diff --git a/packages/docs/.gitignore b/packages/docs/.gitignore deleted file mode 100644 index ddd31cd195e..00000000000 --- a/packages/docs/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -_book/* -command-line-interface/*.bak \ No newline at end of file diff --git a/packages/docs/GLOSSARY.md b/packages/docs/GLOSSARY.md deleted file mode 100644 index 622772fcc70..00000000000 --- a/packages/docs/GLOSSARY.md +++ /dev/null @@ -1,280 +0,0 @@ -# Glossary - -## Account - -Identifies an account on Celo. There are two types of account. **Externally owned accounts** have an associated [CELO](#celo-native-asset) balance and are controlled by a user holding the associated public-private keypair. **Contract accounts** contain the code and data of a single smart contract which can be called and manipulate its own stored data. - -## Address - -A unique identifier for an account on the Celo blockchain. - -## [Alfajores](getting-started/alfajores-testnet.md) - -The first public Celo test network, available for developers to use freely subject to the [Alfajores Testnet Disclaimer](important-information/alfajores-testnet-disclaimer.md). - -## Attestation - -Generally, support for an entity having an associated identity. In Celo, each attestation confirms that an account has access to a message sent to a specific mobile phone number via a specific validator via Celo's decentralized verification process. - -## Attestation Service - -A service operated by validators that sends signed SMS messages in order to allow accounts to prove they have access to a phone number. - -## [Baklava](getting-started/baklava-testnet.md) - -The second public Celo test network, intended for use as a testing ground for protocol changes and validator configurations. It is subject to the [Baklava Testnet Disclaimer](important-information/baklava-testnet-disclaimer.md). - -## Block - -The unit of update to the blockchain. A block consists of a header identifying its position in the chain and other metadata, and a body that contains a list of transactions, and data structures that describe the new state after executing those transactions. - -## Blockchain - -A database maintained by a distributed set of computers that do not share a trust relationship or common ownership. This arrangement is referred to as decentralized. The content of a blockchain's database, or ledger, is authenticated using cryptographic techniques, preventing its contents being added to, edited or removed except according to a protocol operated by the network as a whole. - -## Byzantine Fault Tolerant (BFT) Consensus - -A form of consensus algorithm in which up to a third of participants can be faulty or malicious. - -## cLabs, Celo Labs - -The team that, before mainnet release, has worked closely to develop and shape the Celo protocol and Celo Wallet application with the input of the larger Celo Community. - -## Carbon Offsetting Fund - -An account that receives a transfer as part of epoch rewards to cover the cost of offsetting the carbon generated by the hardware footprint required to operate the Celo network. The account that receives these funds and the amount is determined from time to time by on-chain governance proposal. - -## Celo - -An open platform that makes financial tools accessible to anyone with a mobile phone. - -## CELO - -The ticker symbol for the [Celo native asset](#celo-native-asset), often written in capital letters to avoid confusion with references to the Celo protocol. - -## Celo Foundation - -A mission-driven foundation responsible for education, community engagement, and ecosystem support of the Celo platform. - -## Celo Gold - -The deprecated name for the Celo native asset, which now is referred to simply as "Celo" or preferably "CELO". - -## Celo Native Asset - -The Celo native asset which may be used to take actions on-chain, such as participating in [Governance](#governance). - -## Claim - -Part of the metadata that Celo can associate with an address, a claim is used by an account to assert it has control over a particular off-chain entity (for example, a DNS domain name, an account on a third party service, etc). Claims can only be verified off-chain. - -## Client - -See [Node](#node). - -## Consensus - -An algorithm that enables multiple computers to reach a decision on a single value proposed by one of them, despite network or computer failures. - -## ContractKit - -A library to help developers and operators of Validator nodes interact with the Celo Blockchain and Celo Core Contracts. - -## DApp - -Short for Decentralized Application. An application, usually a mobile application, which to deliver its functionality connects to a decentralized network like Celo, rather than to centralized services in a single organization's data centers. - -## DAppKit - -A lightweight set of functions in the Celo Wallet that allow other mobile DApps to use the Celo Blockchain node bundled with the Celo Wallet to sign transactions and access the user's address. - -## DeFi - -Decentralized Finance; open source software and networks without intermediaries in the financial space. - -## Double Signing - -When a validator signs two different blocks at the same height and with the same parent hash in the blockchain. - -## Epoch - -A fixed number of blocks, configured in the network's genesis block, during which the same validator set is used for consensus. A validator election is carried out after the last block of an epoch, and any resulting changes to the validator set are written into that block's header. - -## Epoch Rewards - -Funds disbursed by the protocol at the end of every epoch as incentives for validators, validator groups, holders of [Locked Gold](#locked-gold) that voted for validator groups that elected one or more validators, the Reserve, the Community Fund, and the Carbon Offsetting Fund. - -## ERC-20 - -A standard interface for implementing tokens as smart contracts. Balances associated with addresses are typically maintained inside the contract's storage. Both [CELO](#celo-native-asset) and Celo Dollars implement the ERC-20 interface. - -## Ethereum - -A project with which the code of the Celo Blockchain has shared ancestry. [Ethereum](https://www.ethereum.org) facilitates building general-purpose decentralized applications. - -## EVM - -The Ethereum Virtual Machine. A runtime environment used by smart contracts on Ethereum and Celo. - -## Full Node - -A computer running the Celo Blockchain software that maintains a full copy of the blockchain locally and, in Celo, receives transaction fees in exchange for servicing light clients. - -## Gas - -A step of execution of a smart contract. Different operations consume different amounts of gas. To prevent denial-of-service attacks, transactions specify a **maximum gas** which bounds the steps of execution before a transaction is reverted. - -## Gas Price - -Determines the unit price for gas, i.e. cost for a transaction to perform one step of execution. This is used to prioritize which transactions the network applies. - -## Gas Price Minimum - -The minimum unit price for gas that the Celo protocol will accept. This value changes from block to block in response to congestion, increasing as more transactions are competing for the limited capacity of the network. A transaction specifying a gas price below the Gas Price Minimum will not be processed until the Gas Price Minimum falls. - -## Genesis block - -The very first block in the blockchain, provided as configuration to Celo Blockchain nodes. - -## Geth - -[go-ethereum](https://github.com/ethereum/go-ethereum), a Golang implementation of the Ethereum protocol from which the Celo Blockchain software is forked. - -## [Governance](celo-codebase/protocol/governance.md) - -A part of Celo that allow the protocol to be upgraded, and other actions to be taken on behalf of the network, by holding a referendum process in which [CELO](#celo-native-asset) holders vote for proposals submitted by the community. - -## Governable - -A smart contract that is owned by the Celo [Governance](celo-codebase/protocol/governance.md) mechanism and so can be changed or updated by an on-chain governance proposal. - -## Group Share - -The proportion of epoch rewards for an elected validator that is passed to the validator group that caused it to be elected. This is a property that can be configured by each group. - -## Header - -See [Block](#block). - -## HSM - -Hardware Security Module. A hardware device that hosts one or more private keys and signs data without passing the key off the device. - -## Key Rotation - -The creation of a new cryptographic key to replace an existing key in active use. - -## [Community Fund](celo-codebase/protocol/proof-of-stake/community-fund.md) - -An account that supports the development and operational costs of the Celo protocol. The Community Fund is maintained by a transfer made as part of Epoch Rewards, and is intended to cover costs beyond the other specific incentives provided to validators and validator groups. Awards can be made through an on-chain governance proposal. - -## Istanbul - -Istanbul, or IBFT, is the original name of the implementation of the Byzantine Fault Tolerant consensus algorithm used by Celo. Istanbul is also the name of a hard fork of the Ethereum network. - -## Light Client - -A device or computer running the Celo Blockchain software that keeps typically only the most recent blockchain state, such that it can send transactions and identify what other data to request as necessary. Every Celo Wallet installation includes a Celo Blockchain light client. - -## [Locked Gold](celo-codebase/protocol/proof-of-stake/locked-gold.md) - -[CELO](#celo-native-asset) balances held in escrow at the Locked Gold contract for the account that deposited it there. This permits that balance to be used for voting in validator elections, governance proposals, and to meet staking requirements for registering a validator or validator group. - -Locked Gold is in the process of being renamed along with other references to [Celo Gold](#celo-gold) (cGLD), which is now referred as [CELO](#celo-native-asset). - -## Mainnet - -The Celo production network. - -## Node - -A running instance of the Celo Blockchain software. This could be configured to run as a Validator, Full Node, or Light Client. Used interchangeably with 'Client'. - -## On-chain - -An interaction that takes place solely through a transaction being executed on the blockchain and updating the state of the ledger. - -## Proof-of-Stake - -The system that determines the participants in a Byzantine Fault Tolerant consensus mechanism. [Celo's Proof-of-Stake mechanism](celo-codebase/protocol/proof-of-stake/README.md) permits accounts to convert units of [CELO](#celo-native-asset) into [Locked Gold](#locked-gold) then vote for Validator Groups, such that an election held at the end of every epoch selects a new set of validators for the following epoch. - -## RC1 - -RC1, which stands for Release Candidate 1, was the first network that had the potential to become the Celo mainnet. It was promoted to Mainnet after the Celo community voted to enable [CELO](#celo-native-asset) transfers on the network on May 18, 2020. - -## Savings Circle - -A common practice in societies without easy access to banking (source); a peer-to-peer savings and loan group. - -## SBAT - -Should Be Able To (Acronym used in GitHub issue title) - -## SNBAT - -Should Not Be Able To (Acronym used in GitHub issue title) - -## Sync - -The process, when a node joins the network, of requesting and receiving block headers so that the node catches up to the network's latest state. - -## SDK - -Software Development Kit. Generally, a suite of developer tools that enable applications to be built on a platform. Celo's SDK currently comprises two components, [DAppKit](developer-resources/dappkit/README.md) and [ContractKit](developer-resources/contractkit/README.md). - -## Slashing - -The reduction in the stake of a validator, a validator group, or both, for a particular action not conducive to the health of the network. - -## Slashing Penalty - -A variable that is tracked for each validator group by the proof-of-stake mechanism that causes rewards to the group, its validators and its voters to be temporarily reduced because of a recent slashing. - -## [Solidity](https://solidity.readthedocs.io/en/v0.5.10/) - -The preferred language for writing Smart Contracts on the Celo platform. - -## Smart Contracts - -Programs that are deployed to a blockchain and execute on its nodes. They operate on data on the blockchain, and on external inputs received in transactions or messages to the blockchain, and may update the state of the blockchain, including account balances. On Celo and Ethereum, smart contracts are written in languages like [Solidity](https://solidity.readthedocs.io/en/v0.5.10/). - -## Stablecoin - -A stablecoin is a type of cryptocurrency whose price tracks an external currency or commodity. - -## Stake - -[Locked Gold](#locked-gold) that a validator or validator group puts at risk at the point of registration. A portion of a stake can be slashed for particular actions not conducive to the health of the network. - -## Testnet - -A test network. Its tokens hold no real world economic value. - -## Transaction - -Requests to make a change to the state of the blockchain. They can: transfer value between accounts; execute a function in a smart contract and pass in arguments \(perhaps causing other smart contracts to be called, update their storage, or transfer value\); or create a new smart contract. - -## Unlocking Period - -The elapsed time between an account requesting an amount of [Locked Gold](#locked-gold) be unlocked and the first point it can be withdrawn. - -## Uptime Score - -A variable that is tracked for each validator by the proof-of-stake mechanism that approximates how regularly that validator participates in consensus. - -## Validator - -Both: the entity in the proof-of-stake mechanism that can be associated with a validator group and subsequently elected; and a running instance of the Celo Blockchain software that is configured and ready (if elected) to participate in the Byzantine Fault Tolerant consensus algorithm to agree new blocks to append to the blockchain ledger. - -## Validator Group - -The entity in the proof-of-stake mechanism that can associate validators, receive votes from holders of [Locked Gold](#locked-gold) and cause those validators to be elected. - -## Validator Set - -The set of elected validators (with respect to a specific epoch) that participate in consensus - -## Wallet - -A DApp that allows a user to manage an account, and usually stores the associated private key. -DApp that allows a user to manage an account, and usually stores the associated private key. diff --git a/packages/docs/README.md b/packages/docs/README.md deleted file mode 100644 index f23bbc78468..00000000000 --- a/packages/docs/README.md +++ /dev/null @@ -1,139 +0,0 @@ -# Welcome - -Welcome to the technical documentation site for the Celo project! - -In this documentation you’ll find information on: - -- An [overview](overview.md) of the high-level architecture of Celo -- Tutorials to get you started with the [Celo SDK](developer-resources/start.md) and the [Celo networks](getting-started/choosing-a-network.md) -- Reference documentation about the [Celo protocol](celo-codebase/protocol/) and [wallet](celo-codebase/wallet/) -- How to make technical [contributions](community/contributing.md) to the project and community - -## Quick Reference - -- CELO Owners - - [Start here](celo-holder-guide/quick-start.md) to find out how to access your account and earn rewards for participating in the network. -- Validator & Node Operators - - Check out the [Validator overview page](validator-guide/overview.md). - - Consider running a node on the [Baklava testnet](getting-started/baklava-testnet.md) before getting started on Mainnet. - - Learn more about running nodes on [Mainnet](getting-started/mainnet.md). -- Developers - - Start at the [developer tools page](developer-resources/overview.md) for help building a DApp or service on the Celo network. -- Integration Guide - - [This section](developer-resources/integrations/integrations.md) includes guides on common ways for integrating Celo into your service. This may be relevant for custodians, exchanges or other services that intend to custody Celo assets like CELO and cUSD. - -### About Celo - -Celo’s purpose is to empower anyone with a smartphone anywhere in the world to have access to financial services, send money to phone numbers, and pay merchants. - -The project aims to be a decentralized platform that is not controlled by any single entity, but instead developed, upgraded and operated by a broad community of individuals, organizations and partners. - -Uniquely, Celo is oriented around providing the simplest possible experience for end users, who may have no familiarity with cryptocurrencies, and may be using low cost devices with limited connectivity. To achieve this, the project takes a full-stack approach, comprising of both a protocol and applications that use that protocol. - -The Celo protocol is an open, distributed cryptographic protocol that allows applications to make transactions with and perform computation on a family of cryptocurrencies, including ones pegged to ‘fiat’ currencies like the US Dollar. The [Celo Wallet](http://celo.org/build/wallet) app, the first of an ecosystem of applications, allows end users to manage accounts and make payments securely and simply by taking advantage of the innovations in the Celo protocol. - -Highlights include: - -- **Stable Value Currencies** - - Celo includes native support for multiple ERC20-like stable currencies pegged to ‘fiat’ currencies like the US dollar, to facilitate the use of Celo as a means of payment. - -- **Accounts Linked to Phone Numbers** - - Celo maintains a secure decentralized mapping of phone numbers that allow wallet users to send and receive payments with their existing contacts simply and with confidence that the payment will reach the intended recipient. - -- **Transaction Fees in Any Currency** - - Users can pay transaction fees in stable currencies, so that they do not need to manage balances of different currencies. - -- **Immediate Syncing Even on Slow Connections** - - Extremely fast, secure synchronization between mobile devices and the Celo network means that even wallet users with high latency, low bandwidth, or high cost data tariffs can use Celo. Celo removes the need to check every header before a received header can be trusted. Performance will be further improved with BLS signature aggregation and succinct zero-knowledge proofs, via zk-SNARKs. - -- **Proof-of-Stake** - - Celo uses a proof-of-stake consensus algorithm. In comparison to Proof of Work systems like Bitcoin and Ethereum, this eliminates the negative environmental impact and means that users can make transactions that are cheaper, faster, and where the outcome cannot be changed once complete. - -- **Full Node Incentives** - - The Celo protocol offers incentives for running full nodes to service the light clients that run on each mobile device. Unlike other proof-of-stake systems, users can still earn cryptocurrency in exchange for providing compute resources without having to stake funds. - -- **On-chain Governance** - - Since great user experiences need constant iteration, Celo supports rapid upgrades and protocol changes via on-chain governance in which all cryptocurrency holders can participate. - -- **Programmable \(Full EVM Compatibility\)** - - Celo includes a programmable smart contract platform that is compatible with the Ethereum Virtual Machine, which is already widely adopted, familiar to developers, and has strong tool support. This enables Celo to deliver rich user features and rapidly support a wide ecosystem of third-party applications and extensions. - -- **Self Custody** - - Users have access to and fully control their funds and account keys, and don't need to depend on third parties to make payments. - -### Current Status - -The Celo project is live on [Mainnet](https://medium.com/celoorg/its-official-celo-mainnet-is-here-6a3a71763f68)! - -The code is entirely open source and available on [GitHub](https://github.com/celo-org). Versions of all the major components of both the protocol and wallet exist, but the platform as a whole is under active development and testing by the Celo community. - -The [Alfajores Testnet](getting-started/alfajores-testnet.md) is the first of several networks designed for testing and for developers to experiment and learn more about Celo. You can set up an account, receive funds, and try out the Celo Wallet and Celo CLI. [Get started here](getting-started/faucet.md). - -{% hint style="warning" %} -The Alfajores Testnet’s tokens hold no real world economic value. The entirety of the testnet’s data will be reset on a regular basis. This will erase your accounts, their balance and your transaction history. Your use of the Alfajores Tesnet is subject to the [Alfajores Testnet Disclaimer](important-information/alfajores-testnet-disclaimer.md). -{% endhint %} - -The [Baklava Testnet](getting-started/baklava-testnet.md) is the second Celo test network after Alfajores. You can use it to participate in the The Great Celo Stake Off. Subject to these Terms and Conditions, eligible participants will have the opportunity to receive CELO at the Mainnet launch of the Celo Protocol. The Stake Off will operate in phases, with each phase focusing on a different part of the protocol or infrastructure to test. - -The Celo community's work is focused on the path to a production Celo network that holds economic value. This means testing, running security audits, and building broader involvement around a longer-term roadmap. The project also continues to remain focused on user experience. - -The team working on Celo anticipates working to improve and expand the range of APIs available for developers to use in creating extensions to Celo, whether as smart contracts or applications. Your input is very welcome in the form of use cases, suggestions, and bug reports. - -{% hint style="warning" %} -While development proceeds, Celo’s protocol and its APIs will evolve and any smart contracts or applications built to operate on Alfajores or with respect to the current codebase may become incompatible. -{% endhint %} - -Celo is a project with a mission of financial inclusion that consists entirely of open source code, is deployed as an open, decentralized runtime, and promotes open governance. Make it your project too. Please [get involved](community/contributing.md)! - -### Useful Links - -Learn more about Celo: - -- [Overview of Celo’s architecture ](overview.md) -- [Technical blog posts](https://medium.com/celoorg/technology/home) - -Browse the code, raise an issue, or contribute a PR: - -- [Monorepo GitHub Page](https://github.com/celo-org/celo-monorepo) -- [Celo Client GitHub Page](https://github.com/celo-org/celo-blockchain) -- [Contributing Guide](community/contributing.md) -- [Celo Build Page](https://celo.org/build) - -Try Celo out: - -- [Using the Mobile Wallet](getting-started/using-the-mobile-wallet.md) on the Alfajores Testnet -- [Introduction to the CLI ](command-line-interface/introduction.md)on the Alfajores Testnet - -Read the Whitepapers: - -- [Main Celo Whitepaper](https://celo.org/papers/whitepaper) and [introductory blog post](https://medium.com/celohq/a-look-at-the-celo-whitepaper-c0061118ffd4) -- [Stability Analysis Whitepaper](https://celo.org/papers/Celo_Stability_Analysis.pdf) and [blog post](https://medium.com/celohq/a-look-at-the-celo-stability-analysis-white-paper-part-1-23edd5ef8b5) -- [BFTree \(Longer Term Consensus Plan\)](https://storage.googleapis.com/celo_whitepapers/BFTree%20-%20Scaling%20HotStuff%20to%20Millions%20of%20Validators.pdf) - -Alfajores Testnet links: - -- [Alfajores Testnet Faucet](https://celo.org/build/faucet) - get testnet tokens to experiment with -- [Celo Wallet for Alfajores](https://celo.org/build/wallet) - download the Android wallet app for the testnet from the Play Store -- [Alfajores Testnet Network Status](https://alfajores-celostats.celo-testnet.org) - to check the current availability of the testnet -- [Alfajores Testnet Block Explorer](https://alfajores-blockscout.celo-testnet.org) - explore the history of the blockchain and view transaction details - -Ask questions, find answers, and get in touch: - -- [Celo Forum](https://forum.celo.org) -- [Celo Developer Chat on Discord](https://chat.celo.org) -- [Celo Subreddit](https://www.reddit.com/r/celo/) -- [Celo Website](https://celo.org/build) -- [Host a Meetup](https://airtable.com/shrTCM7LddTxOm3r6) - -### Notes - -If you are viewing this document on GitHub, please visit the [official hosted version](https://docs.celo.org) of this content for a better experience. Additionally, Celo is in active development. If you encounter any issues or bugs or have suggestions for how Celo can improve, please post an issue or pull request [here](https://github.com/celo-org/celo-monorepo). diff --git a/packages/docs/SUMMARY.md b/packages/docs/SUMMARY.md deleted file mode 100644 index e1c03b2ca3a..00000000000 --- a/packages/docs/SUMMARY.md +++ /dev/null @@ -1,987 +0,0 @@ -# Table of contents - -- [Welcome](README.md) -- [Celo Overview](overview.md) - -## Getting Started - -- [Choosing a Network](getting-started/choosing-a-network.md) -- [Wallets](getting-started/wallets.md) - - [Using MetaMask with Celo](getting-started/using-metamask-with-celo/README.md) - - [Manual Setup](getting-started/using-metamask-with-celo/manual-setup.md) - - [Programmatic Setup](getting-started/using-metamask-with-celo/programmatic-setup.md) - - [Using a Ledger with MetaMask](getting-started/using-metamask-with-celo/using-a-ledger-with-metamask.md) -- [Mainnet](getting-started/mainnet.md) - - [Running a Validator](getting-started/running-a-validator-in-mainnet.md) - - [Running a Full Node](getting-started/running-a-full-node-in-mainnet.md) -- [Baklava Testnet](getting-started/baklava-testnet.md) - - [Running a Validator](getting-started/running-a-validator-in-baklava.md) - - [Running a Full Node](getting-started/running-a-full-node-in-baklava.md) -- [Alfajores Testnet](getting-started/alfajores-testnet.md) - - [Using the Mobile Wallet](getting-started/using-the-mobile-wallet.md) - - [Getting an Account and Funds](getting-started/faucet.md) - - [Running a Full Node](getting-started/running-a-full-node-in-alfajores.md) -- [Hosted nodes](getting-started/hosted-nodes.md) -- [Validator Setup FAQ](getting-started/validator-troubleshooting-faq.md) -- [Glossary](GLOSSARY.md) - -## CELO Owner Guide - -- [Quick Start](celo-holder-guide/quick-start.md) -- [cUSD Owner Guide](celo-holder-guide/cusd.md) -- [Using a Ledger Wallet](celo-holder-guide/ledger.md) -- [Understanding ReleaseGold](celo-holder-guide/release-gold.md) -- [Voting for Validator Groups](celo-holder-guide/voting-validators.md) -- [Voting on Governance](celo-holder-guide/voting-governance.md) -- [Governance Cheat Sheet](celo-holder-guide/governance-cheat-sheet.md) -- [Recovering CELO from an Ethereum Address](celo-holder-guide/eth-recovery.md) -- [Recovering ETH from a Celo Address](celo-holder-guide/celo-recovery.md) - -## Validator Guide - -- [Overview](validator-guide/overview.md) -- [Attestation Service](validator-guide/attestation-service.md) -- [Key Management](validator-guide/key-management/summary.md) - - [Detailed Role Descriptions](validator-guide/key-management/detailed.md) - - [Validator Signer Key Rotation](validator-guide/key-management/key-rotation.md) -- [Securing Celo Nodes and Services](validator-guide/securing-nodes-and-services.md) -- [Monitoring](validator-guide/monitoring.md) -- [Devops Best Practices](validator-guide/devops-best-practices.md) -- [Upgrading a Node](validator-guide/node-upgrades.md) -- [Running Proxies](validator-guide/proxy.md) -- [Validator Explorer](validator-guide/validator-explorer.md) -- [Celo Foundation Voting Policy](validator-guide/celo-foundation-voting-policy.md) -- [Celo Signal](validator-guide/celo-signal.md) - -## Developer Guide - -- [Overview](developer-resources/overview.md) -- [Code Examples](developer-resources/start.md) - - [Sending CELO & cUSD](developer-resources/walkthroughs/hellocelo.md) - - [Deploy a Contract (local node)](developer-resources/walkthroughs/hellocontracts.md) - - [Deploy and Interact with Contracts (Remotely)](developer-resources/walkthroughs/hello-contract-remote-node.md) - - [DappKit Truffle Box](developer-resources/walkthroughs/hello-mobile-dapp.md) - - [Using Windows](developer-resources/develop-on-windows.md) - - [React based DApp](developer-resources/walkthroughs/web-dapp.md) - - [WalletConnect](developer-resources/walkthroughs/wallet-connect.md) - - [Using Keystores](developer-resources/walkthroughs/using-js-keystores.md) - - - -- [ContractKit](developer-resources/contractkit/README.md) - - [Setup](developer-resources/contractkit/setup.md) - - [Using the kit](developer-resources/contractkit/usage.md) - - [Using Web3 from the Kit](developer-resources/contractkit/notes-web3-with-contractkit.md) - - [Celo Core Contracts. Wrappers / Registry](developer-resources/contractkit/contracts-wrappers-registry.md) - - [Querying on-chain identifiers with ODIS](developer-resources/contractkit/odis.md) - - [Migrating to ContractKit v1.0](developer-resources/contractkit/migrating-to-contractkit-v1.md) - - -- [DAppKit](developer-resources/dappkit/README.md) - - - [Setup](developer-resources/dappkit/setup.md) - - - [Usage](developer-resources/dappkit/usage.md) - -- [Forno](developer-resources/forno/README.md) -- [Local Development Chain w/ Protocol Contracts](developer-resources/walkthroughs/development-chain.md) -- [Celo for Ethereum Developers](developer-resources/celo-for-eth-devs.md) -- [Celo DApp Gallery](developer-resources/celo-dapp-gallery.md) -- [Integrations](developer-resources/integrations/integrations.md) - - [General](developer-resources/integrations/general.md) - - [Checklist](developer-resources/integrations/checklist.md) - - [Custody](developer-resources/integrations/custody.md) - - [Listings](developer-resources/integrations/listings.md) - - [Using a Cloud HSM](developer-resources/integrations/cloud-hsm.md) -- SDK Code Reference - - [Base](developer-resources/base/reference/SUMMARY.md) - - - [Globals](developer-resources/base/reference/globals.md) - - [Modules]() - - [account](developer-resources/base/reference/modules/_account_.md) - - [MnemonicLanguages](developer-resources/base/reference/enums/_account_.mnemoniclanguages.md) - - [MnemonicStrength](developer-resources/base/reference/enums/_account_.mnemonicstrength.md) - - [Bip39](developer-resources/base/reference/interfaces/_account_.bip39.md) - - [address](developer-resources/base/reference/modules/_address_.md) - - [async](developer-resources/base/reference/modules/_async_.md) - - [attestations](developer-resources/base/reference/modules/_attestations_.md) - - [IdentifierType](developer-resources/base/reference/enums/_attestations_.identifiertype.md) - - [AttestationsStatus](developer-resources/base/reference/interfaces/_attestations_.attestationsstatus.md) - - [collections](developer-resources/base/reference/modules/_collections_.md) - - [AddressListItem](developer-resources/base/reference/interfaces/_collections_.addresslistitem.md) - - [contacts](developer-resources/base/reference/modules/_contacts_.md) - - [ContactPhoneNumber](developer-resources/base/reference/interfaces/_contacts_.contactphonenumber.md) - - [MinimalContact](developer-resources/base/reference/interfaces/_contacts_.minimalcontact.md) - - [currencies](developer-resources/base/reference/modules/_currencies_.md) - - [CURRENCY_ENUM](developer-resources/base/reference/enums/_currencies_.currency_enum.md) - - [SHORT_CURRENCIES](developer-resources/base/reference/enums/_currencies_.short_currencies.md) - - [displayFormatting](developer-resources/base/reference/modules/_displayformatting_.md) - - [future](developer-resources/base/reference/modules/_future_.md) - - [Future](developer-resources/base/reference/classes/_future_.future.md) - - [inputValidation](developer-resources/base/reference/modules/_inputvalidation_.md) - - [ValidatorKind](developer-resources/base/reference/enums/_inputvalidation_.validatorkind.md) - - [BaseProps](developer-resources/base/reference/interfaces/_inputvalidation_.baseprops.md) - - [io](developer-resources/base/reference/modules/_io_.md) - - [lock](developer-resources/base/reference/modules/_lock_.md) - - [Lock](developer-resources/base/reference/classes/_lock_.lock.md) - - [logger](developer-resources/base/reference/modules/_logger_.md) - - [parsing](developer-resources/base/reference/modules/_parsing_.md) - - [phoneNumbers](developer-resources/base/reference/modules/_phonenumbers_.md) - - [ParsedPhoneNumber](developer-resources/base/reference/interfaces/_phonenumbers_.parsedphonenumber.md) - - [result](developer-resources/base/reference/modules/_result_.md) - - [JSONParseError](developer-resources/base/reference/classes/_result_.jsonparseerror.md) - - [RootError](developer-resources/base/reference/classes/_result_.rooterror.md) - - [BaseError](developer-resources/base/reference/interfaces/_result_.baseerror.md) - - [ErrorResult](developer-resources/base/reference/interfaces/_result_.errorresult.md) - - [OkResult](developer-resources/base/reference/interfaces/_result_.okresult.md) - - [signatureUtils](developer-resources/base/reference/modules/_signatureutils_.md) - - [Signature](developer-resources/base/reference/interfaces/_signatureutils_.signature.md) - - [Signer](developer-resources/base/reference/interfaces/_signatureutils_.signer.md) - - [string](developer-resources/base/reference/modules/_string_.md) - - [task](developer-resources/base/reference/modules/_task_.md) - - [RepeatTaskContext](developer-resources/base/reference/interfaces/_task_.repeattaskcontext.md) - - [RetryTaskOptions](developer-resources/base/reference/interfaces/_task_.retrytaskoptions.md) - - [RunningTask](developer-resources/base/reference/interfaces/_task_.runningtask.md) - - [RunningTaskWithValue](developer-resources/base/reference/interfaces/_task_.runningtaskwithvalue.md) - - [TaskOptions](developer-resources/base/reference/interfaces/_task_.taskoptions.md) - - [Classes]() - - [Future](developer-resources/base/reference/classes/_future_.future.md) - - [Lock](developer-resources/base/reference/classes/_lock_.lock.md) - - [JSONParseError](developer-resources/base/reference/classes/_result_.jsonparseerror.md) - - [RootError](developer-resources/base/reference/classes/_result_.rooterror.md) - - [Enums]() - - [MnemonicLanguages](developer-resources/base/reference/enums/_account_.mnemoniclanguages.md) - - [MnemonicStrength](developer-resources/base/reference/enums/_account_.mnemonicstrength.md) - - [IdentifierType](developer-resources/base/reference/enums/_attestations_.identifiertype.md) - - [CURRENCY_ENUM](developer-resources/base/reference/enums/_currencies_.currency_enum.md) - - [SHORT_CURRENCIES](developer-resources/base/reference/enums/_currencies_.short_currencies.md) - - [ValidatorKind](developer-resources/base/reference/enums/_inputvalidation_.validatorkind.md) - - [Interfaces]() - - [Bip39](developer-resources/base/reference/interfaces/_account_.bip39.md) - - [AttestationsStatus](developer-resources/base/reference/interfaces/_attestations_.attestationsstatus.md) - - [AddressListItem](developer-resources/base/reference/interfaces/_collections_.addresslistitem.md) - - [ContactPhoneNumber](developer-resources/base/reference/interfaces/_contacts_.contactphonenumber.md) - - [MinimalContact](developer-resources/base/reference/interfaces/_contacts_.minimalcontact.md) - - [BaseProps](developer-resources/base/reference/interfaces/_inputvalidation_.baseprops.md) - - [ParsedPhoneNumber](developer-resources/base/reference/interfaces/_phonenumbers_.parsedphonenumber.md) - - [BaseError](developer-resources/base/reference/interfaces/_result_.baseerror.md) - - [ErrorResult](developer-resources/base/reference/interfaces/_result_.errorresult.md) - - [OkResult](developer-resources/base/reference/interfaces/_result_.okresult.md) - - [Signature](developer-resources/base/reference/interfaces/_signatureutils_.signature.md) - - [Signer](developer-resources/base/reference/interfaces/_signatureutils_.signer.md) - - [RepeatTaskContext](developer-resources/base/reference/interfaces/_task_.repeattaskcontext.md) - - [RetryTaskOptions](developer-resources/base/reference/interfaces/_task_.retrytaskoptions.md) - - [RunningTask](developer-resources/base/reference/interfaces/_task_.runningtask.md) - - [RunningTaskWithValue](developer-resources/base/reference/interfaces/_task_.runningtaskwithvalue.md) - - [TaskOptions](developer-resources/base/reference/interfaces/_task_.taskoptions.md) - - - - [Connect](developer-resources/connect/reference/SUMMARY.md) - - - [Globals](developer-resources/connect/reference/globals.md) - - [Modules]() - - [abi-types](developer-resources/connect/reference/modules/_abi_types_.md) - - [ABIDefinition](developer-resources/connect/reference/interfaces/_abi_types_.abidefinition.md) - - [AbiCoder](developer-resources/connect/reference/interfaces/_abi_types_.abicoder.md) - - [DecodedParamsArray](developer-resources/connect/reference/interfaces/_abi_types_.decodedparamsarray.md) - - [DecodedParamsObject](developer-resources/connect/reference/interfaces/_abi_types_.decodedparamsobject.md) - - [celo-provider](developer-resources/connect/reference/modules/_celo_provider_.md) - - [CeloProvider](developer-resources/connect/reference/classes/_celo_provider_.celoprovider.md) - - [connection](developer-resources/connect/reference/modules/_connection_.md) - - [Connection](developer-resources/connect/reference/classes/_connection_.connection.md) - - [ConnectionOptions](developer-resources/connect/reference/interfaces/_connection_.connectionoptions.md) - - [types](developer-resources/connect/reference/modules/_types_.md) - - [CeloParams](developer-resources/connect/reference/interfaces/_types_.celoparams.md) - - [CeloTxObject](developer-resources/connect/reference/interfaces/_types_.celotxobject.md) - - [EncodedTransaction](developer-resources/connect/reference/interfaces/_types_.encodedtransaction.md) - - [JsonRpcPayload](developer-resources/connect/reference/interfaces/_types_.jsonrpcpayload.md) - - [JsonRpcResponse](developer-resources/connect/reference/interfaces/_types_.jsonrpcresponse.md) - - [Provider](developer-resources/connect/reference/interfaces/_types_.provider.md) - - [RLPEncodedTx](developer-resources/connect/reference/interfaces/_types_.rlpencodedtx.md) - - [utils/abi-utils](developer-resources/connect/reference/modules/_utils_abi_utils_.md) - - [utils/celo-transaction-object](developer-resources/connect/reference/modules/_utils_celo_transaction_object_.md) - - [CeloTransactionObject](developer-resources/connect/reference/classes/_utils_celo_transaction_object_.celotransactionobject.md) - - [utils/formatter](developer-resources/connect/reference/modules/_utils_formatter_.md) - - [utils/provider-utils](developer-resources/connect/reference/modules/_utils_provider_utils_.md) - - [utils/rpc-caller](developer-resources/connect/reference/modules/_utils_rpc_caller_.md) - - [DefaultRpcCaller](developer-resources/connect/reference/classes/_utils_rpc_caller_.defaultrpccaller.md) - - [RpcCaller](developer-resources/connect/reference/interfaces/_utils_rpc_caller_.rpccaller.md) - - [utils/tx-params-normalizer](developer-resources/connect/reference/modules/_utils_tx_params_normalizer_.md) - - [TxParamsNormalizer](developer-resources/connect/reference/classes/_utils_tx_params_normalizer_.txparamsnormalizer.md) - - [utils/tx-result](developer-resources/connect/reference/modules/_utils_tx_result_.md) - - [TransactionResult](developer-resources/connect/reference/classes/_utils_tx_result_.transactionresult.md) - - [wallet](developer-resources/connect/reference/modules/_wallet_.md) - - [ReadOnlyWallet](developer-resources/connect/reference/interfaces/_wallet_.readonlywallet.md) - - [Signer](developer-resources/connect/reference/interfaces/_wallet_.signer.md) - - [Classes]() - - [CeloProvider](developer-resources/connect/reference/classes/_celo_provider_.celoprovider.md) - - [Connection](developer-resources/connect/reference/classes/_connection_.connection.md) - - [CeloTransactionObject](developer-resources/connect/reference/classes/_utils_celo_transaction_object_.celotransactionobject.md) - - [DefaultRpcCaller](developer-resources/connect/reference/classes/_utils_rpc_caller_.defaultrpccaller.md) - - [TxParamsNormalizer](developer-resources/connect/reference/classes/_utils_tx_params_normalizer_.txparamsnormalizer.md) - - [TransactionResult](developer-resources/connect/reference/classes/_utils_tx_result_.transactionresult.md) - - [Interfaces]() - - [ABIDefinition](developer-resources/connect/reference/interfaces/_abi_types_.abidefinition.md) - - [AbiCoder](developer-resources/connect/reference/interfaces/_abi_types_.abicoder.md) - - [DecodedParamsArray](developer-resources/connect/reference/interfaces/_abi_types_.decodedparamsarray.md) - - [DecodedParamsObject](developer-resources/connect/reference/interfaces/_abi_types_.decodedparamsobject.md) - - [ConnectionOptions](developer-resources/connect/reference/interfaces/_connection_.connectionoptions.md) - - [CeloParams](developer-resources/connect/reference/interfaces/_types_.celoparams.md) - - [CeloTxObject](developer-resources/connect/reference/interfaces/_types_.celotxobject.md) - - [EncodedTransaction](developer-resources/connect/reference/interfaces/_types_.encodedtransaction.md) - - [JsonRpcPayload](developer-resources/connect/reference/interfaces/_types_.jsonrpcpayload.md) - - [JsonRpcResponse](developer-resources/connect/reference/interfaces/_types_.jsonrpcresponse.md) - - [Provider](developer-resources/connect/reference/interfaces/_types_.provider.md) - - [RLPEncodedTx](developer-resources/connect/reference/interfaces/_types_.rlpencodedtx.md) - - [RpcCaller](developer-resources/connect/reference/interfaces/_utils_rpc_caller_.rpccaller.md) - - [ReadOnlyWallet](developer-resources/connect/reference/interfaces/_wallet_.readonlywallet.md) - - [Signer](developer-resources/connect/reference/interfaces/_wallet_.signer.md) - - - - [ContractKit](developer-resources/contractkit/reference/SUMMARY.md) - - - [Globals](developer-resources/contractkit/reference/globals.md) - - [Modules]() - - [address-registry](developer-resources/contractkit/reference/modules/_address_registry_.md) - - [AddressRegistry](developer-resources/contractkit/reference/classes/_address_registry_.addressregistry.md) - - [base](developer-resources/contractkit/reference/modules/_base_.md) - - [CeloContract](developer-resources/contractkit/reference/enums/_base_.celocontract.md) - - [contract-cache](developer-resources/contractkit/reference/modules/_contract_cache_.md) - - [WrapperCache](developer-resources/contractkit/reference/classes/_contract_cache_.wrappercache.md) - - [identity/claims/account](developer-resources/contractkit/reference/modules/_identity_claims_account_.md) - - [identity/claims/attestation-service-url](developer-resources/contractkit/reference/modules/_identity_claims_attestation_service_url_.md) - - [identity/claims/claim](developer-resources/contractkit/reference/modules/_identity_claims_claim_.md) - - [identity/claims/keybase](developer-resources/contractkit/reference/modules/_identity_claims_keybase_.md) - - [identity/claims/types](developer-resources/contractkit/reference/modules/_identity_claims_types_.md) - - [ClaimTypes](developer-resources/contractkit/reference/enums/_identity_claims_types_.claimtypes.md) - - [identity/claims/verify](developer-resources/contractkit/reference/modules/_identity_claims_verify_.md) - - [identity/metadata](developer-resources/contractkit/reference/modules/_identity_metadata_.md) - - [IdentityMetadataWrapper](developer-resources/contractkit/reference/classes/_identity_metadata_.identitymetadatawrapper.md) - - [kit](developer-resources/contractkit/reference/modules/_kit_.md) - - [ContractKit](developer-resources/contractkit/reference/classes/_kit_.contractkit.md) - - [NetworkConfig](developer-resources/contractkit/reference/interfaces/_kit_.networkconfig.md) - - [proxy](developer-resources/contractkit/reference/modules/_proxy_.md) - - [test-utils/PromiEventStub](developer-resources/contractkit/reference/modules/_test_utils_promieventstub_.md) - - [test-utils/setup.global](developer-resources/contractkit/reference/modules/_test_utils_setup_global_.md) - - [test-utils/teardown.global](developer-resources/contractkit/reference/modules/_test_utils_teardown_global_.md) - - [web3-contract-cache](developer-resources/contractkit/reference/modules/_web3_contract_cache_.md) - - [Web3ContractCache](developer-resources/contractkit/reference/classes/_web3_contract_cache_.web3contractcache.md) - - [wrappers/Accounts](developer-resources/contractkit/reference/modules/_wrappers_accounts_.md) - - [AccountsWrapper](developer-resources/contractkit/reference/classes/_wrappers_accounts_.accountswrapper.md) - - [wrappers/Attestations](developer-resources/contractkit/reference/modules/_wrappers_attestations_.md) - - [AttestationServiceStatusState](developer-resources/contractkit/reference/enums/_wrappers_attestations_.attestationservicestatusstate.md) - - [AttestationState](developer-resources/contractkit/reference/enums/_wrappers_attestations_.attestationstate.md) - - [AttestationsWrapper](developer-resources/contractkit/reference/classes/_wrappers_attestations_.attestationswrapper.md) - - [ActionableAttestation](developer-resources/contractkit/reference/interfaces/_wrappers_attestations_.actionableattestation.md) - - [AttestationServiceStatusResponse](developer-resources/contractkit/reference/interfaces/_wrappers_attestations_.attestationservicestatusresponse.md) - - [AttestationStat](developer-resources/contractkit/reference/interfaces/_wrappers_attestations_.attestationstat.md) - - [AttestationStateForIssuer](developer-resources/contractkit/reference/interfaces/_wrappers_attestations_.attestationstateforissuer.md) - - [AttestationsConfig](developer-resources/contractkit/reference/interfaces/_wrappers_attestations_.attestationsconfig.md) - - [AttestationsToken](developer-resources/contractkit/reference/interfaces/_wrappers_attestations_.attestationstoken.md) - - [UnselectedRequest](developer-resources/contractkit/reference/interfaces/_wrappers_attestations_.unselectedrequest.md) - - [wrappers/BaseSlasher](developer-resources/contractkit/reference/modules/_wrappers_baseslasher_.md) - - [BaseSlasher](developer-resources/contractkit/reference/classes/_wrappers_baseslasher_.baseslasher.md) - - [wrappers/BaseWrapper](developer-resources/contractkit/reference/modules/_wrappers_basewrapper_.md) - - [BaseWrapper](developer-resources/contractkit/reference/classes/_wrappers_basewrapper_.basewrapper.md) - - [wrappers/BlockchainParameters](developer-resources/contractkit/reference/modules/_wrappers_blockchainparameters_.md) - - [BlockchainParametersWrapper](developer-resources/contractkit/reference/classes/_wrappers_blockchainparameters_.blockchainparameterswrapper.md) - - [BlockchainParametersConfig](developer-resources/contractkit/reference/interfaces/_wrappers_blockchainparameters_.blockchainparametersconfig.md) - - [ClientVersion](developer-resources/contractkit/reference/interfaces/_wrappers_blockchainparameters_.clientversion.md) - - [wrappers/DoubleSigningSlasher](developer-resources/contractkit/reference/modules/_wrappers_doublesigningslasher_.md) - - [DoubleSigningSlasherWrapper](developer-resources/contractkit/reference/classes/_wrappers_doublesigningslasher_.doublesigningslasherwrapper.md) - - [wrappers/DowntimeSlasher](developer-resources/contractkit/reference/modules/_wrappers_downtimeslasher_.md) - - [DowntimeSlasherWrapper](developer-resources/contractkit/reference/classes/_wrappers_downtimeslasher_.downtimeslasherwrapper.md) - - [DowntimeSlasherConfig](developer-resources/contractkit/reference/interfaces/_wrappers_downtimeslasher_.downtimeslasherconfig.md) - - [Interval](developer-resources/contractkit/reference/interfaces/_wrappers_downtimeslasher_.interval.md) - - [wrappers/Election](developer-resources/contractkit/reference/modules/_wrappers_election_.md) - - [ElectionWrapper](developer-resources/contractkit/reference/classes/_wrappers_election_.electionwrapper.md) - - [ElectableValidators](developer-resources/contractkit/reference/interfaces/_wrappers_election_.electablevalidators.md) - - [ElectionConfig](developer-resources/contractkit/reference/interfaces/_wrappers_election_.electionconfig.md) - - [GroupVote](developer-resources/contractkit/reference/interfaces/_wrappers_election_.groupvote.md) - - [GroupVoterReward](developer-resources/contractkit/reference/interfaces/_wrappers_election_.groupvoterreward.md) - - [ValidatorGroupVote](developer-resources/contractkit/reference/interfaces/_wrappers_election_.validatorgroupvote.md) - - [Voter](developer-resources/contractkit/reference/interfaces/_wrappers_election_.voter.md) - - [VoterReward](developer-resources/contractkit/reference/interfaces/_wrappers_election_.voterreward.md) - - [wrappers/Escrow](developer-resources/contractkit/reference/modules/_wrappers_escrow_.md) - - [EscrowWrapper](developer-resources/contractkit/reference/classes/_wrappers_escrow_.escrowwrapper.md) - - [wrappers/Exchange](developer-resources/contractkit/reference/modules/_wrappers_exchange_.md) - - [ExchangeWrapper](developer-resources/contractkit/reference/classes/_wrappers_exchange_.exchangewrapper.md) - - [ExchangeConfig](developer-resources/contractkit/reference/interfaces/_wrappers_exchange_.exchangeconfig.md) - - [wrappers/Freezer](developer-resources/contractkit/reference/modules/_wrappers_freezer_.md) - - [FreezerWrapper](developer-resources/contractkit/reference/classes/_wrappers_freezer_.freezerwrapper.md) - - [wrappers/GasPriceMinimum](developer-resources/contractkit/reference/modules/_wrappers_gaspriceminimum_.md) - - [GasPriceMinimumWrapper](developer-resources/contractkit/reference/classes/_wrappers_gaspriceminimum_.gaspriceminimumwrapper.md) - - [GasPriceMinimumConfig](developer-resources/contractkit/reference/interfaces/_wrappers_gaspriceminimum_.gaspriceminimumconfig.md) - - [wrappers/GoldTokenWrapper](developer-resources/contractkit/reference/modules/_wrappers_goldtokenwrapper_.md) - - [GoldTokenWrapper](developer-resources/contractkit/reference/classes/_wrappers_goldtokenwrapper_.goldtokenwrapper.md) - - [wrappers/Governance](developer-resources/contractkit/reference/modules/_wrappers_governance_.md) - - [ProposalStage](developer-resources/contractkit/reference/enums/_wrappers_governance_.proposalstage.md) - - [VoteValue](developer-resources/contractkit/reference/enums/_wrappers_governance_.votevalue.md) - - [GovernanceWrapper](developer-resources/contractkit/reference/classes/_wrappers_governance_.governancewrapper.md) - - [GovernanceConfig](developer-resources/contractkit/reference/interfaces/_wrappers_governance_.governanceconfig.md) - - [HotfixRecord](developer-resources/contractkit/reference/interfaces/_wrappers_governance_.hotfixrecord.md) - - [ParticipationParameters](developer-resources/contractkit/reference/interfaces/_wrappers_governance_.participationparameters.md) - - [ProposalMetadata](developer-resources/contractkit/reference/interfaces/_wrappers_governance_.proposalmetadata.md) - - [ProposalRecord](developer-resources/contractkit/reference/interfaces/_wrappers_governance_.proposalrecord.md) - - [ProposalStageDurations](developer-resources/contractkit/reference/interfaces/_wrappers_governance_.proposalstagedurations.md) - - [UpvoteRecord](developer-resources/contractkit/reference/interfaces/_wrappers_governance_.upvoterecord.md) - - [VoteRecord](developer-resources/contractkit/reference/interfaces/_wrappers_governance_.voterecord.md) - - [Voter](developer-resources/contractkit/reference/interfaces/_wrappers_governance_.voter.md) - - [Votes](developer-resources/contractkit/reference/interfaces/_wrappers_governance_.votes.md) - - [wrappers/LockedGold](developer-resources/contractkit/reference/modules/_wrappers_lockedgold_.md) - - [LockedGoldWrapper](developer-resources/contractkit/reference/classes/_wrappers_lockedgold_.lockedgoldwrapper.md) - - [AccountSlashed](developer-resources/contractkit/reference/interfaces/_wrappers_lockedgold_.accountslashed.md) - - [LockedGoldConfig](developer-resources/contractkit/reference/interfaces/_wrappers_lockedgold_.lockedgoldconfig.md) - - [PendingWithdrawal](developer-resources/contractkit/reference/interfaces/_wrappers_lockedgold_.pendingwithdrawal.md) - - [VotingDetails](developer-resources/contractkit/reference/interfaces/_wrappers_lockedgold_.votingdetails.md) - - [wrappers/MetaTransactionWallet](developer-resources/contractkit/reference/modules/_wrappers_metatransactionwallet_.md) - - [MetaTransactionWalletWrapper](developer-resources/contractkit/reference/classes/_wrappers_metatransactionwallet_.metatransactionwalletwrapper.md) - - [RawTransaction](developer-resources/contractkit/reference/interfaces/_wrappers_metatransactionwallet_.rawtransaction.md) - - [TransactionObjectWithValue](developer-resources/contractkit/reference/interfaces/_wrappers_metatransactionwallet_.transactionobjectwithvalue.md) - - [wrappers/MetaTransactionWalletDeployer](developer-resources/contractkit/reference/modules/_wrappers_metatransactionwalletdeployer_.md) - - [MetaTransactionWalletDeployerWrapper](developer-resources/contractkit/reference/classes/_wrappers_metatransactionwalletdeployer_.metatransactionwalletdeployerwrapper.md) - - [wrappers/MultiSig](developer-resources/contractkit/reference/modules/_wrappers_multisig_.md) - - [MultiSigWrapper](developer-resources/contractkit/reference/classes/_wrappers_multisig_.multisigwrapper.md) - - [TransactionData](developer-resources/contractkit/reference/interfaces/_wrappers_multisig_.transactiondata.md) - - [wrappers/ReleaseGold](developer-resources/contractkit/reference/modules/_wrappers_releasegold_.md) - - [ReleaseGoldWrapper](developer-resources/contractkit/reference/classes/_wrappers_releasegold_.releasegoldwrapper.md) - - [BalanceState](developer-resources/contractkit/reference/interfaces/_wrappers_releasegold_.balancestate.md) - - [ReleaseGoldInfo](developer-resources/contractkit/reference/interfaces/_wrappers_releasegold_.releasegoldinfo.md) - - [wrappers/Reserve](developer-resources/contractkit/reference/modules/_wrappers_reserve_.md) - - [ReserveWrapper](developer-resources/contractkit/reference/classes/_wrappers_reserve_.reservewrapper.md) - - [ReserveConfig](developer-resources/contractkit/reference/interfaces/_wrappers_reserve_.reserveconfig.md) - - [wrappers/SortedOracles](developer-resources/contractkit/reference/modules/_wrappers_sortedoracles_.md) - - [MedianRelation](developer-resources/contractkit/reference/enums/_wrappers_sortedoracles_.medianrelation.md) - - [SortedOraclesWrapper](developer-resources/contractkit/reference/classes/_wrappers_sortedoracles_.sortedoracleswrapper.md) - - [MedianRate](developer-resources/contractkit/reference/interfaces/_wrappers_sortedoracles_.medianrate.md) - - [OracleRate](developer-resources/contractkit/reference/interfaces/_wrappers_sortedoracles_.oraclerate.md) - - [OracleReport](developer-resources/contractkit/reference/interfaces/_wrappers_sortedoracles_.oraclereport.md) - - [OracleTimestamp](developer-resources/contractkit/reference/interfaces/_wrappers_sortedoracles_.oracletimestamp.md) - - [SortedOraclesConfig](developer-resources/contractkit/reference/interfaces/_wrappers_sortedoracles_.sortedoraclesconfig.md) - - [wrappers/StableTokenWrapper](developer-resources/contractkit/reference/modules/_wrappers_stabletokenwrapper_.md) - - [StableTokenWrapper](developer-resources/contractkit/reference/classes/_wrappers_stabletokenwrapper_.stabletokenwrapper.md) - - [InflationParameters](developer-resources/contractkit/reference/interfaces/_wrappers_stabletokenwrapper_.inflationparameters.md) - - [StableTokenConfig](developer-resources/contractkit/reference/interfaces/_wrappers_stabletokenwrapper_.stabletokenconfig.md) - - [wrappers/Validators](developer-resources/contractkit/reference/modules/_wrappers_validators_.md) - - [ValidatorsWrapper](developer-resources/contractkit/reference/classes/_wrappers_validators_.validatorswrapper.md) - - [GroupMembership](developer-resources/contractkit/reference/interfaces/_wrappers_validators_.groupmembership.md) - - [LockedGoldRequirements](developer-resources/contractkit/reference/interfaces/_wrappers_validators_.lockedgoldrequirements.md) - - [MembershipHistoryExtraData](developer-resources/contractkit/reference/interfaces/_wrappers_validators_.membershiphistoryextradata.md) - - [Validator](developer-resources/contractkit/reference/interfaces/_wrappers_validators_.validator.md) - - [ValidatorGroup](developer-resources/contractkit/reference/interfaces/_wrappers_validators_.validatorgroup.md) - - [ValidatorReward](developer-resources/contractkit/reference/interfaces/_wrappers_validators_.validatorreward.md) - - [ValidatorsConfig](developer-resources/contractkit/reference/interfaces/_wrappers_validators_.validatorsconfig.md) - - [Classes]() - - [AddressRegistry](developer-resources/contractkit/reference/classes/_address_registry_.addressregistry.md) - - [WrapperCache](developer-resources/contractkit/reference/classes/_contract_cache_.wrappercache.md) - - [IdentityMetadataWrapper](developer-resources/contractkit/reference/classes/_identity_metadata_.identitymetadatawrapper.md) - - [ContractKit](developer-resources/contractkit/reference/classes/_kit_.contractkit.md) - - [Web3ContractCache](developer-resources/contractkit/reference/classes/_web3_contract_cache_.web3contractcache.md) - - [AccountsWrapper](developer-resources/contractkit/reference/classes/_wrappers_accounts_.accountswrapper.md) - - [AttestationsWrapper](developer-resources/contractkit/reference/classes/_wrappers_attestations_.attestationswrapper.md) - - [BaseSlasher](developer-resources/contractkit/reference/classes/_wrappers_baseslasher_.baseslasher.md) - - [BaseWrapper](developer-resources/contractkit/reference/classes/_wrappers_basewrapper_.basewrapper.md) - - [BlockchainParametersWrapper](developer-resources/contractkit/reference/classes/_wrappers_blockchainparameters_.blockchainparameterswrapper.md) - - [DoubleSigningSlasherWrapper](developer-resources/contractkit/reference/classes/_wrappers_doublesigningslasher_.doublesigningslasherwrapper.md) - - [DowntimeSlasherWrapper](developer-resources/contractkit/reference/classes/_wrappers_downtimeslasher_.downtimeslasherwrapper.md) - - [ElectionWrapper](developer-resources/contractkit/reference/classes/_wrappers_election_.electionwrapper.md) - - [EscrowWrapper](developer-resources/contractkit/reference/classes/_wrappers_escrow_.escrowwrapper.md) - - [ExchangeWrapper](developer-resources/contractkit/reference/classes/_wrappers_exchange_.exchangewrapper.md) - - [FreezerWrapper](developer-resources/contractkit/reference/classes/_wrappers_freezer_.freezerwrapper.md) - - [GasPriceMinimumWrapper](developer-resources/contractkit/reference/classes/_wrappers_gaspriceminimum_.gaspriceminimumwrapper.md) - - [GoldTokenWrapper](developer-resources/contractkit/reference/classes/_wrappers_goldtokenwrapper_.goldtokenwrapper.md) - - [GovernanceWrapper](developer-resources/contractkit/reference/classes/_wrappers_governance_.governancewrapper.md) - - [LockedGoldWrapper](developer-resources/contractkit/reference/classes/_wrappers_lockedgold_.lockedgoldwrapper.md) - - [MetaTransactionWalletWrapper](developer-resources/contractkit/reference/classes/_wrappers_metatransactionwallet_.metatransactionwalletwrapper.md) - - [MetaTransactionWalletDeployerWrapper](developer-resources/contractkit/reference/classes/_wrappers_metatransactionwalletdeployer_.metatransactionwalletdeployerwrapper.md) - - [MultiSigWrapper](developer-resources/contractkit/reference/classes/_wrappers_multisig_.multisigwrapper.md) - - [ReleaseGoldWrapper](developer-resources/contractkit/reference/classes/_wrappers_releasegold_.releasegoldwrapper.md) - - [ReserveWrapper](developer-resources/contractkit/reference/classes/_wrappers_reserve_.reservewrapper.md) - - [SortedOraclesWrapper](developer-resources/contractkit/reference/classes/_wrappers_sortedoracles_.sortedoracleswrapper.md) - - [StableTokenWrapper](developer-resources/contractkit/reference/classes/_wrappers_stabletokenwrapper_.stabletokenwrapper.md) - - [ValidatorsWrapper](developer-resources/contractkit/reference/classes/_wrappers_validators_.validatorswrapper.md) - - [Enums]() - - [CeloContract](developer-resources/contractkit/reference/enums/_base_.celocontract.md) - - [ClaimTypes](developer-resources/contractkit/reference/enums/_identity_claims_types_.claimtypes.md) - - [AttestationServiceStatusState](developer-resources/contractkit/reference/enums/_wrappers_attestations_.attestationservicestatusstate.md) - - [AttestationState](developer-resources/contractkit/reference/enums/_wrappers_attestations_.attestationstate.md) - - [ProposalStage](developer-resources/contractkit/reference/enums/_wrappers_governance_.proposalstage.md) - - [VoteValue](developer-resources/contractkit/reference/enums/_wrappers_governance_.votevalue.md) - - [MedianRelation](developer-resources/contractkit/reference/enums/_wrappers_sortedoracles_.medianrelation.md) - - [Interfaces]() - - [NetworkConfig](developer-resources/contractkit/reference/interfaces/_kit_.networkconfig.md) - - [ActionableAttestation](developer-resources/contractkit/reference/interfaces/_wrappers_attestations_.actionableattestation.md) - - [AttestationServiceStatusResponse](developer-resources/contractkit/reference/interfaces/_wrappers_attestations_.attestationservicestatusresponse.md) - - [AttestationStat](developer-resources/contractkit/reference/interfaces/_wrappers_attestations_.attestationstat.md) - - [AttestationStateForIssuer](developer-resources/contractkit/reference/interfaces/_wrappers_attestations_.attestationstateforissuer.md) - - [AttestationsConfig](developer-resources/contractkit/reference/interfaces/_wrappers_attestations_.attestationsconfig.md) - - [AttestationsToken](developer-resources/contractkit/reference/interfaces/_wrappers_attestations_.attestationstoken.md) - - [UnselectedRequest](developer-resources/contractkit/reference/interfaces/_wrappers_attestations_.unselectedrequest.md) - - [BlockchainParametersConfig](developer-resources/contractkit/reference/interfaces/_wrappers_blockchainparameters_.blockchainparametersconfig.md) - - [ClientVersion](developer-resources/contractkit/reference/interfaces/_wrappers_blockchainparameters_.clientversion.md) - - [DowntimeSlasherConfig](developer-resources/contractkit/reference/interfaces/_wrappers_downtimeslasher_.downtimeslasherconfig.md) - - [Interval](developer-resources/contractkit/reference/interfaces/_wrappers_downtimeslasher_.interval.md) - - [ElectableValidators](developer-resources/contractkit/reference/interfaces/_wrappers_election_.electablevalidators.md) - - [ElectionConfig](developer-resources/contractkit/reference/interfaces/_wrappers_election_.electionconfig.md) - - [GroupVote](developer-resources/contractkit/reference/interfaces/_wrappers_election_.groupvote.md) - - [GroupVoterReward](developer-resources/contractkit/reference/interfaces/_wrappers_election_.groupvoterreward.md) - - [ValidatorGroupVote](developer-resources/contractkit/reference/interfaces/_wrappers_election_.validatorgroupvote.md) - - [Voter](developer-resources/contractkit/reference/interfaces/_wrappers_election_.voter.md) - - [VoterReward](developer-resources/contractkit/reference/interfaces/_wrappers_election_.voterreward.md) - - [ExchangeConfig](developer-resources/contractkit/reference/interfaces/_wrappers_exchange_.exchangeconfig.md) - - [GasPriceMinimumConfig](developer-resources/contractkit/reference/interfaces/_wrappers_gaspriceminimum_.gaspriceminimumconfig.md) - - [GovernanceConfig](developer-resources/contractkit/reference/interfaces/_wrappers_governance_.governanceconfig.md) - - [HotfixRecord](developer-resources/contractkit/reference/interfaces/_wrappers_governance_.hotfixrecord.md) - - [ParticipationParameters](developer-resources/contractkit/reference/interfaces/_wrappers_governance_.participationparameters.md) - - [ProposalMetadata](developer-resources/contractkit/reference/interfaces/_wrappers_governance_.proposalmetadata.md) - - [ProposalRecord](developer-resources/contractkit/reference/interfaces/_wrappers_governance_.proposalrecord.md) - - [ProposalStageDurations](developer-resources/contractkit/reference/interfaces/_wrappers_governance_.proposalstagedurations.md) - - [UpvoteRecord](developer-resources/contractkit/reference/interfaces/_wrappers_governance_.upvoterecord.md) - - [VoteRecord](developer-resources/contractkit/reference/interfaces/_wrappers_governance_.voterecord.md) - - [Voter](developer-resources/contractkit/reference/interfaces/_wrappers_governance_.voter.md) - - [Votes](developer-resources/contractkit/reference/interfaces/_wrappers_governance_.votes.md) - - [AccountSlashed](developer-resources/contractkit/reference/interfaces/_wrappers_lockedgold_.accountslashed.md) - - [LockedGoldConfig](developer-resources/contractkit/reference/interfaces/_wrappers_lockedgold_.lockedgoldconfig.md) - - [PendingWithdrawal](developer-resources/contractkit/reference/interfaces/_wrappers_lockedgold_.pendingwithdrawal.md) - - [VotingDetails](developer-resources/contractkit/reference/interfaces/_wrappers_lockedgold_.votingdetails.md) - - [RawTransaction](developer-resources/contractkit/reference/interfaces/_wrappers_metatransactionwallet_.rawtransaction.md) - - [TransactionObjectWithValue](developer-resources/contractkit/reference/interfaces/_wrappers_metatransactionwallet_.transactionobjectwithvalue.md) - - [TransactionData](developer-resources/contractkit/reference/interfaces/_wrappers_multisig_.transactiondata.md) - - [BalanceState](developer-resources/contractkit/reference/interfaces/_wrappers_releasegold_.balancestate.md) - - [ReleaseGoldInfo](developer-resources/contractkit/reference/interfaces/_wrappers_releasegold_.releasegoldinfo.md) - - [ReserveConfig](developer-resources/contractkit/reference/interfaces/_wrappers_reserve_.reserveconfig.md) - - [MedianRate](developer-resources/contractkit/reference/interfaces/_wrappers_sortedoracles_.medianrate.md) - - [OracleRate](developer-resources/contractkit/reference/interfaces/_wrappers_sortedoracles_.oraclerate.md) - - [OracleReport](developer-resources/contractkit/reference/interfaces/_wrappers_sortedoracles_.oraclereport.md) - - [OracleTimestamp](developer-resources/contractkit/reference/interfaces/_wrappers_sortedoracles_.oracletimestamp.md) - - [SortedOraclesConfig](developer-resources/contractkit/reference/interfaces/_wrappers_sortedoracles_.sortedoraclesconfig.md) - - [InflationParameters](developer-resources/contractkit/reference/interfaces/_wrappers_stabletokenwrapper_.inflationparameters.md) - - [StableTokenConfig](developer-resources/contractkit/reference/interfaces/_wrappers_stabletokenwrapper_.stabletokenconfig.md) - - [GroupMembership](developer-resources/contractkit/reference/interfaces/_wrappers_validators_.groupmembership.md) - - [LockedGoldRequirements](developer-resources/contractkit/reference/interfaces/_wrappers_validators_.lockedgoldrequirements.md) - - [MembershipHistoryExtraData](developer-resources/contractkit/reference/interfaces/_wrappers_validators_.membershiphistoryextradata.md) - - [Validator](developer-resources/contractkit/reference/interfaces/_wrappers_validators_.validator.md) - - [ValidatorGroup](developer-resources/contractkit/reference/interfaces/_wrappers_validators_.validatorgroup.md) - - [ValidatorReward](developer-resources/contractkit/reference/interfaces/_wrappers_validators_.validatorreward.md) - - [ValidatorsConfig](developer-resources/contractkit/reference/interfaces/_wrappers_validators_.validatorsconfig.md) - - - - [Explorer](developer-resources/explorer/reference/SUMMARY.md) - - - [Globals](developer-resources/explorer/reference/globals.md) - - [Modules]() - - [base](developer-resources/explorer/reference/modules/_base_.md) - - [ContractDetails](developer-resources/explorer/reference/interfaces/_base_.contractdetails.md) - - [block-explorer](developer-resources/explorer/reference/modules/_block_explorer_.md) - - [BlockExplorer](developer-resources/explorer/reference/classes/_block_explorer_.blockexplorer.md) - - [CallDetails](developer-resources/explorer/reference/interfaces/_block_explorer_.calldetails.md) - - [ParsedBlock](developer-resources/explorer/reference/interfaces/_block_explorer_.parsedblock.md) - - [ParsedTx](developer-resources/explorer/reference/interfaces/_block_explorer_.parsedtx.md) - - [log-explorer](developer-resources/explorer/reference/modules/_log_explorer_.md) - - [LogExplorer](developer-resources/explorer/reference/classes/_log_explorer_.logexplorer.md) - - [Classes]() - - [BlockExplorer](developer-resources/explorer/reference/classes/_block_explorer_.blockexplorer.md) - - [LogExplorer](developer-resources/explorer/reference/classes/_log_explorer_.logexplorer.md) - - [Interfaces]() - - [ContractDetails](developer-resources/explorer/reference/interfaces/_base_.contractdetails.md) - - [CallDetails](developer-resources/explorer/reference/interfaces/_block_explorer_.calldetails.md) - - [ParsedBlock](developer-resources/explorer/reference/interfaces/_block_explorer_.parsedblock.md) - - [ParsedTx](developer-resources/explorer/reference/interfaces/_block_explorer_.parsedtx.md) - - - - [Governance](developer-resources/governance/reference/SUMMARY.md) - - - [Globals](developer-resources/governance/reference/globals.md) - - [Modules]() - - [proposals](developer-resources/governance/reference/modules/_proposals_.md) - - [InteractiveProposalBuilder](developer-resources/governance/reference/classes/_proposals_.interactiveproposalbuilder.md) - - [ProposalBuilder](developer-resources/governance/reference/classes/_proposals_.proposalbuilder.md) - - [ProposalTransactionJSON](developer-resources/governance/reference/interfaces/_proposals_.proposaltransactionjson.md) - - [Classes]() - - [InteractiveProposalBuilder](developer-resources/governance/reference/classes/_proposals_.interactiveproposalbuilder.md) - - [ProposalBuilder](developer-resources/governance/reference/classes/_proposals_.proposalbuilder.md) - - [Interfaces]() - - [ProposalTransactionJSON](developer-resources/governance/reference/interfaces/_proposals_.proposaltransactionjson.md) - - - - [Identity](developer-resources/identity/reference/SUMMARY.md) - - - [Globals](developer-resources/identity/reference/globals.md) - - [Modules]() - - [odis/bls-blinding-client](developer-resources/identity/reference/modules/_odis_bls_blinding_client_.md) - - [WasmBlsBlindingClient](developer-resources/identity/reference/classes/_odis_bls_blinding_client_.wasmblsblindingclient.md) - - [BlsBlindingClient](developer-resources/identity/reference/interfaces/_odis_bls_blinding_client_.blsblindingclient.md) - - [odis/matchmaking](developer-resources/identity/reference/modules/_odis_matchmaking_.md) - - [odis/phone-number-identifier](developer-resources/identity/reference/modules/_odis_phone_number_identifier_.md) - - [PhoneNumberHashDetails](developer-resources/identity/reference/interfaces/_odis_phone_number_identifier_.phonenumberhashdetails.md) - - [odis/query](developer-resources/identity/reference/modules/_odis_query_.md) - - [AuthenticationMethod](developer-resources/identity/reference/enums/_odis_query_.authenticationmethod.md) - - [ErrorMessages](developer-resources/identity/reference/enums/_odis_query_.errormessages.md) - - [CustomSigner](developer-resources/identity/reference/interfaces/_odis_query_.customsigner.md) - - [EncryptionKeySigner](developer-resources/identity/reference/interfaces/_odis_query_.encryptionkeysigner.md) - - [MatchmakingRequest](developer-resources/identity/reference/interfaces/_odis_query_.matchmakingrequest.md) - - [MatchmakingResponse](developer-resources/identity/reference/interfaces/_odis_query_.matchmakingresponse.md) - - [PhoneNumberPrivacyRequest](developer-resources/identity/reference/interfaces/_odis_query_.phonenumberprivacyrequest.md) - - [ServiceContext](developer-resources/identity/reference/interfaces/_odis_query_.servicecontext.md) - - [SignMessageRequest](developer-resources/identity/reference/interfaces/_odis_query_.signmessagerequest.md) - - [SignMessageResponse](developer-resources/identity/reference/interfaces/_odis_query_.signmessageresponse.md) - - [WalletKeySigner](developer-resources/identity/reference/interfaces/_odis_query_.walletkeysigner.md) - - [offchain-data-wrapper](developer-resources/identity/reference/modules/_offchain_data_wrapper_.md) - - [OffchainErrorTypes](developer-resources/identity/reference/enums/_offchain_data_wrapper_.offchainerrortypes.md) - - [OffchainDataWrapper](developer-resources/identity/reference/classes/_offchain_data_wrapper_.offchaindatawrapper.md) - - [offchain/accessors/authorized-signer](developer-resources/identity/reference/modules/_offchain_accessors_authorized_signer_.md) - - [AuthorizedSignerAccessor](developer-resources/identity/reference/classes/_offchain_accessors_authorized_signer_.authorizedsigneraccessor.md) - - [offchain/accessors/binary](developer-resources/identity/reference/modules/_offchain_accessors_binary_.md) - - [PrivateBinaryAccessor](developer-resources/identity/reference/classes/_offchain_accessors_binary_.privatebinaryaccessor.md) - - [PublicBinaryAccessor](developer-resources/identity/reference/classes/_offchain_accessors_binary_.publicbinaryaccessor.md) - - [offchain/accessors/errors](developer-resources/identity/reference/modules/_offchain_accessors_errors_.md) - - [SchemaErrorTypes](developer-resources/identity/reference/enums/_offchain_accessors_errors_.schemaerrortypes.md) - - [InvalidDataError](developer-resources/identity/reference/classes/_offchain_accessors_errors_.invaliddataerror.md) - - [InvalidKey](developer-resources/identity/reference/classes/_offchain_accessors_errors_.invalidkey.md) - - [OffchainError](developer-resources/identity/reference/classes/_offchain_accessors_errors_.offchainerror.md) - - [UnavailableKey](developer-resources/identity/reference/classes/_offchain_accessors_errors_.unavailablekey.md) - - [UnknownCiphertext](developer-resources/identity/reference/classes/_offchain_accessors_errors_.unknownciphertext.md) - - [offchain/accessors/interfaces](developer-resources/identity/reference/modules/_offchain_accessors_interfaces_.md) - - [PrivateAccessor](developer-resources/identity/reference/interfaces/_offchain_accessors_interfaces_.privateaccessor.md) - - [PublicAccessor](developer-resources/identity/reference/interfaces/_offchain_accessors_interfaces_.publicaccessor.md) - - [offchain/accessors/name](developer-resources/identity/reference/modules/_offchain_accessors_name_.md) - - [PrivateNameAccessor](developer-resources/identity/reference/classes/_offchain_accessors_name_.privatenameaccessor.md) - - [PublicNameAccessor](developer-resources/identity/reference/classes/_offchain_accessors_name_.publicnameaccessor.md) - - [offchain/accessors/pictures](developer-resources/identity/reference/modules/_offchain_accessors_pictures_.md) - - [PrivatePictureAccessor](developer-resources/identity/reference/classes/_offchain_accessors_pictures_.privatepictureaccessor.md) - - [PublicPictureAccessor](developer-resources/identity/reference/classes/_offchain_accessors_pictures_.publicpictureaccessor.md) - - [offchain/accessors/simple](developer-resources/identity/reference/modules/_offchain_accessors_simple_.md) - - [PrivateSimpleAccessor](developer-resources/identity/reference/classes/_offchain_accessors_simple_.privatesimpleaccessor.md) - - [PublicSimpleAccessor](developer-resources/identity/reference/classes/_offchain_accessors_simple_.publicsimpleaccessor.md) - - [offchain/storage-writers](developer-resources/identity/reference/modules/_offchain_storage_writers_.md) - - [GitStorageWriter](developer-resources/identity/reference/classes/_offchain_storage_writers_.gitstoragewriter.md) - - [GoogleStorageWriter](developer-resources/identity/reference/classes/_offchain_storage_writers_.googlestoragewriter.md) - - [LocalStorageWriter](developer-resources/identity/reference/classes/_offchain_storage_writers_.localstoragewriter.md) - - [MockStorageWriter](developer-resources/identity/reference/classes/_offchain_storage_writers_.mockstoragewriter.md) - - [StorageWriter](developer-resources/identity/reference/classes/_offchain_storage_writers_.storagewriter.md) - - [offchain/utils](developer-resources/identity/reference/modules/_offchain_utils_.md) - - [test-utils/setup.global](developer-resources/identity/reference/modules/_test_utils_setup_global_.md) - - [test-utils/teardown.global](developer-resources/identity/reference/modules/_test_utils_teardown_global_.md) - - [Classes]() - - [WasmBlsBlindingClient](developer-resources/identity/reference/classes/_odis_bls_blinding_client_.wasmblsblindingclient.md) - - [OffchainDataWrapper](developer-resources/identity/reference/classes/_offchain_data_wrapper_.offchaindatawrapper.md) - - [AuthorizedSignerAccessor](developer-resources/identity/reference/classes/_offchain_accessors_authorized_signer_.authorizedsigneraccessor.md) - - [PrivateBinaryAccessor](developer-resources/identity/reference/classes/_offchain_accessors_binary_.privatebinaryaccessor.md) - - [PublicBinaryAccessor](developer-resources/identity/reference/classes/_offchain_accessors_binary_.publicbinaryaccessor.md) - - [InvalidDataError](developer-resources/identity/reference/classes/_offchain_accessors_errors_.invaliddataerror.md) - - [InvalidKey](developer-resources/identity/reference/classes/_offchain_accessors_errors_.invalidkey.md) - - [OffchainError](developer-resources/identity/reference/classes/_offchain_accessors_errors_.offchainerror.md) - - [UnavailableKey](developer-resources/identity/reference/classes/_offchain_accessors_errors_.unavailablekey.md) - - [UnknownCiphertext](developer-resources/identity/reference/classes/_offchain_accessors_errors_.unknownciphertext.md) - - [PrivateNameAccessor](developer-resources/identity/reference/classes/_offchain_accessors_name_.privatenameaccessor.md) - - [PublicNameAccessor](developer-resources/identity/reference/classes/_offchain_accessors_name_.publicnameaccessor.md) - - [PrivatePictureAccessor](developer-resources/identity/reference/classes/_offchain_accessors_pictures_.privatepictureaccessor.md) - - [PublicPictureAccessor](developer-resources/identity/reference/classes/_offchain_accessors_pictures_.publicpictureaccessor.md) - - [PrivateSimpleAccessor](developer-resources/identity/reference/classes/_offchain_accessors_simple_.privatesimpleaccessor.md) - - [PublicSimpleAccessor](developer-resources/identity/reference/classes/_offchain_accessors_simple_.publicsimpleaccessor.md) - - [GitStorageWriter](developer-resources/identity/reference/classes/_offchain_storage_writers_.gitstoragewriter.md) - - [GoogleStorageWriter](developer-resources/identity/reference/classes/_offchain_storage_writers_.googlestoragewriter.md) - - [LocalStorageWriter](developer-resources/identity/reference/classes/_offchain_storage_writers_.localstoragewriter.md) - - [MockStorageWriter](developer-resources/identity/reference/classes/_offchain_storage_writers_.mockstoragewriter.md) - - [StorageWriter](developer-resources/identity/reference/classes/_offchain_storage_writers_.storagewriter.md) - - [Enums]() - - [AuthenticationMethod](developer-resources/identity/reference/enums/_odis_query_.authenticationmethod.md) - - [ErrorMessages](developer-resources/identity/reference/enums/_odis_query_.errormessages.md) - - [OffchainErrorTypes](developer-resources/identity/reference/enums/_offchain_data_wrapper_.offchainerrortypes.md) - - [SchemaErrorTypes](developer-resources/identity/reference/enums/_offchain_accessors_errors_.schemaerrortypes.md) - - [Interfaces]() - - [BlsBlindingClient](developer-resources/identity/reference/interfaces/_odis_bls_blinding_client_.blsblindingclient.md) - - [PhoneNumberHashDetails](developer-resources/identity/reference/interfaces/_odis_phone_number_identifier_.phonenumberhashdetails.md) - - [CustomSigner](developer-resources/identity/reference/interfaces/_odis_query_.customsigner.md) - - [EncryptionKeySigner](developer-resources/identity/reference/interfaces/_odis_query_.encryptionkeysigner.md) - - [MatchmakingRequest](developer-resources/identity/reference/interfaces/_odis_query_.matchmakingrequest.md) - - [MatchmakingResponse](developer-resources/identity/reference/interfaces/_odis_query_.matchmakingresponse.md) - - [PhoneNumberPrivacyRequest](developer-resources/identity/reference/interfaces/_odis_query_.phonenumberprivacyrequest.md) - - [ServiceContext](developer-resources/identity/reference/interfaces/_odis_query_.servicecontext.md) - - [SignMessageRequest](developer-resources/identity/reference/interfaces/_odis_query_.signmessagerequest.md) - - [SignMessageResponse](developer-resources/identity/reference/interfaces/_odis_query_.signmessageresponse.md) - - [WalletKeySigner](developer-resources/identity/reference/interfaces/_odis_query_.walletkeysigner.md) - - [PrivateAccessor](developer-resources/identity/reference/interfaces/_offchain_accessors_interfaces_.privateaccessor.md) - - [PublicAccessor](developer-resources/identity/reference/interfaces/_offchain_accessors_interfaces_.publicaccessor.md) - - - - [Keystores](developer-resources/keystores/reference/../../../SUMMARY.md) - - - [Globals](developer-resources/keystores/reference/globals.md) - - [Modules]() - - [file-keystore](developer-resources/keystores/reference/modules/_file_keystore_.md) - - [FileKeystore](developer-resources/keystores/reference/classes/_file_keystore_.filekeystore.md) - - [inmemory-keystore](developer-resources/keystores/reference/modules/_inmemory_keystore_.md) - - [InMemoryKeystore](developer-resources/keystores/reference/classes/_inmemory_keystore_.inmemorykeystore.md) - - [keystore-base](developer-resources/keystores/reference/modules/_keystore_base_.md) - - [ErrorMessages](developer-resources/keystores/reference/enums/_keystore_base_.errormessages.md) - - [KeystoreBase](developer-resources/keystores/reference/classes/_keystore_base_.keystorebase.md) - - [keystore-wallet-wrapper](developer-resources/keystores/reference/modules/_keystore_wallet_wrapper_.md) - - [KeystoreWalletWrapper](developer-resources/keystores/reference/classes/_keystore_wallet_wrapper_.keystorewalletwrapper.md) - - [test-constants](developer-resources/keystores/reference/modules/_test_constants_.md) - - [Classes]() - - [FileKeystore](developer-resources/keystores/reference/classes/_file_keystore_.filekeystore.md) - - [InMemoryKeystore](developer-resources/keystores/reference/classes/_inmemory_keystore_.inmemorykeystore.md) - - [KeystoreBase](developer-resources/keystores/reference/classes/_keystore_base_.keystorebase.md) - - [KeystoreWalletWrapper](developer-resources/keystores/reference/classes/_keystore_wallet_wrapper_.keystorewalletwrapper.md) - - [Enums]() - - [ErrorMessages](developer-resources/keystores/reference/enums/_keystore_base_.errormessages.md) - - - - [Network-Utils](developer-resources/network-utils/reference/SUMMARY.md) - - - [Globals](developer-resources/network-utils/reference/globals.md) - - [Modules]() - - [genesis-block-utils](developer-resources/network-utils/reference/modules/_genesis_block_utils_.md) - - [GenesisBlockUtils](developer-resources/network-utils/reference/classes/_genesis_block_utils_.genesisblockutils.md) - - [google-storage-utils](developer-resources/network-utils/reference/modules/_google_storage_utils_.md) - - [GoogleStorageUtils](developer-resources/network-utils/reference/classes/_google_storage_utils_.googlestorageutils.md) - - [static-node-utils](developer-resources/network-utils/reference/modules/_static_node_utils_.md) - - [StaticNodeUtils](developer-resources/network-utils/reference/classes/_static_node_utils_.staticnodeutils.md) - - [utils/timezone](developer-resources/network-utils/reference/modules/_utils_timezone_.md) - - [Coordinates](developer-resources/network-utils/reference/interfaces/_utils_timezone_.coordinates.md) - - [Timezone](developer-resources/network-utils/reference/interfaces/_utils_timezone_.timezone.md) - - [Classes]() - - [GenesisBlockUtils](developer-resources/network-utils/reference/classes/_genesis_block_utils_.genesisblockutils.md) - - [GoogleStorageUtils](developer-resources/network-utils/reference/classes/_google_storage_utils_.googlestorageutils.md) - - [StaticNodeUtils](developer-resources/network-utils/reference/classes/_static_node_utils_.staticnodeutils.md) - - [Interfaces]() - - [Coordinates](developer-resources/network-utils/reference/interfaces/_utils_timezone_.coordinates.md) - - [Timezone](developer-resources/network-utils/reference/interfaces/_utils_timezone_.timezone.md) - - - - [Transactions-Uri](developer-resources/transactions-uri/reference/SUMMARY.md) - - - [Globals](developer-resources/transactions-uri/reference/globals.md) - - [Modules]() - - [test-utils/setup.global](developer-resources/transactions-uri/reference/modules/_test_utils_setup_global_.md) - - [test-utils/teardown.global](developer-resources/transactions-uri/reference/modules/_test_utils_teardown_global_.md) - - [tx-uri](developer-resources/transactions-uri/reference/modules/_tx_uri_.md) - - - - [Utils](developer-resources/utils/reference/SUMMARY.md) - - - [Globals](developer-resources/utils/reference/globals.md) - - [Modules]() - - [node_modules/bls12377js/src/bls](developer-resources/utils/reference/modules/_node_modules_bls12377js_src_bls_.md) - - [node_modules/bls12377js/src/defs](developer-resources/utils/reference/modules/_node_modules_bls12377js_src_defs_.md) - - [FieldSpec](developer-resources/utils/reference/interfaces/_node_modules_bls12377js_src_defs_.fieldspec.md) - - [GroupSpec](developer-resources/utils/reference/interfaces/_node_modules_bls12377js_src_defs_.groupspec.md) - - [node_modules/bls12377js/src/f](developer-resources/utils/reference/modules/_node_modules_bls12377js_src_f_.md) - - [F](developer-resources/utils/reference/classes/_node_modules_bls12377js_src_f_.f.md) - - [node_modules/bls12377js/src/f2](developer-resources/utils/reference/modules/_node_modules_bls12377js_src_f2_.md) - - [F2](developer-resources/utils/reference/classes/_node_modules_bls12377js_src_f2_.f2.md) - - [node_modules/bls12377js/src/g1](developer-resources/utils/reference/modules/_node_modules_bls12377js_src_g1_.md) - - [G1](developer-resources/utils/reference/classes/_node_modules_bls12377js_src_g1_.g1.md) - - [node_modules/bls12377js/src/g2](developer-resources/utils/reference/modules/_node_modules_bls12377js_src_g2_.md) - - [G2](developer-resources/utils/reference/classes/_node_modules_bls12377js_src_g2_.g2.md) - - [node_modules/bls12377js/src/group](developer-resources/utils/reference/modules/_node_modules_bls12377js_src_group_.md) - - [Group](developer-resources/utils/reference/classes/_node_modules_bls12377js_src_group_.group.md) - - [packages/sdk/utils/src/account](developer-resources/utils/reference/modules/_packages_sdk_utils_src_account_.md) - - [packages/sdk/utils/src/address](developer-resources/utils/reference/modules/_packages_sdk_utils_src_address_.md) - - [packages/sdk/utils/src/async](developer-resources/utils/reference/modules/_packages_sdk_utils_src_async_.md) - - [packages/sdk/utils/src/attestations](developer-resources/utils/reference/modules/_packages_sdk_utils_src_attestations_.md) - - [packages/sdk/utils/src/bls](developer-resources/utils/reference/modules/_packages_sdk_utils_src_bls_.md) - - [packages/sdk/utils/src/bn](developer-resources/utils/reference/modules/_packages_sdk_utils_src_bn_.md) - - [packages/sdk/utils/src/celoHistory](developer-resources/utils/reference/modules/_packages_sdk_utils_src_celohistory_.md) - - [packages/sdk/utils/src/collections](developer-resources/utils/reference/modules/_packages_sdk_utils_src_collections_.md) - - [packages/sdk/utils/src/commentEncryption](developer-resources/utils/reference/modules/_packages_sdk_utils_src_commentencryption_.md) - - [EncryptionStatus](developer-resources/utils/reference/interfaces/_packages_sdk_utils_src_commentencryption_.encryptionstatus.md) - - [packages/sdk/utils/src/contacts](developer-resources/utils/reference/modules/_packages_sdk_utils_src_contacts_.md) - - [packages/sdk/utils/src/countries](developer-resources/utils/reference/modules/_packages_sdk_utils_src_countries_.md) - - [Countries](developer-resources/utils/reference/classes/_packages_sdk_utils_src_countries_.countries.md) - - [LocalizedCountry](developer-resources/utils/reference/interfaces/_packages_sdk_utils_src_countries_.localizedcountry.md) - - [packages/sdk/utils/src/currencies](developer-resources/utils/reference/modules/_packages_sdk_utils_src_currencies_.md) - - [packages/sdk/utils/src/dappkit](developer-resources/utils/reference/modules/_packages_sdk_utils_src_dappkit_.md) - - [DappKitRequestTypes](developer-resources/utils/reference/enums/_packages_sdk_utils_src_dappkit_.dappkitrequesttypes.md) - - [DappKitResponseStatus](developer-resources/utils/reference/enums/_packages_sdk_utils_src_dappkit_.dappkitresponsestatus.md) - - [AccountAuthRequest](developer-resources/utils/reference/interfaces/_packages_sdk_utils_src_dappkit_.accountauthrequest.md) - - [AccountAuthResponseFailure](developer-resources/utils/reference/interfaces/_packages_sdk_utils_src_dappkit_.accountauthresponsefailure.md) - - [AccountAuthResponseSuccess](developer-resources/utils/reference/interfaces/_packages_sdk_utils_src_dappkit_.accountauthresponsesuccess.md) - - [DappKitRequestBase](developer-resources/utils/reference/interfaces/_packages_sdk_utils_src_dappkit_.dappkitrequestbase.md) - - [DappKitRequestMeta](developer-resources/utils/reference/interfaces/_packages_sdk_utils_src_dappkit_.dappkitrequestmeta.md) - - [SignTxRequest](developer-resources/utils/reference/interfaces/_packages_sdk_utils_src_dappkit_.signtxrequest.md) - - [SignTxResponseFailure](developer-resources/utils/reference/interfaces/_packages_sdk_utils_src_dappkit_.signtxresponsefailure.md) - - [SignTxResponseSuccess](developer-resources/utils/reference/interfaces/_packages_sdk_utils_src_dappkit_.signtxresponsesuccess.md) - - [TxToSignParam](developer-resources/utils/reference/interfaces/_packages_sdk_utils_src_dappkit_.txtosignparam.md) - - [packages/sdk/utils/src/dataEncryptionKey](developer-resources/utils/reference/modules/_packages_sdk_utils_src_dataencryptionkey_.md) - - [packages/sdk/utils/src/displayFormatting](developer-resources/utils/reference/modules/_packages_sdk_utils_src_displayformatting_.md) - - [packages/sdk/utils/src/ecdh](developer-resources/utils/reference/modules/_packages_sdk_utils_src_ecdh_.md) - - [packages/sdk/utils/src/ecies](developer-resources/utils/reference/modules/_packages_sdk_utils_src_ecies_.md) - - [packages/sdk/utils/src/fixidity](developer-resources/utils/reference/modules/_packages_sdk_utils_src_fixidity_.md) - - [packages/sdk/utils/src/future](developer-resources/utils/reference/modules/_packages_sdk_utils_src_future_.md) - - [packages/sdk/utils/src/inputValidation](developer-resources/utils/reference/modules/_packages_sdk_utils_src_inputvalidation_.md) - - [packages/sdk/utils/src/io](developer-resources/utils/reference/modules/_packages_sdk_utils_src_io_.md) - - [packages/sdk/utils/src/istanbul](developer-resources/utils/reference/modules/_packages_sdk_utils_src_istanbul_.md) - - [IstanbulExtra](developer-resources/utils/reference/interfaces/_packages_sdk_utils_src_istanbul_.istanbulextra.md) - - [Seal](developer-resources/utils/reference/interfaces/_packages_sdk_utils_src_istanbul_.seal.md) - - [packages/sdk/utils/src/logger](developer-resources/utils/reference/modules/_packages_sdk_utils_src_logger_.md) - - [packages/sdk/utils/src/parsing](developer-resources/utils/reference/modules/_packages_sdk_utils_src_parsing_.md) - - [packages/sdk/utils/src/phoneNumbers](developer-resources/utils/reference/modules/_packages_sdk_utils_src_phonenumbers_.md) - - [packages/sdk/utils/src/sign-typed-data-utils](developer-resources/utils/reference/modules/_packages_sdk_utils_src_sign_typed_data_utils_.md) - - [EIP712Object](developer-resources/utils/reference/interfaces/_packages_sdk_utils_src_sign_typed_data_utils_.eip712object.md) - - [EIP712Parameter](developer-resources/utils/reference/interfaces/_packages_sdk_utils_src_sign_typed_data_utils_.eip712parameter.md) - - [EIP712TypedData](developer-resources/utils/reference/interfaces/_packages_sdk_utils_src_sign_typed_data_utils_.eip712typeddata.md) - - [EIP712Types](developer-resources/utils/reference/interfaces/_packages_sdk_utils_src_sign_typed_data_utils_.eip712types.md) - - [packages/sdk/utils/src/signatureUtils](developer-resources/utils/reference/modules/_packages_sdk_utils_src_signatureutils_.md) - - [packages/sdk/utils/src/solidity](developer-resources/utils/reference/modules/_packages_sdk_utils_src_solidity_.md) - - [packages/sdk/utils/src/string](developer-resources/utils/reference/modules/_packages_sdk_utils_src_string_.md) - - [packages/sdk/utils/src/task](developer-resources/utils/reference/modules/_packages_sdk_utils_src_task_.md) - - [packages/sdk/utils/src/typed-data-constructors](developer-resources/utils/reference/modules/_packages_sdk_utils_src_typed_data_constructors_.md) - - [Classes]() - - [F](developer-resources/utils/reference/classes/_node_modules_bls12377js_src_f_.f.md) - - [F2](developer-resources/utils/reference/classes/_node_modules_bls12377js_src_f2_.f2.md) - - [G1](developer-resources/utils/reference/classes/_node_modules_bls12377js_src_g1_.g1.md) - - [G2](developer-resources/utils/reference/classes/_node_modules_bls12377js_src_g2_.g2.md) - - [Group](developer-resources/utils/reference/classes/_node_modules_bls12377js_src_group_.group.md) - - [Countries](developer-resources/utils/reference/classes/_packages_sdk_utils_src_countries_.countries.md) - - [Enums]() - - [DappKitRequestTypes](developer-resources/utils/reference/enums/_packages_sdk_utils_src_dappkit_.dappkitrequesttypes.md) - - [DappKitResponseStatus](developer-resources/utils/reference/enums/_packages_sdk_utils_src_dappkit_.dappkitresponsestatus.md) - - [Interfaces]() - - [FieldSpec](developer-resources/utils/reference/interfaces/_node_modules_bls12377js_src_defs_.fieldspec.md) - - [GroupSpec](developer-resources/utils/reference/interfaces/_node_modules_bls12377js_src_defs_.groupspec.md) - - [EncryptionStatus](developer-resources/utils/reference/interfaces/_packages_sdk_utils_src_commentencryption_.encryptionstatus.md) - - [LocalizedCountry](developer-resources/utils/reference/interfaces/_packages_sdk_utils_src_countries_.localizedcountry.md) - - [AccountAuthRequest](developer-resources/utils/reference/interfaces/_packages_sdk_utils_src_dappkit_.accountauthrequest.md) - - [AccountAuthResponseFailure](developer-resources/utils/reference/interfaces/_packages_sdk_utils_src_dappkit_.accountauthresponsefailure.md) - - [AccountAuthResponseSuccess](developer-resources/utils/reference/interfaces/_packages_sdk_utils_src_dappkit_.accountauthresponsesuccess.md) - - [DappKitRequestBase](developer-resources/utils/reference/interfaces/_packages_sdk_utils_src_dappkit_.dappkitrequestbase.md) - - [DappKitRequestMeta](developer-resources/utils/reference/interfaces/_packages_sdk_utils_src_dappkit_.dappkitrequestmeta.md) - - [SignTxRequest](developer-resources/utils/reference/interfaces/_packages_sdk_utils_src_dappkit_.signtxrequest.md) - - [SignTxResponseFailure](developer-resources/utils/reference/interfaces/_packages_sdk_utils_src_dappkit_.signtxresponsefailure.md) - - [SignTxResponseSuccess](developer-resources/utils/reference/interfaces/_packages_sdk_utils_src_dappkit_.signtxresponsesuccess.md) - - [TxToSignParam](developer-resources/utils/reference/interfaces/_packages_sdk_utils_src_dappkit_.txtosignparam.md) - - [IstanbulExtra](developer-resources/utils/reference/interfaces/_packages_sdk_utils_src_istanbul_.istanbulextra.md) - - [Seal](developer-resources/utils/reference/interfaces/_packages_sdk_utils_src_istanbul_.seal.md) - - [EIP712Object](developer-resources/utils/reference/interfaces/_packages_sdk_utils_src_sign_typed_data_utils_.eip712object.md) - - [EIP712Parameter](developer-resources/utils/reference/interfaces/_packages_sdk_utils_src_sign_typed_data_utils_.eip712parameter.md) - - [EIP712TypedData](developer-resources/utils/reference/interfaces/_packages_sdk_utils_src_sign_typed_data_utils_.eip712typeddata.md) - - [EIP712Types](developer-resources/utils/reference/interfaces/_packages_sdk_utils_src_sign_typed_data_utils_.eip712types.md) - - - - [Wallet-Base](developer-resources/wallet-base/reference/SUMMARY.md) - - - [Globals](developer-resources/wallet-base/reference/globals.md) - - [Modules]() - - [signing-utils](developer-resources/wallet-base/reference/modules/_signing_utils_.md) - - [wallet-base](developer-resources/wallet-base/reference/modules/_wallet_base_.md) - - [WalletBase](developer-resources/wallet-base/reference/classes/_wallet_base_.walletbase.md) - - [UnlockableWallet](developer-resources/wallet-base/reference/interfaces/_wallet_base_.unlockablewallet.md) - - [Wallet](developer-resources/wallet-base/reference/interfaces/_wallet_base_.wallet.md) - - [Classes]() - - [WalletBase](developer-resources/wallet-base/reference/classes/_wallet_base_.walletbase.md) - - [Interfaces]() - - [UnlockableWallet](developer-resources/wallet-base/reference/interfaces/_wallet_base_.unlockablewallet.md) - - [Wallet](developer-resources/wallet-base/reference/interfaces/_wallet_base_.wallet.md) - - - - [Wallet-Hsm](developer-resources/wallet-hsm/reference/SUMMARY.md) - - - [Globals](developer-resources/wallet-hsm/reference/globals.md) - - [Modules]() - - [ber-utils](developer-resources/wallet-hsm/reference/modules/_ber_utils_.md) - - [signature-utils](developer-resources/wallet-hsm/reference/modules/_signature_utils_.md) - - [Signature](developer-resources/wallet-hsm/reference/classes/_signature_utils_.signature.md) - - [Classes]() - - [Signature](developer-resources/wallet-hsm/reference/classes/_signature_utils_.signature.md) - - - - [Wallet-Hsm-Aws](developer-resources/wallet-hsm-aws/reference/SUMMARY.md) - - - [Globals](developer-resources/wallet-hsm-aws/reference/globals.md) - - [Modules]() - - [aws-hsm-signer](developer-resources/wallet-hsm-aws/reference/modules/_aws_hsm_signer_.md) - - [AwsHsmSigner](developer-resources/wallet-hsm-aws/reference/classes/_aws_hsm_signer_.awshsmsigner.md) - - [aws-hsm-wallet](developer-resources/wallet-hsm-aws/reference/modules/_aws_hsm_wallet_.md) - - [AwsHsmWallet](developer-resources/wallet-hsm-aws/reference/classes/_aws_hsm_wallet_.awshsmwallet.md) - - [Classes]() - - [AwsHsmSigner](developer-resources/wallet-hsm-aws/reference/classes/_aws_hsm_signer_.awshsmsigner.md) - - [AwsHsmWallet](developer-resources/wallet-hsm-aws/reference/classes/_aws_hsm_wallet_.awshsmwallet.md) - - - - [Wallet-Hsm-Azure](developer-resources/wallet-hsm-azure/reference/SUMMARY.md) - - - [Globals](developer-resources/wallet-hsm-azure/reference/globals.md) - - [Modules]() - - [azure-hsm-signer](developer-resources/wallet-hsm-azure/reference/modules/_azure_hsm_signer_.md) - - [AzureHSMSigner](developer-resources/wallet-hsm-azure/reference/classes/_azure_hsm_signer_.azurehsmsigner.md) - - [azure-hsm-wallet](developer-resources/wallet-hsm-azure/reference/modules/_azure_hsm_wallet_.md) - - [AzureHSMWallet](developer-resources/wallet-hsm-azure/reference/classes/_azure_hsm_wallet_.azurehsmwallet.md) - - [azure-key-vault-client](developer-resources/wallet-hsm-azure/reference/modules/_azure_key_vault_client_.md) - - [AzureKeyVaultClient](developer-resources/wallet-hsm-azure/reference/classes/_azure_key_vault_client_.azurekeyvaultclient.md) - - [Classes]() - - [AzureHSMSigner](developer-resources/wallet-hsm-azure/reference/classes/_azure_hsm_signer_.azurehsmsigner.md) - - [AzureHSMWallet](developer-resources/wallet-hsm-azure/reference/classes/_azure_hsm_wallet_.azurehsmwallet.md) - - [AzureKeyVaultClient](developer-resources/wallet-hsm-azure/reference/classes/_azure_key_vault_client_.azurekeyvaultclient.md) - - - - [Wallet-Ledger](developer-resources/wallet-ledger/reference/SUMMARY.md) - - - [Globals](developer-resources/wallet-ledger/reference/globals.md) - - [Modules]() - - [data](developer-resources/wallet-ledger/reference/modules/_data_.md) - - [ledger-signer](developer-resources/wallet-ledger/reference/modules/_ledger_signer_.md) - - [LedgerSigner](developer-resources/wallet-ledger/reference/classes/_ledger_signer_.ledgersigner.md) - - [ledger-utils](developer-resources/wallet-ledger/reference/modules/_ledger_utils_.md) - - [ledger-wallet](developer-resources/wallet-ledger/reference/modules/_ledger_wallet_.md) - - [AddressValidation](developer-resources/wallet-ledger/reference/enums/_ledger_wallet_.addressvalidation.md) - - [LedgerWallet](developer-resources/wallet-ledger/reference/classes/_ledger_wallet_.ledgerwallet.md) - - [tokens](developer-resources/wallet-ledger/reference/modules/_tokens_.md) - - [API](developer-resources/wallet-ledger/reference/interfaces/_tokens_.api.md) - - [TokenInfo](developer-resources/wallet-ledger/reference/interfaces/_tokens_.tokeninfo.md) - - [Classes]() - - [LedgerSigner](developer-resources/wallet-ledger/reference/classes/_ledger_signer_.ledgersigner.md) - - [LedgerWallet](developer-resources/wallet-ledger/reference/classes/_ledger_wallet_.ledgerwallet.md) - - [Enums]() - - [AddressValidation](developer-resources/wallet-ledger/reference/enums/_ledger_wallet_.addressvalidation.md) - - [Interfaces]() - - [API](developer-resources/wallet-ledger/reference/interfaces/_tokens_.api.md) - - [TokenInfo](developer-resources/wallet-ledger/reference/interfaces/_tokens_.tokeninfo.md) - - - - [Wallet-Local](developer-resources/wallet-local/reference/SUMMARY.md) - - - [Globals](developer-resources/wallet-local/reference/globals.md) - - [Modules]() - - [local-signer](developer-resources/wallet-local/reference/modules/_local_signer_.md) - - [LocalSigner](developer-resources/wallet-local/reference/classes/_local_signer_.localsigner.md) - - [local-wallet](developer-resources/wallet-local/reference/modules/_local_wallet_.md) - - [LocalWallet](developer-resources/wallet-local/reference/classes/_local_wallet_.localwallet.md) - - [Classes]() - - [LocalSigner](developer-resources/wallet-local/reference/classes/_local_signer_.localsigner.md) - - [LocalWallet](developer-resources/wallet-local/reference/classes/_local_wallet_.localwallet.md) - - - - [Wallet-Remote](developer-resources/wallet-remote/reference/SUMMARY.md) - - - [Globals](developer-resources/wallet-remote/reference/globals.md) - - [Modules]() - - [remote-wallet](developer-resources/wallet-remote/reference/modules/_remote_wallet_.md) - - [RemoteWallet](developer-resources/wallet-remote/reference/classes/_remote_wallet_.remotewallet.md) - - [Classes]() - - [RemoteWallet](developer-resources/wallet-remote/reference/classes/_remote_wallet_.remotewallet.md) - - - - [Wallet-Rpc](developer-resources/wallet-rpc/reference/SUMMARY.md) - - - [Globals](developer-resources/wallet-rpc/reference/globals.md) - - [Modules]() - - [rpc-signer](developer-resources/wallet-rpc/reference/modules/_rpc_signer_.md) - - [RpcSigner](developer-resources/wallet-rpc/reference/classes/_rpc_signer_.rpcsigner.md) - - [rpc-wallet](developer-resources/wallet-rpc/reference/modules/_rpc_wallet_.md) - - [RpcWalletErrors](developer-resources/wallet-rpc/reference/enums/_rpc_wallet_.rpcwalleterrors.md) - - [RpcWallet](developer-resources/wallet-rpc/reference/classes/_rpc_wallet_.rpcwallet.md) - - [test-utils/ganache.setup](developer-resources/wallet-rpc/reference/modules/_test_utils_ganache_setup_.md) - - [test-utils/ganache.teardown](developer-resources/wallet-rpc/reference/modules/_test_utils_ganache_teardown_.md) - - [Classes]() - - [RpcSigner](developer-resources/wallet-rpc/reference/classes/_rpc_signer_.rpcsigner.md) - - [RpcWallet](developer-resources/wallet-rpc/reference/classes/_rpc_wallet_.rpcwallet.md) - - [Enums]() - - [RpcWalletErrors](developer-resources/wallet-rpc/reference/enums/_rpc_wallet_.rpcwalleterrors.md) - - - -## Celo Codebase - -- [Celo Protocol](celo-codebase/protocol/README.md) - - [Consensus](celo-codebase/protocol/consensus/README.md) - - [Validator Set Differences](celo-codebase/protocol/consensus/validator-set-differences.md) - - [Locating Nodes](celo-codebase/protocol/consensus/locating-nodes.md) - - [Ultralight Sync](celo-codebase/protocol/consensus/ultralight-sync.md) - - [Proof-of-Stake](celo-codebase/protocol/proof-of-stake/README.md) - - [Validator Groups](celo-codebase/protocol/proof-of-stake/validator-groups.md) - - [Locked Gold and Voting](celo-codebase/protocol/proof-of-stake/locked-gold.md) - - [Validator Elections](celo-codebase/protocol/proof-of-stake/validator-elections.md) - - [Epoch Rewards](celo-codebase/protocol/proof-of-stake/epoch-rewards.md) - - [Rewards for Validators and Validator Groups](celo-codebase/protocol/proof-of-stake/validator-rewards.md) - - [Rewards for Locked Gold Holders](celo-codebase/protocol/proof-of-stake/locked-gold-rewards.md) - - [Community Fund](celo-codebase/protocol/proof-of-stake/community-fund.md) - - [Carbon Offsetting Fund](celo-codebase/protocol/proof-of-stake/carbon-offsetting-fund.md) - - [Penalties](celo-codebase/protocol/proof-of-stake/penalties.md) - - [Governance](celo-codebase/protocol/governance.md) - - [Stability Mechanism](celo-codebase/protocol/stability/README.md) - - [Stability Algorithm \(Mento\)](celo-codebase/protocol/stability/doto.md) - - [Oracles](celo-codebase/protocol/stability/oracles.md) - - [Stability Fees](celo-codebase/protocol/stability/stability-fees.md) - - [Adding Stable Tokens](celo-codebase/protocol/stability/adding_stable_assets.md) - - [Tobin Tax](celo-codebase/protocol/stability/tobin-tax.md) - - [Transactions](celo-codebase/protocol/transactions/README.md) - - [Native Currency](celo-codebase/protocol/transactions/native-currency.md) - - [Paying for Gas in Tokens](celo-codebase/protocol/transactions/erc20-transaction-fees.md) - - [Gas Pricing](celo-codebase/protocol/transactions/gas-pricing.md) - - [Escrow](celo-codebase/protocol/transactions/escrow.md) - - [Encrypted Payment Comments](celo-codebase/protocol/transactions/tx-comment-encyption.md) - - [Full Node Incentives](celo-codebase/protocol/transactions/full-node-incentives.md) - - [Identity](celo-codebase/protocol/identity/README.md) - - [Valora Accounts](celo-codebase/protocol/identity/valora-accounts.md) - - [Phone Number Privacy](celo-codebase/protocol/identity/phone-number-privacy.md) - - [Metadata](celo-codebase/protocol/identity/metadata.md) - - [Randomness](celo-codebase/protocol/identity/randomness.md) - - [Optics](celo-codebase/protocol/optics.md) - - [Plumo Ultralight Sync](celo-codebase/protocol/plumo.md) -- [Celo Wallet](celo-codebase/wallet/README.md) - - [Running the Wallet Locally](celo-codebase/wallet/intro.md) - - [Wallet Functionality](celo-codebase/wallet/how-the-wallet-works/README.md) - - [Verification](celo-codebase/wallet/how-the-wallet-works/verification.md) - - [Invitations](celo-codebase/wallet/how-the-wallet-works/invitations.md) - - [Payments and Exchanging](celo-codebase/wallet/how-the-wallet-works/sending-and-requesting-payments.md) - - [Ultralight Node Sync](celo-codebase/wallet/how-the-wallet-works/ultralight-node-sync.md) - -## Command Line Interface - -- [Introduction](command-line-interface/introduction.md) -- [Commands](command-line-interface/commands.md) - - [Account](command-line-interface/account.md) - - [Config](command-line-interface/config.md) - - [DKG](command-line-interface/dkg.md) - - [Election](command-line-interface/election.md) - - [Exchange](command-line-interface/exchange.md) - - [Governance](command-line-interface/governance.md) - - [Identity](command-line-interface/identity.md) - - [LockedGold](command-line-interface/lockedgold.md) - - [Multisig](command-line-interface/multisig.md) - - [Network](command-line-interface/network.md) - - [Node](command-line-interface/node.md) - - [Oracle](command-line-interface/oracle.md) - - [ReleaseGold](command-line-interface/releasegold.md) - - [Reserve](command-line-interface/reserve.md) - - [Rewards](command-line-interface/rewards.md) - - [Transfer](command-line-interface/transfer.md) - - [Validator](command-line-interface/validator.md) - - [ValidatorGroup](command-line-interface/validatorgroup.md) - - [Help](command-line-interface/help.md) - -## Community - -- [Code of Conduct](community/code-of-conduct.md) -- [Contributing](community/contributing.md) -- [Grant Playbook](community/grant-playbook.md) -- [Release Process](community/release-process/README.md) - - [Smart Contracts](community/release-process/smart-contracts.md) - - [Blockchain Client](community/release-process/blockchain-client.md) - - [Celocli and ContractKit](community/release-process/base-cli-contractkit-dappkit-utils.md) - - [Attestation Service](community/release-process/attestation-service.md) - -## Important Information - -- [Alfajores Testnet Disclaimer](important-information/alfajores-testnet-disclaimer.md) -- [Baklava Testnet Disclaimer](important-information/baklava-testnet-disclaimer.md) -- [Mainnet Disclaimer](important-information/mainnet-network-disclaimer.md) diff --git a/packages/docs/book.json b/packages/docs/book.json deleted file mode 100644 index e6df6d6ad28..00000000000 --- a/packages/docs/book.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "plugins": ["hints", "page-ref", "youtube"] -} diff --git a/packages/docs/celo-codebase/protocol/README.md b/packages/docs/celo-codebase/protocol/README.md deleted file mode 100644 index 9173c95a34f..00000000000 --- a/packages/docs/celo-codebase/protocol/README.md +++ /dev/null @@ -1,23 +0,0 @@ -# Celo Protocol - -Celo's blockchain reference implementation is based on go-ethereum, the Go implementation of the Ethereum protocol. The project team is indebted to the Geth community for providing these shoulders to stand on and, while recognizing that Ethereum is an independent project with its own trajectory, hopes to contribute changes where it makes sense to do so. - -In addition to the blockchain client, some core components of the Celo protocol are implemented at the smart contract level and even off-chain (e.g. phone number verification via SMS). - -Overall, a number of substantial changes and additions have been made in service of Celo's product goals, including the following: - -{% page-ref page="consensus/" %} - -{% page-ref page="proof-of-stake/" %} - -{% page-ref page="governance.md" %} - -{% page-ref page="stability/" %} - -{% page-ref page="transactions/" %} - -{% page-ref page="identity/" %} - -{% page-ref page="optics.md" %} - -{% page-ref page="plumo.md" %} diff --git a/packages/docs/celo-codebase/protocol/consensus/README.md b/packages/docs/celo-codebase/protocol/consensus/README.md deleted file mode 100644 index 60ce4710212..00000000000 --- a/packages/docs/celo-codebase/protocol/consensus/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# Consensus - -Celo’s consensus protocol is based on an implementation called Istanbul, or IBFT. IBFT was developed by AMIS and [proposed](https://github.com/ethereum/EIPs/issues/650) as an extension to [go-ethereum](https://github.com/ethereum/go-ethereum) but never merged. Variants of IBFT exist in both the [Quorum](https://github.com/jpmorganchase/quorum) and [Pantheon](https://github.com/PegaSysEng/pantheon) clients. We’ve modified Istanbul to bring it up to date with the latest [go-ethereum](https://github.com/ethereum/go-ethereum) releases and we’re fixing [correctness and liveness issues](https://arxiv.org/abs/1901.07160) and improving its scalability and security. - -Celo’s consensus protocol is performed by nodes that are selected as validators. There is a maximum cap on the number of active validators that can be changed by governance proposal, which is currently set at a 100 validators. The active validator set is determined via the proof-of-stake process and is updated at the end of each epoch, a fixed period of approximately one day. diff --git a/packages/docs/celo-codebase/protocol/consensus/locating-nodes.md b/packages/docs/celo-codebase/protocol/consensus/locating-nodes.md deleted file mode 100644 index 99f14adc49b..00000000000 --- a/packages/docs/celo-codebase/protocol/consensus/locating-nodes.md +++ /dev/null @@ -1,9 +0,0 @@ -# Locating Nodes - -All Celo nodes \(including our validators\) are using a variant of Ethereum's V4 discovery protocol to find other nodes within the network. Details of Ethereum's protocol can be found here: [https://github.com/ethereum/devp2p/blob/master/discv4.md](https://github.com/ethereum/devp2p/blob/master/discv4.md). - -When a node attempts to join the network, it will execute our discovery protocol. It will first send a request to the bootnodes to retrieve a list of other nodes of the network. The bootnodes will then reply with that list, and then the joining node will then send additional requests to nodes in that list to find additional nodes in the network. The main difference in Celo's discovery protocol compared to Ethereum's is that it will require that the joining node's networkID be the same as the bootnodes' \(and the same as all other network's nodes\). Also, all of the messages in Celo's discovery protocol must be hashed with a special salt to be accepted by other nodes. The reason why these changes were made is so that each node within a network will only store information of other nodes that have the same networkID (to distinguish nodes from other networks) and the same special salt \(to distinguish nodes from other blockchains, such as Ethereum\). - -Once a joining node finds other nodes, it will establish direct TCP connections to a subset of them. This will allow that node to sync it's blockchain and transactions. Validators will additionally attempt to establish TCP connections to the rest of the validators, so that it can send consensus messages directly to them, instead of via gossip. The reason that the validators do this is to minimize the latency of messages that are sent and received among the validators, and to ultimately help minimize block time. - -The way that validators communicate their IP address to other validators is by periodically gossiping a subprotocol message that we call an _IstanbulAnnounce_ message. That message will contain `n` copies (where `n` is the total number of validators for the current epoch) of the sending validator's IP address where each copy is encrypted with the other validators' public key. Once a validator receives a gossiped _IstanbulAnnounce_ message, it will decrypt the encrypted IP address that was encrypted with its public key, and then establish a TCP connection to it. All consensus related messages will then sent via those direct TCP connections. When an epoch ends, a validator will establish new connections with any newly elected validator and disconnect from any removed validators. If the validator itself is removed from the new epoch's validator set, then it will disconnect with all the validators. diff --git a/packages/docs/celo-codebase/protocol/consensus/ultralight-sync.md b/packages/docs/celo-codebase/protocol/consensus/ultralight-sync.md deleted file mode 100644 index 0cf4f71f140..00000000000 --- a/packages/docs/celo-codebase/protocol/consensus/ultralight-sync.md +++ /dev/null @@ -1,5 +0,0 @@ -# Ultralight Sync - -In addition to the “full”, “fast”, and “light” sync modes supported by Ethereum, Celo supports an “ultralight” sync mode. Ultralight nodes compute the validator set for the current epoch by downloading the last header of each previous epoch and applying the validator set diff. They then download the latest block header, which can be verified by checking that at least two-thirds of the validator set for the current epoch signed the block header. Ultralight nodes download approximately 30,000 times fewer headers than light nodes in order to sync the latest block \(assuming 3-second block periods and 1-day epochs\). - -In the future, Celo will support zk-SNARK-based proofs of the ultralight sync mode, which will lower the sync time even more. diff --git a/packages/docs/celo-codebase/protocol/consensus/validator-set-differences.md b/packages/docs/celo-codebase/protocol/consensus/validator-set-differences.md deleted file mode 100644 index 35d17637d91..00000000000 --- a/packages/docs/celo-codebase/protocol/consensus/validator-set-differences.md +++ /dev/null @@ -1,3 +0,0 @@ -# Validator Set Differences - -The validator set for a given epoch is elected at the end of the last block of the previous epoch. The new validator set is written to the “extradata” field of the header for this block. As an optimization, the validator set is encoded as the difference between the new and previous validator sets. Nodes that join the network are able to compute the validator set for the current epoch by starting with the initial validator set \(encoded in the genesis block\) and iteratively applying these diffs. diff --git a/packages/docs/celo-codebase/protocol/governance.md b/packages/docs/celo-codebase/protocol/governance.md deleted file mode 100644 index 6038cc98302..00000000000 --- a/packages/docs/celo-codebase/protocol/governance.md +++ /dev/null @@ -1,69 +0,0 @@ -# Governance - -Celo uses a formal on-chain governance mechanism to manage and upgrade the protocol such as for upgrading smart contracts, adding new stable currencies, or modifying the reserve target asset allocation. All changes must be agreed upon by CELO holders. A quorum threshold model is used to determine the number of votes needed for a proposal to pass. - -## Stakeholder Proposal Process - -Changes are managed via the Celo `Governance` smart contract. This contract acts as an "owner" for making modifications to other protocol smart contracts. Such smart contracts are termed **governable**. The `Governance` contract itself is governable, and owned by itself. - -The change procedure happens in the following phases: - -1. Proposal -2. Approval -3. Referendum -4. Execution - -### Overview of Phases - -Each proposal starts on the **Proposal Queue** where it may receive upvotes to move forward in the queue relative to other queued proposals. Three proposals from the top of the queue are dequeued and promoted to the approval stage per day. Any proposal that remains in the queue for 4 weeks will expire. **Approval** lasts 1 days, during which the proposal must be approved by the Approver. Approved proposals are promoted to the Referendum stage. **Referendum** lasts five days, during which owners of Locked Celo vote yes or no on the proposal. Proposals that satisfy the necessary quorum are promoted to the execution phase. **Execution** lasts up to three days, during which anybody may trigger the execution of the proposal. - -### Proposal - -Any user may submit a Proposal to the `Governance` smart contract, along with a small deposit of CELO. This deposit is required to avoid spam proposals, and is refunded to the proposer if the proposal reaches the Approval stage. A Proposal consists of a list of transactions, and a description URL where voters can get more information about the proposal. It is encouraged that this description URL points to a CGP document in the [celo-org/celo-proposals](https://github.com/celo-org/celo-proposals) repository. Transaction data in the proposal includes the destination address, data, and value. If the proposal passes, the included transactions will be executed by the `Governance` contract. - -Submitted proposals are added to the queue of proposals. While a proposal is on this queue, voters may use their [Locked Celo](./proof-of-stake/locked-gold.md) to **upvote** the proposal. Once per day the top three proposals, by weight of the Locked Gold upvoting them, are dequeued and moved into the Approval phase. Note that if there are fewer than three proposals on the queue, all may be dequeued even if they have no upvotes. If a proposal has been on the queue for for more than 4 weeks, it expires and the deposit is forfeited. - -### Approval - -Every day the top three proposals at the head of the queue are pop off and move to the Approval phase. At this time, the original proposers are eligible to reclaim their Locked Gold deposit. In this phase, the proposal needs to be approved by the Approver. The Approver is initially a 3 of 9 multi-signature address held by individuals selected by the Celo Foundation, and will move to a DAO in the future. The Approval phase lasts 1 day and if the proposal is not approved in this window, it is considered expired and does not move on to the “Referendum” phase. - -### Referendum - -Once the Approval phase is over, approved proposals graduate to the referendum phase. Any user may vote yes, no, or abstain on these proposals. Their vote's weight is determined by the weight of their Locked Gold. After the Referendum phase is over, which lasts five days, each proposal is marked as passed or failed as a function of the votes and the corresponding passing function parameters. - -In order for a proposal to pass, it must meet a minimum threshold for **participation**, and **agreement**: - -* Participation is the minimum portion of Locked Gold which must cast a vote for a proposal to pass. It exists to prevent proposals passing with very low participation. The participation requirement is calculated as a governable portion of the participation baseline, which is an exponential moving average of final participation in past governance proposals. -* Agreement is the portion of votes cast that must be "yes" votes for a proposal to pass. Each contract and function can define a required level of agreement, and the required agreement for a proposal is the maximum requirement among its constituent transactions. - -### Execution - -Proposals that graduate from the Referendum phase to the Execution phase may be executed by anyone, triggering a `call` operation code with the arguments defined in the proposal, originating from the `Governance` smart contract. Proposals expire from this phase after three days. - -## Smart Contract Upgradeability -​ -Smart contracts deployed to an EVM blockchain like Celo are immutable. To allow -for improvements, new features, and bug fixes, the Celo codebase uses the -[Proxy Upgrade Pattern](https://docs.openzeppelin.com/upgrades-plugins/1.x/proxies). All of the core contracts owned by Governance are proxied. Thus, a smart contract implementation can be upgraded using the standard on-chain governance process. -​ -### Upgrade risks -​ -The core contracts define critical behavior of the Celo network such as CELO and Celo Dollar asset management or validator elections and rewards. Malicious or inadvertent contract bugs could compromise user balances or potentially cause harm, irreversible without a blockchain hard fork. - -Great care must be taken to ensure that any Governance proposal that modifies smart contract code will not break the existing system. To this end, the contracts have a well defined [release process](../../community/release-process/smart-contracts.md), which includes soliciting security audits from reputable third-party auditors. - -As Celo is a decentralized network, all Celo network participants are invited to -participate in the governance proposals discussions on the [forum](https://forum.celo.org/c/governance/12). - - -## Validator Hotfix Process - -The cadence and transparency of the standard on-chain governance protocol make it poorly suited for proposals that patch issues that may compromise the security of the network, especially when the patch would reveal an exploitable bug in one of the core contracts. Instead, these sorts of changes are better suited for the more responsive, and less transparent, hotfix protocol. - -Anyone can make a proposal in the hotfix protocol by submitting the hash of their proposal to the `Governance` smart contract. If that hash is approved by the `approver` and a quorum of validators, the proposer can execute the contents of that proposal immediately. - -Note that this means the validators may not always know the contents of the proposal that they are voting on. Revealing the contents of the proposal to all validators may compromise the integrity of the hotfix protocol, as only one validator would need to be malicious in order to exploit the vulnerability or share it publicly. Instead, to convince the validators that the hash represents a proposal that should be executed via the hotfix protocol, the proposer should consider contacting reputable, third party, security firms to publicly vouch for the contents of the proposal. - -## Celo Blockchain Software Upgrades - -Some changes cannot be made through the on-chain governance process (via proposal or hotfix) alone. Examples include changes to the underlying consensus protocol and changes which would result in a hard-fork. When Celo Blockchain software upgrades are required to continue operating correctly on the network, a "Minimum Client Version" parameter is set to indicate the minimum version that it required. diff --git a/packages/docs/celo-codebase/protocol/identity/README.md b/packages/docs/celo-codebase/protocol/identity/README.md deleted file mode 100644 index ba22afd0d3d..00000000000 --- a/packages/docs/celo-codebase/protocol/identity/README.md +++ /dev/null @@ -1,37 +0,0 @@ -# Identity - -Celo’s unique purpose is to make financial tools accessible to anyone with a mobile phone. One barrier for the usage of many other platforms is their required usage of 30+ hexadecimal-character-long strings as addresses. It’s like bank account numbers, but worse. Hard to remember, easy to mess up. They are so hard to use that the predominant way of exchanging addresses is usually via copy-paste over an existing messaging channel or via QR-codes in person. Both approaches are practically interactive protocols and thus do not cover many use cases in which people would like to transact. Celo offers an optional lightweight identity layer that starts with a decentralized mapping of phone numbers to wallet addresses, allowing users to transact with one another via the most common identity scheme everyone is familiar with: their address book. - -![](https://storage.googleapis.com/celo-website/docs/attestations-flow.jpg) - -### Adding their phone number to the mapping - -To allow Bob to find an address mapped to her phone number, Alice can request attestations to their phone number \(technically the hash of their phone number\) from the `Attestations` contract by transferring the attestation request fee to it. The fee per attestation request is set on the contract with [Governance](../governance.md). After a brief waiting time of currently `4` blocks, the `Attestations` contract will use the `Random` contract to do a random selection over the current validator set in the `Validators` contract who will become responsible for these attestation requests. - -As part of the expectation to validators, they run the attestation service whose endpoint they register in their [Metadata](./metadata.md). Alice can identify the validators responsible for her attestation from the smart contract, determine the validators' attestation service URLs from their [Metadata](./metadata.md) and request attestations from them. In turn, the attestation service produces a signed secret message that acts as an attestation by that validator that Alice owns the phone number. The validator sends that message via SMS. Read more under [attestation service](#attestation-service). - -When Alice receives the text message, she can take that signed message to the `Attestations` contract, which can verify that the attestation came from the validator indeed. Upon a successful attestation, the validator can redeem for the attestation request fee to pay them for the cost of sending the SMS. In the end, we have recorded an attestation by the validator to a mapping of Alice’s phone number to her account address. - -### Using the mapping for payment - -Once Alice has completed attestations for their phone number/address, Bob, who has her phone number in his contact book, can see that Alice has an attested account address with her phone number. He can use that address to send funds to Alice, without her having to specifically communicate her address to Bob. - -The `Attestations` contract records all attestations of a phone number to any number of addresses. That for example could happen when a user loses their private key and wants to map a new wallet address. However, it could also happen through the collusion of a validator with Alice. Therefore, it is important that clients of the identity protocol highlight possible conflicting attestations. - -Some risk exists for attestations to be added without the permission of the "legitimate" owner of the phone number. One such risk is that the phone service provider or [SIM swap](https://en.wikipedia.org/wiki/SIM_swap_scam) attacker could take control of the phone number and complete a number of attestations. Another risk is that a sufficient number of Attestation Service providers may collude to complete fake attestations. Notably, completing malicious attestations does not lead to a loss of funds, as the private key is still the necessary and sufficient condition for transactions of an account. However, without proper care, future senders may be tricked into sending funds to the newly associated address. In general the number and age of attestations for an address should be taken into account to identify the valid owner of a phone number. - -There are additional measures we can take to further secure the integrity of the mapping’s usage. In the future we plan to provide reference implementations in the wallet for some of these. For example, we plan to detect remapping of wallet addresses. Many users are already accustomed to sending small amounts first and verifying the receipt of those funds before attempting to transfer larger amounts. - -### Preventing harvesting of phone numbers - -To protect user privacy by preventing mass harvesting of phone numbers, the Celo platform includes a service that obfuscates the information saved on the blockchain. The service is enabled by default for all Celo Wallet users. Details of its functionality and architecture are explained in [Phone Number Privacy](./phone-number-privacy.md) - -### Attestation service - -The attestation service is a simple Node.js service that validators run to send signed messages for attestations. It can be configured with SMS providers, as different providers have different characteristics like reliability, trustworthiness and performance in different regions. The attestation service currently supports [Twilio](https://www.twilio.com) and [Nexmo](https://nexmo.com). Celo should widen the number of supported providers over time. - -We have been experimenting with a SMS provider that we would like community feedback on. Instead of sending the SMS via conventional providers like Twilio, users of a `Rewards Mobile App` could register themselves with a `Verification Pool` and be made responsible for sending those text messages. It would allow users with cheap or leftover SMS capacity from their cell phone plan to effectively acquire a share of the attestation request fees. It would represent a unique on-ramp for users who do not have access to classic on-ramps like exchanges. Validators could configure their attestation service to use such a SMS provider which could in theory provide better inclusion and performance. - -### Future improvements to privacy - -Celo is committed to meet the privacy needs of its users. More details about areas for future research can be found in [Privacy Research](./privacy-research.md) diff --git a/packages/docs/celo-codebase/protocol/identity/metadata.md b/packages/docs/celo-codebase/protocol/identity/metadata.md deleted file mode 100644 index 9010dad1008..00000000000 --- a/packages/docs/celo-codebase/protocol/identity/metadata.md +++ /dev/null @@ -1,64 +0,0 @@ -# Metadata - -The Celo protocol's **metadata and claims** feature makes it possible to connect on-chain with off-chain identities. - -Use cases include: - -- Tools want to present public metadata supplied by a validator or validator group as part of a list of candidate groups, or a list of current elected validators. -- Governance Explorer UIs may want to present public metadata about the creators of governance proposals -- The Celo Foundation receives notice of a security vulnerability and wants to contact elected validators to facilitate them to make a decision on applying a patch. -- A DApp makes a request to the Celo Wallet for account information or to sign a transaction. The Celo Wallet should provide information about the DApp to allow the user to make a decision whether to sign the transaction or not. - -Furthermore, these tools may want to include user chosen information such as names or profile pictures that would be expensive to store on-chain. For this purpose, the Celo protocol supports **metadata** that allows accounts to make both verifiable as well as non-verifiable claims. The design is described in [CIP3](https://github.com/celo-org/CIPs/pull/4). - -On the `Accounts` smart contract, any account can register a URL under which their metadata file is available. The metadata file contains an unordered list of claims, signed by the account. - -## Types of Claim - -ContractKit currently supports the following types of claim: - -- **Name Claim** - An account can claim a human-readable name. This claim is not verifiable. - -- **Attestation Service URL Claim** - For the [lightweight identity layer](../), validators can make a claim under which their Attestation Service is reachable to provide attestations. This claim is not verifiable. - -- **Keybase User Claim** - Accounts can make claims on [Keybase](https://keybase.io) usernames. This claim is verifiable by signing a message with the account and hosting it on the publicly accessible path of the Keybase file system. - -- **Domain Claim** - Accounts can make claims on domain names. This claim is verifiable by signing a message with the account and embedding it in a [TXT record](https://en.wikipedia.org/wiki/TXT_record). - -In the future ContractKit may support other types of claim, including: - -- **Twitter User Claim** - Accounts can make claims on [Twitter](https://twitter.com/) usernames. This claim is verifiable by signing a message with the account and posting it as a tweet. Any client can verify the claim with a reference to the tweet in the claim. - -## Handling Metadata - -You can interact with metadata files easily through the [CLI](../../../command-line-interface/account.md), or in your own scripts, tools or DApps via [ContractKit](../../../developer-resources/contractkit/). Most commands require a node being available under `http://localhost:8545` to make view calls, and to modify metadata files, you'll need the relevant account to be unlocked to sign the files. - -You can create an empty metadata file with: - -```bash -celocli account:create-metadata ./metadata.json --from $ACCOUNT_ADDRESS -``` - -You can add claims with various commands: - -```bash -celocli account:claim-attestation-service-url ./metadata.json --from $ACCOUNT_ADDRESS --url $ATTESTATION_SERVICE_URL -``` - -You can display the claims in your file and their status with: - -```bash -celocli account:show-metadata ./metadata.json -``` - -Once you are satisfied with your claims, you can upload your file to your own web site or a site that will host the file (for example, [https://gist.github.com](https://gist.github.com)) and then register it with the `Accounts` smart contract by running: - -```bash -celocli account:register-metadata --url $METADATA_URL --from $ACCOUNT_ADDRESS -``` - -Then, anyone can lookup your claims and verify them by running: - -```bash -celocli account:get-metadata $ACCOUNT_ADDRESS -``` diff --git a/packages/docs/celo-codebase/protocol/identity/phone-number-privacy.md b/packages/docs/celo-codebase/protocol/identity/phone-number-privacy.md deleted file mode 100644 index 3881fd355e3..00000000000 --- a/packages/docs/celo-codebase/protocol/identity/phone-number-privacy.md +++ /dev/null @@ -1,61 +0,0 @@ -# Phone Number Privacy - -Celo's [identity protocol](README.md) allows users to associate their phone number with one or more addresses on the Celo blockchain. This allows users to find each other on the Celo network using phone number instead of cumbersome hexadecimal addresses. The Oblivious Decentralized Identifier Service (ODIS) was created to help preserve the privacy of phone numbers and addresses. - -## Understanding the problem - -When a user sends a payment to someone in their phone's address book, the mobile client must look up the identifier for that phone number on-chain to find the corresponding Celo blockchain address. This address is needed in order to create a payment transaction. If cleartext phone numbers were used as network identifiers directly, then anyone would be able to associate all phone numbers with blockchain accounts and balances. If instead, the identifier was the hash of the recipient's phone number, attackers would still be able to associate phone numbers with accounts and balances via a [rainbow table attack](https://en.wikipedia.org/wiki/Rainbow_table). - -## The solution - -The basis of the solution is to derive a user's identifier from both their phone number and a secret pepper that is provided by the Oblivious Decentralized Identifier Service (ODIS). In order to associate a phone number with a Celo blockchain address, the mobile wallet first queries ODIS for the pepper. It then uses the pepper to compute the unique identifier that's used on-chain. - -### Pepper request quota - -ODIS imposes a quota on requests for peppers in order to limit the feasibility of rainbow table attacks. When ODIS receives a request for a pepper, it authenticates the request and ensures the requester has not exceeded their quota. Since blockchain accounts and phone numbers are not naturally Sybil-resistant, ODIS bases request quota on the following factors: - -- Requester transaction history -- Requester phone number attestation count and success rate -- Requester account balance - -The requirements for these factors are configured to make it prohibitively expensive to scrape large quantities of phone numbers while still allowing typical user flows to remain unaffected. - -## Oblivious Decentralized Identifier Service - -### Distributed Key Generation - -For the sake of user privacy, no single party should have the ability to unilaterally compute the pepper for a given phone number. To ensure this, ODIS was designed to be decentralized across a set of reputable participants. Before the ODIS was deployed, a set of operators participated in a Distributed Key Generation (DKG) ceremony to generate parts of a shared secret. Details of the the DKG setup can be found [in the Celo Threshold BLS repository](https://github.com/celo-org/celo-threshold-bls-rs). Each ODIS node holds a share of the key which can be used to sign the response to the user. When enough of these signatures are combined, their combination can be used to derive a unique, deterministic phone number pepper. The number of key holders (_m_) and threshold of signatures required (_k_) are both configurable at the time of the DKG ceremony. - -### Rotating keys - -In the case that a key is compromised or a new ODIS operator is added, it will be necessary to perform a key rotation. Before going over the key rotation process, let's take a look at the implications of a compromised key. If the number of keys compromised at a time is less than the threshold _k_, the attacker will not be able to reach a sufficient threshold to compute the pepper for all phone numbers. Similarly, as long as _k_ other keys remain uncompromised, good users will still be able to perform the pepper lookup as part of the ODIS. Therefore, in the case that a single key is compromised, user data will remain private and the service operational; however, it's important that we can detect and perform a key rotation before the number of keys compromised exceeds _k_ or _m - k + 1_ (whichever is lower). For example, if there are ten ODIS operators and the required threshold is three, then if three of them are compromised an attacker may compute the pepper for all phone numbers. If eight are compromised then an attacker may prevent the rest of the nodes (two in this case) from generating the pepper for users. Note that "compromised" entities in these examples could also be malicious or simply unavailable. - -To rotate keys, a new DKG ceremony must be performed with at least _k_ of the _m_ original keys. These newly generated keys will not be compatible with the old keys; however if _k_ of the old keys are used, an attacker may still reach the necessary threshold.Therefore, it's extremely important that all of the old keys are destroyed after a successful key rotation. Note that a DKG ceremony also provides the opportunity to change the values for _k_ and _m_. - -### Blinding - -When a client, like the Celo wallet, queries ODIS to retrieve a phone number pepper, the client first blinds the phone number locally. This blinding process preserves the privacy of the mobile number such that ODIS nodes cannot determine what number they're providing a pepper for; reducing risk of targeted censorship and further increasing privacy. After the application receives the response, it unblinds it to compute the pepper. - -### Combiner - -To facilitate the multi-service communication needed for the K of M signing, ODIS includes a combiner service which performs this orchestration for the convenience of wallets and other clients building on Celo. Like ODIS signer nodes, the combiner only receives the blinded phone number and therefore cannot see what number it's handling. The combiner also validates the response from each signer to ensure a corrupt signer cannot corrupt the resulting pepper. - -Anyone who wishes to participate in the ODIS service may run a combiner. Currently, cLabs operates one such combiner that may be used by other projects building on Celo. - -## Authentication - -In order to measure the quota for a given requester, ODIS must check their account information on the Celo blockchain. To prove ownership over their account, the POST request contains an Authorization header with the signed message body. When ODIS nodes receive the request, it authenticates the user by recovering the message signer from the header and comparing it to the value in the message body. - -## Request Flow Diagram - -![request flow diagram](https://storage.googleapis.com/celo-website/docs/ODIS-flow-diagram.svg) - -## Architecture - -![architecture diagram](https://storage.googleapis.com/celo-website/docs/ODIS-architecture-diagram.svg) - -The hosted architecture is divided into two components, the Combiner and the Signers. Currently the combiner is a cloud function and the signers are independent NodeJs servers. Both services leverage the [Celo Threshold BLS library](https://github.com/celo-org/celo-threshold-bls-rs) which has been compiled to [a Web Assembly module](https://github.com/celo-org/blind-threshold-bls-wasm). - -The combiner and signers maintain some minimal state in a SQL database, mainly related to quota tracking. - -For storage of the BLS signing key, the signers currently support three cloud-based keystores: Azure Key Vault, AWS Secret Manager, and Google Secret Manager. diff --git a/packages/docs/celo-codebase/protocol/identity/privacy-research.md b/packages/docs/celo-codebase/protocol/identity/privacy-research.md deleted file mode 100644 index e06fc42739e..00000000000 --- a/packages/docs/celo-codebase/protocol/identity/privacy-research.md +++ /dev/null @@ -1,14 +0,0 @@ -# Future Privacy Research - -Celo is committed to meet the privacy needs of its users. This section describes future plans for delivering on this commitment, while also sharing the current limitations of the Celo networks. - -### Privacy mode - -One downside to this identity protocol is that knowledge of a phone number can let anyone quickly determine the balance of the associated wallet, which of course may be unacceptable for many use cases. For these circumstances, the contract allows users to use the `Attestations` contract in privacy mode. In this mode, the user does not map their phone number to their wallet address, but to an account that is not meant to be the recipient of transfers. Through a registered encryption key on the user’s account on the contract, schemes can be derived to allow users to selectively reveal their true wallet addresses to authorized participants. - -### Transaction and Balance Privacy - -As with most public blockchains \(e.g. Bitcoin, Ethereum\), transactions and smart contracts calls on Celo are public for everyone to see. This means that if a user wants to map the hash of their phone number to their wallet address, people with knowledge of that user's phone number will be able to see their transactions and balances. - -To address this issue, the cLabs team, [Matterlabs](https://matterlabs.dev) and other esteemed zk-SNARK cryptographers and Celo community members are working to create a framework that makes it easy to create gas-efficient tokens that offer Zcash-like privacy, using a shared anonymity pool. Such an implementation could allow wallets to use the default identity mode easily without the risk that someone with your phone number could see your balance and transaction history. - diff --git a/packages/docs/celo-codebase/protocol/identity/randomness.md b/packages/docs/celo-codebase/protocol/identity/randomness.md deleted file mode 100644 index 4f6dc0f588a..00000000000 --- a/packages/docs/celo-codebase/protocol/identity/randomness.md +++ /dev/null @@ -1,9 +0,0 @@ -# Randomness - -As mentioned previously, when requesting new attestations, random validators are selected to perform phone number verification. This selection needs to be unpredictable to prevent Eve from creating an attestation for a phone number she doesn’t control. Suppose, for example, that instead validators were selected in a round robin fashion. Eve could request an attestation when it was the turn of a validator she controls to perform verification. Instead of sending an SMS to the phone number \(since she doesn’t own it\) she could just produce the correct verification code since she has access to the validator’s private key. - -Producing unpredictable pseudo-randomness without a trusted third party is not trivial. Several solutions for this problem exist or are being currently researched. They include Verifiable Random Functions \(for example, based on BLS threshold signatures\), Verifiable Delay Functions, and commit-reveal schemes. Currently, Celo implements a simple commit-reveal scheme which is secure enough for the purposes of validator selection. A more sophisticated solution might be implemented as the network evolves, especially if randomness becomes necessary for other purposes that require stronger assumptions about the randomness’s security \(for example if it was decided that a randomized leader election algorithm should replace the current round robin\). - -In a proposed block, the proposer attaches two values related to the randomness scheme - randomness corresponding to their previous commitment, and a new commitment to freshly generated random bytes that will be revealed in the future. The revealed randomness is added to an entropy pool accessible on-chain from the Random smart contract. - -More formally, the $$n*{th}$$ block proposed by a given validator contains values $$(r_n, s_n)$$ such that $$\text{keccack256}(r_n) = s*{n-1}$$. The one exception to this is the validator’s first block, the case where $$n = 1$$, since they have not previously committed to randomness yet. Here, the protocol instead requires that $$r_1 = 1$$. diff --git a/packages/docs/celo-codebase/protocol/identity/valora-accounts.md b/packages/docs/celo-codebase/protocol/identity/valora-accounts.md deleted file mode 100644 index 86ee3ccbf47..00000000000 --- a/packages/docs/celo-codebase/protocol/identity/valora-accounts.md +++ /dev/null @@ -1,42 +0,0 @@ -# Valora Accounts - -Behind every Valora wallet are two types of accounts: an externally owned account (EOA) and a meta-transaction wallet (MTW). EOAs are what most people think of when they imagine a blockchain wallet. EOAs are comprised of an ECDSA public/private key pair from which the on-chain address is derived. With Valora, this EOA is generated and stored on the user's mobile device and backed up via the mnemonic phrase. A meta-transaction wallet on the other hand is a smart contract that can be used to interact with other smart contracts on behalf of an EOA. In this case you can think of the MTW as a proxy account and the EOA as the only controller of this account. - -## Benefits of a Meta-Transaction Wallet - -### Separation of signer and payer - -When new users sign up with Valora, most wallets start with an empty balance. This makes it difficult for the user to verify their phone number as they need to pay for both the Celo transactions and the Attestation Service fees ([see here for more details](README.md)). To make this experience more intuitive for new users, cLabs operates an [onboarding service called Komenci](https://github.com/celo-org/komenci/) that pays for the transactions on behalf of the user. It does this by first deploying a meta-transaction wallet contract and setting the Valora EOA address as the signer. At this point, the EOA can sign transactions and submit them to Komenci. Komenci will wrap the signed transaction into a meta-transaction, which it pays for and submits to the network. - -### Fund Recovery - -Meta-transaction wallets can also be useful if a user ever loses their phone and backup account key. Any ERC20 tokens that the EOA has [approved](https://docs.openzeppelin.com/contracts/2.x/api/token/erc20#IERC20-approve-address-uint256-) their meta-transaction wallet to use, can be recovered. In the case of loss of EOA, a new EOA will be created and granted signer rights to the original MTW. This would allow the lost funds to still be accessed, even though the original EOA is unrecoverable. This recovery mechanism hasn't been rolled out yet, but is actively being worked on by cLabs. - -## For Wallet Developers - -When performing a payment to a Valora wallet, it's important that the address that is receiving funds is the EOA, and not the MTW since funds in the MTW are not displayed or directly accessible to Valora users. To look up a wallet using a phone number: - -1. Use ODIS to query the phone number pepper -2. Use the phone number pepper to get the on-chain identifier -3. Use the on-chain identifier to get the account address -4. Use the account address to get the wallet address (EOA) - -The first two steps are covered extensively in [this guide](../../../developer-resources/contractkit/odis.md). - -To get the account address (step 3) you can use the [Attestation contract method `lookupAccountsForIdentifier`](https://github.com/celo-org/celo-monorepo/blob/e6fdaf798a662ffe2c12f9a74b28e0fa1c1f8101/packages/sdk/contractkit/src/wrappers/Attestations.ts#L472). - -To get the wallet address from the account (step 4) you can use the [Account contract method `getWalletAddress`](https://github.com/celo-org/celo-monorepo/blob/e6fdaf798a662ffe2c12f9a74b28e0fa1c1f8101/packages/sdk/contractkit/src/wrappers/Accounts.ts#L318). - -It may also be necessary to lookup the data encryption key (ex. [for comment encryption](../transactions/tx-comment-encyption.md)). This key can similarly be queried with the account by using the [Account contract method `getDataEncryptionKey`](https://github.com/celo-org/celo-monorepo/blob/e6fdaf798a662ffe2c12f9a74b28e0fa1c1f8101/packages/sdk/contractkit/src/wrappers/Accounts.ts#L310). - -You can view a working example of this all tied together in [the `celocli` command `identity:get-attestations`](https://github.com/celo-org/celo-monorepo/blob/master/packages/cli/src/commands/identity/get-attestations.ts). - -## For Dapp Developers - -### EIP-712 - -Since all Valora users will have the ability to use a meta-transaction wallet, it's important to keep in mind that transactions may originate from an EOA as well as a smart contract. If your contract relies upon EIP-712 signed typed data, be sure to also support typed data originating from contracts. This data doesn't need to be signed by the msg.sender since it's originating from a contract. - -## Implementation - -The implementation of Valora's meta-transaction wallet can be [found here](https://github.com/celo-org/celo-monorepo/blob/master/packages/protocol/contracts/common/MetaTransactionWallet.sol). diff --git a/packages/docs/celo-codebase/protocol/optics.md b/packages/docs/celo-codebase/protocol/optics.md deleted file mode 100644 index 4635df7e6ce..00000000000 --- a/packages/docs/celo-codebase/protocol/optics.md +++ /dev/null @@ -1,180 +0,0 @@ -# Optics: OPTimistic Interchain Communication - -Optics is a new design for radically cheaper cross-chain communication without header verification. We expect operating Optics to cut 90% of gas costs compared to a traditional header relay. To accomplish this, we took inspiration from optimistic systems (a la Optimistic Roll-ups). Optics features many of the features we prize in an optimistic mechanism, like public verification, low gas fees, broad participation, but has a slightly different security model. - -Optics will form the base layer of a cross-chain communication network that provides fast, cheap communication for all smart contract chains and rollups. It relies only on widely-available cryptographic primitives (unlike header relays), has a latency of a few hours (rather than an ORU’s one week latency), and imposes only about 120,000 gas overhead on message senders. - -Optics has been designed for ease of implementation in any blockchain that supports user-defined computations. We will provide initial Solidity implementations of the on-chain contracts, and Rust implementations of the off-chain system agents. We aim to follow up with Rust implementations of the on-chain contracts targeting Near and Solana later this year. - -## Building Intuition for Optics - -Optics works something like a notary service. - - -optics-notary - - -The sending (or “home”) chain produces a series of documents ("messages") that needs notarization. A notary (called the “updater”) is contracted to sign it. The notary can produce a fraudulent copy, but they will be punished by having their bond and license publicly revoked. When this happens, everyone relying on the notary learns that the notary is malicious. All the notary's customers can immediately block the notary and prevent any malicious access to their accounts. - -## How does Optics work? - -Optics is patterned after optimistic systems. It sees an attestation of some data, and accepts it as valid after a timer elapses. While the timer is running, honest participants have a chance to respond to the attestation and/or submit fraud proofs. - -Unlike most optimistic systems, Optics spans multiple chains. The sending chain is the source of truth, and contains the “Home” contract where messages are enqueued. Messages are committed to in a merkle tree (the “message tree”). The root of this tree is notarized by the updater and relayed to the receiving chain in an “update”. Updates are signed by the updater. They commit to the previous root and a new root. - -Any chain can maintain a “Replica” contract, which holds knowledge of the updater and the current root. Signed updates are held by the Replica, and accepted after a timeout. The Replica effectively replays a series of updates to reach the same root as the Home chain. Because the root commits to the message tree, once the root has been transmitted this way, the message can be proven and processed. - -This leaves open the possibility that the Updater signs a fraudulent update. Unlike an optimistic rollup, Optics permits fraud. This is the single most important change to the security model. Importantly, fraud can always be proven to the Home contract on the sending chain. Because of this, the updater must submit a bonded stake on the sending chain. Fraud can always be proven on the sending chain, and the bond can be slashed as punishment. - -Unfortunately, certain types of fraud can't be objectively proven on the receiving chain; Replicas can't know which messages the home chain intended to send and therefore can't check message tree validity in all cases. However, if a message is falsified by an Updater and submitted to the Replica, that update is public. This means that any honest actor can prove this fraud on the original Home contract and cause slashing. There is no way to hide fraud. - -In addition, because the Replica waits to process messages, Optics guarantees that honest dapps can always prevent processing of dishonest messages. Fraud is always public knowledge before the fraudulent message is processed. In this sense, Optics (like atomic swaps and other locally verified systems) includes a requirement for honest users to stay online. We have built a robust system for delegating this responsibility. - -All off-chain observers can be immediately convinced of fraud (as they can check the home chain). This means that the validity of a message sent by Optics is not 100% guaranteed. - -Instead, Optics guarantees the following: - -- Fraud is costly -- All users can learn about fraud -- All users can block a fraudulent message before they are accepted - -In other words, rather than using a globally verifiable fraud-proof, Optics relies on local verification by participants. This tradeoff allows Optics to save 90% on gas fees compared to pessimistic relays, while still maintaining a high degree of security. - -## Optics Architecture - -Optics contains several on-chain and off-chain components. For convenience, we’ll be referring to the Home and Replica as contracts, when in fact they are several contracts working together. - - -optics-on-chain-components - - -## On-chain (Contracts) - -### Home - -The home contract is responsible for managing production of the message tree and holding custody of the updater bond. - -__It performs the following functions:__ - -- Expose a "send message" API to other contracts on the home chain -- Enforce the message format -- Commit messages to the message tree -- Maintain a queue of tree roots -- Slash the updater's bond - - Double-update proofs - - Improper update proofs - -### Replica - -The replica contract is responsible for managing optimistic replication and dispatching messages to end recipients. - -__It performs the following functions:__ - -- Maintain a queue of pending updates -- Finalize updates as their timeouts elapse -- Accept double-update proofs -- Validate message inclusion proofs -- Enforce the message format -- Ensure messages are processed in order -- Dispatch messages to their destination -- Off-chain (Agents) - -### Updater - -The updater is responsible for signing attestations of new roots. - -__It is an off-chain actor that does the following:__ - -- Observe the home chain contract -- Sign attestations to new roots -- Publish the signed attestation to the home chain - -### Watcher - -The watcher observes the Updater's interactions with the Home contract (by watching the Home contract) and reacts to malicious or faulty attestations. It also observes any number of replicas to ensure the Updater does not bypass the Home and go straight to a replica. - -__It is an off-chain actor that does the following:__ - -- Observe the home -- Observe 1 or more replicas -- Maintain a DB of seen updates -- Submit double-update proofs -- Submit invalid update proofs -- If configured, issue an emergency halt transaction - -### Relayer - -The relayer forwards updates from the home to one or more replicas. - -__It is an off-chain actor that does the following:__ - -- Observe the home -- Observe 1 or more replicas -- Polls home for new signed updates (since replica's current root) and submits them to replica -- Polls replica for confirmable updates (that have passed their optimistic time window) and confirms if available (updating replica's current root) - -### Processor - -The processor proves the validity of pending messages and sends them to end recipients. - -__It is an off-chain actor that does the following:__ - -- Observe the home -- Maintain local merkle tree with all leaves -- Observe 1 or more replicas -- Maintain list of messages corresponding to each leaf -- Generate and submit merkle proofs for pending (unproven) messages -- Dispatch proven messages to end recipients - -## How Optics passes messages between chains - - -optics-messages-between-chains - - -Optics creates an authenticated data structure on a home chain, and relays updates to that data structure on any number of replicas. As a result, the home chain and all replicas will agree on the state of the data structure. By embedding data ("messages") in this data structure we can propagate it between chains with a high degree of confidence. - -The home chain enforces rules on the creation of this data structure. In the current design, this data structure is a sparse merkle tree based on the design used in the eth2 deposit contract. This tree commits to the vector of all previous messages. The home chain enforces an addressing and message scheme for messages and calculates the tree root. This root will be propagated to the replicas. The home chain maintains a queue of roots (one for each message). - -The home chain elects an "updater" that must attest to the state of the message tree. The updater places a bond on the home chain and is required to periodically sign attestations (updates or U). Each attestation contains the root from the previous attestation (U_prev), and a new root (U_new). - -The home chain slashes when it sees two conflicting updates (U_i and U_i' where U_i_prev == U_i'_prev && U_i_new != U_i'_new) or a single update where U_new is not an element of the queue. The new root MUST be a member of the queue. E.g a list of updates U_1...U_i should follow the form [(A, B), (B, C), (C, D)...]. - -Semantically, updates represent a batch commitment to the messages between the two roots. Updates contain one or more messages that ought to be propagated to the replica chain. Updates may occur at any frequency, as often as once per message. Because updates are chain-independent, any home chain update may be presented to any replica, and any replica update may be presented to the home chain. In other words, data availability of signed updates is guaranteed by each chain. - -Before accepting an update, a replica places it into a queue of pending updates. Each update must wait for some time parameter before being accepted. While a replica can't know that an update is certainly valid, the waiting system guarantees that fraud is publicly visible on the home chain before being accepted by the replica. In other words, the security guarantee of the system is that all frauds may be published by any participant, all published frauds may be slashed, and all participants have a window to react to any fraud. Therefore updates that are not blacklisted by participants are sufficiently trustworthy for the replica to accept. - -## Optical Channels for Cross-Chain Communication - -Optics sends messages from one chain to another in the form of raw bytes. A cross-chain application that wishes to use Optics will need to define the rules for sending and receiving messages for its use case. - -Each cross-chain application must implement its own messaging protocol. By convention, we call the contracts that implement this protocol the application's Router contracts. Their function is broadly similar to routers in local networks. They ensure that incoming and outgoing messages are in the protocol-defined format, and facilitate handling and dispatch. - -__These Router contracts must:__ - -- maintain a permissioned set of the contract(s) on remote chains from which it will accept messages via Optics — this could be a single owner of the application on one chain; it could be a registry of other applications implementing the same rules on various chains -- encode messages in a standardized format, so they can be decoded by the Router contract on the destination chain -- handle messages from remote Router contracts -- dispatch messages to remote Router contracts - -By implementing these pieces of functionality within a Router contract and deploying it across multiple chains, we create a working cross-chain application using a common language and set of rules. Applications of this kind may use Optics as the cross-chain courier for sending and receiving messages to each other. - -## Benefits and Trade-offs of the Optics Architecture - -__Benefits__ | __Challenges__ --- | -- -Broadcast channel | 1-of-N fraud-proof trust model -Cheap | Liveness failure if updater goes down -One-solution fits all | Updater could voluntarily forfeit bond to try to pass forged messages -Simple |   - -The benefit of Optics is that the broadcast channel allows for a single-producer, multi-consumer model. This ensures that 1 accumulator can communicate with any number of receiving chains. It’s also much cheaper than other options, allowing updates and proofs to cost <100k gas and be checked by only 1 signature. With Optics, one-solution fits all meaning that constraints on receiving chains are minimal (1 hash function + 1 signature check). There is no implementation or security difference between Proof of Stake and Proof of Work chains. There is also many fewer LoC than a Relay, much lower design maintenance overhead, and much less expertise required to maintain and operate. - -We’ve been careful to address all concerns with the Optics system and have designed solutions that allow for optimal speed, cost, and security of the network. For example, we rely on fraud publication rather than fraud proofs to improve the speed and cost of sending messages. In this security model, any potential fraud is disincentivized and costly, and all participants will always learn of any potential fraud with plenty of time to mitigate harm. - - - - - - - diff --git a/packages/docs/celo-codebase/protocol/plumo.md b/packages/docs/celo-codebase/protocol/plumo.md deleted file mode 100644 index b98a555e564..00000000000 --- a/packages/docs/celo-codebase/protocol/plumo.md +++ /dev/null @@ -1,209 +0,0 @@ -# Plumo Ultralight Sync - -Plumo is a zk-SNARK based system that allows mobile and resource constrained nodes on the Celo network to sync to the Celo blockchain faster and with less data. It accomplishes this by using zero-knowledge proofs, which allow the quick verification of the chain syncing computation without having to run it locally. - -## Background - -Celo is a mobile-first blockchain platform with a mission to enable the conditions for prosperity across the world. This means that may of Celo and the Valora wallet's first users will be in emerging markets. In these countries, while mobile phone penetration has significantly increased, data plans and device hardware still lags. This means that for average users, data is a scarce commodity and devices are underpowered in compute relative to the latest and greatest iPhone or Android devices. - -If these users are to trustlessly sync and interact with a blockchain network, they'll need to run a [light client](https://www.parity.io/what-is-a-light-client/) on devices. However, traditional light clients in proof of work (PoW) blockchains need to download every block header, which grows linearly with new blocks. Over time, this becomes untenable, and even light clients [take minutes to sync](https://ethereum.stackexchange.com/questions/82568/whats-the-status-of-ethereum-light-client). - -### Proof of Stake Light Clients - -Celo uses a proof of stake (PoS) consensus sytem, enabling it to offer a better light client sync experience, right off the bat: - -1. First, Celo light clients only need to download epoch block headers, which contain information about the current validator set. [The validator set](./consensus/validator-set-differences.md) in Celo changes once every epoch, roughly about once per day. This means instead of downloading a block header for every block on the Celo network, they can just download one a day. - -2. Second, Celo uses BLS signatures to aggregate validator signatures. Similar to Tendermint consensus, Celo's IBFT consensus mechanism requires a quorum of 2/3 or more validators to sign each block to commit it to the blockchain. Instead of having each of these signatures be separately stored on-chain, Celo uses BLS signatures which can combine them into one signature per block. - -These two innovations reduce the time and data required to sync significantly, but over time, sync time continues to increase. One option is to [checkpoint](https://decentralizedthoughts.github.io/2019-09-13-dont-trust-checkpoint/) the chain ever so frequently so that clients do not need to sync from the genesis block. This certainly alleviates the challenge, but checkpointing requires getting consensus and agreement from the community, which can take time. What if there were a way to "checkpoint" cryptographically? - -### Enter Plumo - -This is where Plumo comes in. Plumo zk-SNARKs allow light clients to quickly verify transitions from epoch X to epoch X + Y, where Y is hundreds of epochs. This means that instead of verifying each epoch, light clients can "hop" from SNARK to SNARK until they reach the latest proof. From there, they can download the remaining epoch block headers to sync to the head of the chain. - -The Plumo proofs are generated by a prover that can be run by multiple nodes across the Celo network. Proofs are then requested by light clients on the modified light client protocol. Light clients are able to verify proofs using the verification key that is included with the binary. - -Using Plumo, light clients can drastically reduce the amount of data and time required to trustlessly sync with the Celo blockchain. But one more step is required for Plumo to be live on the Celo network -- the Plumo MPC setup. - -## Plumo MPC Setup - -In order to generate the prover and verifier keys for the Plumo SNARK circuit, it is necessary to run a multi-party computation (MPC). - -An MPC is a cryptographic mechanism for different parties to jointly perform a computation. SNARK circuits require a “trusted setup” where a shared secret is used to generate public parameters that can be used to prove and verify SNARKs. If one person ran this setup, then they could potentially prove incorrect things by exploiting a backdoor in the circuit. However, with an MPC, this setup process is split amongst tens or hundreds of contributors, and if even one of the participants is honest (keeps their inputs private), then the system will be secure. - -In the case of the Plumo Ceremony, this collective computation will be a series of joint actions done by a group of participants from within the Celo community and beyond. - -## How to Contribute - -The Plumo MPC setup is broken up into two phases: - -* Phase 1 - Powers of Tau - - The output of this phase can be used for either Groth16 circuits up to the size of the phase, or universal proving systems such as PLONK and Marlin. -* Phase 2 - Plumo circuit - - In this phase, the participants contribute to the Plumo circuit keys, which would be used by provers to create proofs and verifiers to verify them. - -Phase 1 will take place starting early December 2020, and continue until January 2021. It will consist of multiple rounds of 6–10 contributors each running the Plumo setup for approximately 36 hours. While much of the activity is passive and involves simply running the computation continuously, contributors should not expect to use their machines for other intensive activies through the duration of the setup. - -Phase 2 will commence roughly a month after Phase 1. - -Contributors will also receieve a gift for the time and efforts, and be recognized for their contributions to the Celo network. - -### Pre-requisites - -You can run the contributor software locally or on cloud VMs, but desktop machines are preferable. The minimum machine requirements are detailed below: - -#### Machine requirements: - -- CPU model newer than 2016 -- Minimum processor requirements: - - 2.6GHz, 6 cores, 12 threads, OR - - 2.3GHz, 8 cores, 16 threads, OR - - 3.6GHz, 4 cores, 4 threads -- Operating system: Linux, macOS, Windows -- Recommended internet connection speed: 10Mbit upload - -With these kind of machines, participiation in the setup should take around 30 hours, potentially a bit more or much less, depending on your specific hardware and internet connection. - -## Running the Setup - -### Phase 1 - -The instructions below are for the first phase of the Plumo setup, Powers of Tau. - -#### Generate your address - -The first step to participating is generating your Celo address in a secure location. - -* Obtain the `generate` binary: - * Option one - compile the `generate` binary: - * Install Rust 1.49 using `rustup install 1.49.0`. If you don't have `rustup` installed, follow the instructions in https://rustup.rs/. If you're using an Apple M1 machine, install the beta version of Rust using `rustup install beta`. - * `git clone https://github.com/celo-org/snark-setup-operator` - * `cd snark-setup-operator` - * `git checkout ac3d5603256fc250500e00bae21ba646dd316d6f` - * `cargo build --release --bin generate` - * Now you can use `./target/release/generate` - * Option two - if you prefer using a precompiled binary, download the `generate` binary corresponding to your OS from [here](https://github.com/celo-org/snark-setup-operator/releases/tag/v1.1.3). -* Use `b2sum` to check the hash of the binary against the hash in the download page by running `b2sum FILE`, where `FILE` is the `contribute` binary name for your OS. If you don't have `b2sum` installed, you can download it from `https://github.com/dchest/b2sum`, for example. -* Run it in a command line - navigate in the command line to the relevant folder - and follow the instructions. - * When asked to `Enter some entropy for your Plumo seed:`, you can use any source of entropy. - * Make sure to save your passphrase - you will need it later. - * If you are using a USB thumbdrive, you can use the flag `--keys-file KEYS_FILE`, passing in the respective file path to save the key on the drive itself. -* Send the address generated to plumo@celo.org. -* Keep the resulting `plumo.keys` file. Ideally, it will be stored in a location that's easy to destroy afterwards, such as a USB thumbdrive. - -#### Run the Contributor software - -Next you'll obtain the `contribute` binary and begin contributing to the Plumo setup. - -cLabs is running the coordinator server, which has a list of approved participant addresses. Additionally, cLabs is running a few verifiers that verify contributions on-demand, allowing the setup to make progress. - -* After receiving confirmation from cLabs, obtain the `contribute` binary: - * Option one - compile the `contribute` binary: - * Install Rust 1.49 using `rustup install 1.49.0`. If you don't have `rustup` installed, follow the instructions in https://rustup.rs/. If you're using an Apple M1 machine, install the beta version of Rust using `rustup install beta`. - * `git clone https://github.com/celo-org/snark-setup-operator` - * `cd snark-setup-operator` - * `git checkout ac3d5603256fc250500e00bae21ba646dd316d6f` - * `cargo build --release --bin contribute` - * Now you can use `./target/release/contribute` - * Option two - if you prefer using a precompiled binary, download the `contribute` binary corresponding to your OS from [here](https://github.com/celo-org/snark-setup-operator/releases/tag/v1.1.3). -* Use `b2sum` to check the hash of the binary against the hash in the download page by running `b2sum FILE`, where `FILE` is the `contribute` binary name for your OS. If you don't have `b2sum` installed, you can download it from `https://github.com/dchest/b2sum`, for example. -* Run it as follows, assuming your keys reside in KEYS_FILE: - * Windows users: `./contribute-windows.exe --keys-file KEYS_FILE` - * macOS users: `./contribute-macos --keys-file KEYS_FILE` - * Linux users: `./contribute-linux --keys-file KEYS_FILE` - - For example, assuming you're using Linux and your keys reside in `/mnt/plumo/plumo.keys`, you'd run: `./contribute-linux --keys-file /mnt/plumo/plumo.keys`. -* You will be asked for your passphrase - enter the same one from earlier. - * Follow the same process from earlier when prompted for additional entropy. -* Wait until you see 0/256 on the progress bar. This means that your contribution has started, and you are succesfully running the contributor binary. - -Once this is running, you can leave the machine running -- no direct action is needed. This will run for about ~36 hours, after which the software will terminate running and you will have finished contributing to the Plumo setup! - -### Phase 2 - -The instructions below are for the second phase of the Plumo setup, the Plumo circuit. - -#### Generate your address - -The first step to participating is generating your Celo address in a secure location. - -* Obtain the `generate` binary: - * Option one - compile the `generate` binary: - * Install Rust 1.52 using `rustup install 1.52.1`. If you don't have `rustup` installed, follow the instructions in https://rustup.rs/. If you're using an Apple M1 machine, install the beta version of Rust using `rustup install beta`. - * `git clone https://github.com/celo-org/snark-setup-operator` - * `cd snark-setup-operator` - * `git checkout 33717c3b0869c605e6c3627446e916f268712e00` - * `cargo build --release --bin generate` - * Now you can use `./target/release/generate` - * Option two - if you prefer using a precompiled binary, download the `generate` binary corresponding to your OS from [here](https://github.com/celo-org/snark-setup-operator/releases/tag/v1.2.2). -* Use `b2sum` to check the hash of the binary against the hash in the download page by running `b2sum FILE`, where `FILE` is the `contribute` binary name for your OS. If you don't have `b2sum` installed, you can download it from `https://github.com/dchest/b2sum`, for example. -* Run it in a command line - navigate in the command line to the relevant folder - and follow the instructions. - * When asked to `Enter some entropy for your Plumo seed:`, you can use any source of entropy. - * Make sure to save your passphrase - you will need it later. - * If you are using a USB thumbdrive, you can use the flag `--keys-file KEYS_FILE`, passing in the respective file path to save the key on the drive itself. -* Send the address generated to plumo@celo.org. -* Keep the resulting `plumo.keys` file. Ideally, it will be stored in a location that's easy to destroy afterwards, such as a USB thumbdrive. - -#### Run the Contributor software - -Next you'll obtain the `contribute` binary and begin contributing to the Plumo setup. - -cLabs is running the coordinator server, which has a list of approved participant addresses. Additionally, cLabs is running a few verifiers that verify contributions on-demand, allowing the setup to make progress. - -* After receiving confirmation from cLabs, obtain the `contribute` binary: - * Option one - compile the `contribute` binary: - * Install Rust 1.52 using `rustup install 1.52.1`. If you don't have `rustup` installed, follow the instructions in https://rustup.rs/. If you're using an Apple M1 machine, install the beta version of Rust using `rustup install beta`. - * `git clone https://github.com/celo-org/snark-setup-operator` - * `cd snark-setup-operator` - * `git checkout 33717c3b0869c605e6c3627446e916f268712e00` - * `cargo build --release --bin contribute` - * Now you can use `./target/release/contribute` - * Option two - if you prefer using a precompiled binary, download the `contribute` binary corresponding to your OS from [here](https://github.com/celo-org/snark-setup-operator/releases/tag/v1.2.2). -* Use `b2sum` to check the hash of the binary against the hash in the download page by running `b2sum FILE`, where `FILE` is the `contribute` binary name for your OS. If you don't have `b2sum` installed, you can download it from `https://github.com/dchest/b2sum`, for example. -* Run it as follows, assuming your keys reside in KEYS_FILE: - * Windows users: `./contribute-windows.exe --keys-file KEYS_FILE` - * macOS users: `./contribute-macos --keys-file KEYS_FILE` - * Linux users: `./contribute-linux --keys-file KEYS_FILE` - - For example, assuming you're using Linux and your keys reside in `/mnt/plumo/plumo.keys`, you'd run: `./contribute-linux --keys-file /mnt/plumo/plumo.keys`. -* You will be asked for your passphrase - enter the same one from earlier. - * Follow the same process from earlier when prompted for additional entropy. -* Wait until you see 0/256 on the progress bar. This means that your contribution has started, and you are succesfully running the contributor binary. - -Once this is running, you can leave the machine running -- no direct action is needed. This will run for about ~36 hours, after which the software will terminate running and you will have finished contributing to the Plumo setup! - -### Publish your attestation - -The `contribute` binary produces a `plumo.attestation` file that contains a signature with your address. After your participation finishes (and not before!), please post it (here)[https://github.com/celo-org/plumo-ceremony-attestations] by creating a new issue! If you use precompiled binaries, be sure to mention you've verified the binary hashes posted on the releases page match the downloaded files. - -If you don't have access to the `plumo.attestation` anymore, that's still OK, you can fill in the other details in the issue. - -### Troubleshooting - -This section contains some common issues contributors may run into while running the setup software. If you have any questions, please reach out on the #plumo channel in the [Celo Discord server](https://discord.gg/6yWMkgM). It is recommended that you have another device to be able to reach out in case of persistent issues. - -**Permissions:** -- You may need to change the permissions on both the `generate` and `contribute` files to be able to run them. For example, on macOS, you can run `chmod u+x generate-macos contribute-macos`. -- On Windows, you might be presented with a warning that this program is from an unsigned developer. Click "run anyway" to continue. -- On macOS, you might be shown a "permission denied" error. This is because it's a downloaded file and is by default in quarantine. You can remove it from quarantine by running `xattr -d com.apple.quarantine contribute-macos`. See here for more details: https://superuser.com/questions/526920/how-to-remove-quarantine-from-file-permissions-in-os-x. - -**Hardware:** -- Disable sleep - if your machine is automatically set to sleep or turn hard disks off, it's best to switch these options off. -- Battery - it's best to connect the machine to an outlet, as the setup is computationally intensive and would drain a battery fast. -- Frozen machine - if your computer freezes, don't worry -- the Plumo setup software is using all the threads on the CPU, and it should resolve itself. - -If either of these happen, don't worry - stop and restart the contribution program and re-enter the passphrase to continue. - -**Network:** -- If you have issues uploading your contributions, it could be that you have some other processes that are consuming your bandwidth. Make sure to quit any processes such as: - - A Nest or home camera uploading feeds - - Torrenting / seeding any files - - Backup services - -## Additional Resources -- [Plumo Paper](https://docs.zkproof.org/pages/standards/accepted-workshop3/proposal-plumo_celolightclient.pdf) -- [Plumo Celo Improvement Proposal](https://github.com/celo-org/celo-proposals/pull/41) -- [Zero Knowledge Summit Presentation on Plumo](https://www.youtube.com/watch?v=2e0XpWgFKLg) -- [Transcript of Plumo presentation at Stanford Blockchain Conference](https://diyhpl.us/wiki/transcripts/stanford-blockchain-conference/2020/celo-ultralight-client/) -- [Zero Knowledge Summit Presentation on the Plumo setup system, Espero](https://www.youtube.com/watch?v=LKbDNc-LrA4) diff --git a/packages/docs/celo-codebase/protocol/proof-of-stake/README.md b/packages/docs/celo-codebase/protocol/proof-of-stake/README.md deleted file mode 100644 index d913b25c7a2..00000000000 --- a/packages/docs/celo-codebase/protocol/proof-of-stake/README.md +++ /dev/null @@ -1,35 +0,0 @@ -# Proof-of-Stake - -{% youtube src="https://www.youtube.com/watch?v=3UIudzzCb8o" %}{% endyoutube %} - -Celo uses a Byzantine Fault Tolerant [consensus protocol](../consensus/README.md) to agree on new blocks to append to the blockchain. The instances of the Celo software that participate in this consensus protocol are known as **validators**. More accurately, they are **active validators** or **elected validators**, to distinguish them from **registered validators** which are configured to participate but are not actively selected. - -Celo's proof-of-stake mechanism is the set of processes that determine which nodes become active validators and how incentives are arranged to secure the network. - -The first set of active validators are determined in the genesis block. Thereafter at the end of every epoch, a fixed number of blocks fixed at network creation time, an election is run that may lead to validators being added or removed. - -![](https://storage.googleapis.com/celo-website/docs/concepts.jpg) - -In Celo's [Validator Elections](validator-elections.md), holders of the native asset, CELO, may participate and earn rewards for doing so. Accounts do not make votes for validators directly, but instead vote for [validator groups](validator-groups.md). - -Before they can vote, holders of CELO move balances into the [Locked Gold](locked-gold.md) smart contract. Locked Gold can be used concurrently for: placing votes in Validator Elections, maintaining a stake to satisfy the requirements of registering as a validator or validator group, and also voting in on-chain [Governance](../governance.md) proposals. This means that validators and groups can vote and earn rewards with their stake. - -Unlike in other proof-of-stake systems, holding Locked Gold or voting for a group does not put that amount 'at risk' from slashing due to the behavior of validators or validator groups. Only the stake put up by a validator or group may be slashed. - -## Implementation - -Most of Celo's proof-of-stake mechanism is implemented as smart contracts, and as such can be changed through Celo's on-chain [Governance](../governance.md) process. - -- [`Accounts.sol`](https://github.com/celo-org/celo-monorepo/blob/master/packages/protocol/contracts/common/Accounts.sol) manages key delegation and metadata for all accounts including Validators, Groups and Locked Gold holders. - -- [`LockedGold.sol`](https://github.com/celo-org/celo-monorepo/blob/master/packages/protocol/contracts/governance/LockedGold.sol) manages the lifecycle of Locked Gold. - -- [`Validators.sol`](https://github.com/celo-org/celo-monorepo/blob/master/packages/protocol/contracts/governance/Validators.sol) handles registration, deregistration, staking, key management and epoch rewards for validators and validator groups, as well as routines to manage the members of groups. - -- [`Election.sol`](https://github.com/celo-org/celo-monorepo/blob/master/packages/protocol/contracts/governance/Election.sol) manages Locked Gold voting and epoch rewards and runs Validator Elections. - -In Celo blockchain: - -- [`consensus/istanbul/backend/backend.go`](https://github.com/celo-org/celo-blockchain/blob/master/consensus/istanbul/backend/backend.go) performs validator elections in the last block of the epoch and calculates the new [validator set diff](../consensus/validator-set-differences.md). - -- [`consensus/istanbul/backend/pos.go`](https://github.com/celo-org/celo-blockchain/blob/master/consensus/istanbul/backend/pos.go) is called in the last block of the epoch to process validator uptime scores and make epoch rewards. diff --git a/packages/docs/celo-codebase/protocol/proof-of-stake/becoming-a-validator.md b/packages/docs/celo-codebase/protocol/proof-of-stake/becoming-a-validator.md deleted file mode 100644 index 8a392b30309..00000000000 --- a/packages/docs/celo-codebase/protocol/proof-of-stake/becoming-a-validator.md +++ /dev/null @@ -1,7 +0,0 @@ -# Becoming a Validator - -To participate in the network, an operator must put up a slashable commitment of locked CELO, register as a validator, and join a validator group. A minimum stake of one CELO and a notice period of 60 days is required to be a validator in the Alfajores Testnet. - -Any account that meets the minimum stake and notice period requirements can register as a validator. By doing so, the locked funds on that account become ‘at risk’: a fraction of the stake can be slashed automatically for an evolving set of misbehaviors. In addition, the community can use governance proposals to slash funds, which avoids having to anticipate and encode in the protocol every possible misbehavior. As long as the CELO staked for a validator account is not slashed, it’s eligible to earn rewards like any other Locked Gold account. - -A validator joins a validator group by affiliating itself with it. However, to avoid untrusted or malicious validators joining a group, the validator group must accept the affiliation. Once done, the validator is added to the list of validators in the group. A validator can remove itself from a validator group at any time. Changes only take effect at the next subsequent election, so if the validator is currently participating in consensus, it’s expected to do so until the end of the epoch in which it deregisters itself. diff --git a/packages/docs/celo-codebase/protocol/proof-of-stake/carbon-offsetting-fund.md b/packages/docs/celo-codebase/protocol/proof-of-stake/carbon-offsetting-fund.md deleted file mode 100644 index 57b775fa7d8..00000000000 --- a/packages/docs/celo-codebase/protocol/proof-of-stake/carbon-offsetting-fund.md +++ /dev/null @@ -1,5 +0,0 @@ -# Carbon Offsetting Fund - -The Carbon Offsetting Fund provides for making the infrastructure of the Celo platform carbon-neutral, by making a transfer every epoch to an organization that commits to using those assets off-chain for carbon offsetting projects. - -Through the [on-chain governance process](../governance.md), CELO holders can set the fraction of the total desired epoch rewards, initially planned to be 0.1%, that is received by the carbon offsetting fund, and the address of a carbon offsetting partner to which to direct these transfers. The on-target amount is adjusted by the epoch [rewards multiplier](epoch-rewards.md), as with all epoch rewards. diff --git a/packages/docs/celo-codebase/protocol/proof-of-stake/community-fund.md b/packages/docs/celo-codebase/protocol/proof-of-stake/community-fund.md deleted file mode 100644 index 6ab14f86b2c..00000000000 --- a/packages/docs/celo-codebase/protocol/proof-of-stake/community-fund.md +++ /dev/null @@ -1,15 +0,0 @@ -# Community Fund - -The Community Fund provides for general upkeep of the Celo platform. CELO holders decide how to allocate these funds through governance proposals. Funds might be used to pay bounties for bugs or vulnerabilities, security audits, or grants for protocol development. - -The Community Fund receives assets from three sources: - -- The Community Fund obtains a desired epoch reward defined as a fraction of the total desired epoch rewards \(governable, initially planned to be $$25\%$$\). This amount is subject to adjustment up or down in the event of under- or over-spending against the epoch rewards target schedule. The Community Fund epoch rewards may be redirected to [bolster the Reserve](#bolstering-the-reserve). - -- The Community Fund is the default destination for slashed assets. - -- The Community Fund also receives the 'base' portion of [transaction fees](../transactions/gas-pricing.md). - -## Bolstering the Reserve - -The rewards to the Community Fund are automatically redirected to the on-chain reserve during times in which the reserve ratio (the ratio of aggregate reserve value of on-chain CELO and the off-chain reserve of crypto-assets over stablecoin market capitalization) is below a cutoff value. This cutoff reduces from two to one over the first of 25 years in a linear fashion and remains at one afterwards. diff --git a/packages/docs/celo-codebase/protocol/proof-of-stake/epoch-rewards.md b/packages/docs/celo-codebase/protocol/proof-of-stake/epoch-rewards.md deleted file mode 100644 index 2cb094a54fd..00000000000 --- a/packages/docs/celo-codebase/protocol/proof-of-stake/epoch-rewards.md +++ /dev/null @@ -1,26 +0,0 @@ -# Epoch Rewards - -## Overview - -**Epoch Rewards** are similar to the familiar notion of block rewards in other blockchains, minting and distributing new units of CELO as blocks are produced, to create several kinds of incentives. Epoch rewards are paid in the final block of the epoch and are used to: -* Distributed [rewards for validators and validator groups](validator-rewards.md) -* Distribute [rewards to holders of Locked CELO](locked-gold-rewards.md) voting for groups that elected validators -* Make payments into a [Community Fund](community-fund.md) for protocol infrastructure grants -* [Bolster the stablecoin reserve](community-fund.md#bolstering-the-reserve) if it is under-collateralized -* Make payments into a [Carbon Offsetting Fund](carbon-offsetting-fund.md). - -A total of 400 million CELO will be released for epoch rewards over time. CELO is a utility and governance asset on Celo, and also the reserve collateral for Celo Dollar (and possibly in the future other whitelisted tokens). It has a fixed total supply and in the long term will exhibit deflationary characteristics like Bitcoin. - -The total amount of disbursements is determined at the end of every epoch via a two step process. In step one, economically desired **on-target rewards** are derived. These are explained in the following pages. Several factors can increase or decrease the value of the payments that would ideally be made in a given epoch (including the CELO to Dollar exchange rate, the collateralization of the reserve, and whether payments to validators or groups are held back due to poor uptime or prior slashing). - -In step two, these on-target rewards are adjusted to generate a drift towards a predefined target epoch rewards schedule. This process aims to solve the trade-off between paying reasonable rewards in terms of purchasing power and avoiding excessive over- or underspending with respect to a predefined epoch rewards schedule. More detail about the two steps is provided below. - -## Adjusting Rewards for Target Schedule - -There is a target schedule for the release of CELO epoch rewards. The proposed target curve \(subject to change\) of remaining epoch rewards declines linearly over 15 years to 50% of the initial 400 million CELO, then decays exponentially with half life of $$h = ln(2)\times15 =10.3$$ afterwards. The choice of $$h$$ guarantees a smooth transition from the linear to the exponential regime. - -![](https://storage.googleapis.com/celo-website/docs/epoch-rewards-schedule.png) - -The total **actual rewards** paid out at the end of a given epoch result from multiplying the total on-target rewards with a `Rewards Multiplier`. This adjustment factor is a function of the percentage deviation of the remaining epoch rewards from the target epoch rewards remaining. It evaluates to `1` if the remaining epoch rewards are at the target and to smaller \(or larger\) than `1` if the remaining rewards are below \(or above, respectively\) the target. This creates a drag towards the target schedule. - -The sensitivity of the adjustment factor to the percentage deviation from the target are governable parameters: one for an underspend, one for an overspend. diff --git a/packages/docs/celo-codebase/protocol/proof-of-stake/locked-gold-rewards.md b/packages/docs/celo-codebase/protocol/proof-of-stake/locked-gold-rewards.md deleted file mode 100644 index effb3fd8820..00000000000 --- a/packages/docs/celo-codebase/protocol/proof-of-stake/locked-gold-rewards.md +++ /dev/null @@ -1,23 +0,0 @@ -# Rewards to Locked Gold - -Holders of Locked Gold that voted in the previous epoch for a group that elected one or more validators and have activated their votes are eligible for rewards. Rewards are added directly to the Locked Gold voting for that group, and re-applied as votes for that same group, so future rewards are compounded without the account holder needing to take any action. The voting process is described further [here](locked-gold.md). - -Rewards to Locked Gold are totally independent from validator and validator group rewards, and are not subject to the ‘group share’. - -![](https://storage.googleapis.com/celo-website/docs/locked-gold-rewards.jpg) - -## Adjusting the Reward Rate for Voting Participation - -The protocol has a target for the proportion of circulating CELO that is locked and used for voting. An on-target reward rate is determined and then adjusted at every epoch to increase or reduce the attractiveness of locking up additional supply. This aims to balance having sufficient liquidity for CELO, while making it more challenging to buy enough CELO to meaningfully influence the outcome of a validator election. - -The reward rate is adjusted as follows: - -![](https://storage.googleapis.com/celo-website/docs/voting_reward_rate_adjustment_equation.png) - -where $$rr$$ is the reward rate or voting yield, $$vf$$ is the voting fraction calculated as locked CELO for voting divided by circulating CELO supply, and $$af$$ is the adjustment factor. If the voting participation is below the target at the end of an epoch, the on-target reward rate is increased; if the voting participation is above the target at the end of an epoch, the reward is decreased. - -## Adjusting the Reward Rate for Target Schedule and Deductions - -Adjusting the on-target reward rate to account for under- or over-spending against the target schedule gives a baseline reward, essentially the percentage increase for a unit of Locked CELO voting for a group eligible for rewards. - -The reward for activated Locked Gold voting for a given group is determined as follows. First, if the group elected no validators in the current epoch, rewards are zero. Otherwise, the baseline reward rate factors in two deductions. It is multiplied by the slashing penalty for the group, and by the average epoch uptime score for validators in the group elected in the current epoch. Finally, the group's activated pool of Locked Gold is increased by this rate. diff --git a/packages/docs/celo-codebase/protocol/proof-of-stake/locked-gold.md b/packages/docs/celo-codebase/protocol/proof-of-stake/locked-gold.md deleted file mode 100644 index e567302240b..00000000000 --- a/packages/docs/celo-codebase/protocol/proof-of-stake/locked-gold.md +++ /dev/null @@ -1,39 +0,0 @@ -# Locked Gold and Voting - -To participate in validator elections, users must first make a transfer of CELO to the `LockedGold` smart contract. - -## Concurrent Use of Locked Gold - -Locking up CELO guarantees that the same asset is not used more than once in the same vote. However every unit of Locked CELO can be deployed in several ways at once. Using an amount for voting for a validator does not preclude that same amount also being used to vote for a governance proposal, or as a stake at the same time. Users do not need to choose whether to have to move funds from validator elections in order to vote on a governance proposal. - -## Unlocking Period - -Celo implements an **unlocking period**, a delay of 3 days after making a request to unlock Locked Gold before it can be recovered from the escrow. - -This value balances two concerns. First, it is long enough that an election will have taken place since the request to unlock, so that those units of CELO will no longer have any impact on which validators are managing the network. This deters an attacker from manipulations in the form of borrowing funds to purchase CELO, then using it to elect malicious validators, since they will not be able to return the borrowed funds until after the attack, when presumably it would have been detected and the borrowed funds’ value have fallen. - -Second, the unlocking period is short enough that it does not represent a significant liquidity risk for most users. This limits the attractiveness to users of exchanges creating secondary markets in Locked CELO and thereby pooling voting power. - -## Locking and Voting Flow - -![](https://storage.googleapis.com/celo-website/docs/locked-gold-flow.jpg) - -The flow is as follows: - -- An account calls `lock`, transferring an amount of CELO from their balance to the `LockedGold` smart contract. This increments the account's 'non-voting' balance by the same amount. - -- Then the account calls `vote`, passing in an amount and the address of the group to vote for. This decrements the account's 'non-voting' balance and increments the 'pending' balance associated with that group by the same amount. This counts immediately towards electing validators. Note that the vote may be rejected if it would mean that the account would be voting for more than 3 distinct groups, or that the [voting cap](validator-elections.md#group-voting-caps) for the group would be exceeded. - -- At the end of the current epoch, the protocol will first deliver [epoch rewards](epoch-rewards.md) to validators, groups and voters based on the current epoch (pending votes do not count for these purposes), and then run an [election](validator-elections.md) to select the active validator set for the following epoch. - -- The pending vote continues to contribute towards electing validators until it is changed, but the account must call `activate` (in a subsequent epoch to the one in which the vote was made) to convert the pending vote to one that earns rewards. - -- At the end of that epoch, if the group for which the vote was made had elected one or more validators in the prior election, then the activated vote is eligible for [Locked Gold rewards](locked-gold-rewards.md). These are applied to the pool of activated votes for the group. This means that activated voting Locked Gold automatically compounds, with the rewards increasing the account's votes for the same group, thereby increasing future rewards, benefitting participants who have elected to continuously participate in governance. - -- The account may subsequently choose to `unvote` a specific amount of voting Locked Gold from a group, up to the total balance that the account has accrued there. Due to rewards, this Locked Gold amount may be higher than the original value passed to `vote`. - -- This Locked Gold immediately becomes non-voting, receives no further Epoch Rewards, and can be re-used to vote for a different group. - -- The account may choose to `unlock` an amount of Locked Gold at any time, provided that it is inactive: this means it is non-voting in Validator Elections, the `deregistrationPeriod` has elapsed if the amount has been used as a validator or validator group stake, and not active in any [Governance proposals](../governance.md). Once an unlocking period of 3 days has passed, the account can call `withdraw` to have the `LockedGold` contract transfer them that amount. - -Votes persist between epochs, and the same vote is applied to each election unless and until it is changed. Vote withdrawal, vote changes, and additional CELO being used to vote have no effect on the validator set until the election finalizes at the end of the epoch. diff --git a/packages/docs/celo-codebase/protocol/proof-of-stake/penalties.md b/packages/docs/celo-codebase/protocol/proof-of-stake/penalties.md deleted file mode 100644 index a2b5f2024bb..00000000000 --- a/packages/docs/celo-codebase/protocol/proof-of-stake/penalties.md +++ /dev/null @@ -1,36 +0,0 @@ -# Slashing - -## Overview - -Slashing accomplishes punishment of misbehaving validators by seizing a portion of their stake. Without these punishments, for example, the Celo Protocol would be subject to the [nothing at stake](https://github.com/ethereum/wiki/wiki/Proof-of-Stake-FAQ#what-is-the-nothing-at-stake-problem-and-how-can-it-be-fixed) problem. Validator misbehavior is classified as a set of slashing conditions below. - -## Enforcement Mechanisms - -The protocol has three means of recourse for validator misbehavior. Each slashing condition applies a combination of these, as described below. - -- **Slashing of validator and group stake -** Some slashing conditions take a fixed amount of the Locked Gold stake put up by a validator. In these cases, the group through which that validator was elected for the epoch in which the slashing condition was proven is also slashed the same fixed amount. A validator or group's stake may be forfeit while it is registered or, after being deregistered, during the notice period (60 days for validators, 180 days for groups) and before the amount is withdrawn from the `LockedGold` contract. - -- **Suppression of future rewards -** Every validator group has a **slashing penalty**, initially `1.0`. All rewards to the group and to voters for the group are weighted by this factor. If a validator is slashed, the group through which that validator was elected for the epoch in which it misbehaved has the value of its slashing penalty halved. So long as no further slashing occurs, the slashing penalty is reset to `1.0` after `slashing_penalty_reset_epochs` epochs. - -- **Ejection -** When a validator is slashed, it is immediately removed from the group of which it is currently a member (even if this group is not the group that elected the validator at the point the misbehavior was recorded). Since no changes in the active validator set are made during an epoch, this means an elected validator continues participate in consensus until the end of the epoch. The group can choose to re-add the validator at any point, provided the usual conditions are met (including that the validator has sufficient Locked Gold as stake). - -## Slashing Conditions - -There are three categories of slashing conditions: - -- Provable \(initiated off-chain, verifiable on-chain\) -- Governed \(verified only by off-chain knowledge\) - -### Provable - -Provable slashing conditions cannot be initiated automatically on chain but information provided from an external source can be definitively verified on-chain. - -In exchange for sending a transaction which initiates a successful provable slashing condition on-chain, the reporter receives a "reward", a portion of the slashed amount (which will always be greater than the gas costs of the proof). The reward is added to the reporter's balance of non-voting LockedGold. The remainder of the slashed amount is sent to the [Community Fund](community-fund.md). - -- **Persistent downtime -** A validator which can be shown to be absent from 8640 consecutive BLS signatures will be slashed 100 CELO, have future rewards suppressed, and (most importantly in this case) will be ejected from its current group. - -- **Double Signing -** A validator which can be shown to have produced BLS signatures for 2 distinct blocks at the same height and in the same consensus round but with different hashes will be slashed 9000 CELO, have future rewards suppressed, and will be ejected from its current group. Note that unlike some proof-of-stake networks, Celo does not penalize validators for double signing regular consensus messages. In particular, one side-effect of how Celo provides liveness can result in cases where honest validators may legitimately double sign blocks across different rounds at the same height (Cosmos terms this [amnesia](https://github.com/tendermint/spec/blob/fa3430ad163a2a0ed77aa3f624a70cd9b8b84b78/spec/consensus/signing.md#other-rules) and also specifically excludes it from slashing). - -### **Governed** - -For misbehavior which is harder to formally classify and requires some off-chain knowledge, slashing can be performed via [governance proposals](../governance.md). These conditions are important for preventing nuanced validator attacks. diff --git a/packages/docs/celo-codebase/protocol/proof-of-stake/validator-elections.md b/packages/docs/celo-codebase/protocol/proof-of-stake/validator-elections.md deleted file mode 100644 index 747eea564c8..00000000000 --- a/packages/docs/celo-codebase/protocol/proof-of-stake/validator-elections.md +++ /dev/null @@ -1,29 +0,0 @@ -# Electing Validators - -The active validator set is updated by running an election in the final block of each epoch, after processing transactions and [Epoch Rewards](epoch-rewards.md). - -## Group Voting Caps - -One way to consider the security of a proof-of-stake system is the marginal cost of getting a malicious validator elected. In a steady state, assuming the Celo community set the incentives appropriately, a full complement of validators is likely to be elected, which means the attack cost is the cost of acquiring sufficient CELO to receive more votes than the currently elected validator with fewest votes, and thereby supplant it. - -As such, the objective of Celo’s validator elections differs from real-world elections: they aim to translate voter preferences into representation while promoting decentralization and creating a moat around existing, well-performing elected validators. Two design choices influence this: a limit on the maximum number of member validator that a group can list, and a **voting cap** on the number of votes that any one group can receive. - -Since voting for a group can cause only the group’s member validators to get elected, and no more, votes in excess of the number needed to achieve that are unproductive in the sense that they do not raise the number of votes needed to get the least-voted-for validator elected. This would translate into a lower cost for a malicious actor to acquire enough CELO to supplant that validator. This is particularly true because the protocol limits the maximum number of members in a group, to promote decentralization. - -The Celo protocol addresses this by enforcing a per-group vote cap. This cap is set to be the number of votes that would be needed to elect all of its validators, plus one more validator. The cap is enforced at the point of voting: a user can only cast a vote for a group if it currently has fewer votes than this cap. An account holder may not set or increase the amount of gold they have voting for a particular validator group `j`, if it already has at least `[(group_members_j + 1) / min(total_group_members, max_validators)]` of the total Locked Gold. - -If a group adds a new validator, or the total amount of voting Locked Gold increases, the group’s cap rises and new votes are permitted. If a group removes a validator or a validator chooses to leave, or the total amount of voting Locked Gold falls, then the group’s cap falls: if it has more votes than this new cap, then new votes are no longer permitted, but all existing votes continue to be counted. - -The Celo protocol allows an account to divide its vote between up to ten groups, since there may be cases where the vote cap prevents an account allocating its entire vote to its first choice group. - -## Running the Election - -![](https://storage.googleapis.com/celo-website/docs/election.jpg) - -The `Election` contract is called from the IBFT block finalization code to select the validators for the following epoch. The contract maintains a sorted list of the Locked Gold voting (either pending or activated) for each Validator Group. The [D’Hondt method](https://en.wikipedia.org/wiki/D'Hondt_method), a closed party list form of proportional representation, is applied to iteratively select validators from the Validator Groups with the greatest associated vote balances. - -The list of groups is first filtered to remove those that have not achieved a certain fraction of the votes of the total voting Locked Gold. - -Then, in the first iteration, the algorithm assigns the first seat to the group that has at least one member and with the most votes. Thereafter, it assigns the seat to the group that would ‘pay’, if its next validator were elected, the highest vote averaged over its candidates that have been selected so far plus the one under consideration. - -There is a minimum target and a maximum cap on the number of active validators that may be selected. If the minimum target is not reached, the election aborts and no change is made to the validator set this epoch. diff --git a/packages/docs/celo-codebase/protocol/proof-of-stake/validator-groups.md b/packages/docs/celo-codebase/protocol/proof-of-stake/validator-groups.md deleted file mode 100644 index 1c1274adc38..00000000000 --- a/packages/docs/celo-codebase/protocol/proof-of-stake/validator-groups.md +++ /dev/null @@ -1,47 +0,0 @@ -# Validator Groups - -Celo's proof-of-stake mechanism introduces the concept of **Validator Groups** as intermediaries between voters and validators. - -## Overview - -A validator group has **members**, an ordered list of candidate validators. There is a fixed limit to the number of members that a group may have. - -Validator groups can help mitigate the information disparity between voters and validators. It is anticipated that groups might emerge that do not necessarily operate validators themselves but attract votes for their reputation for ensuring their associated validators have known real-world identities, have high uptime, are well maintained and regularly audited. Since every validator needs to be accepted by a single group to stand for election, that group will be more able to build up long-term judgements on their validators’ operational practices and security setups than each of the numerous CELO holders that might vote for it would. - -Equally, a number of organizations may want to attempt to field multiple validators under their own control, or be able to interchange the specific machines or keys under which they validate in the case of hardware or connectivity failure. By switching out validators in the list, groups can accomplish this without users having to change their votes. - -Validator groups can have no more than a small, fixed maximum number of validators -- currently 5 in Mainnet. This means an organization wanting to get more validators elected than this maximum has the added challenge of managing multiple group identities and reputations simultaneously. This further promotes decentralization and strengthens operational security, making it more likely that the validator set will be composed of nodes operated in different fashions by independent individuals and organizations. - -## Registration - -Any account that has at least the minimum stake requirement in Locked Gold, whether voting or non-voting, can register an empty validator group. If a validating key is specified it may be used for this registration. - -## Deregistration - -The account that creates a validator group is able to deregister that group if it has no members. - -While an account has a registered validator group, or for up to a `deregistrationPeriod` after it is deregistered, attempts to `unlock` the account's amount of Locked Gold will fail if they would cause the remaining amount to fall below the minimum stake requirement. - -## Group Share - -Validator groups are compensated by taking a share (the 'Group Share') of the [validator rewards](validator-rewards.md) from any of its member validators that are elected during an epoch. This value is set at registration time and can be changed later. - -## Changing Group Members - -The account owner controls the list of validators in their group and can at any time add, remove, or re-order validators. - -For a validator to be added to a group, several conditions must hold: the number of members in the group must be less than the maximum; the Locked Gold balance of the group's account must be sufficient (the stake is per-member validator); and the validator must first have set its affiliation to the group. - -This means that while a group can unilaterally remove a validator, and a validator can unilaterally leave by changing its affiliation, both parties have to agree before a validator can become a member of a group. - -## Votes and Voting Cap - -Validator Groups can receive votes from Locked Gold up to a [voting cap](validator-elections.md#group-voting-caps). This value is set to be the number of votes that would be needed to elect all of its validators, plus one more validator. The cap is enforced at the point of voting: a user can only cast a vote for a group if it currently has fewer votes than this cap. - -## Slashing Penalty - -A [slashing penalty](penalties.md), initially `1.0`, is also tracked for each validator group. This value may be reduced as a penalty for misbehavior of the validator in the group. It affects the future rewards of the group, its validators, and Locked Gold holders receiving rewards for voting for the group. - -## Metadata - -Both validators and validator groups can use [Accounts Metadata](../identity/metadata.md) to provide unverified metadata (such as name and organizational affiliation) as well as claims that can be verified off-chain for control of third-party accounts. All validators are encouraged to make a verifiable claim for [domain names](../../../validator-guide/validator-explorer.md). diff --git a/packages/docs/celo-codebase/protocol/proof-of-stake/validator-rewards.md b/packages/docs/celo-codebase/protocol/proof-of-stake/validator-rewards.md deleted file mode 100644 index 43ab96be677..00000000000 --- a/packages/docs/celo-codebase/protocol/proof-of-stake/validator-rewards.md +++ /dev/null @@ -1,51 +0,0 @@ -# Rewards to Validators and Validator Groups - -The protocol aims to incentivize validator uptime performance and penalize past poor behavior in future rewards, while ensuring that payments are economically reasonable in size independent of fluctuations of the price of CELO. - -Five factors affect validator and group rewards: - -- The on-target reward amount for this epoch -- The protocol's [overall spending vs target of epoch rewards](epoch-rewards.md) -- The validator’s ‘uptime score’ -- The current value of the slashing penalty for the group of which it was a member at the last election -- The group share for the group of which it was a member at the last election - -Epoch rewards to validators and validator groups are denominated in Celo Dollars, since it is anticipated that most of their expenses will be incurred in fiat currencies, allowing organizations to understand their likely return regardless of volatility in the price of CELO. To enable this, the protocol mints new Celo Dollars that correspond to the epoch reward equivalent of CELO which are maintained on chain to preserve the collateralization ratio. Of course, the effect on the target schedule depends on the prevailing exchange rate. - -![](https://storage.googleapis.com/celo-website/docs/validator-rewards.jpg) - -## On-target Rewards - -The on-target validator reward is a constant value (as block rewards typically would be) and is intended to cover costs plus an attractive margin for amortized capital and operating expenses associated with a recommended set up that includes redundant hosts with hardware wallets in a secure co-lo facility, proxy nodes at cloud or edge hosting providers, as well as security audits. As with most parameters of the Celo protocol, it can be changed by governance proposal. - -In the usual case where no validator in the group has been slashed recently, and the validator has signed almost every block in the epoch, then the validator receives the full amount of the on-target reward, less the fraction sent to the validator group based on the group share. Unlike in some other proof-of-stake schemes, epoch rewards to validators do not depend on the number of votes the validator’s group has received. - -## Calculating Uptime Score - -The Celo protocol tracks an ‘uptime score’ for each validator. When a validator proposes a block, it also includes in the block body every signature that it has received from validators committing the previous block. - -![](https://storage.googleapis.com/celo-website/docs/uptime-score.jpg) - -For a validator to be ‘up’ at a given block, it must have its signature included in at least one in the previous twelve blocks. This cannot be done during the first 11 blocks of the epoch. At each epoch, this counter is reset to 0. Because the proposer order is shuffled at each election, it is very hard for a malicious actor withholding an honest validator’s signatures to affect this measure. - -Then, a validator’s uptime for the epoch is the proportion of blocks in the epoch for which it is ‘up’: `U = counter/ (epoch_size - 11)`. Its epoch uptime score `S_ve = u ^ k`, where `k` is a governable constant. This means that downtime of less than around a minute does not count against the validator, but that longer periods begin to reduce the score rapidly. - -The validator’s overall uptime score is an exponential moving average of the uptime score from this and previous epochs. `S_{v} = min(S_ve, S_ve * x + S_{v-1} * (1 -x))` where `0 < x < 1` and is governable. Since `S_v` starts out at zero, validators have a disincentive to change identities and an incentive to prioritize activities that improve long-term availability. - -## Calculating Slashing Penalty - -The protocol also tracks for each group a ‘slashing penalty’, initially equal to one but successively reduced on each occasion a validator in that group is slashed. The penalty returns to one 30 days after it was last reduced. - -This factor is applied to all rewards to validators in that group, to the group itself, and to voters for the group. - -The slashing penalty gives groups a further incentive to vet validators they accept as members, not only to avoid reducing their own future rewards from existing validators but to attract and retain the best validators. - -Validators have an incentive to be elected through groups with a high value, so a recent slashing makes a group less attractive. Validators also have an incentive to select groups where they believe careful vetting processes are in place, because poor vetting of other validators in the group reduces their own expectation of future rewards. - -When a validator is slashed, reduced rewards may lead other validators in the same group to consider equivalently ‘safe’ slots in other groups, if they are available. A validator disassociating from the group would cause the group’s rewards to further decline. While that may cause churn in the set of groups through which validators are elected, it is unlikely that a validator would move to a group where they could not be elected (since in this case they would receive no rewards, as opposed to fewer rewards), hence making the votes by which they were previously elected unproductive. - -## Group Share - -Validator groups are compensated by taking a share of the rewards allocated to validators. Validator groups set a **group share** rate when they register, and can change that at any time. The protocol automatically deducts this share, sending that portion of the epoch rewards to the validator group of which they were a member at the time of the last election. - -Since the sum of a validator’s reward and its validator group’s reward are the same regardless of the ‘group share’ that the group chooses, no side-channel collusion is possible to avoid deductions for downtime or previous slashing. diff --git a/packages/docs/celo-codebase/protocol/stability/README.md b/packages/docs/celo-codebase/protocol/stability/README.md deleted file mode 100644 index 11d1d0ad246..00000000000 --- a/packages/docs/celo-codebase/protocol/stability/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# Stability Mechanism - -{% youtube src="https://www.youtube.com/watch?v=kYhDUmKuGCY" %}{% endyoutube %} - -The Celo protocol's stability mechanism comprises the following: - -{% page-ref page="doto.md" %} - -{% page-ref page="oracles.md" %} - -{% page-ref page="stability-fees.md" %} - -{% page-ref page="adding_stable_assets.md" %} - -{% page-ref page="tobin-tax.md" %} diff --git a/packages/docs/celo-codebase/protocol/stability/adding_stable_assets.md b/packages/docs/celo-codebase/protocol/stability/adding_stable_assets.md deleted file mode 100644 index bfc0879b291..00000000000 --- a/packages/docs/celo-codebase/protocol/stability/adding_stable_assets.md +++ /dev/null @@ -1,62 +0,0 @@ -# Adding more stable assets - -This document outlies the requirements and steps to add a new stable asset to the Celo platform. Assuming we want to add to the platform a new stable asset `cX` tracking the value of X (where X can be a fiat currency like ARS or MXN), using the [Mento exchange](doto.md). - -## Requirements - -1. Liquidity: the asset X has to be liquidly traded against CELO, in a CELO/X ticker. In absence of that, X has to be liquidly traded, including weekends, against well known assets that trade 24/7, like BTC or ETH, such that the price of X with respect to Celo can be inferred. In this second case, an implicit pair can be calculated for the oracle reports. -2. Determine pre-mint addresses and amounts: It is possible to pre-mint a fixed amount at the time of launching a new stable asset, good candidates to receive the pre-mint are the community fund and other entities commited to distribute this initial allocation to grant recipients and liquidity providers. - -A good criteria to a successfully decide a pre-mint amount is to check by how much it would affect the reserve collateralization ratio, this is, the ratio of all stable assets, divided by all the reserve holdings. Reserve information, as well as the collateralization ration can be found on the [Reserve website](https://celoreserve.org/). -## Procedure - -### Including contracts on the registry - -Currently, the addition of new assets is tied to the [Contract Release Cycle](https://docs.celo.org/community/release-process/smart-contracts), as the contracts `ExchangeX` and `StableTokenX` need to be checked in [^1]. These new contracts inherit from Exchange and StableToken, that are the ones originally used for `cUSD`. As StableToken `cX` will be initialized by the contract release, key parameters like `spread` and `reserveFraction` should be included, although they can be later modified by setters in the following governance proposals. The only value that can't be changed is the pre-mint amount. - -### Freezing - -These contracts should be set as frozen to prevent `cX` from being transferable before Mento supports it in a governance proposal. At this point, as there are no oracles, the contract `ExchangeX` can't update buckets and it is thus impossible to mint and burn `cX`. There is [an issue open](https://github.com/celo-org/celo-monorepo/issues/7331) to include this step as part of the Contract Release. - -For the [deployment of cEUR](https://github.com/celo-org/celo-proposals/blob/master/CGPs/0023.md), this was included as part of the [Oracle activation](#oracle-activation) proposal. - -### Constitutional parameters - -As new contracts are added to the registry, new [constitution parameters](https://docs.celo.org/developer-guide/sdk-code-reference/summary-2/classes/_wrappers_governance_.governancewrapper#isproposalpassing) need to be set. There's an [issue open](https://github.com/celo-org/celo-monorepo/issues/7318) to include this in the tooling to support it as part of the Contract Release. - -### Oracle activation - -A following governance proposal needs to be submitted to enable [oracles](oracles.md) to report. This oracle proposal needs to enable addresses to report to the `StableTokenX` address and, optionally, fund them to pay for gas fees. An example of this proposal is the [cEUR oracle activation proposal](https://github.com/celo-org/celo-proposals/blob/master/CGPs/0023.md)[^2]. - -### Oracle report - -Before fully activating `cX`, it is required to have at least one oracle report. This is required by the Reserve contract in [this line](https://github.com/celo-org/celo-monorepo/blob/9b43d07b35c9d50389f5f2f53ddfa0c21f16d0f2/packages/protocol/contracts/stability/Reserve.sol#L223). After reporting, it is worth double checking that the buckets sizes on `StableTokenX` are consistent with values reported and it is a good opportunity to test the oracle set up in production with no funds at risk, as the contracts involved are still frozen. - -### Full activation - -The last governance proposal is expected to unfreeze the contract and attach the last strings in the process to get a fully transferable asset stabilized by the Reserve. This propose involves: - -1. Unfreezing both `StableTokenX` & `ExchangeX`. -2. Making `ExchangeX` able to pull CELO out of the Reserve for the buckets `Reserve.addExchangeSpender` -3. Declaring the token to the Reserve as an asset to be stabilized calling `Reserve.addToken` -4. Enable `StableTokenX` as a fee currency, so that it can be used to pay for gas `FeeCurrencyWhitelist.addToken`. -5. In case necessary, parameters such as `reserveFraction` and `spread` can also be updated in this governance proposal. - - -After passing this last proposal, `cX` should be fully activated. - -## Tooling - -Adding a new stable asset involves updating many parts of the tooling, such as: - -* Update the Ledger app integration such that it displays the names of the newly added token. -* Update oracles and generating their keys and addresses. -* Adding support on `contractkit`. -* Adding support on [kliento](https://github.com/celo-org/kliento). -* Adding support on [eksportisto](https://github.com/celo-org/eksportisto). -* Update on the cli, an example list of things to add are included on [this issue](https://github.com/celo-org/celo-monorepo/issues/6793). -* Supporting alfajores faucet. -* Supporting on Dapp kit. - -[^1] There are opened issues trying to de-couple the addition of new assets to the reserve to the release cycle. -[^2] Please note this example proposal also includes freezing, this is because, at the time of writing (22-march-2021), the tooling for proposing a contract release doesn't support freezing those contracts on the same proposal. Proposals shall not be modified manually given that the tool is meant to run verifications. diff --git a/packages/docs/celo-codebase/protocol/stability/doto.md b/packages/docs/celo-codebase/protocol/stability/doto.md deleted file mode 100644 index 412784ecdda..00000000000 --- a/packages/docs/celo-codebase/protocol/stability/doto.md +++ /dev/null @@ -1,27 +0,0 @@ -# Stability Algorithm \(Mento\) - -This section discusses the mechanism by which the supply of the Celo Dollar is achieved in the Celo protocol - the constant-product decentralized one-to-one mechanism (CP-DOTO). On a high level, Mento (previously known as CP-DOTO) allows user demand to determine the supply of celo stable assets by enabling users to create, for example, a new Celo Dollar by sending 1 US Dollar worth of CELO to the reserve, or to burn a Celo Dollar by redeeming it for 1 US Dollar worth of CELO. The mechanism requires an accurate [Oracle](oracles.md) value of the CELO to US Dollar market rate to work. - -This creates incentives such that when demand for the Celo Dollar rises and the market price is above the peg, users can profit using their own efforts by buying 1 US Dollar worth of CELO on the market, exchanging it with the protocol for one Celo Dollar, and selling that Celo Dollar for the market price. Similarly, when demand for the Celo Dollar falls and the market price is below the peg, users can profit using their own efforts by purchasing Celo Dollar at the market price, exchanging it with the protocol for 1 US Dollar worth of CELO, and selling the CELO to the market. - -In cases in which the CELO to US Dollar oracle value is not an accurate reflection of the market price, exploiting such discrepancies can lead to a depletion of the reserve. Mento, inspired by the [Uniswap](https://uniswap.io/) system, mitigates this risk of depletion as follows: The Celo protocol maintains two virtual buckets of CELO and Celo Dollar. The amounts in these virtual buckets are recalibrated every time the reported oracle value is updated, provided the difference between the current time and the oracle timestamp is less than $$oracle\_staleness\_threshold$$. The equation for the constant-product-market-maker model fixes the product of the wallet quantities - -$$ -G_t \times D_t = k -$$ - -where $$G_t$$ and $$D_t$$denote the quantities in the CELO and Celo Dollar buckets respectively and $$k$$ is some constant. Given the above rule, it can be shown that the price of CELO, to be paid in Celo Dollar units, is - -$$ -P_t = \frac{D_t}{G_t} -$$ - -for traded amounts that are small relative to the bucket quantities. Whenever the CELO to US Dollar oracle rate is updated, the protocol adjusts the bucket quantities such that they equalize the on-chain CELO to Celo Dollar exchange rate $$P_t$$ to the current oracle rate. During such a reset, the CELO bucket must remain smaller than the total reserve gold balance. To achieve this, the CELO bucket size is defined as the total reserve balance times $$gold\_bucket\_size$$, with $$0 {} -} -``` - -### Exporting variables only for testing - -When a variable is exported only for the propose of getting accessed by tests, a low dash should be added before the name. - -For example instead of doing this: - -``` -export myFunction{...} -``` - -This is the preferred way: - -``` -const myFunction{...} -export _myFunction = myFunction -``` - -In case it's necessary, a decorator could wrap the exported function to allow it only to be accessed during testing. diff --git a/packages/docs/celo-codebase/wallet/README.md b/packages/docs/celo-codebase/wallet/README.md deleted file mode 100644 index 83349e1b0b1..00000000000 --- a/packages/docs/celo-codebase/wallet/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# Celo Wallet - -The Celo Wallet is an easy way to send, receive, and save Celo Assets. This section describes what is going on under the hood during various aspects of the wallet experience. - -![Celo Wallet Verification](https://storage.googleapis.com/celo-website/docs/celo-onboarding.gif) diff --git a/packages/docs/celo-codebase/wallet/how-the-wallet-works/README.md b/packages/docs/celo-codebase/wallet/how-the-wallet-works/README.md deleted file mode 100644 index 03131caa787..00000000000 --- a/packages/docs/celo-codebase/wallet/how-the-wallet-works/README.md +++ /dev/null @@ -1,11 +0,0 @@ -# Wallet Functionality - -This section describes the technology powering key functionality of the Celo Wallet. - -{% page-ref page="verification.md" %} - -{% page-ref page="invitations.md" %} - -{% page-ref page="sending-and-requesting-payments.md" %} - -{% page-ref page="ultralight-node-sync.md" %} diff --git a/packages/docs/celo-codebase/wallet/how-the-wallet-works/invitations.md b/packages/docs/celo-codebase/wallet/how-the-wallet-works/invitations.md deleted file mode 100644 index f50f74bdb41..00000000000 --- a/packages/docs/celo-codebase/wallet/how-the-wallet-works/invitations.md +++ /dev/null @@ -1,30 +0,0 @@ -# Invitations - -### **Overview** - -To be able to use the wallet and create an account, a user must be invited through their phone number by a verified user. The inviter will send an _invitation code_ to the invitee, which they can later redeem upon downloading the app. - -### **Sending Invitations** - -If Alice is verified, she can invite \(unverified\) Bob to the app by choosing him through her contacts list in the wallet or by inputting his phone number. This will generate a temporary public/private key pair and associated temporary wallet address. Alice will have to pay a small invitation fee to this temporary wallet. Finally, Alice's wallet app will auto populate a message including this temporary private key, now known as invitation code, and will prompt Alice to send this message to Bob through either SMS or WhatsApp. - -{% hint style="info" %} -Note: The invitation fee allows for invitees to be able to pay for verification fees and complete the [verification](verification.md) process upon redemption of the invitation code. -{% endhint %} - -Along with an invite, inviters also have the option of sending a payment. In the example above, Alice will send this payment to an [escrow](../../protocol/transactions/escrow.md) smart contract which maps the temporary wallet address associated with the invitation code/temporary private key with the specific payment. - -### Escrow and Redeeming Invites - -After downloading the wallet app, Bob can redeem the invitation code that Alice sent him by inputting it into the app's homepage. During the invitation code redemption process: - -- A new public/private key pair and corresponding wallet address is generated \(which only Bob has access to\). This is his permanent wallet address. -- Bob proves ownership of the temporary wallet address since he can provide its corresponding private key \(which is the invitation code\). -- Bob then transfers the invitation fee held in the temporary wallet to his newly created permanent wallet. -- Bob is then prompted to the [verification](verification.md) screen. - -If the invite code is attached to an [escrowed payment](../../protocol/transactions/escrow.md) then, upon finishing verification, the payment will be automatically withdrawn and those funds will be transferred into the user’s account. - -{% hint style="info" %} -Note: If a user has been invited by multiple people and they all sent payments along with the invite, the user will only be able to redeem the payment corresponding to the invite code they chose to use initially. The original senders of the rest of the unclaimed payments will be able to reclaim those funds and resend the payment to the new wallet associated to the now-verified user. -{% endhint %} diff --git a/packages/docs/celo-codebase/wallet/how-the-wallet-works/sending-and-requesting-payments.md b/packages/docs/celo-codebase/wallet/how-the-wallet-works/sending-and-requesting-payments.md deleted file mode 100644 index a3e08619a7c..00000000000 --- a/packages/docs/celo-codebase/wallet/how-the-wallet-works/sending-and-requesting-payments.md +++ /dev/null @@ -1,32 +0,0 @@ -# Payments and Exchanging - -## **Payments** - -### **Sending** - -The Celo Wallet can be used to send and request payments with anyone who has verified their phone number to an address\(or using QR codes for unverified addresses\). Send transactions make a call to the `transferWithComment` function within the `StableToken` contract. - -### Comment Encryption - -Comments are encrypted using the `messageEncryptionKey` of the sender and the recipient to ensure that comment contents are kept private. These encrypted comments are then stored on chain. For more details, please refer to the [Encrypted Payment Comments](../../protocol/transactions/tx-comment-encyption.md) section of protocol documentation. - -### **Requesting** - -Payment requests occur off chain - using a service \(firebase in the open source Celo Wallet\) we deliver payment requests. Upon confirmation of a request, a send transaction is created and sent. - -### Notifications - -For non-essential functionality that is not detrimental to interoperability, a private firebase service. Notifications in the Celo Wallet are one example of this. Users receive push notifications in the following circumstances: - -- Receiving a payment request -- Payment of an outstanding payment request - -{% hint style="info" %} -In order for notifications to work in a fork of the Celo Wallet, creation of another firebase service for the forked wallet is necessary. -{% endhint %} - -## **Exchanging** - -The Mobile Exchange experience implements the uniswap-style exchange detailed in [Stability Mechanism Documentation](../../protocol/stability/doto.md). For this reason, rates provided are an overestimate of the current rate and subject to change \(such changes are presented to the user if they result in a less favorable rate\) - -\_\_ diff --git a/packages/docs/celo-codebase/wallet/how-the-wallet-works/ultralight-node-sync.md b/packages/docs/celo-codebase/wallet/how-the-wallet-works/ultralight-node-sync.md deleted file mode 100644 index 5ece5c09dd8..00000000000 --- a/packages/docs/celo-codebase/wallet/how-the-wallet-works/ultralight-node-sync.md +++ /dev/null @@ -1,7 +0,0 @@ -# Ultralight Node Sync - -The Celo Wallet first fetches the latest header to learn about the likely latest block height. Next, it fetches all the _epoch headers_ between Genesis and the latest block height. The fetch is done in batches of 192 blocks \(Ethereum's default batch size\) to minimize latency. In Celo's case, each of these headers are not contiguous and are instead one epoch apart \(planned for around 1 day for mainnet\). The wallet then validates each of the epoch headers by updating the set of validators at every epoch, and using that set to verify signatures. Once the wallet has reached the latest epoch, it can verify the signatures of all header is that epoch, including the latest one. - -Once the latest header is verified, all the block from that point onwards are fetched. When the app restarts, only the epoch blocks between the last fetched block and the latest header are fetched. - -In the future, Celo will support zk-SNARK-based proofs that can succinctly prove this sequence of steps, which will lower the sync times and data usage even more. diff --git a/packages/docs/celo-codebase/wallet/how-the-wallet-works/verification.md b/packages/docs/celo-codebase/wallet/how-the-wallet-works/verification.md deleted file mode 100644 index 2f8b951e0df..00000000000 --- a/packages/docs/celo-codebase/wallet/how-the-wallet-works/verification.md +++ /dev/null @@ -1,17 +0,0 @@ -# Verification - -The Celo Wallet leverages the [Lightweight Identity](../../protocol/identity/) protocol to construct mappings of phone number hashes to addresses. - -### Phone Number Verification in the Wallet - -During the final step of new user onboarding in the Celo Wallet, a user completes phone number verification. Given that the Celo Protocol supports a variable, the Celo Wallet implements this as a binary notion of `verified` \(>= 3 attestations\) or `unverified` \(< 3 attestations\). During the verification process, three attestations are attempted, and the user receives three text messages, upon receipt of which the user is considered verified. Future implementations of the wallet may explore using requested/received verification ratios or variable numbers of attestations to provide a notion of non-binary verification so as to account for variable probabilities of ownership of a phone number. - -### Verifications - -When verification is in progress, the celo wallet sends a request for three SMS attestations. The process of selecting the senders of each of these three messages is detailed in the [Lightweight Identity](../../protocol/identity/) documentation. - -The following diagrams depict the user flows for the celo wallet: - -- [General Verification Flow](https://storage.googleapis.com/celo-website/Verification%20Flow.jpg) -- [Detailed Phone Number Hash Flow](https://storage.googleapis.com/celo-website/Get%20Phone%20Number%20Hash%20Details%20Flow.jpg) -- [Detailed Flow for Receiving SMS Input and Compeleting Verification](https://storage.googleapis.com/celo-website/Wait%20SMS%20and%20Complete%20Attestation%20Flow%20(1).jpg) diff --git a/packages/docs/celo-codebase/wallet/intro.md b/packages/docs/celo-codebase/wallet/intro.md deleted file mode 100644 index 403f3cb0231..00000000000 --- a/packages/docs/celo-codebase/wallet/intro.md +++ /dev/null @@ -1,113 +0,0 @@ -# Running the Wallet Locally - -## Setup - -The app uses [React Native](https://facebook.github.io/react-native/) and a [light node](https://github.com/ethereum/wiki/wiki/Light-client-protocol) running the [celo client](https://github.com/celo-org/celo-blockchain). You will need to install Java 8, the Android SDK, Yarn, and Node.js v12.x to run the app. - -To do this, follow the [setup instructions](https://github.com/celo-org/celo-monorepo/blob/master/SETUP.md). - -#### \(_Optional_\) Gradle improvement - -This makes Gradle faster: - -```bash -export GRADLE_OPTS='-Dorg.gradle.daemon=true -Dorg.gradle.parallel=true -Dorg.gradle.jvmargs="-Xmx4096m -XX:+HeapDumpOnOutOfMemoryError"' -``` - -## Running - -1. If you haven't already, run `yarn` from the monorepo root to install dependencies. -2. Attach your device or start an emulated one. - - You can verify if your device is properly connecting to ADB with `adb devices`. More information about running the app on Android devices can be found on the [React Native docs](https://facebook.github.io/react-native/docs/running-on-device). - -3. Compile the project and start the bundler with - - ```bash - yarn run dev - ``` - - This will build the app in a device \(physical or emulated\) and open a terminal with a js server. - - **Note:** We've seen some issues running the metro bundler from iTerm - -## Debugging - -In order to debug, you should run: - -```bash -yarn run dev:show-menu -``` - -A menu will pop-up in the app and you should hit `Start Remote JS Debugging`. This will open a new tab in your browser with React Native logger in the console. In order to get a full picture, the console's filter should be set to `All levels`. - -You will probably want to open the dev menu again and enable `Live Reloading` and `Hot Reloading` to make development faster. - -#### \(_Optional_\) React Native debugger app - -The [React Native debugger app](https://github.com/jhen0409/react-native-debugger) bundles together the Redux and Chrome dev tools nicely. - -## App Profiling - -Start the emulator and load up the app. Then run the following to start react devtools. - -```bash -yarn run react-devtools -``` - -It should automatically connect to the running app, and includes a profiler \(second tab\). Start recorder with the profiler, using the app, and the stop recording. The flame graph provides a view of each component and sub-component. The width is proportional to how long it took to load. If it is grey, it was not re-rendered at that 'commit' or DOM change. Details on the react native profiler are [here](https://reactjs.org/blog/2018/09/10/introducing-the-react-profiler.html). The biggest thing to look for are large number of renders when no state has changed. Reducing renders can be done via pure components in react or overloading the should component update method [example here](https://reactjs.org/docs/optimizing-performance.html#examples). - -## Connecting to networks - -By default, we have the `alfajores` network set up. If you have other testnets that you want to use with the app, you can download the contract artifacts as per [instructions in the protocol package](https://github.com/celo-org/celo-monorepo/tree/master/packages/protocol). Once you have done that, you can run - -```bash -yarn run update-contracts --testnets=my_testnet,my_other_testnet -``` - -`--testnets` should be a comma-separated list of testnets whose artifacts you have under `../protocol/build`. `update-contracts` will copy them to the mobile app for use. Avoid unnecessary check-ins of contract artifacts. - -## Testing - -### Snapshot Testing - -We use Jest snapshot testing to assert that no intentional changes to the component tree have been made without explicit developer intention. See an example at [`src/components/CodeRow.test.tsx`](https://github.com/celo-org/wallet/blob/master/packages/mobile/src/components/CodeRow.test.tsx). If your snapshot is expected to deviate, you can update the snapshot with the `--updateSnapshot` flag when running the test. - -### Shallow rendering testing - -We use Enzyme as an additional testing tool. It allows for shallow rendering, which reduces running time and the amount of stubbing you have to do by only rendering the immediate children \(and not the grandchildren etc.\) Further, you can interact with the rendered tree to assert proper reactions to user interaction and input. See an example at [`src/components/CodeRow.test.tsx`](https://github.com/celo-org/wallet/blob/master/packages/mobile/src/components/CodeRow.test.tsx) or read more about the [docs](https://airbnb.io/enzyme/docs/guides/react-native.html) - -### E2E testing - -We use [Detox](https://github.com/wix/Detox) for E2E testing. In order to run the tests locally, you must have the proper emulator set up. Emulator installation instructions can be [found here](https://docs.expo.io/versions/latest/workflow/android-studio-emulator/). Please make sure to set up the emulator you would like to run the tests with is set up properly with the name `Pixel_API_29_AOSP_x86_64`. - -Please set `123456` as the pin code in the emulator, since the e2e tests rely on that. - -Next, the VM snapshot settings should be modified: - -1. Close all apps and lock the emulator \(go to lock screen\). -2. Power off the emulator -3. Power it back on and go to emulator settings \(... button\) -> Snapshots -> Settings -4. Set Auto-Save to No - -## Troubleshooting - -1. Make sure to have watchman installed: `brew install watchman` -2. It's a known [detox issue](https://github.com/wix/Detox/issues/1255) that test will fail if a emulator is renamed. -3. Make sure the emulator is not running before runing the tests. - -For information on how to run and extend the e2e tests, refer to the [e2e readme](https://github.com/celo-org/wallet/blob/master/packages/mobile/e2e/README.md). - -### Generating GraphQL Types - -We're using [GraphQL Code Generator](https://github.com/dotansimha/graphql-code-generator) to properly type GraphQL queries. If you make a change to a query, run `yarn run gen-types` to update the typings in the `typings` directory. - -## **Celo Wallet API Keys** - -#### Running The Celo App Without API Keys - -The mobile app can run without putting the Firebase keys in place by changing the env variable `FIREBASE_ENABLED` to false in the mobile package. - -For Testnet configuration, an env variable called `MNEMONIC` should be set with a seed to generate validators private keys. Remember to make this seed long enough to be secured \(20 words or more\). - -**Please keep your keys secret- avoid committing them to github and/or publishing keys for your infrastructure in any way.** diff --git a/packages/docs/celo-holder-guide/celo-recovery.md b/packages/docs/celo-holder-guide/celo-recovery.md deleted file mode 100644 index 4f95a08540f..00000000000 --- a/packages/docs/celo-holder-guide/celo-recovery.md +++ /dev/null @@ -1,51 +0,0 @@ -# Recovering ETH or ERC-20 tokens sent to a Celo Address - -In this guide, steps are outlined to help you recover your ETH or ERC-20 tokens if you accidentally transferred them to a [CELO (previously Celo Gold)](../overview.md#background-and-key-concepts) address. - -## Prerequisites - -This guide assumes that you have access to the following: - -- The [24-word recovery phrase](https://kb.myetherwallet.com/en/security-and-privacy/what-is-a-mnemonic-phrase/) of your Celo address -- An Ethereum wallet manager such as MyEtherWallet or MyCrypto. (It is recommended to use the Desktop or offline version over a webapp version) - -{% hint style="danger" %} -There are [risks](https://www.cryptomathic.com/news-events/blog/cryptographic-key-management-the-risks-and-mitigations) associated with using a recovery phrase or a private key. Please do not share them with anyone else. -{% endhint %} - -## Steps - -Please follow the instructions below closely because missteps can lead to errors or permanent loss of your tokens. To understand these steps, please read [What is Ethereum](https://ethereum.org/en/what-is-ethereum/) and [Celo Overview](https://docs.celo.org/overview). - -### MyEtherWallet - -1. [Download and run MEW Offline](https://kb.myetherwallet.com/en/offline/using-mew-offline/) (scroll down until you see the download instructions) -2. Open MEW and click on **Access My Wallet > Software > Mnemonic Phrase > Continue** -3. Change to a 24 Value mnemonic and enter in the words from your Account Key. Then click **Continue** -4. Change the HD Derivation Path to **Add Custom path** -5. Call your Alias "Celo" for easy reference. Enter in your Path as `m/44'/52752'/0'/0`. Click **Add Custom Path.** -6. Go back to your Derivation Path dropdown and select **Celo (m/44'/52752'/0'/0)**. You should see the addresses change. Select the address that matches your Valora Account Number (it's usually the first one). -7. Accept the Terms -8. Click **Access My Wallet** -9. Now you can send your token back to your original address: - 1. Click on **Send Transaction** - 2. Fill in the **Type, Amount,** and **To Address**. - 3. Confirm that the information is correct and you have enough funds to cover any fees. - 4. Click **Send Transaction**. - -### MyCrypto - -1. [Download](https://app.mycrypto.com/download-desktop-app) then open the MyCrypto desktop app and click on **View & Send** -2. Access using **Mnemonic Phrase** -3. Enter in your Valora Account Key into the Mnemonic Phrase box (tip: click the eye icon to easily see your phrase) the click **Choose address** -4. Change the **Address** from "Default (ETH)" to "Custom". Enter `m/44'/52752'/0'/0` into the box that pops up next to it. -5. Select the address that matches your Valora Account number (it's usually the first one). -6. Click **Unlock** -7. Scroll down and look for a button that says **Scan For Tokens**. Click it. -8. You should be able to see your token. -9. Now you can send your token back to your original address: - 1. Enter your address in the **To Address** box - 2. Change the currency. - 3. Fill in the **Amount** or click the "double up-arrow" icon to send your entire balance. - 4. Confirm that the information is correct and you have enough funds to cover any fees. - 5. Click **Send Transaction** diff --git a/packages/docs/celo-holder-guide/cusd.md b/packages/docs/celo-holder-guide/cusd.md deleted file mode 100644 index c805882a123..00000000000 --- a/packages/docs/celo-holder-guide/cusd.md +++ /dev/null @@ -1,50 +0,0 @@ -# Celo Asset Management Guide - -If you intend to hold Celo Dollars (cUSD) or a similar stablecoin like Celo Euros (cEUR), exchange CELO for stablecoins, or send Celo native assets to others, this guide will help you access your account and manage your funds. - -## Prerequisites - -This guide assumes: - -- You have read [Key Management](../validator-guide/key-management/summary.md) on Celo -- You have installed the [Celo Command Line Interface](../command-line-interface/introduction.md) (Celo CLI) - -## Choose a Node - -In order to execute the tasks listed below, you will need to point the Celo CLI to a node that is synchronized with the [Mainnet](../getting-started/mainnet.md). There are two options explained [here](quick-start.md#deployment). - -## Create an Account - -There are two ways to create an account: - -- (Recommended) use [accounts generated by Ledger](ledger.md), if you possess a [Ledger hardware wallet](https://shop.ledger.com/products/ledger-nano-s) -- Use CLI to [generate an account](../getting-started/running-a-full-node-in-mainnet.md#create-an-account-and-get-its-address) -- this approach is less secure and hence not recommended - -After creating an account, record its address in environment variables: - -``` -export CELO_ACCOUNT_ADDRESS= -``` - -## Exchange CELO for Stablecoins - -Once you have deposited CELO to your account, you can check your balance: - -``` -celocli account:balance $CELO_ACCOUNT_ADDRESSS -``` - -As an example of a common stablecoin swap, you can exchange CELO for cUSD using the following command. This exchanges CELO for stable tokens (cUSD by default) via the stability mechanism. Note that the unit of value is CELO Wei (1 CELO = 10^18 CELO Wei). - -``` -celocli exchange:celo --value --from $CELO_ACCOUNT_ADDRESS -``` - -## Transfer Stablecoins - -When you have sufficient balance, you can send stablecoins such as cUSD to other accounts. Note that the unit of value is cUSD Wei (1 cUSD = 10^18 cUSD Wei). - -``` -celocli transfer:dollars --from $CELO_ACCOUNT_ADDRESS --to --value -``` - diff --git a/packages/docs/celo-holder-guide/eth-recovery.md b/packages/docs/celo-holder-guide/eth-recovery.md deleted file mode 100644 index 0b13edbe65f..00000000000 --- a/packages/docs/celo-holder-guide/eth-recovery.md +++ /dev/null @@ -1,113 +0,0 @@ -# Recovering CELO from an Ethereum Address - -In this guide, steps are outlined to help you recover your [CELO (previously Celo Gold)](../overview.md#background-and-key-concepts) if you accidentally transferred them to an [Ethereum address](https://en.wikipedia.org/wiki/Ethereum#Addresses). - -This guide assumes you have access to the recipient's mnemonic recovery phrase (note, in Valora and Celo Wallet it's called your 'Account Key'). - -{% hint style="danger" %} -There are [risks](https://www.cryptomathic.com/news-events/blog/cryptographic-key-management-the-risks-and-mitigations) associated with using a recovery phrase or a private key. Please keep these secret. -{% endhint %} - -## Recovering with CeloWallet.app - -The Celo Wallet for Web and Desktop can be used to import mnemonic phrases with custom derivation paths (like Ethereum's) in order to recover your funds. - -### Steps to access funds - -1. Visit [celowallet.app](https://celowallet.app) in a modern browser (Chrome is recommended). -2. For small accounts, you can import in the web version directly. For larger accounts, downloading the desktop version is **strongly** recommended. -3. Click 'Use Existing Account', then 'Use Account Key', then choose the 'Advanced' tab. -4. Specify your deriviation path and click import. -5. Set a strong password and click Continue. You should reach the home screen and see your account funds. - -![](https://storage.googleapis.com/celo-website/docs/celo-wallet-advanced-import-screen.png) - -### Steps to migrate funds - -Once you've been able to access your funds, it's recommended that you move them to an account derived from the Celo derivation path. - -1. Create a new account: you can use the celowallet.app again, Valora, the Celo CLI, or any other wallets compatible with Celo. -2. Copy the address of your new account -3. In the first Celo Wallet window, click the Send button in the top-left. -4. Send your funds to your new account. -5. If you intend to keep this new account permanently, be sure to save its password and account key in a safe place! - -## Recovering with the Celo CLI - -### Prerequisites - -This guide assumes that you have access to the following: - -- A computer with a [Command Line Interface](https://en.wikipedia.org/wiki/Command-line_interface). You can access it following these instructions: - - [Windows](https://www.howtogeek.com/270810/how-to-quickly-launch-a-bash-shell-from-windows-10s-file-explorer/) - - [Mac](https://macpaw.com/how-to/use-terminal-on-mac) - - [Linux](https://askubuntu.com/questions/196212/how-do-you-open-a-command-line) -- [Celo Command Line Interface](../command-line-interface/introduction.md) installed on your computer -- The [24-word recovery phrase](https://kb.myetherwallet.com/en/security-and-privacy/what-is-a-mnemonic-phrase/) of your Ethereum address - - - -### Steps - -Please follow the instructions below closely, because missteps can lead to errors or permanent loss of your tokens. To understand these steps, please read [What is Ethereum](https://ethereum.org/en/what-is-ethereum/) and [Celo Overview](https://docs.celo.org/overview). - - -#### Prepare your recovery phases - -Write your recovery phrase to a file using the following commands: - -1. `nano recovery.txt` -2. Paste ` ` -3. Replace the ``s in brackets with the words from your recovery phrase (usually 24 words, but can be 12, 15, 18, 21 or 24 words, as specified in the [BIP 39 standard](https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki)) -4. Press ctrl-o to save -5. Press ctrl-x to exit - -#### Recover your Ethereum address on Celo - -Recover your Ethereum address on the Celo network: - -``` -celocli account:new --mnemonicPath recovery.txt --derivationPath "eth" --node https://forno.celo.org -``` - -This command will return you with: - -- `accountAddress`: the same address as your Ethereum address -- `privateKey`: the private key associated with your address -- please record this private key on paper and not share with anyone else -- `publicKey`: the public key associated with your address - -***Note*** - -Using the `eth` derivation path as above will work for the default Ethereum path used by nearly all Ethereum wallets (`"m/44'/60'/0'/0/0"`). If your address was generated using a different derivation path you can specify that using a combination of the flags `addressIndex`, `changeIndex` and `derivationPath`. - -For example, for the address corresponding to the path `m/44'/78'/1'/4/23` use: - -``` -celocli account:new --mnemonicPath recovery.txt --derivationPath "m/44'/78'/1'" --changeIndex 4 --addressIndex 23 --node https://forno.celo.org -``` - -#### Check your CELO balanace - -Check your Celo account balance using this command: - -``` -celocli account:balance --node https://forno.celo.org -``` - -Replace `` with the `accountAddress` you got from the previous step. - -#### Transfer CELO - -Now, you can transfer your CELO to an address of choice: - -``` -celocli transfer:celo --from --to --value --privateKey --node https://forno.celo.org -``` - -- Replace `` with the `accountAddress` you got from the previous step. -- Replace `` with the address that you want to send CELO to. -- Replace `` with the amount you want to send, but this number needs to be slightly lower than your balance, as there’s a transaction fee. - -{% hint style="info" %} -Note that the value has a unit of CELO Wei (1 CELO = 10^18 CELO Wei), so if you want to send 1 CELO, the `` should be 1000000000000000000. -{% endhint %} diff --git a/packages/docs/celo-holder-guide/governance-cheat-sheet.md b/packages/docs/celo-holder-guide/governance-cheat-sheet.md deleted file mode 100644 index 37814d09c92..00000000000 --- a/packages/docs/celo-holder-guide/governance-cheat-sheet.md +++ /dev/null @@ -1,23 +0,0 @@ -# Governance Cheat Sheet - -## Governable Parameters - -* The stability protocol, including the exchange -* What the protocol does with data feeds from Oracles -* Adding or removing stablecoins -* Whitelisting stablecoins (or other ERC20s) for use in paying gas fees -* The identity protocol, including how phone number attestations works -* Linking of signers and off-chain metadata (e.g claims) to accounts -* Most of Proof of Stake protocol, including elections, locked gold, slashing parameters -* On-chain governance itself -* MinimumClientVersion -* BlockGasLimit -* IntrinsicGasForAlternativeFeeCurrency - -## Things That Can't Be Modified By Governance - -* The protocol by which nodes communicate -* The format of block headers, block bodies, the fields in transactions, etc -* How nodes sync -* How nodes store their data locally -* Most parameters that affect the blockchain diff --git a/packages/docs/celo-holder-guide/ledger.md b/packages/docs/celo-holder-guide/ledger.md deleted file mode 100644 index 06ac782fb5f..00000000000 --- a/packages/docs/celo-holder-guide/ledger.md +++ /dev/null @@ -1,209 +0,0 @@ -# Using a Ledger Wallet - -This section shows how to set up a [Ledger](https://www.ledger.com/) Nano S or X hardware wallet. - -A hardware wallet or Hardware Security Module (HSM) holds a single random seed (expressed as a mnemonic) which can be used to generate any number of public-private keypairs, that is, any number of accounts ("wallets"), each with an associated address. - -{% hint style="info" %} -The steps below require technical knowledge. You should be comfortable with the Command Line Interface (CLI) and understand the basics of how cryptographic network accounts work. -{% endhint %} - -## Requirements - -Make sure to have the following before you begin: -* Initialized your [Ledger Nano X or S](https://support.ledger.com/hc/en-us/articles/360018784134) -* The [latest firmware](https://support.ledger.com/hc/en-us/articles/360013349800) is installed -* [Ledger Live](https://support.ledger.com/hc/en-us/articles/360006395233-Take-your-first-steps) is ready to be used. -* You have [celocli](https://www.npmjs.com/package/@celo/celocli) installed. - -## Installation Instructions -### Install the Celo Application - -Start by installing the Celo application and setting a PIN on your Ledger device by following steps 1 and 2 [on this page](https://www.ledger.com/start/). - -{% hint style="danger" %} -Make sure to securely back up both the PIN and the recovery phrase (also known as a backup key or mnemonic). If you lose them, or they are stolen, you lose access to your Celo assets with no recovery possible. The recovery phrase will be shown only once. -{% endhint %} - -Open the Ledger Live App on your computer and follow the instructions on the screen. - -Search for “Celo” in the app store. - -Click **Install** for the Celo app, this will install the Celo App Version 1.0.3 on your device. - -![](https://storage.googleapis.com/celo-website/docs/ledger-celo-app-install.png) - -{% hint style="info" %} -If you’ve previously installed the Celo app on your device, you’ll see an **Upgrade** option instead of **Install.** -{% endhint %} - -The installation is completed once you see the green tick and **Installed** label. - -![](https://storage.googleapis.com/celo-website/docs/ledger-celo-app-installed.png) - -You should now see on your device’s screen `Celo app`. You may need to toggle left or right using the buttons on the device to find the app. - -Quit the Ledger Live app on your compute but keep the Ledger wallet connected to your computer. - -### Setting up the Celo app - -On your Ledger Nano device enter the PIN if prompted and press both buttons at the same time to open into the `Celo app`. - -Press both buttons on the device at the same time to continue. - -The Celo app is now ready for use and you should see `Application is ready` on the screen. - -## Setup Instructions -### Install the Celo CLI - -Now that you have installed the Celo app on to your ledger, you can begin to use it with the Celo CLI. - -Open the terminal application on your computer and install the [Celo CLI](https://docs.celo.org/command-line-interface/introduction): - -```bash -npm install -g @celo/celocli -``` - -If you have previously installed the CLI, ensure that you are using version 0.0.47 or later: - -```bash -celocli --version -``` - -And if not, upgrade by running the same command as above. - -You will now need to point the Celo CLI to a node that is synchronized with one of Celo’s networks. We’ll be using the [Alfajores Network](https://docs.celo.org/getting-started/alfajores-testnet). - -Configure the Celo CLI so that it uses a cLabs node on the Alfajores network. - -```bash -celocli config:set --node https://alfajores-forno.celo-testnet.org/ -``` - -{% hint style="danger" %} Connecting celocli to an untrusted node may allow that node to influence the transactions sent by the Celo CLI to the Ledger for signing. When in doubt, always use a node that you trust or are running yourself. {% endhint %} - -Check that the node is synchronized: - -```bash -celocli node:synced -``` - -The output should display `true`. If it displays `false` you may need to wait a bit and try again. - -### Confirm Addresses on Celo CLI - -The Ledger's current seed phrase determines the device's accounts. In the terminal on your computer, you can view the first account's address with the following command: - -```bash -celocli account:list --useLedger --ledgerAddresses 1 -``` - -{% hint style="tip" %} -If you wish to generate more than one address from your seed phrase, you can display the first `N` (e.g. 10) addresses use the `--ledgerAddresses` flag. - -```bash -celocli account:list --useLedger --ledgerAddresses N -``` - -To display addresses at specific indexes `M`and `N`(e. 2 and 654) use the `--ledgerCustomAddresses "[M, N]"`flag - -```bash -celocli account:list --useLedger --ledgerCustomAddresses "[M, N]" -``` - -{% endhint %} - -{% hint style="tip" %} -**Advanced:** Celo uses a [BIP-32](https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki) derivation path of `m/44'/52752'/0'/0/index`, where `index >= 0`. -{% endhint %} - -### Performing a Test transaction on Celo CLI - -Before using your address on the Celo Mainnet, you may want to test it on the Celo Alfajores Testnet with the following instructions. - -Visit the Alfajores Faucet and send yourself some testnet CELO at the following URL: - -https://celo.org/developers/faucet - -Check that you received the funds with the following command: - -```bash -celocli account:balance --node https://alfajores-forno.celo-testnet.org/ -``` - -Next, you'll need to enable "Contract Data" in the ledger app. Open the Celo App on your ledger device and go to Settings, then enable "Contract Data" to "Allowed". This setting is required because the celocli uses the ERC20 "pre-wrapped" version of CELO and so sending transactions requires sending data to a smart contract. - -Perform a test transaction by running the following command: - -```bash -celocli transfer:gold --from= --to=0x0000000000000000000000000000000000000001 --value=10000 --useLedger --node https://alfajores-forno.celo-testnet.org/ -``` - -You'll need to then approve the transaction on the Ledger device. Toggle right on the device until you see `Approve` on screen. Press both buttons at the same time to confirm. - -Finally, you can see if your transaction was mined on the network by copying the transaction hash (txHash) outputted by the command, and searching for it on the [Alfajores Block Explorer](https://alfajores-blockscout.celo-testnet.org/). - -### Using `celocli` - -You can use `celocli` to securely sign transactions or proof-of-possessions with your Ledger. - -To use `celocli` with your Ledger, ensure the device is connected to your computer, unlocked, and the `Celo` app is open and displaying `Application is ready`. - -Then, simply append the `--useLedger` flag to any `celocli` commands with which you'd like to use a Ledger. You may also append the `--ledgerConfirmAddress` flag, which will require that you manually verify on the Ledger the address from which the transaction is being sent. - -## View Account Balance - -In order to view your account Balance on your Ledger with `celocli`, you need to run the following command: - -```sh -# If you haven't set the node config to mainnet, do it first -celocli config:set --node=https://forno.celo.org -celocli account:balance -``` - -This will display the specific account balance for your address on Celo Mainnet. - -## Receive Crypto Assets - -In order to receive Celo on your address, whether it's CELO or cUSD or any stablecoin in the future, you must share your specific address with the sender. - -Once a sender has confirmed they sent you the assets to your Ledger address, ask for the transaction ID which you can lookup on the [Explorer](https://explorer.celo.org/). - -## Send Crypto Assets - -In order to send CELO or cUSD from your Ledger, you just need a recipient address to send to. Once you have that and the amount you would like to send (in our example, 10 CELO), we will go over how to send CELO using `celocli`. - -```sh -celocli transfer:gold --from= --to= --value=10 --useLedger -``` -You'll need to then approve the transaction on the Ledger device. Toggle right on the device until you see `Approve` on screen. Press both buttons at the same time to confirm. - -You'll then get a transaction hash when it's confirmed that the transaction was mined by the network, and you can check the status of the transaction on the explorer [here](https://explorer.celo.org). - -## Troubleshooting - -If you have issues connecting to the Ledger, try the following: - -- Check that the Ledger device is connected, powered on, and that you've unlocked it using the PIN. -- Check that no other applications are using the device. Close Ledger Live. Stop any local Celo Blockchain node, or ensure it is run with the `--nousb` option. -- Try unplugging and replugging the device. Some devices appear to trigger a warning on Macs saying: “USB Devices Disabled. Unplug the device using too much power to re-enable USB devices” which is usually resolved by reconnecting. -- Ensure that you are using the original cable supplied with your Ledger. -- Ensure that your Ledger has the [latest firmware](https://support.ledger.com/hc/en-us/articles/360002731113-Update-device-firmware). For Ledger Nano S, a firmware version of 1.6 or later is required. -- Ensure that you are running the latest version of the Celo CLI. - -There have been reports of a possible [issue](https://github.com/celo-org/celo-ledger-spender-app/issues/13) that appears to affect developer store apps on the Ledger Nano X including the Celo Ledger App. This is believed to be fixed in version 1.0.3. In earlier versions, a user clicking through the `Pending Ledger review` notice too rapidly can cause the device to freeze. If this occurs, wait until the device's battery is depleted, then charge and power up again. Then use Ledger Live Manager to update the installed version of the Celo Ledger App. - -## Using Your Ledger with Celo Wallet app - -An alternative to using `celocli` is [celowallet.app](https://celowallet.app) which supports Ledger and provides a simple interface for transacting with Celo accounts. - -1. Load the [wallet app](https://celowallet.app) in a modern browser, Chrome is recommended. -2. Click on `Use Existing Account` option. -3. Click on the Ledger icon. -4. Connect your Ledger Nano to your computer. -5. Unlock your Ledger Nano with your PIN. -6. Go to the Celo app on your Ledger Nano and open it. -7. On `celowallet.app` website, click on `Import Account`. Make sure you are using the right Address Index. Index 0 means the first address on the list. -8. There will be a popup in the web browser to approve the Ledger device, click on Nano in the popup and click `Connect`. -9. Verify on your Ledger Nano that this is the address you want to use, then click the right button on the Ledger until you see `Approve` then click both buttons to approve. -10. You are now using celowallet.app with your Ledger diff --git a/packages/docs/celo-holder-guide/quick-start.md b/packages/docs/celo-holder-guide/quick-start.md deleted file mode 100644 index c0178438aa7..00000000000 --- a/packages/docs/celo-holder-guide/quick-start.md +++ /dev/null @@ -1,423 +0,0 @@ -# Quick Start for CELO Holders - -If you are a self-custodying holder of CELO on the Celo [Mainnet](../getting-started/mainnet.md), this guide will help you access your account and do the setup necessary to earn rewards on those funds. - -## Prerequisites - -This guide assumes: - -- You are self-custodying (you hold the private key to your address), and that you have provided that address directly to cLabs. If you are using a custody provider ([Anchorage](https://anchorage.com), [Coinbase](https://custody.coinbase.com), [CoinList](https://coinlist.co), or others), please contact them for directions. - -- Your address is the beneficiary of a [ReleaseGold](release-gold.md) contract, which releases CELO programmatically to a beneficiary over a period of time. - -- You have been informed by cLabs that the `ReleaseGold` instance corresponding to your address has been deployed. - -- You have your private key held on a [Ledger Nano S or Ledger Nano X](ledger.md) device, and you have a second such device available for managing a voting key. If you only have a single Ledger available, see [below](#Using-a-single-Ledger). - -{% hint style="warning" %} -**Warning**: Self-custodying keys has associated security and financial risks. Loss or theft of keys can result in irrecovable loss of funds. This guide also requires technical knowledge. You should be comfortable with using a Command Line Interface (CLI) and understand the basics of how cryptographic network accounts work. -{% endhint %} - -## Support - -If you have any questions or need assistance with these instructions, please contact cLabs or ask in the `#celo-holders` channel on [Celo's Discord server](https://chat.celo.org). Remember that Discord is a public channel: never disclose recovery phrases (also known as backup keys, or mnemonics), private keys, unsantized log output, or personal information. - -Please refer to the [Ledger Troubleshooting](ledger.md#Troubleshooting) for issues using Ledgers with the Celo CLI. - -## Outline - -In this guide, you will: - -- Install the Celo CLI (and optionally, a local node to connect to the network) -- Access the `ReleaseGold` account associated with your address using your existing Ledger -- Authorize a voting key, which you will hold on a new, second Ledger -- Lock some of the Gold in your `ReleaseGold` account -- Use that Locked Gold to vote for Validator Groups to operate Celo's [Proof of Stake](../celo-codebase/protocol/proof-of-stake/README.md) network (and in doing so be ready to receive epoch rewards of 6% when the community enables them in a forthcoming governance proposal) - -## Preparing Ledgers - -You will need: - -- Your **Beneficiary Ledger**: One Ledger Nano S or X configured with your beneficiary key (used to produce the address you supplied cLabs). Once you have completed this guide, this will become a "cold wallet" that you can keep offline most of the time. - -- Your **Vote Signer Ledger:** One Ledger Nano S or X configured with a new, unused key. This will become a "warm wallet" you can use whenever you want to participate in validator elections or governance proposals. - -As a first step, follow [these instructions](ledger.md) for both Ledgers to install the Ledger Celo app, obtain and verify the associated addresses, and (recommended) run a test transaction on the Alfajores test network. - -{% hint style="info" %} -The latest version of the Celo Ledger app is 1.0.3. If you are already using a Ledger with an earlier version installed, please [upgrade]](ledger.md). -{% endhint %} - -The remainder of this guide assumes you are using the first address available on each Ledger. You can add the flags described in [these instructions](ledger.md) to commands below to use different addresses. - -### Using a single Ledger - -If you only have a single Ledger, and are comfortable losing the security advantage of keeping the beneficiary key offline when voting, you can configure a second address on the same Ledger as your voting key. - -First, read [these instructions](ledger.md) carefully. Then, whereever you see instructions to connect your Vote Signer Ledger, for each command line containing `--useLedger` also add `--ledgerCustomAddresses "[1]"`. If in doubt, [ask for help](#Support). - -## Deployment - -If you haven't already, open a terminal window and install the [Celo CLI](https://docs.celo.org/command-line-interface/introduction): - -```bash - npm install -g @celo/celocli -``` - -If you have previously installed the CLI, ensure that you are using version 0.0.47 or later: - -```bash -celocli --version -``` - -And if not, upgrade by running the same command as above. - -You will now need to point the Celo CLI to a node that is synchronized with the [Mainnet](../getting-started/mainnet.md) network. There are two options: - -- **Local Celo Blockchain node**: You can run a full node on your local machine which will communicate - with other nodes and cryptographically verify all data it receives. Since this approach does not require you to trust the network, it is most secure. - - To do this, follow the tutorial for [running a full node](../getting-started/running-a-full-node-in-mainnet.md) (and make sure to pass `--nousb`). - - Then run: - - ```bash - celocli config:set --node http://localhost:8545 - ``` - -- **cLabs-operated node**: As an alternative to using your own node, you can use an existing transaction - node service. Forno, operated by cLabs, is one example. While this approach does not require you to deploy a node locally, it requires you to trust cLabs and the remote Forno nodes (in the same way you would trust a centralized web service). An attacker may be able to manipulate data returned to you from the service, which the CLI may rely on to complete operations. - - To use Forno, run this command: - - ```bash - celocli config:set --node https://forno.celo.org - ``` - -## Locate and verify your `ReleaseGold` contract address - -First, copy the beneficiary address into the clipboard, and set it in an environment variable: - -```bash -export CELO_BENEFICIARY_ADDRESS= -``` - -Next, you will find the address of the `ReleaseGold` contract deployed for your beneficiary address. The `ReleaseGold` contract has its own address and is separate from the beneficiary address, but there are certain aspects of it that can be controlled only by the beneficiary. For more details, please refer to the [Understanding ReleaseGold page](release-gold.md). - -Open the list of [all ReleaseGold deployments](https://storage.googleapis.com/celo-website/releasegold/CeloMainnetReleaseGoldAll.json) and locate your address (use Edit>Find in your browser, then paste the beneficiary address). Copy the matching value next to `ContractAddress` into your clipboard. - -If you cannot locate your address in these mappings, please contact cLabs. - -If you have more than one beneficiary address, you'll want to step through this guide and complete the steps for each one separately. - -Record the value of the `ContractAddress` in an environment variable: - -```bash -export CELO_RG_ADDRESS= -``` - -You should find your beneficiary account already has a very small CELO balance to pay for transaction fees (values are shown in wei, so For example, 1 CELO = 1000000000000000000): - -```bash -celocli account:balance $CELO_BENEFICIARY_ADDRESS -``` - -Next, check the details of your `ReleaseGold` contract: - -```bash -celocli releasegold:show --contract $CELO_RG_ADDRESS -``` - -Verify the configuration, balance, and beneficiary details. You can find an explanation of these parameters on the [ReleaseGold](release-gold.md) page. - -If any of these details appear to be incorrect, please contact cLabs, and do not proceed with the remainder of this guide. - -If the configuration shows `canVote: true`, your contract allows you to participate in electing Validator Groups for Celo's Proof of Stake protocol, and potentially earn epoch rewards for doing so. Please continue to follow the remainder of this guide (or you can come back and continue at any time). - -Otherwise, you're all set. You don't need to take any further action right now. - -## Authorize Vote Signer Keys - -To allow you to keep your Beneficiary Ledger offline on a day-to-day basis, it’s recommended to use a separate [Authorized Vote Signer Account](https://docs.celo.org/validator-guide/summary/detailed#authorized-vote-signers) that will vote on behalf of the beneficiary. - -{% hint style="info" %} -A vote signer can either be another Ledger device or a cloud Hardware Security Module (HSM). Explore [this guide](../developer-resources/integrations/cloud-hsm.md) to learn more about cloud HSM setup and celocli integration. -{% endhint %} - -This is a two step process. First, you create a "proof of possession" that shows that the holder of the beneficiary key also holds the vote signer key. Then, you will use that when the beneficiary signs a transaction authorizing the vote signer key. This proves to the Celo network that a single entity holds both keys. - -{% hint style="info" %} -Connect your **Vote Signer Ledger** now, unlock it, and open the Celo application. -{% endhint %} - -First obtain your vote signer address: - -```bash -# Using the Vote Signer Ledger -celocli account:list --useLedger -``` - -Your address is listed under `Ledger Addresses`. Create an environment variable for your vote signer address. - -```bash -export CELO_VOTE_SIGNER_ADDRESS= -``` - -Then create the proof of possession: - -```bash -# Using the Vote Signer Ledger -celocli account:proof-of-possession --signer $CELO_VOTE_SIGNER_ADDRESS --account $CELO_RG_ADDRESS --useLedger -``` - -The Ledger `Celo app` will ask you to confirm the transaction. Toggle right on the device until you see `Sign Message` on screen. Press both buttons at the same time to confirm. - -Take note of the signature produced by the `proof-of-possession` command and create an environment variable for it. - -```bash -export CELO_VOTE_SIGNER_SIGNATURE= -``` - -Now switch ledgers. - -{% hint style="info" %} -Connect your **Beneficiary Ledger** now, unlock it, and open the Celo application. -{% endhint %} - -Next, register the `ReleaseGold` contract as a “Locked Gold” account: - -```bash -# Using the Beneficiary Ledger -celocli releasegold:create-account --contract $CELO_RG_ADDRESS --useLedger -``` - -You'll need to press right on the Ledger several times to review details of the transactions, then when the device says "Accept and send" press both buttons together. - -Check that the `ReleaseGold` contract address is associated with a registered Locked Gold Account: - -```bash -celocli account:show $CELO_RG_ADDRESS -``` - -Now, using the proof-of-possession you generated above, as the Locked Gold Account account, you will authorize the vote signing key to vote on the Locked Gold Account's behalf: - -```bash -# Using the Beneficiary Ledger -celocli releasegold:authorize --contract $CELO_RG_ADDRESS --role=vote --signer $CELO_VOTE_SIGNER_ADDRESS --signature $CELO_VOTE_SIGNER_SIGNATURE --useLedger -``` - -Finally, verify that your signer was correctly authorized: - -```bash -celocli account:show $CELO_RG_ADDRESS -``` - -The `vote` address under `authorizedSigners` should match `$CELO_VOTE_SIGNER_ADDRESS`. - -The `ReleaseGold` contract was funded with an additional 1 CELO that it sends to the first vote signer account to be authorized. This allows the vote signer account to cover transaction fees. You can confirm this: - -```bash -celocli account:balance $CELO_VOTE_SIGNER_ADDRESS -``` - -{% hint style="warning" %} -**Warning**: If you authorize a second vote signer, it will not be automatically funded by the `ReleaseGold` contract. You will need to transfer a fraction of 1 CELO from your beneficiary address to it in order to cover transaction fees when using it. -{% endhint %} - -## Lock CELO - -To vote for Validator Groups and on governance proposals you will need to lock CELO. This is to keep the network secure by making sure each unit of CELO can only be used to vote once. - -Specify the amount of CELO you wish to lock (don’t include the `< >` braces). All amounts are given as wei, i.e units of 10^-18 CELO. For example, 1 CELO = 1000000000000000000. - -{% hint style="warning" %} -Make sure to leave at least 1 CELO unlocked to pay for transaction fees. -{% endhint %} - -```bash -# Using the Beneficiary Ledger -celocli releasegold:locked-gold --contract $CELO_RG_ADDRESS --action lock --useLedger --value -``` - -Check that your CELO was successfully locked. - -```bash -celocli lockedgold:show $CELO_RG_ADDRESS -``` - -## Vote for a Validator Group - -Similar to staking or delegating in other Proof of Stake cryptocurrency protocols, CELO holders can lock CELO and vote for Validator Groups on the Celo network. By doing this, not only do you contribute to the health and security of the network, but you can also earn [epoch rewards](../GLOSSARY.md#epoch-rewards). - -For more details, check out the [Voting for Validators page](voting-validators.md), which contains useful background on how voting Validator Elections work, as well as more guidance on how to select a Validator Group to vote for. For now, all you need to know is that: - -- in Celo, CELO holders vote for Validator Groups, not Validators directly -- you only earn epoch rewards if the Validator Group you voted gets at least 1 Validator elected - -Keeping this in mind, you will need to find a Validator Group to vote for, and copy its address. You can find this information on community validator explorers such as the [cLabs Validator explorer](https://celo.org/validators/explore) and [Bi23 Labs' `thecelo` dashboard](https://thecelo.com). - -You can also see registered Validator Groups through the Celo CLI. This will display a list of Validator Groups, the number of votes they have received, the number of additional votes they are able to receive, and whether or not they are eligible to elect Validators: - -```bash -celocli election:list -``` - -Once you have found one or more Validator Groups you’d like to vote for, create an environment variable for its Group address (don’t include the `< >` braces): - -```bash -export CELO_VALIDATOR_GROUP_ADDRESS= -``` - -For each vote you will need to select the amount of locked CELO you wish to vote with. You can lookup your balance again if you need to: - -```bash -celocli account:balance $CELO_RG_ADDRESS -``` - -All CELO amounts should be expressed in wei: that means 1 CELO = 1000000000000000000. Don’t include the `< >` braces in the line below. - -To vote, you will use your vote signer key, which is voting *on behalf of* your Locked Gold account. - -{% hint style="info" %} -Connect your **Vote Signer Ledger** now, unlock it, and open the Celo application. -{% endhint %} - -```bash -# Using the Vote Signer Ledger -celocli election:vote --from $CELO_VOTE_SIGNER_ADDRESS --for $CELO_VALIDATOR_GROUP_ADDRESS --useLedger --value -``` - -Verify that your votes were cast successfully. Since your Vote Signer account votes on behalf of the Celo Locked Gold account, you want to check the election status for that account: - -```bash -celocli election:show $CELO_RG_ADDRESS --voter -``` - -Your locked CELO votes should be displayed next to `pending` under `votes`. - -## The next day: Activate your Vote - -Your vote will apply starting at the next Validator Election, held once per day, and will continue to apply at each subsequent election until you change it. - -After that election has occurred, you will need to activate your vote. This will allow you to receive epoch rewards if in that election (or at any subsequent one, until you change your vote) the Validator Group for which you voted elected at least one Validator. Rewards will get added to your votes for that Group and will compound automatically. - -{% hint style="info" %} -Epoch lengths in Mainnet are set to be the number of blocks produced in a day. As a result, votes may need to be activated up to 24 hours after they are cast. -{% endhint %} - -Check that your votes were cast in a previous epoch: - -```bash -celocli election:show $CELO_RG_ADDRESS --voter -``` - -Your vote should be displayed next to `pending` under `votes`. - -{% hint style="info" %} -Connect your **Vote Signer Ledger** now, unlock it, and open the Celo application. -{% endhint %} - -Now activate your votes: - -```bash -# Using the Vote Signer Ledger -# You must do this in an epoch after the one you voted in: this may take up to 24h -celocli election:activate --from $CELO_VOTE_SIGNER_ADDRESS --useLedger -``` - -If you run `election:show` again, your vote should be displayed next to `active` under `votes`. - -Congratulations! You're all set. - -At the end of the epoch following your vote activation, you may receive voter rewards (if at least one Validator from the Validator Group for which you voted was elected). - -You can see rewards using: - -```bash -celocli rewards:show --voter $CELO_RG_ADDRESS -``` - -Or by searching for your `ReleaseGold` address on the [Block Explorer](https://explorer.celo.org) and clicking the "Celo Info" tab. - -## Next Steps - -You are now set up to participate in the Celo network! - -You might want to read more about [choosing a Validator Group](voting-validators.md) to vote for, and how [voter rewards](../celo-codebase/protocol/proof-of-stake/locked-gold-rewards.md) are calculated. You can vote for up to ten different Groups from a single account. - -Now you've locked CELO, you can use it to participate in voting for or against [Governance proposals](voting-governance.md). You can do this without affecting any vote you have made for Validator Groups. - -You can also read more about how Celo's [Proof of Stake](../celo-codebase/protocol/proof-of-stake/README.md) and on-chain [Governance](../celo-codebase/protocol/governance.md) mechanisms work. - -## Revoking Votes - -At any point you can revoke votes cast for a Validator Group. For example, a Group may be performing poorly and affecting your rewards, and you may prefer to vote for another Group. - -{% hint style="info" %} -When you revoke your votes you will stop receiving voter rewards. -{% endhint %} - -Specify the amount of CELO you wish to revoke (don’t include the `< >` braces). All CELO amounts should be expressed in 18 decimal places. For example, 1 CELO = 1000000000000000000. - -{% hint style="info" %} -Connect your **Vote Signer Ledger** now, unlock it, and open the Celo application. -{% endhint %} - -Revoke votes for the Group: - -```bash -# Using the Vote Signer Ledger -celocli election:revoke --from $CELO_VOTE_SIGNER_ADDRESS --for $CELO_VALIDATOR_GROUP_ADDRESS --value --useLedger -``` - -You can immediately re-use this locked CELO to vote for another Group. - -## Unlocking and Withdrawing - -At some point, the terms of your `ReleaseGold` contract will allow you to withdraw funds and transfer them to your beneficiary address. - -There are actually several steps to this process: - -1. First, revoke all outstanding votes as above (including for governance proposals) -2. Unlock the non-voting Locked Gold, starting a 72 hour unlocking period -3. After the three day unlocking period is complete, withdraw the CELO back to the `ReleaseGold` contract -4. Assuming vesting and distribution requirements are met, withdraw the CELO to the beneficiary address - -Check the current status of outstanding votes: - -```bash -celocli election:show $CELO_RG_ADDRESS --voter -``` - -You can view the balance of locked CELO: - -```bash -celocli account:balance $CELO_RG_ADDRESS -``` - -{% hint style="info" %} -Connect your **Beneficiary Ledger** now, unlock it, and open the Celo application. -{% endhint %} - -Assuming you have non-voting Locked Gold, you can initiate the process to unlock: - -```bash -# Using the Beneficiary Ledger -celocli releasegold:locked-gold --contract $CELO_RG_ADDRESS --action unlock --useLedger --value -``` - -After the 72 hour unlocking period has passed, withdraw the CELO back to the `ReleaseGold` contract: - -```bash -# Using the Beneficiary Ledger -celocli releasegold:locked-gold --contract $CELO_RG_ADDRESS --action withdraw --useLedger --value -``` - -Finally, request that the `ReleaseGold` contract transfer an amount to your beneficiary address: - -```bash -# Using the Beneficiary Ledger -celocli releasegold:withdraw --contract $CELO_RG_ADDRESS --useLedger --value -``` - -To vote with any CELO in your beneficiary account, you'll want to register it as a Locked Gold Acccount, authorize a new vote signing key for it, then lock CELO. diff --git a/packages/docs/celo-holder-guide/release-gold.md b/packages/docs/celo-holder-guide/release-gold.md deleted file mode 100644 index d8a5657a5d9..00000000000 --- a/packages/docs/celo-holder-guide/release-gold.md +++ /dev/null @@ -1,102 +0,0 @@ -# ReleaseGold - -## Introduction - -[`ReleaseGold`](https://github.com/celo-org/celo-monorepo/blob/master/packages/protocol/contracts/governance/ReleaseGold.sol) is a smart contract that enables CELO to be released programmatically to a beneficiary over a period of time. In a deployed `ReleaseGold` smart contract, only the CELO balance that has been released according to the release schedule can be withdrawn by the contract’s beneficiary. The unreleased CELO cannot be withdrawn, but can be used for specific functions in Celo’s Proof of Stake protocol, namely voting and validating. - -The intent of the `ReleaseGold` contract is to allow beneficiaries to participate in Celo’s Proof of Stake protocol with CELO that has not yet been fully released to them. Beneficiaries are able to lock CELO for voting and validating with the full `ReleaseGold` balance, including both released and unreleased CELO. - -Increasing the volume of CELO that can be used in Celo’s Proof of Stake consensus promotes network security and even greater decentralization. See below for details on specific features of the `ReleaseGold` contract, as well as how they are implemented. The [source code](https://github.com/celo-org/celo-monorepo/blob/master/packages/protocol/contracts/governance/ReleaseGold.sol) includes documentation, and technical readers are encouraged to find further details there. - -Warning: please do not send any ERC20 token other han CELO or cUSD to a Release Gold contract, as it will not be able to be transfered out of the contract per [source code](https://github.com/celo-org/celo-monorepo/blob/master/packages/protocol/contracts/governance/ReleaseGold.sol#L164). - -### Example - -To illustrate with an example, let’s consider a `ReleaseGold` contract deployed with a total balance of 100 CELO. For example purposes, we’ll assume this contract enables both voting and validating. - -Let's also assume the beneficiary is an individual who is receiving CELO based on a vesting schedule (or a ‘release schedule’). According to this release schedule, the beneficiary will receive 10% of the total CELO balance each month. - -In three months time after deployment, there will be 30 released CELO in the contract, because 10 CELO (10% of 100 CELO) was released each month, for 3 months. Now, the beneficiary can transfer this 30 CELO freely. - -The beneficiary does not yet have full rights to the remaining 70 unreleased CELO. However, this 70 CELO while unavailable for withdrawal, can still be used by the beneficiary for voting and validating. This unreleased balance will also continue to release at the rate of 10 CELO per month, until the total balance is empty. - -## Addresses Involved - -*Beneficiary* - -The `beneficiary` address is the recipient of the CELO in the `ReleaseGold` contract. As the CELO is released over time, it is incrementally made withdrawable solely to the beneficiary. The beneficiary is also able to use both unreleased and released CELO to participate in Celo’s Proof of Stake consensus protocol, via locking gold and voting or validating. - -*Release Owner* - -The `releaseOwner` is the address involved in administering the `ReleaseGold` contract. The release owner may be able to perform actions including [setting the liquidity provision](https://github.com/celo-org/celo-monorepo/blob/master/packages/protocol/contracts/governance/ReleaseGold.sol#L268) for the contract, setting the maximum withdrawal amount, or [revoking](https://github.com/celo-org/celo-monorepo/blob/master/packages/protocol/contracts/governance/ReleaseGold.sol#L362) the contract, depending on the ReleaseGold configuration. - -*Refund Address* - -The `refundAddress` is the address where funds that have not been released will be sent if a `ReleaseGold` contract is revoked. Contracts that are not revocable do not have a `refundAddress`. - -## Use Cases for `ReleaseGold` - -Two anticipated use cases for `ReleaseGold` contracts are for “holders” and “earners”. Note that these are not specified in `ReleaseGold` explicitly, rather they represent sample configurations that the `ReleaseGold` contract supports. - -In the “holder” case, a recipient may have purchased or been awarded an amount of CELO, but is subject to a distribution schedule limiting the amount of CELO that can be liquidated at any given time. These recipients may be able to validate and vote with the full `ReleaseGold` balance, and also are not subject to the contract’s revocation by another party (eg. an employer). - -In the “earner” case, a grant recipient may have entered a legal contract wherein an exchange of services earns them an amount of CELO over a releasing, or vesting, schedule. These grants are characterized by extra restrictions because the total grant amount is still being *earned*. The `ReleaseGold` balance cannot be used for running a validator, but it can be used to vote for validators and governance proposals on the Celo network. Additionally, these contracts may be revocable and may be subject to the `liquidityProvision` flag, which prevents CELO distribution when markets are incapable of absorbing additional CELO without significant slippage. - -## Release Schedule - -In `ReleaseGold` smart contracts, a fixed amount of CELO becomes accessible to the `beneficiary` over time. - -The following arguments specify a ReleaseGold smart contract schedule: - -- `releasePeriod` - the frequency, in seconds, at which CELO is released - - Some common values: monthly (2628000), every 3 months (7884000) -- `amountReleasedPerPeriod` - the amount of CELO to be released each `releasePeriod` -- `numReleasePeriods` - the number of `releasePeriods` in which CELO will be released -- `releaseCliff` - the time at which the release cliff expires. - -The total balance for the ReleaseGold account can be determined by multiplying the `numReleasePeriods` by `amountReleasedPerPeriod`. - -Similar to vesting-type schedules with cliffs used for other assets, ReleaseGold allows for a `releaseCliff` (expressed in seconds) before which the released CELO cannot be withdrawn by its beneficiary. A common value for this is `31536000`, which is 1 year. - -## Released and Unreleased CELO - -In deployed `ReleaseGold` accounts, you can conceptually think of CELO in two states -- released, and unreleased. There are other states including locked, but for the purposes of the contract, these are the two primary states to consider. - -Released CELO can be withdrawn to the `beneficiary` where it can be used freely. Unreleased CELO comes with some restrictions. Foremost, it cannot be withdrawn by the beneficiary. If `canVote` and `canValidate` are set to false, the beneficiary cannot vote or validate, respectively. - -If the contract permits voting and validating using the unreleased balance, the specific keys to perform these actions must first be authorized. For example, if the `beneficiary` desires to vote using their `ReleaseGold` contract, they must authorize a voting key to vote on the contract’s behalf. - -## FAQ - -Can I vote for validators, or run a validator using my `ReleaseGold` CELO balance? - -- Keep in mind that in a `ReleaseGold` contract, there is both released CELO, and unreleased CELO. You can always vote or validate with the released balance if you are the beneficiary. However, for unreleased CELO, you can only vote or validate if `canVote` or `canValidate` properties are respectively set to true on the contract . - -Can the `releaseOwner` access my CELO? - -- No, the `releaseOwner` cannot make transactions with the CELO balance in a `ReleaseGold` contract. However, they can perform some administrative functions if the permissions are given at time of deployment. For example, a `releaseOwner` cannot revoke a contract unless the property `revocable` is set to true when the contract is deployed. -- It is highly recommended to review the contract at its deployed address, to learn specific details of a `ReleaseGold` contract. - -Can I move the CELO released by the `ReleaseGold` contract to another address? - -- Of course! Once CELO is released and the cliff has passed, the beneficiary is free to do what they want with it. - -Why do I need to authorize separate keys for voting and validating? Can’t I do it using the private key for my beneficiary address? - -- You may use any keys for your voting and validating signers, so long as those keys are not for a registered account or for another signing purpose. This means you *could* use your `beneficiary` address as one of your signing roles, but you would need another account for an additional role. - -Can I change the beneficiary? - -- Yes, but changing the beneficiary requires signatures from both the `releaseOwner` and the current `beneficiary` of the `ReleaseGold` contract. This is implemented as a two out of two multisig contract. - -What if I lose the private key associated with the beneficiary address? - -- Unfortunately, if you lose the private key for the beneficiary address, then you won't be able to access your funds. Please be careful in ownership of this key, as it’s loss is irreversible. - -What happens if there is a bug in the `ReleaseGold` contract? - -- The `ReleaseGold` contract has been reviewed by security firms, and has passed smart contract audits. That said, if any unforeseen bugs are found, it is possible to modify the contract and redeploy it. This process requires a 2/2 multisig agreement from both `releaseOwner` and `beneficiary`. - -What is the distribution ratio? - -- Some grants are subject to “distribution schedules,” which control the release of funds outside of a traditional vesting schedule for legal reasons. This schedule is controlled by the `distributionRatio` and is adjustable by the `releaseOwner`. diff --git a/packages/docs/celo-holder-guide/voting-governance.md b/packages/docs/celo-holder-guide/voting-governance.md deleted file mode 100644 index 5c092dd9192..00000000000 --- a/packages/docs/celo-holder-guide/voting-governance.md +++ /dev/null @@ -1,113 +0,0 @@ -# Voting on Governance Proposals - -{% hint style="info" %} -If you would like to keep up-to-date with all the news happening in the Celo community, including validation, node operation and governance, please sign up to our [Celo Signal mailing list here](https://celo.activehosted.com/f/15). - -You can add the [Celo Signal public calendar](https://calendar.google.com/calendar/u/0/embed?src=c_9su6ich1uhmetr4ob3sij6kaqs@group.calendar.google.com) as well which has relevant dates. -{% endhint %} - -Celo uses a formal on-chain governance mechanism to manage and upgrade the protocol. More information about the Governance system can be found in the [Governance section of the protocol documentation](../celo-codebase/protocol/governance.md). -Here, we will discuss using the [Celo CLI](../command-line-interface/introduction.md) to participate in Governance as a voter as well as how to create a proposal. - -{% hint style="info" %} -In the following commands `` is used as a placeholder for something you should specify on the command line. -{% endhint %} - -## Viewing Proposals - -A list of active proposals can be viewed with the following command: - -```bash -celocli governance:list -``` - -Included will be three lists of proposals by status: -* **Queued** proposals have been submitted, but are not yet being considered. Voters can upvote proposals in this list, and proposals with the most upvotes from this list will be moved from the queue to be considered. -* **Dequeued** proposals are actively being considered and will pass through the Approval, Referendum, and Execution stages, as discussed in the [protocol documentation](../celo-codebase/protocol/governance.md). -* **Expired** proposals are no longer being considered. - -## Understanding Proposal Details - -You can view information about a specific proposal with: - -```bash -celocli governance:show --proposalID= -``` - -For example, the proposal 14 on Mainnet was as follows: - -``` -Running Checks: - ✔ 14 is an existing proposal -proposal: - 0: - contract: Governance - function: setBaselineQuorumFactor - args: - 0: 500000000000000000000000 - params: - baselineQuorumFactor: 500000000000000000000000 (~5.000e+23) - value: 0 -metadata: - proposer: 0xF3EB910DA09B8AF348E0E5B6636da442cFa79239 - deposit: 100000000000000000000 (~1.000e+20) - timestamp: 1609961608 (~1.610e+9) - transactionCount: 1 - descriptionURL: https://github.com/celo-org/celo-proposals/blob/master/CGPs/0016.md -stage: Referendum -upvotes: 0 -votes: - Yes: 95934607718520408413613056 (~9.593e+25) - No: 0 - Abstain: 0 -passing: true -requirements: - participation: 0.2009694258486 - agreement: 90% -isApproved: true -isProposalPassing: true -timeUntilStages: - referendum: past - execution: 57 minutes, 59 seconds - expiration: 3 days, 57 minutes, 59 seconds -``` - -## Voting on Proposals - -When a proposal is Queued, you can upvote the proposal to indicate you'd like it to be considered. - -{% hint style="info" %} -If you are using a Ledger wallet, make sure to include `--useLedger` and `--ledgerAddresses` in the -following commands. -{% endhint %} - -```bash -celocli governance:upvote --proposalID= --from= -``` - -At a defined frequency, which can be checked with the `celocli network:parameters` command, proposals can be dequeued, with the highest upvoted proposals being dequeued first. - -After a proposal is dequeued, it will first enter the Approval phase. -In this phase, the [Governance Approver](../celo-codebase/protocol/governance.md#approval) may choose to approve the proposal, which will allow it to proceed to the Referendum phase after the configured length of time. - -Once a proposal has reached the Referendum phase, it is open to community for voting. - -```bash -celocli governance:vote --proposalID= --value= --from= -``` - -## Executing a Proposal - -If a Governance Proposal receives enough votes and passes in the Referendum phase, it can be executed by anyone. - -```bash -celocli governance:execute --proposalID= --from= -``` - - diff --git a/packages/docs/celo-holder-guide/voting-validators.md b/packages/docs/celo-holder-guide/voting-validators.md deleted file mode 100644 index dd505d64784..00000000000 --- a/packages/docs/celo-holder-guide/voting-validators.md +++ /dev/null @@ -1,103 +0,0 @@ -# Voting for Validator Groups - -Validators play a critical role in the Celo protocol, determining which transactions get applied and producing new blocks. Selecting organizations that operate well-run infrastructure to perform this role effectively is essential for Celo's long-term success. - -The Celo community makes these decisions by locking CELO and voting for [Validator Groups](../celo-codebase/protocol/proof-of-stake/validator-groups.md), intermediaries that sit between voters and Validators. Every Validator Group has an ordered list of up to 5 candidate Validators. Some organizations may operate a group with their own Validators in it; some may operate a group to which they have added Validators run by others. - -{% hint style="info" %} -If you would like to keep up-to-date with all the news happening in the Celo community, including validation, node operation and governance, please sign up to our [Celo Signal mailing list here](https://celo.activehosted.com/f/15). - -You can add the [Celo Signal public calendar](https://calendar.google.com/calendar/u/0/embed?src=c_9su6ich1uhmetr4ob3sij6kaqs@group.calendar.google.com) as well which has relevant dates. -{% endhint %} - -## Validator Elections - -[Validator elections](../celo-codebase/protocol/proof-of-stake/validator-elections.md) are held every epoch (approximately once per day). The protocol elects a maximum of 100 Validators. At each epoch, every elected Validator must be re-elected to continue. Validators are selected [in proportion](../celo-codebase/protocol/proof-of-stake/validator-elections.md#Running-the-Election) to votes received for each Validator Group. - -If you hold CELO, or are a beneficiary of a [`ReleaseGold` contract](release-gold.md) that allows voting, you can vote for Validator Groups. A single account can split their LockedGold balance to have outstanding votes for up to 10 groups. - -CELO that you lock and use to vote for a group that elects one or more Validators receives [epoch rewards](../celo-codebase/protocol/proof-of-stake/epoch-rewards.md) every epoch (approximately every day) once the community passes a governance proposal enabling rewards. The initial level of rewards is anticipated to be around 6% per annum equivalent (but is subject to change). - -Unlike a number of Proof of Stake protocols, **CELO used for voting is never at risk**. The actions of the Validator Groups or Validators you vote for can cause you to receive lower or higher rewards, but the CELO you locked will always be available to be unlocked in the future. [Slashing](../GLOSSARY.md#slashing) in the Celo protocol applies only to Validators and Validator Groups. - -## Choosing a Validator Group - -As a CELO holder, you have the opportunity to impact the Celo network by voting for Validator Groups. As Validators play an integral role in securing Celo, it is crucial that voters choose groups that contribute to both the technical health of the network, as well as the community. Some factors to consider when deciding which Validator Group to vote for include: - -### Technical - -- **Proven identity:** Validators and groups can supply [verifiable DNS claims](../validator-guide/validator-explorer.md). You can use these to securely identify that the same entity has access both to the account of a Validator or group and the supplied DNS records. - -- **Can receive votes**: Validator Groups can receive votes up to a certain [voting cap](../celo-codebase/protocol/proof-of-stake/validator-elections.md#group-voting-caps). You cannot vote for groups with a balance that would put it beyond its cap. - -- **Will get elected**: CELO holders only receive voter rewards during an epoch if their CELO is used to vote for a Validator Group that elects at least one Validator during that epoch. Put another way, your vote does not contribute to securing the network or earning you rewards if your group does not receive enough other votes to elect at least one Validator. - -- **Secure**: The operational security of Validators is essential for everyone's use of the Celo network. All Validators that participated in the Stake Off were eligible for a [security audit](https://medium.com/celoorg/the-celo-Validator-community-security-audits-and-lessons-learned-e67b78cd4123). You can see scores under the "Master Validator Challenge" column in the [Stake Off leaderboard](https://docs.google.com/spreadsheets/d/e/2PACX-1vQwk10o6YV0uriR8LuYfLqB1irjmOX_-L6Jljn3BtKlmz_R_TsUU8aI-pMqGVlu4HQKIQlQaFkUhsyl/pubhtml?gid=1970613133&single=true). Scores of 80% or greater were awarded the "Master Validator" badge, indiciating a serious proven commitment to operational security. - -- **Reliable**: Celo's consensus protocol relies on two-thirds of elected Validators being available in order to produce blocks and process transactions. Voter rewards are directly tied to the [uptime score](../celo-codebase/protocol/proof-of-stake/validator-rewards.md#calculating-uptime-score) of all elected Validators in the group for which the vote was made. Any period of consecutive downtime greater than a minute reduces a Validator's uptime score. - -- **No recent slashing:** When Validators and groups register, their Locked Gold becomes "staked", in that it is subject to penalties for conduct that could seriously adversely affect the health of the network. Voters' Locked Gold is never slashed, but voter rewards are affected by a group's [slashing penalty](../celo-codebase/protocol/proof-of-stake/validator-rewards.md#calculating-slashing-penalty), which is halved when a group or one of its Validators is slashed. Look for groups with a last slashing time long in the past, ideally `0` (never), and a slashing penalty value of `1.0`. - -- **Runs an Attestation Service**: The [Attestation Service](../celo-codebase/protocol/identity/README.md) is an important service that Validators can run that allows users to verify that they have access to a phone number and map it to an address. Supporting Validators that run this service makes it easier for new users to begin using Celo. - -- **Runs a Validator on Baklava**: A group that runs a Validator on the [Baklava](../getting-started/baklava-testnet.md) helps maintain the testnet and verify that upgrades to the Celo Blockchain software can be deployed smoothly. - -### Community - -- **Promotes the Celo mission**: Celo's mission is to [build a monetary system that creates the conditions of prosperity for all](https://medium.com/celoorg/an-introductory-guide-to-celo-b185c62d3067). Consider Validator Groups that further this mission through their own activities or initiatives around financial inclusion, education and sustainability. - -- **Broadens Diversity**: The Celo community aims to be inclusive to the largest number of contributors, with the most varied and diverse backgrounds possible. Support that diversity by considering what new perspectives and strengths the teams you support offer. As well as the backgrounds and experiences of the team, consider that the network security and availability is improved by Validators operating at different network locations, on different platforms, and with different toolchains. - -- **Contributes to Celo:** Support Validator Groups that strengthen the Celo developer community, for example through building or operating services for the Celo ecosystem, participating actively in on-chain governance, and answering questions and supporting others, on [Discord](https://chat.celo.org) or the [Forum](https://forum.celo.org). - -## The Celo Foundation Voting Policy - -As described above, there are many criteria to consider when deciding which group to vote for. While it is highly recommended that all CELO holders do their independent research when deciding which group to vote for, another option is to vote for Validator Groups that have received votes from the Celo Foundation. - -The Celo Foundation has a [Validator Group voting policy](../validator-guide/celo-foundation-voting-policy.md) that it follows when voting with the CELO that it holds. This policy has been developed by the Foundation board and technical advisors with the express goal of promoting the long-term security and decentralization of the network. Validator Groups have an opportunity to apply for Foundation votes every 3 months, and a new cohort is selected based on past performance and contributions. - -You can find the [full set of Validator Groups currently receiving votes, and their addresses linked here](https://docs.google.com/spreadsheets/d/1ltVNkQfXW3lIZxXU52R3IXeD6w21oacWFVb3a-FYRBY/edit?usp=sharing). - -## Validator Explorers - -The Celo ecosystem includes a number of great services for browsing registered Validator Groups and Validators. - -{% hint style="warning" %} -**Warning**: Exercise caution in relying on Validator-supplied names to determine their real-world identity. Malicious participants may attempt to impersonate other Validators in order to attract votes. - -Validators and groups can also supply [verifiable DNS claims](../validator-guide/validator-explorer.md), and the Celo Validator Explorer displays these. You can use these to securely identify that the same entity has access both to the account of a Validator or group and the supplied DNS records. -{% endhint %} - -### [Celo Validator Explorer](https://validators.celo.org) (cLabs) - -The Celo Validator Explorer has tabs to show either Mainnet or the Baklava Testnet. - -The list shows Validator Groups and, when you expand each group, the Validators that are affiliated to that group. - -A white check mark next to the name of a Validator Group shows that there is one or more DNS metadata claims verified for that group (see below). - -The Votes Available column shows: - -- On the left: Votes made for the group, as a percentage of the total Locked Gold - -- On the right: The voting cap of that group, as a percentage of the total Locked Gold - -- In the middle: votes made for the group as a proportion of the voting cap - -### [TheCelo](https://thecelo.com) (Bi23 Labs) - -TheCelo contains a range of valuable information on the Celo project and active Celo networks. The "Groups" tab shows a detailed view of Validator Groups. Click on a group to drilldown to see group metadata and affiliated Validators. - -### [Celo Whale](https://celowhale.com) (DSRV) - -Celo Whale shows detailed metadata and statistics around Validators but does not presently offer a view centered on Validator Groups. - -### [Celovote Scores](https://celovote.com/scores) (WOTrust | celovote.com) - -Celovote shows ranking of validator groups based on their estimated annual rate of return (ARR). Estimate is calculated based on past performance. - -### [Cauldron](https://cauldron.pretoriaresearchlab.io/block-map) ( [Pretoria Research Lab GmbH](https://pretoriaresearchlab.io)) - -Cauldron is a tooling site containing a signed blocks explorer for Mainnet and Baklava testnet, visualizing missed blocks and patterns for the validator group set, and developer faucets for the Alfajores and Baklava test networks. - -_Please raise a Pull Request against [this page](https://github.com/celo-org/celo-monorepo/blob/master/packages/docs/celo-holder-guide/voting-validators.md) to add/amend details of any community services!_ diff --git a/packages/docs/command-line-interface/account.md b/packages/docs/command-line-interface/account.md deleted file mode 100644 index de0d18a343c..00000000000 --- a/packages/docs/command-line-interface/account.md +++ /dev/null @@ -1,839 +0,0 @@ -# `celocli account` - -Manage your account, keys, and metadata - - -## `celocli account:authorize` - -Keep your locked Gold more secure by authorizing alternative keys to be used for signing attestations, voting, or validating. By doing so, you can continue to participate in the protocol while keeping the key with access to your locked Gold in cold storage. You must include a "proof-of-possession" of the key being authorized, which can be generated with the "account:proof-of-possession" command. - -``` -Keep your locked Gold more secure by authorizing alternative keys to be used for signing attestations, voting, or validating. By doing so, you can continue to participate in the protocol while keeping the key with access to your locked Gold in cold storage. You must include a "proof-of-possession" of the key being authorized, which can be generated with the "account:proof-of-possession" command. - -USAGE - $ celocli account:authorize - -OPTIONS - -r, --role=vote|validator|attestation (required) Role to delegate - - --blsKey=0x The BLS public key that the - validator is using for consensus, - should pass proof of possession. - 96 bytes. - - --blsPop=0x The BLS public key - proof-of-possession, which - consists of a signature on the - account address. 48 bytes. - - --from=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) Account Address - - --globalHelp View all available global flags - - --signature=0x (required) Signature (a.k.a - proof-of-possession) of the - signer key - - --signer=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) Account Address - -EXAMPLES - authorize --from 0x5409ED021D9299bf6814279A6A1411A7e866A631 --role vote --signer - 0x6ecbe1db9ef729cbe972c83fb886247691fb6beb --signature - 0x1b9fca4bbb5bfb1dbe69ef1cddbd9b4202dcb6b134c5170611e1e36ecfa468d7b46c85328d504934fce6 - c2a1571603a50ae224d2b32685e84d4d1a1eebad8452eb - - authorize --from 0x5409ED021D9299bf6814279A6A1411A7e866A631 --role validator --signer - 0x6ecbe1db9ef729cbe972c83fb886247691fb6beb --signature - 0x1b9fca4bbb5bfb1dbe69ef1cddbd9b4202dcb6b134c5170611e1e36ecfa468d7b46c85328d504934fce6 - c2a1571603a50ae224d2b32685e84d4d1a1eebad8452eb --blsKey - 0x4fa3f67fc913878b068d1fa1cdddc54913d3bf988dbe5a36a20fa888f20d4894c408a6773f3d7bde1115 - 4f2a3076b700d345a42fd25a0e5e83f4db5586ac7979ac2053cd95d8f2efd3e959571ceccaa743e02cf4be - 3f5d7aaddb0b06fc9aff00 --blsPop - 0xcdb77255037eb68897cd487fdd85388cbda448f617f874449d4b11588b0b7ad8ddc20d9bb450b513bb35 - 664ea3923900 -``` - -_See code: [src/commands/account/authorize.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/account/authorize.ts)_ - -## `celocli account:balance ADDRESS` - -View Celo Stables and CELO balances for an address - -``` -View Celo Stables and CELO balances for an address - -USAGE - $ celocli account:balance ADDRESS - -OPTIONS - --erc20Address=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d Address of generic ERC-20 - token to also check balance - for - - --globalHelp View all available global - flags - -EXAMPLES - balance 0x5409ed021d9299bf6814279a6a1411a7e866a631 - - balance 0x5409ed021d9299bf6814279a6a1411a7e866a631 --erc20Address - 0x765DE816845861e75A25fCA122bb6898B8B1282a -``` - -_See code: [src/commands/account/balance.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/account/balance.ts)_ - -## `celocli account:claim-account FILE` - -Claim another account, and optionally its public key, and add the claim to a local metadata file - -``` -Claim another account, and optionally its public key, and add the claim to a local metadata file - -USAGE - $ celocli account:claim-account FILE - -ARGUMENTS - FILE Path of the metadata file - -OPTIONS - --address=address (required) The address of the - account you want to claim - - --from=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) Address of the account - to set metadata for or an - authorized signer for the address - in the metadata - - --globalHelp View all available global flags - - --publicKey=publicKey The public key of the account that - others may use to send you - encrypted messages - -EXAMPLE - claim-account ~/metadata.json --address 0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d - --from 0x47e172F6CfB6c7D01C1574fa3E2Be7CC73269D95 -``` - -_See code: [src/commands/account/claim-account.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/account/claim-account.ts)_ - -## `celocli account:claim-attestation-service-url FILE` - -Claim the URL of the attestation service and add the claim to a local metadata file - -``` -Claim the URL of the attestation service and add the claim to a local metadata file - -USAGE - $ celocli account:claim-attestation-service-url FILE - -ARGUMENTS - FILE Path of the metadata file - -OPTIONS - --force Ignore URL validity checks - - --from=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) Address of the account - to set metadata for or an - authorized signer for the address - in the metadata - - --globalHelp View all available global flags - - --url=https://www.celo.org (required) The URL you want to - claim. Should begin http:// - -EXAMPLE - claim-attestation-service-url ~/metadata.json --url https://test.com/myurl --from - 0x47e172F6CfB6c7D01C1574fa3E2Be7CC73269D95 -``` - -_See code: [src/commands/account/claim-attestation-service-url.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/account/claim-attestation-service-url.ts)_ - -## `celocli account:claim-domain FILE` - -Claim a domain and add the claim to a local metadata file - -``` -Claim a domain and add the claim to a local metadata file - -USAGE - $ celocli account:claim-domain FILE - -ARGUMENTS - FILE Path of the metadata file - -OPTIONS - --domain=domain (required) The domain you want to - claim - - --from=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) Address of the account - to set metadata for or an - authorized signer for the address - in the metadata - - --globalHelp View all available global flags - -EXAMPLE - claim-domain ~/metadata.json --domain test.com --from - 0x47e172F6CfB6c7D01C1574fa3E2Be7CC73269D95 -``` - -_See code: [src/commands/account/claim-domain.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/account/claim-domain.ts)_ - -## `celocli account:claim-keybase FILE` - -Claim a keybase username and add the claim to a local metadata file - -``` -Claim a keybase username and add the claim to a local metadata file - -USAGE - $ celocli account:claim-keybase FILE - -ARGUMENTS - FILE Path of the metadata file - -OPTIONS - --from=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) Address of the account - to set metadata for or an - authorized signer for the address - in the metadata - - --globalHelp View all available global flags - - --username=username (required) The keybase username you - want to claim - -EXAMPLE - claim-keybase ~/metadata.json --from 0x47e172F6CfB6c7D01C1574fa3E2Be7CC73269D95 - --username myusername -``` - -_See code: [src/commands/account/claim-keybase.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/account/claim-keybase.ts)_ - -## `celocli account:claim-name FILE` - -Claim a name and add the claim to a local metadata file - -``` -Claim a name and add the claim to a local metadata file - -USAGE - $ celocli account:claim-name FILE - -ARGUMENTS - FILE Path of the metadata file - -OPTIONS - --from=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) Address of the account - to set metadata for or an - authorized signer for the address - in the metadata - - --globalHelp View all available global flags - - --name=name (required) The name you want to - claim - -EXAMPLE - claim-name ~/metadata.json --from 0x47e172F6CfB6c7D01C1574fa3E2Be7CC73269D95 --name - myname -``` - -_See code: [src/commands/account/claim-name.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/account/claim-name.ts)_ - -## `celocli account:claim-storage FILE` - -Claim a storage root and add the claim to a local metadata file - -``` -Claim a storage root and add the claim to a local metadata file - -USAGE - $ celocli account:claim-storage FILE - -ARGUMENTS - FILE Path of the metadata file - -OPTIONS - --from=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) Address of the account - to set metadata for or an - authorized signer for the address - in the metadata - - --globalHelp View all available global flags - - --url=https://www.celo.org (required) The URL of the storage - root you want to claim - -EXAMPLE - claim-storage ~/metadata.json --url http://test.com/myurl --from - 0x47e172F6CfB6c7D01C1574fa3E2Be7CC73269D95 -``` - -_See code: [src/commands/account/claim-storage.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/account/claim-storage.ts)_ - -## `celocli account:create-metadata FILE` - -Create an empty identity metadata file. Use this metadata file to store claims attesting to ownership of off-chain resources. Claims can be generated with the account:claim-\* commands. - -``` -Create an empty identity metadata file. Use this metadata file to store claims attesting to ownership of off-chain resources. Claims can be generated with the account:claim-* commands. - -USAGE - $ celocli account:create-metadata FILE - -ARGUMENTS - FILE Path where the metadata should be saved - -OPTIONS - --from=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) Address of the account - to set metadata for or an - authorized signer for the address - in the metadata - - --globalHelp View all available global flags - -EXAMPLE - create-metadata ~/metadata.json --from 0x47e172F6CfB6c7D01C1574fa3E2Be7CC73269D95 -``` - -_See code: [src/commands/account/create-metadata.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/account/create-metadata.ts)_ - -## `celocli account:get-metadata ADDRESS` - -Show information about an address. Retreives the metadata URL for an account from the on-chain, then fetches the metadata file off-chain and verifies proofs as able. - -``` -Show information about an address. Retreives the metadata URL for an account from the on-chain, then fetches the metadata file off-chain and verifies proofs as able. - -USAGE - $ celocli account:get-metadata ADDRESS - -ARGUMENTS - ADDRESS Address to get metadata for - -OPTIONS - -x, --extended show extra columns - --columns=columns only show provided columns (comma-separated) - --csv output is csv format [alias: --output=csv] - --filter=filter filter property by partial string matching, ex: name=foo - --globalHelp View all available global flags - --no-header hide table header from output - --no-truncate do not truncate output to fit screen - --output=csv|json|yaml output in a more machine friendly format - --sort=sort property to sort by (prepend '-' for descending) - -EXAMPLE - get-metadata 0x97f7333c51897469E8D98E7af8653aAb468050a3 -``` - -_See code: [src/commands/account/get-metadata.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/account/get-metadata.ts)_ - -## `celocli account:list` - -List the addresses from the node and the local instance - -``` -List the addresses from the node and the local instance - -USAGE - $ celocli account:list - -OPTIONS - --globalHelp View all available global flags - - --local If set, only show local and hardware wallet accounts. Use no-local to - only show keystore addresses. -``` - -_See code: [src/commands/account/list.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/account/list.ts)_ - -## `celocli account:lock ACCOUNT` - -Lock an account which was previously unlocked - -``` -Lock an account which was previously unlocked - -USAGE - $ celocli account:lock ACCOUNT - -ARGUMENTS - ACCOUNT Account address - -OPTIONS - --globalHelp View all available global flags - -EXAMPLE - lock 0x5409ed021d9299bf6814279a6a1411a7e866a631 -``` - -_See code: [src/commands/account/lock.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/account/lock.ts)_ - -## `celocli account:new` - -Creates a new account locally using the Celo Derivation Path (m/44'/52752'/0/changeIndex/addressIndex) and print out the key information. Save this information for local transaction signing or import into a Celo node. Ledger: this command has been tested swapping mnemonics with the Ledger successfully (only supports english) - -``` -Creates a new account locally using the Celo Derivation Path (m/44'/52752'/0/changeIndex/addressIndex) and print out the key information. Save this information for local transaction signing or import into a Celo node. Ledger: this command has been tested swapping mnemonics with the Ledger successfully (only supports english) - -USAGE - $ celocli account:new - -OPTIONS - --addressIndex=addressIndex - Choose the address index for the derivation path - - --changeIndex=changeIndex - Choose the change index for the derivation path - - --derivationPath=derivationPath - Choose a different derivation Path (Celo's default is "m/44'/52752'/0'"). Use "eth" - as an alias of the Ethereum derivation path ("m/44'/60'/0'"). Recreating the same - account requires knowledge of the mnemonic, passphrase (if any), and the derivation - path - - --globalHelp - View all available global flags - - --language=chinese_simplified|chinese_traditional|english|french|italian|japanese|kore - an|spanish - [default: english] Language for the mnemonic words. **WARNING**, some hardware - wallets don't support other languages - - --mnemonicPath=mnemonicPath - Instead of generating a new mnemonic (seed phrase), use the user-supplied mnemonic - instead. Path to a file that contains all the mnemonic words separated by a space - (example: "word1 word2 word3 ... word24"). If the words are a language other than - English, the --language flag must be used. Only BIP39 mnemonics are supported - - --passphrasePath=passphrasePath - Path to a file that contains the BIP39 passphrase to combine with the mnemonic - specified using the mnemonicPath flag and the index specified using the addressIndex - flag. Every passphrase generates a different private key and wallet address. - -EXAMPLES - new - - new --passphrasePath myFolder/my_passphrase_file - - new --language spanish - - new --passphrasePath some_folder/my_passphrase_file --language japanese --addressIndex - 5 - - new --passphrasePath some_folder/my_passphrase_file --mnemonicPath - some_folder/my_mnemonic_file --addressIndex 5 -``` - -_See code: [src/commands/account/new.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/account/new.ts)_ - -## `celocli account:offchain-read ADDRESS` - -DEV: Reads the name from offchain storage - -``` -DEV: Reads the name from offchain storage - -USAGE - $ celocli account:offchain-read ADDRESS - -OPTIONS - --bucket=bucket If using a GCP or AWS storage - bucket this parameter is required - - --directory=directory [default: .] To which directory - data should be written - - --from=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d Account Address - - --globalHelp View all available global flags - - --privateDEK=privateDEK - - --provider=(git|aws|gcp) If the CLI should attempt to push - to the cloud - -EXAMPLES - offchain-read 0x... - - offchain-read 0x... --from 0x... --privateKey 0x... -``` - -_See code: [src/commands/account/offchain-read.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/account/offchain-read.ts)_ - -## `celocli account:offchain-write` - -DEV: Writes a name to offchain storage - -``` -DEV: Writes a name to offchain storage - -USAGE - $ celocli account:offchain-write - -OPTIONS - --bucket=bucket If using a GCP or AWS storage bucket this parameter is - required - - --directory=directory [default: .] To which directory data should be written - - --encryptTo=encryptTo - - --globalHelp View all available global flags - - --name=name (required) - - --privateDEK=privateDEK - - --privateKey=privateKey (required) - - --provider=(git|aws|gcp) If the CLI should attempt to push to the cloud - -EXAMPLES - offchain-write --name test-account --privateKey 0x... - - offchain-write --name test-account --privateKey 0x... privateDEK 0x... --encryptTo - 0x... -``` - -_See code: [src/commands/account/offchain-write.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/account/offchain-write.ts)_ - -## `celocli account:proof-of-possession` - -Generate proof-of-possession to be used to authorize a signer. See the "account:authorize" command for more details. - -``` -Generate proof-of-possession to be used to authorize a signer. See the "account:authorize" command for more details. - -USAGE - $ celocli account:proof-of-possession - -OPTIONS - --account=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) Address of the - account that needs to prove - possession of the signer key. - - --globalHelp View all available global flags - - --signer=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) Address of the signer - key to prove possession of. - -EXAMPLE - proof-of-possession --account 0x5409ed021d9299bf6814279a6a1411a7e866a631 --signer - 0x6ecbe1db9ef729cbe972c83fb886247691fb6beb -``` - -_See code: [src/commands/account/proof-of-possession.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/account/proof-of-possession.ts)_ - -## `celocli account:recover-old` - -Recovers the Valora old account and print out the key information. The old Valora app (in a beta state) generated the user address using a seed of 32 bytes, instead of 64 bytes. As the app fixed that, some old accounts were left with some funds. This command allows the user to recover those funds. - -``` -Recovers the Valora old account and print out the key information. The old Valora app (in a beta state) generated the user address using a seed of 32 bytes, instead of 64 bytes. As the app fixed that, some old accounts were left with some funds. This command allows the user to recover those funds. - -USAGE - $ celocli account:recover-old - -OPTIONS - --addressIndex=addressIndex - Choose the address index for the derivation path - - --changeIndex=changeIndex - Choose the change index for the derivation path - - --derivationPath=derivationPath - Choose a different derivation Path (Celo's default is "m/44'/52752'/0'"). Use "eth" - as an alias of the Ethereum derivation path ("m/44'/60'/0'"). Recreating the same - account requires knowledge of the mnemonic, passphrase (if any), and the derivation - path - - --globalHelp - View all available global flags - - --language=chinese_simplified|chinese_traditional|english|french|italian|japanese|kore - an|spanish - [default: english] Language for the mnemonic words. **WARNING**, some hardware - wallets don't support other languages - - --mnemonicPath=mnemonicPath - (required) Path to a file that contains all the mnemonic words separated by a space - (example: "word1 word2 word3 ... word24"). If the words are a language other than - English, the --language flag must be used. Only BIP39 mnemonics are supported - - --passphrasePath=passphrasePath - Path to a file that contains the BIP39 passphrase to combine with the mnemonic - specified using the mnemonicPath flag and the index specified using the addressIndex - flag. Every passphrase generates a different private key and wallet address. - -EXAMPLES - recover-old --mnemonicPath some_folder/my_mnemonic_file - - recover-old --mnemonicPath some_folder/my_mnemonic_file --passphrasePath - myFolder/my_passphrase_file - - recover-old --mnemonicPath some_folder/my_mnemonic_file --language spanish - - recover-old --mnemonicPath some_folder/my_mnemonic_file --passphrasePath - some_folder/my_passphrase_file --language japanese --addressIndex 5 - - recover-old --mnemonicPath some_folder/my_mnemonic_file --passphrasePath - some_folder/my_passphrase_file --addressIndex 5 -``` - -_See code: [src/commands/account/recover-old.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/account/recover-old.ts)_ - -## `celocli account:register` - -Register an account on-chain. This allows you to lock Gold, which is a pre-requisite for registering a Validator or Group, participating in Validator elections and on-chain Governance, and earning epoch rewards. - -``` -Register an account on-chain. This allows you to lock Gold, which is a pre-requisite for registering a Validator or Group, participating in Validator elections and on-chain Governance, and earning epoch rewards. - -USAGE - $ celocli account:register - -OPTIONS - --from=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) Account Address - --globalHelp View all available global flags - --name=name - -EXAMPLES - register --from 0x5409ed021d9299bf6814279a6a1411a7e866a631 - - register --from 0x5409ed021d9299bf6814279a6a1411a7e866a631 --name test-account -``` - -_See code: [src/commands/account/register.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/account/register.ts)_ - -## `celocli account:register-data-encryption-key` - -Register a data encryption key for an account on chain. This key can be used to encrypt data to you such as offchain metadata or transaction comments - -``` -Register a data encryption key for an account on chain. This key can be used to encrypt data to you such as offchain metadata or transaction comments - -USAGE - $ celocli account:register-data-encryption-key - -OPTIONS - --from=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) Addess of the account to - set the data encryption key for - - --globalHelp View all available global flags - - --publicKey=publicKey (required) The public key you want - to register - -EXAMPLE - register-data-encryption-key --publicKey 0x... --from - 0x47e172F6CfB6c7D01C1574fa3E2Be7CC73269D95 -``` - -_See code: [src/commands/account/register-data-encryption-key.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/account/register-data-encryption-key.ts)_ - -## `celocli account:register-metadata` - -Register metadata URL for an account where users will be able to retieve the metadata file and verify your claims - -``` -Register metadata URL for an account where users will be able to retieve the metadata file and verify your claims - -USAGE - $ celocli account:register-metadata - -OPTIONS - -x, --extended show extra columns - - --columns=columns only show provided columns - (comma-separated) - - --csv output is csv format [alias: - --output=csv] - - --filter=filter filter property by partial string - matching, ex: name=foo - - --force Ignore metadata validity checks - - --from=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) Addess of the account to - set metadata for - - --globalHelp View all available global flags - - --no-header hide table header from output - - --no-truncate do not truncate output to fit - screen - - --output=csv|json|yaml output in a more machine friendly - format - - --sort=sort property to sort by (prepend '-' - for descending) - - --url=https://www.celo.org (required) The url to the metadata - you want to register - -EXAMPLE - register-metadata --url https://www.mywebsite.com/celo-metadata --from - 0x47e172F6CfB6c7D01C1574fa3E2Be7CC73269D95 -``` - -_See code: [src/commands/account/register-metadata.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/account/register-metadata.ts)_ - -## `celocli account:set-name` - -Sets the name of a registered account on-chain. An account's name is an optional human readable identifier - -``` -Sets the name of a registered account on-chain. An account's name is an optional human readable identifier - -USAGE - $ celocli account:set-name - -OPTIONS - --account=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) Account Address - --globalHelp View all available global flags - --name=name (required) - -EXAMPLE - set-name --account 0x5409ed021d9299bf6814279a6a1411a7e866a631 --name test-account -``` - -_See code: [src/commands/account/set-name.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/account/set-name.ts)_ - -## `celocli account:show ADDRESS` - -Show information for an account, including name, authorized vote, validator, and attestation signers, the URL at which account metadata is hosted, the address the account is using with the mobile wallet, and a public key that can be used to encrypt information for the account. - -``` -Show information for an account, including name, authorized vote, validator, and attestation signers, the URL at which account metadata is hosted, the address the account is using with the mobile wallet, and a public key that can be used to encrypt information for the account. - -USAGE - $ celocli account:show ADDRESS - -OPTIONS - --globalHelp View all available global flags - -EXAMPLE - show 0x5409ed021d9299bf6814279a6a1411a7e866a631 -``` - -_See code: [src/commands/account/show.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/account/show.ts)_ - -## `celocli account:show-claimed-accounts ADDRESS` - -Show information about claimed accounts - -``` -Show information about claimed accounts - -USAGE - $ celocli account:show-claimed-accounts ADDRESS - -OPTIONS - --globalHelp View all available global flags - -EXAMPLE - show-claimed-accounts 0x5409ed021d9299bf6814279a6a1411a7e866a631 -``` - -_See code: [src/commands/account/show-claimed-accounts.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/account/show-claimed-accounts.ts)_ - -## `celocli account:show-metadata FILE` - -Show the data in a local metadata file - -``` -Show the data in a local metadata file - -USAGE - $ celocli account:show-metadata FILE - -ARGUMENTS - FILE Path of the metadata file - -OPTIONS - -x, --extended show extra columns - --columns=columns only show provided columns (comma-separated) - --csv output is csv format [alias: --output=csv] - --filter=filter filter property by partial string matching, ex: name=foo - --globalHelp View all available global flags - --no-header hide table header from output - --no-truncate do not truncate output to fit screen - --output=csv|json|yaml output in a more machine friendly format - --sort=sort property to sort by (prepend '-' for descending) - -EXAMPLE - show-metadata ~/metadata.json -``` - -_See code: [src/commands/account/show-metadata.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/account/show-metadata.ts)_ - -## `celocli account:unlock ACCOUNT` - -Unlock an account address to send transactions or validate blocks - -``` -Unlock an account address to send transactions or validate blocks - -USAGE - $ celocli account:unlock ACCOUNT - -ARGUMENTS - ACCOUNT Account address - -OPTIONS - --duration=duration Duration in seconds to leave the account unlocked. Unlocks until - the node exits by default. - - --globalHelp View all available global flags - - --password=password Password used to unlock the account. If not specified, you will - be prompted for a password. - -EXAMPLES - unlock 0x5409ed021d9299bf6814279a6a1411a7e866a631 - - unlock 0x5409ed021d9299bf6814279a6a1411a7e866a631 --duration 600 -``` - -_See code: [src/commands/account/unlock.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/account/unlock.ts)_ - -## `celocli account:verify-proof-of-possession` - -Verify a proof-of-possession. See the "account:proof-of-possession" command for more details. - -``` -Verify a proof-of-possession. See the "account:proof-of-possession" command for more details. - -USAGE - $ celocli account:verify-proof-of-possession - -OPTIONS - --account=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) Address of the - account that needs to prove - possession of the signer key. - - --globalHelp View all available global flags - - --signature=0x (required) Signature (a.k.a. - proof-of-possession) of the - signer key - - --signer=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) Address of the signer - key to verify proof of - possession. - -EXAMPLE - verify-proof-of-possession --account 0x199eDF79ABCa29A2Fa4014882d3C13dC191A5B58 - --signer 0x0EdeDF7B1287f07db348997663EeEb283D70aBE7 --signature - 0x1c5efaa1f7ca6484d49ccce76217e2fba0552c0b23462cff7ba646473bc2717ffc4ce45be89bd5be9b5d - 23305e87fc2896808467c4081d9524a84c01b89ec91ca3 -``` - -_See code: [src/commands/account/verify-proof-of-possession.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/account/verify-proof-of-possession.ts)_ diff --git a/packages/docs/command-line-interface/autocomplete.md b/packages/docs/command-line-interface/autocomplete.md deleted file mode 100644 index 957b2fe2884..00000000000 --- a/packages/docs/command-line-interface/autocomplete.md +++ /dev/null @@ -1,32 +0,0 @@ -# `celocli autocomplete` - -display autocomplete installation instructions - - -## `celocli autocomplete [SHELL]` - -display autocomplete installation instructions - -``` -display autocomplete installation instructions - -USAGE - $ celocli autocomplete [SHELL] - -ARGUMENTS - SHELL shell type - -OPTIONS - -r, --refresh-cache Refresh cache (ignores displaying instructions) - -EXAMPLES - $ celocli autocomplete - - $ celocli autocomplete bash - - $ celocli autocomplete zsh - - $ celocli autocomplete --refresh-cache -``` - -_See code: [@oclif/plugin-autocomplete](https://github.com/oclif/plugin-autocomplete/blob/v0.1.5/src/commands/autocomplete/index.ts)_ diff --git a/packages/docs/command-line-interface/commands.md b/packages/docs/command-line-interface/commands.md deleted file mode 100644 index 495208bd98d..00000000000 --- a/packages/docs/command-line-interface/commands.md +++ /dev/null @@ -1,30 +0,0 @@ -# `celocli commands` - -list all the commands - - -## `celocli commands` - -list all the commands - -``` -list all the commands - -USAGE - $ celocli commands - -OPTIONS - -h, --help show CLI help - -j, --json display unfiltered api data in json format - -x, --extended show extra columns - --columns=columns only show provided columns (comma-separated) - --csv output is csv format [alias: --output=csv] - --filter=filter filter property by partial string matching, ex: name=foo - --hidden show hidden commands - --no-header hide table header from output - --no-truncate do not truncate output to fit screen - --output=csv|json|yaml output in a more machine friendly format - --sort=sort property to sort by (prepend '-' for descending) -``` - -_See code: [@oclif/plugin-commands](https://github.com/oclif/plugin-commands/blob/v1.3.0/src/commands/commands.ts)_ diff --git a/packages/docs/command-line-interface/config.md b/packages/docs/command-line-interface/config.md deleted file mode 100644 index 75a4e13752c..00000000000 --- a/packages/docs/command-line-interface/config.md +++ /dev/null @@ -1,56 +0,0 @@ -# `celocli config` - -Configure CLI options which persist across commands - - -## `celocli config:get` - -Output network node configuration - -``` -Output network node configuration - -USAGE - $ celocli config:get - -OPTIONS - --globalHelp View all available global flags -``` - -_See code: [src/commands/config/get.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/config/get.ts)_ - -## `celocli config:set` - -Configure running node information for propogating transactions to network - -``` -Configure running node information for propogating transactions to network - -USAGE - $ celocli config:set - -OPTIONS - -n, --node=node URL of the node to run - commands against (defaults to - 'http://localhost:8545') - - --gasCurrency=(auto|Auto|CELO|celo|cUSD|cusd|cEUR|ceur) Use a specific gas currency - for transaction fees - (defaults to 'auto' which - uses whatever feeCurrency is - available) - - --globalHelp View all available global - flags - -EXAMPLES - set --node ws://localhost:2500 - - set --node /geth.ipc - - set --gasCurrency cUSD - - set --gasCurrency CELO -``` - -_See code: [src/commands/config/set.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/config/set.ts)_ diff --git a/packages/docs/command-line-interface/dkg.md b/packages/docs/command-line-interface/dkg.md deleted file mode 100644 index 42e51596a9b..00000000000 --- a/packages/docs/command-line-interface/dkg.md +++ /dev/null @@ -1,132 +0,0 @@ -# `celocli dkg` - -Publish your locally computed DKG results to the blockchain - - -## `celocli dkg:allowlist` - -Allowlist an address in the DKG - -``` -Allowlist an address in the DKG - -USAGE - $ celocli dkg:allowlist - -OPTIONS - --address=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) DKG Contract Address - --from=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) Address of the sender - --globalHelp View all available global flags - - --participantAddress=participantAddress (required) Address of the - participant to allowlist -``` - -_See code: [src/commands/dkg/allowlist.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/dkg/allowlist.ts)_ - -## `celocli dkg:deploy` - -Deploys the DKG smart contract - -``` -Deploys the DKG smart contract - -USAGE - $ celocli dkg:deploy - -OPTIONS - --from=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) Address of the sender - --globalHelp View all available global flags - - --phaseDuration=phaseDuration (required) Duration of each DKG - phase in blocks - - --threshold=threshold (required) The threshold to use for - the DKG -``` - -_See code: [src/commands/dkg/deploy.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/dkg/deploy.ts)_ - -## `celocli dkg:get` - -Gets data from the contract to run the next phase - -``` -Gets data from the contract to run the next phase - -USAGE - $ celocli dkg:get - -OPTIONS - --address=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) DKG - Contract Address - - --globalHelp View all - available global - flags - - --method=(shares|responses|justifications|participants|phase|group) (required) Getter - method to call -``` - -_See code: [src/commands/dkg/get.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/dkg/get.ts)_ - -## `celocli dkg:publish` - -Publishes data for each phase of the DKG - -``` -Publishes data for each phase of the DKG - -USAGE - $ celocli dkg:publish - -OPTIONS - --address=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) DKG Contract Address - - --data=data (required) Path to the data - being published - - --from=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) Address of the sender - - --globalHelp View all available global flags -``` - -_See code: [src/commands/dkg/publish.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/dkg/publish.ts)_ - -## `celocli dkg:register` - -Register a public key in the DKG - -``` -Register a public key in the DKG - -USAGE - $ celocli dkg:register - -OPTIONS - --address=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) DKG Contract Address - --blsKey=blsKey (required) - --from=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) Address of the sender - --globalHelp View all available global flags -``` - -_See code: [src/commands/dkg/register.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/dkg/register.ts)_ - -## `celocli dkg:start` - -Starts the DKG - -``` -Starts the DKG - -USAGE - $ celocli dkg:start - -OPTIONS - --address=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) DKG Contract Address - --from=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) Address of the sender - --globalHelp View all available global flags -``` - -_See code: [src/commands/dkg/start.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/dkg/start.ts)_ diff --git a/packages/docs/command-line-interface/election.md b/packages/docs/command-line-interface/election.md deleted file mode 100644 index 96c22ead54a..00000000000 --- a/packages/docs/command-line-interface/election.md +++ /dev/null @@ -1,182 +0,0 @@ -# `celocli election` - -Participate in and view the state of Validator Elections - - -## `celocli election:activate` - -Activate pending votes in validator elections to begin earning rewards. To earn rewards as a voter, it is required to activate your pending votes at some point after the end of the epoch in which they were made. - -``` -Activate pending votes in validator elections to begin earning rewards. To earn rewards as a voter, it is required to activate your pending votes at some point after the end of the epoch in which they were made. - -USAGE - $ celocli election:activate - -OPTIONS - --from=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) Voter's address - --globalHelp View all available global flags - - --wait Wait until all pending votes can be - activated - -EXAMPLES - activate --from 0x4443d0349e8b3075cba511a0a87796597602a0f1 - - activate --from 0x4443d0349e8b3075cba511a0a87796597602a0f1 --wait -``` - -_See code: [src/commands/election/activate.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/election/activate.ts)_ - -## `celocli election:current` - -Outputs the set of validators currently participating in BFT to create blocks. An election is run to select the validator set at the end of every epoch. - -``` -Outputs the set of validators currently participating in BFT to create blocks. An election is run to select the validator set at the end of every epoch. - -USAGE - $ celocli election:current - -OPTIONS - -x, --extended show extra columns - --columns=columns only show provided columns (comma-separated) - --csv output is csv format [alias: --output=csv] - --filter=filter filter property by partial string matching, ex: name=foo - --globalHelp View all available global flags - --no-header hide table header from output - --no-truncate do not truncate output to fit screen - --output=csv|json|yaml output in a more machine friendly format - --sort=sort property to sort by (prepend '-' for descending) - - --valset Show currently used signers from valset (by default the - authorized validator signers are shown). Useful for checking - if keys have been rotated. -``` - -_See code: [src/commands/election/current.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/election/current.ts)_ - -## `celocli election:list` - -Prints the list of validator groups, the number of votes they have received, the number of additional votes they are able to receive, and whether or not they are eligible to elect validators. - -``` -Prints the list of validator groups, the number of votes they have received, the number of additional votes they are able to receive, and whether or not they are eligible to elect validators. - -USAGE - $ celocli election:list - -OPTIONS - -x, --extended show extra columns - --columns=columns only show provided columns (comma-separated) - --csv output is csv format [alias: --output=csv] - --filter=filter filter property by partial string matching, ex: name=foo - --globalHelp View all available global flags - --no-header hide table header from output - --no-truncate do not truncate output to fit screen - --output=csv|json|yaml output in a more machine friendly format - --sort=sort property to sort by (prepend '-' for descending) - -EXAMPLE - list -``` - -_See code: [src/commands/election/list.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/election/list.ts)_ - -## `celocli election:revoke` - -Revoke votes for a Validator Group in validator elections. - -``` -Revoke votes for a Validator Group in validator elections. - -USAGE - $ celocli election:revoke - -OPTIONS - --for=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) ValidatorGroup's address - --from=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) Voter's address - --globalHelp View all available global flags - --value=value (required) Value of votes to revoke - -EXAMPLE - revoke --from 0x4443d0349e8b3075cba511a0a87796597602a0f1 --for - 0x932fee04521f5fcb21949041bf161917da3f588b, --value 1000000 -``` - -_See code: [src/commands/election/revoke.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/election/revoke.ts)_ - -## `celocli election:run` - -Runs a "mock" election and prints out the validators that would be elected if the epoch ended right now. - -``` -Runs a "mock" election and prints out the validators that would be elected if the epoch ended right now. - -USAGE - $ celocli election:run - -OPTIONS - -x, --extended show extra columns - --columns=columns only show provided columns (comma-separated) - --csv output is csv format [alias: --output=csv] - --filter=filter filter property by partial string matching, ex: name=foo - --globalHelp View all available global flags - --no-header hide table header from output - --no-truncate do not truncate output to fit screen - --output=csv|json|yaml output in a more machine friendly format - --sort=sort property to sort by (prepend '-' for descending) -``` - -_See code: [src/commands/election/run.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/election/run.ts)_ - -## `celocli election:show ADDRESS` - -Show election information about a voter or registered Validator Group - -``` -Show election information about a voter or registered Validator Group - -USAGE - $ celocli election:show ADDRESS - -ARGUMENTS - ADDRESS Voter or Validator Groups's address - -OPTIONS - --globalHelp View all available global flags - --group Show information about a group running in Validator elections - --voter Show information about an account voting in Validator elections - -EXAMPLES - show 0x97f7333c51897469E8D98E7af8653aAb468050a3 --voter - - show 0x97f7333c51897469E8D98E7af8653aAb468050a3 --group -``` - -_See code: [src/commands/election/show.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/election/show.ts)_ - -## `celocli election:vote` - -Vote for a Validator Group in validator elections. - -``` -Vote for a Validator Group in validator elections. - -USAGE - $ celocli election:vote - -OPTIONS - --for=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) ValidatorGroup's address - --from=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) Voter's address - --globalHelp View all available global flags - - --value=value (required) Amount of Gold used to - vote for group - -EXAMPLE - vote --from 0x4443d0349e8b3075cba511a0a87796597602a0f1 --for - 0x932fee04521f5fcb21949041bf161917da3f588b, --value 1000000 -``` - -_See code: [src/commands/election/vote.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/election/vote.ts)_ diff --git a/packages/docs/command-line-interface/exchange.md b/packages/docs/command-line-interface/exchange.md deleted file mode 100644 index b2e38f6688d..00000000000 --- a/packages/docs/command-line-interface/exchange.md +++ /dev/null @@ -1,193 +0,0 @@ -# `celocli exchange` - -Exchange Celo Dollars and CELO via the stability mechanism - - -## `celocli exchange:celo` - -Exchange CELO for StableTokens via the stability mechanism. (Note: this is the equivalent of the old exchange:gold) - -``` -Exchange CELO for StableTokens via the stability mechanism. (Note: this is the equivalent of the old exchange:gold) - -USAGE - $ celocli exchange:celo - -OPTIONS - --forAtLeast=10000000000000000000000 [default: 0] Optional, the minimum - value of StableTokens to receive in - return - - --from=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) The address with CELO to - exchange - - --globalHelp View all available global flags - - --stableToken=(cUSD|cusd|cEUR|ceur) [default: cUSD] Name of the stable - to receive - - --value=10000000000000000000000 (required) The value of CELO to - exchange for a StableToken - -EXAMPLES - celo --value 5000000000000 --from 0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d - - celo --value 5000000000000 --forAtLeast 100000000000000 --from - 0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d --stableToken cStableTokenSymbol -``` - -_See code: [src/commands/exchange/celo.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/exchange/celo.ts)_ - -## `celocli exchange:dollars` - -Exchange Celo Dollars for CELO via the stability mechanism - -``` -Exchange Celo Dollars for CELO via the stability mechanism - -USAGE - $ celocli exchange:dollars - -OPTIONS - --forAtLeast=10000000000000000000000 [default: 0] Optional, the minimum - value of CELO to receive in return - - --from=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) The address with Celo - Dollars to exchange - - --globalHelp View all available global flags - - --value=10000000000000000000000 (required) The value of Celo - Dollars to exchange for CELO - -EXAMPLES - dollars --value 10000000000000 --from 0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d - - dollars --value 10000000000000 --forAtLeast 50000000000000 --from - 0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d -``` - -_See code: [src/commands/exchange/dollars.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/exchange/dollars.ts)_ - -## `celocli exchange:euros` - -Exchange Celo Euros for CELO via the stability mechanism - -``` -Exchange Celo Euros for CELO via the stability mechanism - -USAGE - $ celocli exchange:euros - -OPTIONS - --forAtLeast=10000000000000000000000 [default: 0] Optional, the minimum - value of CELO to receive in return - - --from=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) The address with Celo - Euros to exchange - - --globalHelp View all available global flags - - --value=10000000000000000000000 (required) The value of Celo Euros - to exchange for CELO - -EXAMPLES - euros --value 10000000000000 --from 0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d - - euros --value 10000000000000 --forAtLeast 50000000000000 --from - 0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d -``` - -_See code: [src/commands/exchange/euros.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/exchange/euros.ts)_ - -## `celocli exchange:gold` - -Exchange CELO for StableTokens via the stability mechanism. _DEPRECATION WARNING_ Use the "exchange:celo" command instead - -``` -Exchange CELO for StableTokens via the stability mechanism. *DEPRECATION WARNING* Use the "exchange:celo" command instead - -USAGE - $ celocli exchange:gold - -OPTIONS - --forAtLeast=10000000000000000000000 [default: 0] Optional, the minimum - value of StableTokens to receive in - return - - --from=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) The address with CELO to - exchange - - --globalHelp View all available global flags - - --stableToken=(cUSD|cusd|cEUR|ceur) [default: cUSD] Name of the stable - to receive - - --value=10000000000000000000000 (required) The value of CELO to - exchange for a StableToken - -EXAMPLES - gold --value 5000000000000 --from 0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d - - gold --value 5000000000000 --forAtLeast 100000000000000 --from - 0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d --stableToken cUSD -``` - -_See code: [src/commands/exchange/gold.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/exchange/gold.ts)_ - -## `celocli exchange:show` - -Show the current exchange rates offered by the Exchange - -``` -Show the current exchange rates offered by the Exchange - -USAGE - $ celocli exchange:show - -OPTIONS - --amount=amount [default: 1000000000000000000] Amount of the token being exchanged to - report rates for - - --globalHelp View all available global flags - -EXAMPLE - list -``` - -_See code: [src/commands/exchange/show.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/exchange/show.ts)_ - -## `celocli exchange:stable` - -Exchange Stable Token for CELO via the stability mechanism - -``` -Exchange Stable Token for CELO via the stability mechanism - -USAGE - $ celocli exchange:stable - -OPTIONS - --forAtLeast=10000000000000000000000 [default: 0] Optional, the minimum - value of CELO to receive in return - - --from=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) The address with the - Stable Token to exchange - - --globalHelp View all available global flags - - --stableToken=(cUSD|cusd|cEUR|ceur) Name of the stable token to be - transfered - - --value=10000000000000000000000 (required) The value of Stable - Tokens to exchange for CELO - -EXAMPLES - stable --value 10000000000000 --from 0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d - --stableToken cStableTokenSymbol - - stable --value 10000000000000 --forAtLeast 50000000000000 --from - 0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d --stableToken cStableTokenSymbol -``` - -_See code: [src/commands/exchange/stable.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/exchange/stable.ts)_ diff --git a/packages/docs/command-line-interface/governance.md b/packages/docs/command-line-interface/governance.md deleted file mode 100644 index cdd1eaa007d..00000000000 --- a/packages/docs/command-line-interface/governance.md +++ /dev/null @@ -1,373 +0,0 @@ -# `celocli governance` - -Interact with on-chain governance proposals and hotfixes - - -## `celocli governance:build-proposal` - -Interactively build a governance proposal - -``` -Interactively build a governance proposal - -USAGE - $ celocli governance:build-proposal - -OPTIONS - --globalHelp View all available global flags - --output=output (required) Path to output - -EXAMPLE - build-proposal --output ./transactions.json -``` - -_See code: [src/commands/governance/build-proposal.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/governance/build-proposal.ts)_ - -## `celocli governance:dequeue` - -Try to dequeue governance proposal - -``` -Try to dequeue governance proposal - -USAGE - $ celocli governance:dequeue - -OPTIONS - --from=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) From address - --globalHelp View all available global flags - -EXAMPLE - dequeue --from 0x5409ed021d9299bf6814279a6a1411a7e866a631 -``` - -_See code: [src/commands/governance/dequeue.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/governance/dequeue.ts)_ - -## `celocli governance:execute` - -Execute a passing governance proposal - -``` -Execute a passing governance proposal - -USAGE - $ celocli governance:execute - -OPTIONS - --from=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) Executor's address - --globalHelp View all available global flags - - --proposalID=proposalID (required) UUID of proposal to - execute - -EXAMPLE - execute --proposalID 99 --from 0x5409ed021d9299bf6814279a6a1411a7e866a631 -``` - -_See code: [src/commands/governance/execute.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/governance/execute.ts)_ - -## `celocli governance:executehotfix` - -Execute a governance hotfix prepared for the current epoch - -``` -Execute a governance hotfix prepared for the current epoch - -USAGE - $ celocli governance:executehotfix - -OPTIONS - --from=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) Executors's address - --globalHelp View all available global flags - - --jsonTransactions=jsonTransactions (required) Path to json - transactions - - --salt=salt (required) Secret salt associated - with hotfix - -EXAMPLE - executehotfix --jsonTransactions ./transactions.json --salt - 0x614dccb5ac13cba47c2430bdee7829bb8c8f3603a8ace22e7680d317b39e3658 --from - 0x5409ed021d9299bf6814279a6a1411a7e866a631 -``` - -_See code: [src/commands/governance/executehotfix.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/governance/executehotfix.ts)_ - -## `celocli governance:hashhotfix` - -Hash a governance hotfix specified by JSON and a salt - -``` -Hash a governance hotfix specified by JSON and a salt - -USAGE - $ celocli governance:hashhotfix - -OPTIONS - --globalHelp View all available global flags - - --jsonTransactions=jsonTransactions (required) Path to json transactions of the - hotfix - - --salt=salt (required) Secret salt associated with hotfix - -EXAMPLE - hashhotfix --jsonTransactions ./transactions.json --salt - 0x614dccb5ac13cba47c2430bdee7829bb8c8f3603a8ace22e7680d317b39e3658 -``` - -_See code: [src/commands/governance/hashhotfix.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/governance/hashhotfix.ts)_ - -## `celocli governance:list` - -List live governance proposals (queued and ongoing) - -``` -List live governance proposals (queued and ongoing) - -USAGE - $ celocli governance:list - -OPTIONS - -x, --extended show extra columns - --columns=columns only show provided columns (comma-separated) - --csv output is csv format [alias: --output=csv] - --filter=filter filter property by partial string matching, ex: name=foo - --globalHelp View all available global flags - --no-header hide table header from output - --no-truncate do not truncate output to fit screen - --output=csv|json|yaml output in a more machine friendly format - --sort=sort property to sort by (prepend '-' for descending) - -EXAMPLE - list -``` - -_See code: [src/commands/governance/list.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/governance/list.ts)_ - -## `celocli governance:preparehotfix` - -Prepare a governance hotfix for execution in the current epoch - -``` -Prepare a governance hotfix for execution in the current epoch - -USAGE - $ celocli governance:preparehotfix - -OPTIONS - --from=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) Preparer's address - --globalHelp View all available global flags - - --hash=hash (required) Hash of hotfix - transactions - -EXAMPLE - preparehotfix --hash - 0x614dccb5ac13cba47c2430bdee7829bb8c8f3603a8ace22e7680d317b39e3658 --from - 0x5409ed021d9299bf6814279a6a1411a7e866a631 -``` - -_See code: [src/commands/governance/preparehotfix.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/governance/preparehotfix.ts)_ - -## `celocli governance:propose` - -Submit a governance proposal - -``` -Submit a governance proposal - -USAGE - $ celocli governance:propose - -OPTIONS - --deposit=deposit (required) Amount of Gold to attach - to proposal - - --descriptionURL=descriptionURL (required) A URL where further - information about the proposal can - be viewed - - --from=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) Proposer's address - - --globalHelp View all available global flags - - --jsonTransactions=jsonTransactions (required) Path to json - transactions - -EXAMPLE - propose --jsonTransactions ./transactions.json --deposit 10000 --from - 0x5409ed021d9299bf6814279a6a1411a7e866a631 --descriptionURL - https://gist.github.com/yorhodes/46430eacb8ed2f73f7bf79bef9d58a33 -``` - -_See code: [src/commands/governance/propose.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/governance/propose.ts)_ - -## `celocli governance:revokeupvote` - -Revoke upvotes for queued governance proposals - -``` -Revoke upvotes for queued governance proposals - -USAGE - $ celocli governance:revokeupvote - -OPTIONS - --from=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) Upvoter's address - --globalHelp View all available global flags - -EXAMPLE - revokeupvote --from 0x5409ed021d9299bf6814279a6a1411a7e866a631 -``` - -_See code: [src/commands/governance/revokeupvote.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/governance/revokeupvote.ts)_ - -## `celocli governance:show` - -Show information about a governance proposal, hotfix, or account. - -``` -Show information about a governance proposal, hotfix, or account. - -USAGE - $ celocli governance:show - -OPTIONS - --account=account Address of account or voter - --globalHelp View all available global flags - --hotfix=hotfix Hash of hotfix proposal - --jsonTransactions=jsonTransactions Output proposal JSON to provided file - - --nonwhitelisters If set, displays validators that have not - whitelisted the hotfix. - - --notwhitelisted List validators who have not whitelisted the - specified hotfix - - --proposalID=proposalID UUID of proposal to view - - --raw Display proposal in raw bytes format - - --whitelisters If set, displays validators that have whitelisted - the hotfix. - -ALIASES - $ celocli governance:show - $ celocli governance:showhotfix - $ celocli governance:showaccount - $ celocli governance:view - $ celocli governance:viewhotfix - $ celocli governance:viewaccount - -EXAMPLES - show --proposalID 99 - - show --proposalID 99 --raw - - show --hotfix 0x614dccb5ac13cba47c2430bdee7829bb8c8f3603a8ace22e7680d317b39e3658 - - show --hotfix 0x614dccb5ac13cba47c2430bdee7829bb8c8f3603a8ace22e7680d317b39e3658 - --whitelisters - - show --hotfix 0x614dccb5ac13cba47c2430bdee7829bb8c8f3603a8ace22e7680d317b39e3658 - --nonwhitelisters - - show --account 0x47e172f6cfb6c7d01c1574fa3e2be7cc73269d95 -``` - -_See code: [src/commands/governance/show.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/governance/show.ts)_ - -## `celocli governance:upvote` - -Upvote a queued governance proposal - -``` -Upvote a queued governance proposal - -USAGE - $ celocli governance:upvote - -OPTIONS - --from=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) Upvoter's address - --globalHelp View all available global flags - - --proposalID=proposalID (required) UUID of proposal to - upvote - -EXAMPLE - upvote --proposalID 99 --from 0x5409ed021d9299bf6814279a6a1411a7e866a631 -``` - -_See code: [src/commands/governance/upvote.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/governance/upvote.ts)_ - -## `celocli governance:vote` - -Vote on an approved governance proposal - -``` -Vote on an approved governance proposal - -USAGE - $ celocli governance:vote - -OPTIONS - --from=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) Voter's address - --globalHelp View all available global flags - - --proposalID=proposalID (required) UUID of proposal to vote - on - - --value=(Abstain|No|Yes) (required) Vote - -EXAMPLE - vote --proposalID 99 --value Yes --from 0x5409ed021d9299bf6814279a6a1411a7e866a631 -``` - -_See code: [src/commands/governance/vote.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/governance/vote.ts)_ - -## `celocli governance:whitelisthotfix` - -Whitelist a governance hotfix - -``` -Whitelist a governance hotfix - -USAGE - $ celocli governance:whitelisthotfix - -OPTIONS - --from=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) Whitelister's address - --globalHelp View all available global flags - - --hash=hash (required) Hash of hotfix - transactions - -EXAMPLE - whitelisthotfix --hash - 0x614dccb5ac13cba47c2430bdee7829bb8c8f3603a8ace22e7680d317b39e3658 --from - 0x5409ed021d9299bf6814279a6a1411a7e866a631 -``` - -_See code: [src/commands/governance/whitelisthotfix.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/governance/whitelisthotfix.ts)_ - -## `celocli governance:withdraw` - -Withdraw refunded governance proposal deposits. - -``` -Withdraw refunded governance proposal deposits. - -USAGE - $ celocli governance:withdraw - -OPTIONS - --from=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) Proposer's address - --globalHelp View all available global flags - -EXAMPLE - withdraw --from 0x5409ed021d9299bf6814279a6a1411a7e866a631 -``` - -_See code: [src/commands/governance/withdraw.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/governance/withdraw.ts)_ diff --git a/packages/docs/command-line-interface/help.md b/packages/docs/command-line-interface/help.md deleted file mode 100644 index 5d9a05467be..00000000000 --- a/packages/docs/command-line-interface/help.md +++ /dev/null @@ -1,23 +0,0 @@ -# `celocli help` - -display help for celocli - - -## `celocli help [COMMAND]` - -display help for celocli - -``` -display help for <%= config.bin %> - -USAGE - $ celocli help [COMMAND] - -ARGUMENTS - COMMAND command to show help for - -OPTIONS - --all see all commands in CLI -``` - -_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v1.2.11/src/commands/help.ts)_ diff --git a/packages/docs/command-line-interface/identity.md b/packages/docs/command-line-interface/identity.md deleted file mode 100644 index aac2ab18fe9..00000000000 --- a/packages/docs/command-line-interface/identity.md +++ /dev/null @@ -1,153 +0,0 @@ -# `celocli identity` - -Interact with ODIS and the attestations service - - -## `celocli identity:current-attestation-services` - -Outputs the set of validators currently participating in BFT and which ones are participating in Celo's lightweight identity protocol - -``` -Outputs the set of validators currently participating in BFT and which ones are participating in Celo's lightweight identity protocol - -USAGE - $ celocli identity:current-attestation-services - -OPTIONS - -x, --extended show extra columns - --columns=columns only show provided columns (comma-separated) - --csv output is csv format [alias: --output=csv] - --filter=filter filter property by partial string matching, ex: name=foo - --globalHelp View all available global flags - --no-header hide table header from output - --no-truncate do not truncate output to fit screen - --output=csv|json|yaml output in a more machine friendly format - --sort=sort property to sort by (prepend '-' for descending) -``` - -_See code: [src/commands/identity/current-attestation-services.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/identity/current-attestation-services.ts)_ - -## `celocli identity:get-attestations` - -Looks up attestations associated with the provided phone number. If a pepper is not provided, it uses the --from account's balance to query the pepper. - -``` -Looks up attestations associated with the provided phone number. If a pepper is not provided, it uses the --from account's balance to query the pepper. - -USAGE - $ celocli identity:get-attestations - -OPTIONS - --from=from Account whose balance to use for querying ODIS for the - pepper lookup - - --globalHelp View all available global flags - - --identifier=identifier On-chain identifier - - --network=network The ODIS service to hit: mainnet, alfajores, - alfajoresstaging - - --pepper=pepper ODIS phone number pepper - - --phoneNumber=phoneNumber Phone number to check attestations for - -EXAMPLES - get-attestations --phoneNumber +15555555555 --from - 0x47e172F6CfB6c7D01C1574fa3E2Be7CC73269D95 - - get-attestations --phoneNumber +15555555555 --pepper XgnKVpplZc0p1 - - get-attestations --identifier - 0x4952c9db9c283a62721b13f56c4b5e84a438e2569af3de21cb3440efa8840872 -``` - -_See code: [src/commands/identity/get-attestations.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/identity/get-attestations.ts)_ - -## `celocli identity:identifier` - -Queries ODIS for the on-chain identifier and pepper corresponding to a given phone number. - -``` -Queries ODIS for the on-chain identifier and pepper corresponding to a given phone number. - -USAGE - $ celocli identity:identifier - -OPTIONS - --context=context mainnet (default), alfajores, or - alfajoresstaging - - --from=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) The address from which - to perform the query - - --globalHelp View all available global flags - - --phoneNumber=+14152223333 (required) The phone number for - which to query the identifier. - Should be in e164 format with - country code. - -EXAMPLE - identifier --phoneNumber +14151231234 --from - 0x5409ed021d9299bf6814279a6a1411a7e866a631 --context alfajores -``` - -_See code: [src/commands/identity/identifier.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/identity/identifier.ts)_ - -## `celocli identity:test-attestation-service` - -Tests whether the account has setup the attestation service properly by calling the test endpoint on it - -``` -Tests whether the account has setup the attestation service properly by calling the test endpoint on it - -USAGE - $ celocli identity:test-attestation-service - -OPTIONS - --from=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) Your validator's signer - or account address - - --globalHelp View all available global flags - - --message=message (required) The message of the SMS - - --phoneNumber=+14152223333 (required) The phone number to send - the test message to - - --provider=provider Test a specific provider (try - "twilio" or "nexmo") - -EXAMPLE - test-attestation-service --from 0x97f7333c51897469E8D98E7af8653aAb468050a3 -``` - -_See code: [src/commands/identity/test-attestation-service.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/identity/test-attestation-service.ts)_ - -## `celocli identity:withdraw-attestation-rewards` - -Withdraw accumulated attestation rewards for a given currency - -``` -Withdraw accumulated attestation rewards for a given currency - -USAGE - $ celocli identity:withdraw-attestation-rewards - -OPTIONS - --from=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) Address to - withdraw from. Can be the - attestation signer address - or the underlying account - address - - --globalHelp View all available global - flags - - --tokenAddress=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d The address of the token - that will be withdrawn. - Defaults to cUSD -``` - -_See code: [src/commands/identity/withdraw-attestation-rewards.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/identity/withdraw-attestation-rewards.ts)_ diff --git a/packages/docs/command-line-interface/introduction.md b/packages/docs/command-line-interface/introduction.md deleted file mode 100644 index ff54a6b59c1..00000000000 --- a/packages/docs/command-line-interface/introduction.md +++ /dev/null @@ -1,65 +0,0 @@ ---- -description: >- - This Command Line Interface allows users to interact with the Celo Protocol - smart contracts. ---- - -# Introduction - -## Getting Started - -### **Optional** - -- **Run a Celo node full node.** Commands will connect to a Celo node to execute most functionality. You can either use [Forno](../developer-resources/forno/README.md) (this is the easiest way) or run your own full node if you prefer. See the [Running a Full Node](../getting-started/running-a-full-node-in-mainnet.md) instructions for more details on running a full node. - -### NPM Package - -The Celo CLI is published as a node module on NPM. Assuming you have [npm](https://www.npmjs.com/get-npm) and [git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) both installed, you can install the Celo CLI using the following command: - -```bash -npm install -g @celo/celocli -``` - -{% hint style="info" %} -We are currently deploying the CLI with only Node.js v12.x. If you are running a different version of Node.js, consider using [NVM](https://github.com/nvm-sh/nvm#installation-and-update) to manage your node versions. e.g. with: `nvm install 12 && nvm use 12` -{% endhint %} - -{% hint style="info" %} -If you have trouble installing globally \(i.e. with the `-g` flag\), try installing to a local directory instead with `npm install @celo/celocli` and run with `npx celocli`. -{% endhint %} - -### Overview - -The tool is broken down into modules and commands with the following pattern: - -```text -celocli : <...args> <...flags?> -``` - -The `celocli` tool assumes that users are running a node which they have access to signing transactions on, or have another mechanism for signing transactions (such as a Ledger wallet or supplying the private key as an argument to the command). See the documentation on the [config](config.md) module for information about how to set which node commands are sent to. - -{% hint style="info" %} -**All balances of CELO or Celo Dollars are expressed in units of 10^-18** -{% endhint %} - -{% embed url="https://www.npmjs.com/package/@celo/celocli" caption="" %} - -### Using a Ledger Wallet - -The Celo CLI supports using a [Ledger hardware wallet](../celo-holder-guide/ledger.md) to sign transactions. - -### Plugins - -Additional plugins can be installed which make the CLI experience smoother. Currently, `celocli` only supports installing plugins published on NPM within the `@celo/*` and `@clabs/*` scopes. - -{% hint style="danger" %} -Installing a 3rd party plugin can be _dangerous_! Please always be sure that you trust the plugin provider. -{% endhint %} - -The autocomplete plugin adds an interactive autocomplete for `bash` and `zsh` shells. To enable the autocomplete plugin, follow the instructions provided at: - -```text -celocli autocomplete -``` - -The update warning plugin notifies the user if they are using an oudated version of the CLI. This plugin is enabled by default. diff --git a/packages/docs/command-line-interface/lockedgold.md b/packages/docs/command-line-interface/lockedgold.md deleted file mode 100644 index 3c8503045dc..00000000000 --- a/packages/docs/command-line-interface/lockedgold.md +++ /dev/null @@ -1,85 +0,0 @@ -# `celocli lockedgold` - -View and manage locked CELO - - -## `celocli lockedgold:lock` - -Locks CELO to be used in governance and validator elections. - -``` -Locks CELO to be used in governance and validator elections. - -USAGE - $ celocli lockedgold:lock - -OPTIONS - --from=from (required) - --globalHelp View all available global flags - --value=value (required) The unit amount of CELO - -EXAMPLE - lock --from 0x47e172F6CfB6c7D01C1574fa3E2Be7CC73269D95 --value 10000000000000000000000 -``` - -_See code: [src/commands/lockedgold/lock.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/lockedgold/lock.ts)_ - -## `celocli lockedgold:show ACCOUNT` - -Show Locked Gold information for a given account. This includes the total amount of locked gold, the amount being used for voting in Validator Elections, the Locked Gold balance this account is required to maintain due to a registered Validator or Validator Group, and any pending withdrawals that have been initiated via "lockedgold:unlock". - -``` -Show Locked Gold information for a given account. This includes the total amount of locked gold, the amount being used for voting in Validator Elections, the Locked Gold balance this account is required to maintain due to a registered Validator or Validator Group, and any pending withdrawals that have been initiated via "lockedgold:unlock". - -USAGE - $ celocli lockedgold:show ACCOUNT - -OPTIONS - --globalHelp View all available global flags - -EXAMPLE - show 0x5409ed021d9299bf6814279a6a1411a7e866a631 -``` - -_See code: [src/commands/lockedgold/show.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/lockedgold/show.ts)_ - -## `celocli lockedgold:unlock` - -Unlocks CELO, which can be withdrawn after the unlocking period. Unlocked gold will appear as a "pending withdrawal" until the unlocking period is over, after which it can be withdrawn via "lockedgold:withdraw". - -``` -Unlocks CELO, which can be withdrawn after the unlocking period. Unlocked gold will appear as a "pending withdrawal" until the unlocking period is over, after which it can be withdrawn via "lockedgold:withdraw". - -USAGE - $ celocli lockedgold:unlock - -OPTIONS - --from=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) Account Address - --globalHelp View all available global flags - --value=value (required) The unit amount of CELO - -EXAMPLE - unlock --from 0x47e172F6CfB6c7D01C1574fa3E2Be7CC73269D95 --value 500000000 -``` - -_See code: [src/commands/lockedgold/unlock.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/lockedgold/unlock.ts)_ - -## `celocli lockedgold:withdraw` - -Withdraw any pending withdrawals created via "lockedgold:unlock" that have become available. - -``` -Withdraw any pending withdrawals created via "lockedgold:unlock" that have become available. - -USAGE - $ celocli lockedgold:withdraw - -OPTIONS - --from=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) Account Address - --globalHelp View all available global flags - -EXAMPLE - withdraw --from 0x47e172F6CfB6c7D01C1574fa3E2Be7CC73269D95 -``` - -_See code: [src/commands/lockedgold/withdraw.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/lockedgold/withdraw.ts)_ diff --git a/packages/docs/command-line-interface/multisig.md b/packages/docs/command-line-interface/multisig.md deleted file mode 100644 index 584e2972148..00000000000 --- a/packages/docs/command-line-interface/multisig.md +++ /dev/null @@ -1,67 +0,0 @@ -# `celocli multisig` - -Shows information about multi-sig contract - - -## `celocli multisig:show ADDRESS` - -Shows information about multi-sig contract - -``` -Shows information about multi-sig contract - -USAGE - $ celocli multisig:show ADDRESS - -OPTIONS - --all Show info about all transactions - --globalHelp View all available global flags - --raw Do not attempt to parse transactions - --tx=tx Show info for a transaction - -EXAMPLES - show 0x5409ed021d9299bf6814279a6a1411a7e866a631 - - show 0x5409ed021d9299bf6814279a6a1411a7e866a631 --tx 3 - - show 0x5409ed021d9299bf6814279a6a1411a7e866a631 --all --raw -``` - -_See code: [src/commands/multisig/show.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/multisig/show.ts)_ - -## `celocli multisig:transfer ADDRESS` - -Ability to approve CELO transfers to and from multisig. Submit transaction or approve a matching existing transaction - -``` -Ability to approve CELO transfers to and from multisig. Submit transaction or approve a matching existing transaction - -USAGE - $ celocli multisig:transfer ADDRESS - -OPTIONS - --amount=amount (required) Amount to transfer, - e.g. 10e18 - - --from=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) Account transferring - value to the recipient - - --globalHelp View all available global flags - - --sender=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d Identify sender if performing - transferFrom - - --to=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) Recipient of transfer - - --transferFrom Perform transferFrom instead of - transfer in the ERC-20 interface - -EXAMPLES - transfer --to 0x5409ed021d9299bf6814279a6a1411a7e866a631 --amount - 200000e18 --from 0x123abc - - transfer --transferFrom --sender 0x123abc --to - 0x5409ed021d9299bf6814279a6a1411a7e866a631 --amount 200000e18 --from 0x123abc -``` - -_See code: [src/commands/multisig/transfer.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/multisig/transfer.ts)_ diff --git a/packages/docs/command-line-interface/network.md b/packages/docs/command-line-interface/network.md deleted file mode 100644 index 7116a0067f7..00000000000 --- a/packages/docs/command-line-interface/network.md +++ /dev/null @@ -1,62 +0,0 @@ -# `celocli network` - -View details about the network, like contracts and parameters - - -## `celocli network:contracts` - -Lists Celo core contracts and their addesses. - -``` -Lists Celo core contracts and their addesses. - -USAGE - $ celocli network:contracts - -OPTIONS - -x, --extended show extra columns - --columns=columns only show provided columns (comma-separated) - --csv output is csv format [alias: --output=csv] - --filter=filter filter property by partial string matching, ex: name=foo - --globalHelp View all available global flags - --no-header hide table header from output - --no-truncate do not truncate output to fit screen - --output=csv|json|yaml output in a more machine friendly format - --sort=sort property to sort by (prepend '-' for descending) -``` - -_See code: [src/commands/network/contracts.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/network/contracts.ts)_ - -## `celocli network:info` - -View general network information such as the current block number - -``` -View general network information such as the current block number - -USAGE - $ celocli network:info - -OPTIONS - -n, --lastN=lastN [default: 1] Fetch info about the last n epochs - --globalHelp View all available global flags -``` - -_See code: [src/commands/network/info.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/network/info.ts)_ - -## `celocli network:parameters` - -View parameters of the network, including but not limited to configuration for the various Celo core smart contracts. - -``` -View parameters of the network, including but not limited to configuration for the various Celo core smart contracts. - -USAGE - $ celocli network:parameters - -OPTIONS - --globalHelp View all available global flags - --raw Display raw numerical configuration -``` - -_See code: [src/commands/network/parameters.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/network/parameters.ts)_ diff --git a/packages/docs/command-line-interface/node.md b/packages/docs/command-line-interface/node.md deleted file mode 100644 index 85144dfd6a1..00000000000 --- a/packages/docs/command-line-interface/node.md +++ /dev/null @@ -1,37 +0,0 @@ -# `celocli node` - -Manage your Celo node - - -## `celocli node:accounts` - -List the addresses that this node has the private keys for. - -``` -List the addresses that this node has the private keys for. - -USAGE - $ celocli node:accounts - -OPTIONS - --globalHelp View all available global flags -``` - -_See code: [src/commands/node/accounts.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/node/accounts.ts)_ - -## `celocli node:synced` - -Check if the node is synced - -``` -Check if the node is synced - -USAGE - $ celocli node:synced - -OPTIONS - --globalHelp View all available global flags - --verbose output the full status if syncing -``` - -_See code: [src/commands/node/synced.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/node/synced.ts)_ diff --git a/packages/docs/command-line-interface/oracle.md b/packages/docs/command-line-interface/oracle.md deleted file mode 100644 index a595f825f8a..00000000000 --- a/packages/docs/command-line-interface/oracle.md +++ /dev/null @@ -1,126 +0,0 @@ -# `celocli oracle` - -List oracle addresses for a given token - - -## `celocli oracle:list TOKEN` - -List oracle addresses for a given token - -``` -List oracle addresses for a given token - -USAGE - $ celocli oracle:list TOKEN - -ARGUMENTS - TOKEN [default: StableToken] Token to list the oracles for - -OPTIONS - --globalHelp View all available global flags - -EXAMPLES - list StableToken - - list - - list StableTokenEUR -``` - -_See code: [src/commands/oracle/list.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/oracle/list.ts)_ - -## `celocli oracle:remove-expired-reports TOKEN` - -Remove expired oracle reports for a specified token - -``` -Remove expired oracle reports for a specified token - -USAGE - $ celocli oracle:remove-expired-reports TOKEN - -ARGUMENTS - TOKEN [default: StableToken] Token to remove expired reports for - -OPTIONS - --from=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) Address of the account - removing oracle reports - - --globalHelp View all available global flags - -EXAMPLES - remove-expired-reports StableToken --from 0x8c349AAc7065a35B7166f2659d6C35D75A3893C1 - - remove-expired-reports --from 0x8c349AAc7065a35B7166f2659d6C35D75A3893C1 - - remove-expired-reports StableTokenEUR --from - 0x8c349AAc7065a35B7166f2659d6C35D75A3893C1 -``` - -_See code: [src/commands/oracle/remove-expired-reports.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/oracle/remove-expired-reports.ts)_ - -## `celocli oracle:report TOKEN` - -Report the price of CELO in a specified token - -``` -Report the price of CELO in a specified token - -USAGE - $ celocli oracle:report TOKEN - -ARGUMENTS - TOKEN [default: StableToken] Token to report on - -OPTIONS - --from=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) Address of the oracle - account - - --globalHelp View all available global flags - - --value=value (required) Amount of the specified - token equal to 1 CELO - -EXAMPLES - report StableToken --value 1.02 --from 0x8c349AAc7065a35B7166f2659d6C35D75A3893C1 - - report --value 0.99 --from 0x8c349AAc7065a35B7166f2659d6C35D75A3893C1 - - report StableTokenEUR --value 1.02 --from 0x8c349AAc7065a35B7166f2659d6C35D75A3893C1 -``` - -_See code: [src/commands/oracle/report.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/oracle/report.ts)_ - -## `celocli oracle:reports TOKEN` - -List oracle reports for a given token - -``` -List oracle reports for a given token - -USAGE - $ celocli oracle:reports TOKEN - -ARGUMENTS - TOKEN [default: StableToken] Token to list the reports for - -OPTIONS - -x, --extended show extra columns - --columns=columns only show provided columns (comma-separated) - --csv output is csv format [alias: --output=csv] - --filter=filter filter property by partial string matching, ex: name=foo - --globalHelp View all available global flags - --no-header hide table header from output - --no-truncate do not truncate output to fit screen - --output=csv|json|yaml output in a more machine friendly format - --sort=sort property to sort by (prepend '-' for descending) - -EXAMPLES - reports StableToken - - reports - - reports StableTokenEUR -``` - -_See code: [src/commands/oracle/reports.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/oracle/reports.ts)_ diff --git a/packages/docs/command-line-interface/plugins.md b/packages/docs/command-line-interface/plugins.md deleted file mode 100644 index 274da3bc1b2..00000000000 --- a/packages/docs/command-line-interface/plugins.md +++ /dev/null @@ -1,147 +0,0 @@ -# `celocli plugins` - -list installed plugins - - -## `celocli plugins` - -list installed plugins - -``` -list installed plugins - -USAGE - $ celocli plugins - -OPTIONS - --core show core plugins - -EXAMPLE - $ celocli plugins -``` - -_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v1.9.5/src/commands/plugins/index.ts)_ - -## `celocli plugins:install PLUGIN...` - -installs a plugin into the CLI - -``` -installs a plugin into the CLI -Can be installed from npm or a git url. - -Installation of a user-installed plugin will override a core plugin. - -e.g. If you have a core plugin that has a 'hello' command, installing a user-installed plugin with a 'hello' command will override the core plugin implementation. This is useful if a user needs to update core plugin functionality in the CLI without the need to patch and update the whole CLI. - - -USAGE - $ celocli plugins:install PLUGIN... - -ARGUMENTS - PLUGIN plugin to install - -OPTIONS - -f, --force yarn install with force flag - -h, --help show CLI help - -v, --verbose - -DESCRIPTION - Can be installed from npm or a git url. - - Installation of a user-installed plugin will override a core plugin. - - e.g. If you have a core plugin that has a 'hello' command, installing a user-installed - plugin with a 'hello' command will override the core plugin implementation. This is - useful if a user needs to update core plugin functionality in the CLI without the need - to patch and update the whole CLI. - - -ALIASES - $ celocli plugins:add - -EXAMPLES - $ celocli plugins:install myplugin - - $ celocli plugins:install https://github.com/someuser/someplugin - - $ celocli plugins:install someuser/someplugin -``` - -_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v1.9.5/src/commands/plugins/install.ts)_ - -## `celocli plugins:link PLUGIN` - -links a plugin into the CLI for development - -``` -links a plugin into the CLI for development -Installation of a linked plugin will override a user-installed or core plugin. - -e.g. If you have a user-installed or core plugin that has a 'hello' command, installing a linked plugin with a 'hello' command will override the user-installed or core plugin implementation. This is useful for development work. - - -USAGE - $ celocli plugins:link PLUGIN - -ARGUMENTS - PATH [default: .] path to plugin - -OPTIONS - -h, --help show CLI help - -v, --verbose - -DESCRIPTION - Installation of a linked plugin will override a user-installed or core plugin. - - e.g. If you have a user-installed or core plugin that has a 'hello' command, - installing a linked plugin with a 'hello' command will override the user-installed or - core plugin implementation. This is useful for development work. - - -EXAMPLE - $ celocli plugins:link myplugin -``` - -_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v1.9.5/src/commands/plugins/link.ts)_ - -## `celocli plugins:uninstall PLUGIN...` - -removes a plugin from the CLI - -``` -removes a plugin from the CLI - -USAGE - $ celocli plugins:uninstall PLUGIN... - -ARGUMENTS - PLUGIN plugin to uninstall - -OPTIONS - -h, --help show CLI help - -v, --verbose - -ALIASES - $ celocli plugins:unlink - $ celocli plugins:remove -``` - -_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v1.9.5/src/commands/plugins/uninstall.ts)_ - -## `celocli plugins:update` - -update installed plugins - -``` -update installed plugins - -USAGE - $ celocli plugins:update - -OPTIONS - -h, --help show CLI help - -v, --verbose -``` - -_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v1.9.5/src/commands/plugins/update.ts)_ diff --git a/packages/docs/command-line-interface/registry.md b/packages/docs/command-line-interface/registry.md deleted file mode 100644 index 4d4e015aa71..00000000000 --- a/packages/docs/command-line-interface/registry.md +++ /dev/null @@ -1,34 +0,0 @@ ---- -description: Interact with the contract registry ---- - -## Commands - -### List - -List contracts and their addresses in the registry - -``` -USAGE - $ celocli registry:list - -OPTIONS - --gasCurrency=(celo|CELO|cusd|cUSD|auto|Auto) Use a specific gas currency for transaction fees (defaults to 'auto' - which uses whatever feeCurrency is available) - - --ledgerAddresses=ledgerAddresses [default: 1] If --useLedger is set, this will get the first N addresses - for local signing - - --ledgerConfirmAddress Set it to ask confirmation for the address of the transaction from the - ledger - - --ledgerCustomAddresses=ledgerCustomAddresses [default: [0]] If --useLedger is set, this will get the array of index - addresses for local signing. Example --ledgerCustomAddresses "[4,99]" - - --useLedger Set it to use a ledger wallet - -EXAMPLE - list -``` - -_See code: [packages/cli/src/commands/registry/list.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/registry/list.ts)_ diff --git a/packages/docs/command-line-interface/releasegold.md b/packages/docs/command-line-interface/releasegold.md deleted file mode 100644 index 7e591b03c00..00000000000 --- a/packages/docs/command-line-interface/releasegold.md +++ /dev/null @@ -1,466 +0,0 @@ -# `celocli releasegold` - -View and manage Release Gold contracts - - -## `celocli releasegold:authorize` - -Authorize an alternative key to be used for a given action (Vote, Validate, Attest) on behalf of the ReleaseGold instance contract. - -``` -Authorize an alternative key to be used for a given action (Vote, Validate, Attest) on behalf of the ReleaseGold instance contract. - -USAGE - $ celocli releasegold:authorize - -OPTIONS - --blsKey=0x The BLS public key that the - validator is using for - consensus, should pass proof of - possession. 96 bytes. - - --blsPop=0x The BLS public key - proof-of-possession, which - consists of a signature on the - account address. 48 bytes. - - --contract=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) Address of the - ReleaseGold Contract - - --globalHelp View all available global flags - - --role=vote|validator|attestation (required) - - --signature=0x (required) Signature (a.k.a. - proof-of-possession) of the - signer key - - --signer=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) The signer key that - is to be used for voting - through the ReleaseGold - instance - -EXAMPLES - authorize --contract 0x5409ED021D9299bf6814279A6A1411A7e866A631 --role vote --signer - 0x6ecbe1db9ef729cbe972c83fb886247691fb6beb --signature - 0x1b9fca4bbb5bfb1dbe69ef1cddbd9b4202dcb6b134c5170611e1e36ecfa468d7b46c85328d504934fce6 - c2a1571603a50ae224d2b32685e84d4d1a1eebad8452eb - - authorize --contract 0x5409ED021D9299bf6814279A6A1411A7e866A631 --role validator - --signer 0x6ecbe1db9ef729cbe972c83fb886247691fb6beb --signature - 0x1b9fca4bbb5bfb1dbe69ef1cddbd9b4202dcb6b134c5170611e1e36ecfa468d7b46c85328d504934fce6 - c2a1571603a50ae224d2b32685e84d4d1a1eebad8452eb --blsKey - 0x4fa3f67fc913878b068d1fa1cdddc54913d3bf988dbe5a36a20fa888f20d4894c408a6773f3d7bde1115 - 4f2a3076b700d345a42fd25a0e5e83f4db5586ac7979ac2053cd95d8f2efd3e959571ceccaa743e02cf4be - 3f5d7aaddb0b06fc9aff00 --blsPop - 0xcdb77255037eb68897cd487fdd85388cbda448f617f874449d4b11588b0b7ad8ddc20d9bb450b513bb35 - 664ea3923900 - - authorize --contract 0x5409ED021D9299bf6814279A6A1411A7e866A631 --role attestation - --signer 0x6ecbe1db9ef729cbe972c83fb886247691fb6beb --signature - 0x1b9fca4bbb5bfb1dbe69ef1cddbd9b4202dcb6b134c5170611e1e36ecfa468d7b46c85328d504934fce6 - c2a1571603a50ae224d2b32685e84d4d1a1eebad8452eb -``` - -_See code: [src/commands/releasegold/authorize.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/releasegold/authorize.ts)_ - -## `celocli releasegold:create-account` - -Creates a new account for the ReleaseGold instance - -``` -Creates a new account for the ReleaseGold instance - -USAGE - $ celocli releasegold:create-account - -OPTIONS - --contract=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) Address of the - ReleaseGold Contract - - --globalHelp View all available global flags - -EXAMPLE - create-account --contract 0x5409ED021D9299bf6814279A6A1411A7e866A631 -``` - -_See code: [src/commands/releasegold/create-account.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/releasegold/create-account.ts)_ - -## `celocli releasegold:locked-gold` - -Perform actions [lock, unlock, withdraw] on CELO that has been locked via the provided ReleaseGold contract. - -``` -Perform actions [lock, unlock, withdraw] on CELO that has been locked via the provided ReleaseGold contract. - -USAGE - $ celocli releasegold:locked-gold - -OPTIONS - -a, --action=lock|unlock|withdraw (required) Action to perform on - contract's gold - - --contract=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) Address of the - ReleaseGold Contract - - --globalHelp View all available global flags - - --value=10000000000000000000000 (required) Amount of gold to - perform `action` with - - --yes Answer yes to prompt - -EXAMPLES - locked-gold --contract 0xCcc8a47BE435F1590809337BB14081b256Ae26A8 --action lock - --value 10000000000000000000000 - - locked-gold --contract 0xCcc8a47BE435F1590809337BB14081b256Ae26A8 --action unlock - --value 10000000000000000000000 - - locked-gold --contract 0xCcc8a47BE435F1590809337BB14081b256Ae26A8 --action withdraw - --value 10000000000000000000000 -``` - -_See code: [src/commands/releasegold/locked-gold.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/releasegold/locked-gold.ts)_ - -## `celocli releasegold:refund-and-finalize` - -Refund the given contract's balance to the appopriate parties and destroy the contact. Can only be called by the release owner of revocable ReleaseGold instances. - -``` -Refund the given contract's balance to the appopriate parties and destroy the contact. Can only be called by the release owner of revocable ReleaseGold instances. - -USAGE - $ celocli releasegold:refund-and-finalize - -OPTIONS - --contract=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) Address of the - ReleaseGold Contract - - --globalHelp View all available global flags - -EXAMPLE - refund-and-finalize --contract 0x5409ED021D9299bf6814279A6A1411A7e866A631 -``` - -_See code: [src/commands/releasegold/refund-and-finalize.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/releasegold/refund-and-finalize.ts)_ - -## `celocli releasegold:revoke` - -Revoke the given contract instance. Once revoked, any Locked Gold can be unlocked by the release owner. The beneficiary will then be able to withdraw any released Gold that had yet to be withdrawn, and the remainder can be transferred by the release owner to the refund address. Note that not all ReleaseGold instances are revokable. - -``` -Revoke the given contract instance. Once revoked, any Locked Gold can be unlocked by the release owner. The beneficiary will then be able to withdraw any released Gold that had yet to be withdrawn, and the remainder can be transferred by the release owner to the refund address. Note that not all ReleaseGold instances are revokable. - -USAGE - $ celocli releasegold:revoke - -OPTIONS - --contract=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) Address of the - ReleaseGold Contract - - --globalHelp View all available global flags - - --yesreally Override prompt to set - liquidity (be careful!) - -EXAMPLE - revoke --contract 0x5409ED021D9299bf6814279A6A1411A7e866A631 -``` - -_See code: [src/commands/releasegold/revoke.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/releasegold/revoke.ts)_ - -## `celocli releasegold:revoke-votes` - -Revokes `votes` for the given contract's account from the given group's account - -``` -Revokes `votes` for the given contract's account from the given group's account - -USAGE - $ celocli releasegold:revoke-votes - -OPTIONS - --contract=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) Address of the - ReleaseGold Contract - - --globalHelp View all available global flags - - --group=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) Address of the group - to revoke votes from - - --votes=votes (required) The number of votes - to revoke - -EXAMPLE - revoke-votes --contract 0x47e172F6CfB6c7D01C1574fa3E2Be7CC73269D95 --group - 0x5409ED021D9299bf6814279A6A1411A7e866A631 --votes 100 -``` - -_See code: [src/commands/releasegold/revoke-votes.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/releasegold/revoke-votes.ts)_ - -## `celocli releasegold:set-account` - -Set account properties of the ReleaseGold instance account such as name, data encryption key, and the metadata URL - -``` -Set account properties of the ReleaseGold instance account such as name, data encryption key, and the metadata URL - -USAGE - $ celocli releasegold:set-account - -OPTIONS - -p, --property=name|dataEncryptionKey|metaURL (required) Property type to set - - -v, --value=value (required) Property value to - set - - --contract=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) Address of the - ReleaseGold Contract - - --globalHelp View all available global flags - -EXAMPLES - set-account --contract 0x5719118266779B58D0f9519383A4A27aA7b829E5 --property name - --value mywallet - - set-account --contract 0x5719118266779B58D0f9519383A4A27aA7b829E5 --property - dataEncryptionKey --value - 0x041bb96e35f9f4b71ca8de561fff55a249ddf9d13ab582bdd09a09e75da68ae4cd0ab7038030f41b2374 - 98b4d76387ae878dc8d98fd6f6db2c15362d1a3bf11216 - - set-account --contract 0x5719118266779B58D0f9519383A4A27aA7b829E5 --property metaURL - --value www.test.com -``` - -_See code: [src/commands/releasegold/set-account.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/releasegold/set-account.ts)_ - -## `celocli releasegold:set-account-wallet-address` - -Set the ReleaseGold contract account's wallet address - -``` -Set the ReleaseGold contract account's wallet address - -USAGE - $ celocli releasegold:set-account-wallet-address - -OPTIONS - --contract=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d - (required) Address of the ReleaseGold Contract - - --globalHelp - View all available global flags - - --pop=pop - ECDSA PoP for signer over contract's account - - --walletAddress=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d - (required) Address of wallet to set for contract's account and signer of PoP. 0x0 if - owner wants payers to contact them directly. - -EXAMPLE - set-account-wallet-address --contract 0x5409ED021D9299bf6814279A6A1411A7e866A631 - --walletAddress 0xE36Ea790bc9d7AB70C55260C66D52b1eca985f84 --pop - 0x1b3e611d05e46753c43444cdc55c2cc3d95c54da0eba2464a8cc8cb01bd57ae8bb3d82a0e293ca97e581 - 3e7fb9b624127f42ef0871d025d8a56fe2f8f08117e25b -``` - -_See code: [src/commands/releasegold/set-account-wallet-address.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/releasegold/set-account-wallet-address.ts)_ - -## `celocli releasegold:set-beneficiary` - -Set the beneficiary of the ReleaseGold contract. This command is gated via a multi-sig, so this is expected to be called twice: once by the contract's beneficiary and once by the contract's releaseOwner. Once both addresses call this command with the same parameters, the tx will execute. - -``` -Set the beneficiary of the ReleaseGold contract. This command is gated via a multi-sig, so this is expected to be called twice: once by the contract's beneficiary and once by the contract's releaseOwner. Once both addresses call this command with the same parameters, the tx will execute. - -USAGE - $ celocli releasegold:set-beneficiary - -OPTIONS - --beneficiary=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) Address of the - new beneficiary - - --contract=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) Address of the - ReleaseGold Contract - - --from=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) Address to submit - multisig transaction from - (one of the owners) - - --globalHelp View all available global - flags - - --yesreally Override prompt to set new - beneficiary (be careful!) - -EXAMPLE - set-beneficiary --contract 0x5409ED021D9299bf6814279A6A1411A7e866A631 --from - 0xE36Ea790bc9d7AB70C55260C66D52b1eca985f84 --beneficiary - 0x6Ecbe1DB9EF729CBe972C83Fb886247691Fb6beb -``` - -_See code: [src/commands/releasegold/set-beneficiary.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/releasegold/set-beneficiary.ts)_ - -## `celocli releasegold:set-can-expire` - -Set the canExpire flag for the given ReleaseGold contract - -``` -Set the canExpire flag for the given ReleaseGold contract - -USAGE - $ celocli releasegold:set-can-expire - -OPTIONS - --contract=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) Address of the - ReleaseGold Contract - - --globalHelp View all available global flags - - --value=(true|false|True|False) (required) canExpire value - - --yesreally Override prompt to set - expiration flag (be careful!) - -EXAMPLE - set-can-expire --contract 0x5409ED021D9299bf6814279A6A1411A7e866A631 --value true -``` - -_See code: [src/commands/releasegold/set-can-expire.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/releasegold/set-can-expire.ts)_ - -## `celocli releasegold:set-liquidity-provision` - -Set the liquidity provision to true, allowing the beneficiary to withdraw released gold. - -``` -Set the liquidity provision to true, allowing the beneficiary to withdraw released gold. - -USAGE - $ celocli releasegold:set-liquidity-provision - -OPTIONS - --contract=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) Address of the - ReleaseGold Contract - - --globalHelp View all available global flags - - --yesreally Override prompt to set - liquidity (be careful!) - -EXAMPLE - set-liquidity-provision --contract 0x5409ED021D9299bf6814279A6A1411A7e866A631 -``` - -_See code: [src/commands/releasegold/set-liquidity-provision.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/releasegold/set-liquidity-provision.ts)_ - -## `celocli releasegold:set-max-distribution` - -Set the maximum distribution of gold for the given contract - -``` -Set the maximum distribution of gold for the given contract - -USAGE - $ celocli releasegold:set-max-distribution - -OPTIONS - --contract=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) Address of the - ReleaseGold Contract - - --distributionRatio=distributionRatio (required) Amount in range [0, - 1000] (3 significant figures) - indicating % of total balance - available for distribution. - - --globalHelp View all available global flags - - --yesreally Override prompt to set new - maximum distribution (be - careful!) - -EXAMPLE - set-max-distribution --contract 0x5409ED021D9299bf6814279A6A1411A7e866A631 - --distributionRatio 1000 -``` - -_See code: [src/commands/releasegold/set-max-distribution.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/releasegold/set-max-distribution.ts)_ - -## `celocli releasegold:show` - -Show info on a ReleaseGold instance contract. - -``` -Show info on a ReleaseGold instance contract. - -USAGE - $ celocli releasegold:show - -OPTIONS - --contract=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) Address of the - ReleaseGold Contract - - --globalHelp View all available global flags - -EXAMPLE - show --contract 0x47e172F6CfB6c7D01C1574fa3E2Be7CC73269D95 -``` - -_See code: [src/commands/releasegold/show.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/releasegold/show.ts)_ - -## `celocli releasegold:transfer-dollars` - -Transfer Celo Dollars from the given contract address. Dollars may be accrued to the ReleaseGold contract via validator epoch rewards. - -``` -Transfer Celo Dollars from the given contract address. Dollars may be accrued to the ReleaseGold contract via validator epoch rewards. - -USAGE - $ celocli releasegold:transfer-dollars - -OPTIONS - --contract=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) Address of the - ReleaseGold Contract - - --globalHelp View all available global flags - - --to=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) Address of the - recipient of Celo Dollars - transfer - - --value=10000000000000000000000 (required) Value (in Wei) of - Celo Dollars to transfer - -EXAMPLE - transfer-dollars --contract 0x5409ED021D9299bf6814279A6A1411A7e866A631 --to - 0x6Ecbe1DB9EF729CBe972C83Fb886247691Fb6beb --value 10000000000000000000000 -``` - -_See code: [src/commands/releasegold/transfer-dollars.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/releasegold/transfer-dollars.ts)_ - -## `celocli releasegold:withdraw` - -Withdraws `value` released gold to the beneficiary address. Fails if `value` worth of gold has not been released yet. - -``` -Withdraws `value` released gold to the beneficiary address. Fails if `value` worth of gold has not been released yet. - -USAGE - $ celocli releasegold:withdraw - -OPTIONS - --contract=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) Address of the - ReleaseGold Contract - - --globalHelp View all available global flags - - --value=10000000000000000000000 (required) Amount of released - gold (in wei) to withdraw - -EXAMPLE - withdraw --contract 0x5409ED021D9299bf6814279A6A1411A7e866A631 --value - 10000000000000000000000 -``` - -_See code: [src/commands/releasegold/withdraw.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/releasegold/withdraw.ts)_ diff --git a/packages/docs/command-line-interface/reserve.md b/packages/docs/command-line-interface/reserve.md deleted file mode 100644 index 8a234a4f488..00000000000 --- a/packages/docs/command-line-interface/reserve.md +++ /dev/null @@ -1,53 +0,0 @@ -# `celocli reserve` - -Shows information about reserve - - -## `celocli reserve:status` - -Shows information about reserve - -``` -Shows information about reserve - -USAGE - $ celocli reserve:status - -OPTIONS - --globalHelp View all available global flags - -EXAMPLE - status -``` - -_See code: [src/commands/reserve/status.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/reserve/status.ts)_ - -## `celocli reserve:transfergold` - -Transfers reserve gold to other reserve address - -``` -Transfers reserve gold to other reserve address - -USAGE - $ celocli reserve:transfergold - -OPTIONS - --from=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) Spender's address - --globalHelp View all available global flags - --to=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) Receiving address - - --useMultiSig True means the request will be sent - through multisig. - - --value=value (required) The unit amount of CELO - -EXAMPLES - transfergold --value 9000 --to 0x91c987bf62D25945dB517BDAa840A6c661374402 --from - 0x5409ed021d9299bf6814279a6a1411a7e866a631 - - transfergold --value 9000 --to 0x91c987bf62D25945dB517BDAa840A6c661374402 --from - 0x5409ed021d9299bf6814279a6a1411a7e866a631 --useMultiSig -``` - -_See code: [src/commands/reserve/transfergold.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/reserve/transfergold.ts)_ diff --git a/packages/docs/command-line-interface/rewards.md b/packages/docs/command-line-interface/rewards.md deleted file mode 100644 index ac26b7c4794..00000000000 --- a/packages/docs/command-line-interface/rewards.md +++ /dev/null @@ -1,61 +0,0 @@ -# `celocli rewards` - -Show rewards information about a voter, registered Validator, or Validator Group - - -## `celocli rewards:show` - -Show rewards information about a voter, registered Validator, or Validator Group - -``` -Show rewards information about a voter, registered Validator, or Validator Group - -USAGE - $ celocli rewards:show - -OPTIONS - -x, --extended show extra columns - - --columns=columns only show provided columns - (comma-separated) - - --csv output is csv format [alias: - --output=csv] - - --epochs=epochs [default: 1] Show results for - the last N epochs - - --estimate Estimate voter rewards from - current votes - - --filter=filter filter property by partial - string matching, ex: name=foo - - --globalHelp View all available global - flags - - --group=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d Validator Group to show - rewards for - - --no-header hide table header from output - - --no-truncate do not truncate output to fit - screen - - --output=csv|json|yaml output in a more machine - friendly format - - --slashing Show rewards for slashing - - --sort=sort property to sort by (prepend - '-' for descending) - - --validator=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d Validator to show rewards for - - --voter=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d Voter to show rewards for - -EXAMPLE - show --address 0x5409ed021d9299bf6814279a6a1411a7e866a631 -``` - -_See code: [src/commands/rewards/show.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/rewards/show.ts)_ diff --git a/packages/docs/command-line-interface/transfer.md b/packages/docs/command-line-interface/transfer.md deleted file mode 100644 index 7b4d23c949f..00000000000 --- a/packages/docs/command-line-interface/transfer.md +++ /dev/null @@ -1,170 +0,0 @@ -# `celocli transfer` - -Transfer CELO and Celo Dollars - - -## `celocli transfer:celo` - -Transfer CELO to a specified address. (Note: this is the equivalent of the old transfer:gold) - -``` -Transfer CELO to a specified address. (Note: this is the equivalent of the old transfer:gold) - -USAGE - $ celocli transfer:celo - -OPTIONS - --comment=comment Transfer comment - --from=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) Address of the sender - --globalHelp View all available global flags - --to=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) Address of the receiver - - --value=value (required) Amount to transfer (in - wei) - -EXAMPLE - celo --from 0xa0Af2E71cECc248f4a7fD606F203467B500Dd53B --to - 0x5409ed021d9299bf6814279a6a1411a7e866a631 --value 10000000000000000000 -``` - -_See code: [src/commands/transfer/celo.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/transfer/celo.ts)_ - -## `celocli transfer:dollars` - -Transfer Celo Dollars (cUSD) to a specified address. - -``` -Transfer Celo Dollars (cUSD) to a specified address. - -USAGE - $ celocli transfer:dollars - -OPTIONS - --comment=comment Transfer comment - --from=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) Address of the sender - --globalHelp View all available global flags - --to=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) Address of the receiver - - --value=value (required) Amount to transfer (in - wei) - -EXAMPLE - dollars --from 0xa0Af2E71cECc248f4a7fD606F203467B500Dd53B --to - 0x5409ed021d9299bf6814279a6a1411a7e866a631 --value 1000000000000000000 -``` - -_See code: [src/commands/transfer/dollars.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/transfer/dollars.ts)_ - -## `celocli transfer:erc20` - -Transfer ERC20 to a specified address - -``` -Transfer ERC20 to a specified address - -USAGE - $ celocli transfer:erc20 - -OPTIONS - --erc20Address=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) Custom erc20 to - check it's balance too - - --from=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) Address of the - sender - - --globalHelp View all available global - flags - - --to=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) Address of the - receiver - - --value=value (required) Amount to - transfer (in wei) - -EXAMPLE - erc20 --erc20Address 0x765DE816845861e75A25fCA122bb6898B8B1282a --from - 0xa0Af2E71cECc248f4a7fD606F203467B500Dd53B --to - 0x5409ed021d9299bf6814279a6a1411a7e866a631 --value 10000000000000000000 -``` - -_See code: [src/commands/transfer/erc20.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/transfer/erc20.ts)_ - -## `celocli transfer:euros` - -Transfer Celo Euros (cEUR) to a specified address. - -``` -Transfer Celo Euros (cEUR) to a specified address. - -USAGE - $ celocli transfer:euros - -OPTIONS - --comment=comment Transfer comment - --from=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) Address of the sender - --globalHelp View all available global flags - --to=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) Address of the receiver - - --value=value (required) Amount to transfer (in - wei) - -EXAMPLE - euros --from 0xa0Af2E71cECc248f4a7fD606F203467B500Dd53B --to - 0x5409ed021d9299bf6814279a6a1411a7e866a631 --value 1000000000000000000 -``` - -_See code: [src/commands/transfer/euros.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/transfer/euros.ts)_ - -## `celocli transfer:gold` - -Transfer CELO to a specified address. _DEPRECATION WARNING_ Use the "transfer:celo" command instead - -``` -Transfer CELO to a specified address. *DEPRECATION WARNING* Use the "transfer:celo" command instead - -USAGE - $ celocli transfer:gold - -OPTIONS - --comment=comment Transfer comment - --from=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) Address of the sender - --globalHelp View all available global flags - --to=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) Address of the receiver - - --value=value (required) Amount to transfer (in - wei) - -EXAMPLE - gold --from 0xa0Af2E71cECc248f4a7fD606F203467B500Dd53B --to - 0x5409ed021d9299bf6814279a6a1411a7e866a631 --value 10000000000000000000 -``` - -_See code: [src/commands/transfer/gold.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/transfer/gold.ts)_ - -## `celocli transfer:stable` - -Transfer a stable token to a specified address. - -``` -Transfer a stable token to a specified address. - -USAGE - $ celocli transfer:stable - -OPTIONS - --comment=comment Transfer comment - --from=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) Address of the sender - --globalHelp View all available global flags - --stableToken=(cUSD|cusd|cEUR|ceur) Name of the stable to be transfered - --to=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) Address of the receiver - - --value=value (required) Amount to transfer (in - wei) - -EXAMPLE - stable --from 0xa0Af2E71cECc248f4a7fD606F203467B500Dd53B --to - 0x5409ed021d9299bf6814279a6a1411a7e866a631 --value 1000000000000000000 --stableToken - cStableTokenSymbol -``` - -_See code: [src/commands/transfer/stable.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/transfer/stable.ts)_ diff --git a/packages/docs/command-line-interface/validator.md b/packages/docs/command-line-interface/validator.md deleted file mode 100644 index d0c01bfd501..00000000000 --- a/packages/docs/command-line-interface/validator.md +++ /dev/null @@ -1,442 +0,0 @@ -# `celocli validator` - -View and manage Validators - - -## `celocli validator:affiliate GROUPADDRESS` - -Affiliate a Validator with a Validator Group. This allows the Validator Group to add that Validator as a member. If the Validator is already a member of a Validator Group, affiliating with a different Group will remove the Validator from the first group's members. - -``` -Affiliate a Validator with a Validator Group. This allows the Validator Group to add that Validator as a member. If the Validator is already a member of a Validator Group, affiliating with a different Group will remove the Validator from the first group's members. - -USAGE - $ celocli validator:affiliate GROUPADDRESS - -ARGUMENTS - GROUPADDRESS ValidatorGroup's address - -OPTIONS - --from=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) Signer or Validator's - address - - --globalHelp View all available global flags - - --yes Answer yes to prompt - -EXAMPLE - affiliate --from 0x47e172f6cfb6c7d01c1574fa3e2be7cc73269d95 - 0x97f7333c51897469e8d98e7af8653aab468050a3 -``` - -_See code: [src/commands/validator/affiliate.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/validator/affiliate.ts)_ - -## `celocli validator:deaffiliate` - -Deaffiliate a Validator from a Validator Group, and remove it from the Group if it is also a member. - -``` -Deaffiliate a Validator from a Validator Group, and remove it from the Group if it is also a member. - -USAGE - $ celocli validator:deaffiliate - -OPTIONS - --from=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) Signer or Validator's - address - - --globalHelp View all available global flags - -EXAMPLE - deaffiliate --from 0x47e172f6cfb6c7d01c1574fa3e2be7cc73269d95 -``` - -_See code: [src/commands/validator/deaffiliate.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/validator/deaffiliate.ts)_ - -## `celocli validator:deregister` - -Deregister a Validator. Approximately 60 days after the validator is no longer part of any group, it will be possible to deregister the validator and start unlocking the CELO. If you wish to deregister your validator, you must first remove it from it's group, such as by deaffiliating it, then wait the required 60 days before running this command. - -``` -Deregister a Validator. Approximately 60 days after the validator is no longer part of any group, it will be possible to deregister the validator and start unlocking the CELO. If you wish to deregister your validator, you must first remove it from it's group, such as by deaffiliating it, then wait the required 60 days before running this command. - -USAGE - $ celocli validator:deregister - -OPTIONS - --from=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) Signer or Validator's - address - - --globalHelp View all available global flags - -EXAMPLE - deregister --from 0x47e172f6cfb6c7d01c1574fa3e2be7cc73269d95 -``` - -_See code: [src/commands/validator/deregister.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/validator/deregister.ts)_ - -## `celocli validator:downtime-slash` - -Downtime slash a validator - -``` -Downtime slash a validator - -USAGE - $ celocli validator:downtime-slash - -OPTIONS - --beforeBlock=beforeBlock - Slash for slashable downtime window before provided block - - --from=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d - (required) From address to perform the slash (reward recipient) - - --globalHelp - View all available global flags - - --intervals='[0:1], [1:2]' - Array of intervals, ordered by min start to max end - - --validator=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d - Validator (signer or account) address - - --validators='["0xb7ef0985bdb4f19460A29d9829aA1514B181C4CD", - "0x47e172f6cfb6c7d01c1574fa3e2be7cc73269d95"]' - Validator (signer or account) address list - -EXAMPLES - downtime-slash --from 0x47e172f6cfb6c7d01c1574fa3e2be7cc73269d95 --validator - 0xb7ef0985bdb4f19460A29d9829aA1514B181C4CD --intervals "[100:150), [150:200)" - - downtime-slash --from 0x47e172f6cfb6c7d01c1574fa3e2be7cc73269d95 --validator - 0xb7ef0985bdb4f19460A29d9829aA1514B181C4CD --slashableDowntimeBeforeBlock 200 -``` - -_See code: [src/commands/validator/downtime-slash.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/validator/downtime-slash.ts)_ - -## `celocli validator:force-deaffiliate` - -Force deaffiliate a Validator from a Validator Group, and remove it from the Group if it is also a member. Used by stake-off admins in order to remove validators from the next epoch's validator set if they are down and consistently unresponsive, in order to preserve the health of the network. This feature will be removed once slashing for downtime is implemented. - -``` -Force deaffiliate a Validator from a Validator Group, and remove it from the Group if it is also a member. Used by stake-off admins in order to remove validators from the next epoch's validator set if they are down and consistently unresponsive, in order to preserve the health of the network. This feature will be removed once slashing for downtime is implemented. - -USAGE - $ celocli validator:force-deaffiliate - -OPTIONS - --from=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) Initiator - - --globalHelp View all available global - flags - - --validator=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) Validator's address - -EXAMPLE - force-deaffiliate --from 0x47e172f6cfb6c7d01c1574fa3e2be7cc73269d95 --validator - 0xb7ef0985bdb4f19460A29d9829aA1514B181C4CD -``` - -_See code: [src/commands/validator/force-deaffiliate.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/validator/force-deaffiliate.ts)_ - -## `celocli validator:list` - -List registered Validators, their name (if provided), affiliation, uptime score, and public keys used for validating. - -``` -List registered Validators, their name (if provided), affiliation, uptime score, and public keys used for validating. - -USAGE - $ celocli validator:list - -OPTIONS - -x, --extended show extra columns - --columns=columns only show provided columns (comma-separated) - --csv output is csv format [alias: --output=csv] - --filter=filter filter property by partial string matching, ex: name=foo - --globalHelp View all available global flags - --no-header hide table header from output - --no-truncate do not truncate output to fit screen - --output=csv|json|yaml output in a more machine friendly format - --sort=sort property to sort by (prepend '-' for descending) - -EXAMPLE - list -``` - -_See code: [src/commands/validator/list.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/validator/list.ts)_ - -## `celocli validator:register` - -Register a new Validator - -``` -Register a new Validator - -USAGE - $ celocli validator:register - -OPTIONS - --blsKey=0x (required) BLS Public Key - --blsSignature=0x (required) BLS Proof-of-Possession - --ecdsaKey=0x (required) ECDSA Public Key - - --from=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) Address for the - Validator - - --globalHelp View all available global flags - - --yes Answer yes to prompt - -EXAMPLE - register --from 0x47e172F6CfB6c7D01C1574fa3E2Be7CC73269D95 --ecdsaKey - 0x049b7291ab8813a095d6b7913a7930ede5ea17466abd5e1a26c6c44f6df9a400a6f474080098b2c752c6 - c4871978ca977b90dcd3aed92bc9d564137c8dfa14ee72 --blsKey - 0x4fa3f67fc913878b068d1fa1cdddc54913d3bf988dbe5a36a20fa888f20d4894c408a6773f3d7bde1115 - 4f2a3076b700d345a42fd25a0e5e83f4db5586ac7979ac2053cd95d8f2efd3e959571ceccaa743e02cf4be - 3f5d7aaddb0b06fc9aff00 --blsSignature - 0xcdb77255037eb68897cd487fdd85388cbda448f617f874449d4b11588b0b7ad8ddc20d9bb450b513bb35 - 664ea3923900 -``` - -_See code: [src/commands/validator/register.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/validator/register.ts)_ - -## `celocli validator:requirements` - -List the Locked Gold requirements for registering a Validator. This consists of a value, which is the amount of CELO that needs to be locked in order to register, and a duration, which is the amount of time that CELO must stay locked following the deregistration of the Validator. - -``` -List the Locked Gold requirements for registering a Validator. This consists of a value, which is the amount of CELO that needs to be locked in order to register, and a duration, which is the amount of time that CELO must stay locked following the deregistration of the Validator. - -USAGE - $ celocli validator:requirements - -OPTIONS - --globalHelp View all available global flags - -EXAMPLE - requirements -``` - -_See code: [src/commands/validator/requirements.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/validator/requirements.ts)_ - -## `celocli validator:set-bitmaps` - -Set validator signature bitmaps for provided intervals - -``` -Set validator signature bitmaps for provided intervals - -USAGE - $ celocli validator:set-bitmaps - -OPTIONS - --from=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) From address - to sign set bitmap - transactions - - --globalHelp View all available global - flags - - --intervals='[0:1], [1:2]' Array of intervals, - ordered by min start to - max end - - --slashableDowntimeBeforeBlock=slashableDowntimeBeforeBlock Set all bitmaps for - slashable downtime window - before provided block - - --slashableDowntimeBeforeLatest Set all bitmaps for - slashable downtime window - before latest block - -EXAMPLES - set-bitmaps --from 0x47e172f6cfb6c7d01c1574fa3e2be7cc73269d95 - --slashableDowntimeBeforeBlock 10000 - - set-bitmaps --from 0x47e172f6cfb6c7d01c1574fa3e2be7cc73269d95 --intervals "[0:100], - (100:200]" -``` - -_See code: [src/commands/validator/set-bitmaps.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/validator/set-bitmaps.ts)_ - -## `celocli validator:show VALIDATORADDRESS` - -Show information about a registered Validator. - -``` -Show information about a registered Validator. - -USAGE - $ celocli validator:show VALIDATORADDRESS - -ARGUMENTS - VALIDATORADDRESS Validator's address - -OPTIONS - --globalHelp View all available global flags - -EXAMPLE - show 0x97f7333c51897469E8D98E7af8653aAb468050a3 -``` - -_See code: [src/commands/validator/show.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/validator/show.ts)_ - -## `celocli validator:signed-blocks` - -Display a graph of blocks and whether the given signer's signature is included in each. A green '.' indicates the signature is present in that block, a red '✘' indicates the signature is not present. A yellow '~' indicates the signer is not elected for that block. - -``` -Display a graph of blocks and whether the given signer's signature is included in each. A green '.' indicates the signature is present in that block, a red '✘' indicates the signature is not present. A yellow '~' indicates the signer is not elected for that block. - -USAGE - $ celocli validator:signed-blocks - -OPTIONS - --at-block=at-block - latest block to examine for signer activity - - --globalHelp - View all available global flags - - --lookback=lookback - [default: 120] how many blocks to look back for signer activity - - --signer=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d - address of the signer to check for signatures - - --signers='["0xb7ef0985bdb4f19460A29d9829aA1514B181C4CD", - "0x47e172f6cfb6c7d01c1574fa3e2be7cc73269d95"]' - list of signer addresses to check for signatures - - --slashableDowntimeLookback - lookback of slashableDowntime - - --wasDownWhileElected - indicate whether a validator was down while elected for range - - --width=width - [default: 40] line width for printing marks - -EXAMPLES - signed-blocks --signer 0x5409ED021D9299bf6814279A6A1411A7e866A631 - - signed-blocks --signer 0x5409ED021D9299bf6814279A6A1411A7e866A631 --follow - - signed-blocks --at-block 100000 --signer 0x5409ED021D9299bf6814279A6A1411A7e866A631 - - signed-blocks --lookback 500 --signer 0x5409ED021D9299bf6814279A6A1411A7e866A631 - - signed-blocks --lookback 50 --width 10 --signer - 0x5409ED021D9299bf6814279A6A1411A7e866A631 -``` - -_See code: [src/commands/validator/signed-blocks.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/validator/signed-blocks.ts)_ - -## `celocli validator:status` - -Shows the consensus status of a validator. This command will show whether a validator is currently elected, would be elected if an election were to be run right now, and the percentage of blocks signed and number of blocks successfully proposed within a given window. - -``` -Shows the consensus status of a validator. This command will show whether a validator is currently elected, would be elected if an election were to be run right now, and the percentage of blocks signed and number of blocks successfully proposed within a given window. - -USAGE - $ celocli validator:status - -OPTIONS - -x, --extended show extra columns - - --all get the status of all - registered validators - - --columns=columns only show provided columns - (comma-separated) - - --csv output is csv format [alias: - --output=csv] - - --end=end [default: -1] what block to - end at when looking at signer - activity. defaults to the - latest block - - --filter=filter filter property by partial - string matching, ex: name=foo - - --globalHelp View all available global - flags - - --no-header hide table header from output - - --no-truncate do not truncate output to fit - screen - - --output=csv|json|yaml output in a more machine - friendly format - - --signer=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d address of the signer to check - if elected and validating - - --sort=sort property to sort by (prepend - '-' for descending) - - --start=start [default: -1] what block to - start at when looking at - signer activity. defaults to - the last 100 blocks - - --validator=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d address of the validator to - check if elected and - validating - -EXAMPLES - status --validator 0x5409ED021D9299bf6814279A6A1411A7e866A631 - - status --validator 0x5409ED021D9299bf6814279A6A1411A7e866A631 --start 1480000 - - status --all --start 1480000 --end 1490000 -``` - -_See code: [src/commands/validator/status.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/validator/status.ts)_ - -## `celocli validator:update-bls-public-key` - -Update the BLS public key for a Validator to be used in consensus. - -``` -Update the BLS public key for a Validator to be used in consensus. - -Regular (ECDSA and BLS) key rotation is recommended for Validator operational security. - -WARNING: By default, the BLS key used by the validator node is derived from the ECDSA private key. As a result, rotating the BLS key without rotating the ECDSA key will result in validator downtime without special configuration. Use this method only if you know what you are doing. - -USAGE - $ celocli validator:update-bls-public-key - -OPTIONS - --blsKey=0x (required) BLS Public Key - --blsPop=0x (required) BLS Proof-of-Possession - --from=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) Validator's address - --globalHelp View all available global flags - -DESCRIPTION - - Regular (ECDSA and BLS) key rotation is recommended for Validator operational - security. - - WARNING: By default, the BLS key used by the validator node is derived from the ECDSA - private key. As a result, rotating the BLS key without rotating the ECDSA key will - result in validator downtime without special configuration. Use this method only if - you know what you are doing. - -EXAMPLE - update-bls-key --from 0x47e172F6CfB6c7D01C1574fa3E2Be7CC73269D95 --blsKey - 0x4fa3f67fc913878b068d1fa1cdddc54913d3bf988dbe5a36a20fa888f20d4894c408a6773f3d7bde1115 - 4f2a3076b700d345a42fd25a0e5e83f4db5586ac7979ac2053cd95d8f2efd3e959571ceccaa743e02cf4be - 3f5d7aaddb0b06fc9aff00 --blsPop - 0xcdb77255037eb68897cd487fdd85388cbda448f617f874449d4b11588b0b7ad8ddc20d9bb450b513bb35 - 664ea3923900 -``` - -_See code: [src/commands/validator/update-bls-public-key.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/validator/update-bls-public-key.ts)_ diff --git a/packages/docs/command-line-interface/validatorgroup.md b/packages/docs/command-line-interface/validatorgroup.md deleted file mode 100644 index 8ec3293999d..00000000000 --- a/packages/docs/command-line-interface/validatorgroup.md +++ /dev/null @@ -1,201 +0,0 @@ -# `celocli validatorgroup` - -View and manage Validator Groups - - -## `celocli validatorgroup:commission` - -Manage the commission for a registered Validator Group. This represents the share of the epoch rewards given to elected Validators that goes to the group they are a member of. Updates must be made in a two step process where the group owner first calls uses the queue-update option, then after the required update delay, the apply option. The commission update delay, in blocks, can be viewed with the network:parameters command. A groups next commission update block can be checked with validatorgroup:show - -``` -Manage the commission for a registered Validator Group. This represents the share of the epoch rewards given to elected Validators that goes to the group they are a member of. Updates must be made in a two step process where the group owner first calls uses the queue-update option, then after the required update delay, the apply option. The commission update delay, in blocks, can be viewed with the network:parameters command. A groups next commission update block can be checked with validatorgroup:show - -USAGE - $ celocli validatorgroup:commission - -OPTIONS - --apply Applies a previously queued update. - Should be called after the update - delay. - - --from=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) Address for the - Validator Group or Validator Group - validator signer - - --globalHelp View all available global flags - - --queue-update=queue-update Queues an update to the commission, - which can be applied after the - update delay. - -EXAMPLES - commission --from 0x47e172F6CfB6c7D01C1574fa3E2Be7CC73269D95 --queue-update 0.1 - - commission --from 0x47e172F6CfB6c7D01C1574fa3E2Be7CC73269D95 --apply -``` - -_See code: [src/commands/validatorgroup/commission.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/validatorgroup/commission.ts)_ - -## `celocli validatorgroup:deregister` - -Deregister a Validator Group. Approximately 180 days after the validator group is empty, it will be possible to deregister it start unlocking the CELO. If you wish to deregister your validator group, you must first remove all members, then wait the required 180 days before running this command. - -``` -Deregister a Validator Group. Approximately 180 days after the validator group is empty, it will be possible to deregister it start unlocking the CELO. If you wish to deregister your validator group, you must first remove all members, then wait the required 180 days before running this command. - -USAGE - $ celocli validatorgroup:deregister - -OPTIONS - --from=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) Signer or - ValidatorGroup's address - - --globalHelp View all available global flags - -EXAMPLE - deregister --from 0x47e172f6cfb6c7d01c1574fa3e2be7cc73269d95 -``` - -_See code: [src/commands/validatorgroup/deregister.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/validatorgroup/deregister.ts)_ - -## `celocli validatorgroup:list` - -List registered Validator Groups, their names (if provided), commission, and members. - -``` -List registered Validator Groups, their names (if provided), commission, and members. - -USAGE - $ celocli validatorgroup:list - -OPTIONS - -x, --extended show extra columns - --columns=columns only show provided columns (comma-separated) - --csv output is csv format [alias: --output=csv] - --filter=filter filter property by partial string matching, ex: name=foo - --globalHelp View all available global flags - --no-header hide table header from output - --no-truncate do not truncate output to fit screen - --output=csv|json|yaml output in a more machine friendly format - --sort=sort property to sort by (prepend '-' for descending) - -EXAMPLE - list -``` - -_See code: [src/commands/validatorgroup/list.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/validatorgroup/list.ts)_ - -## `celocli validatorgroup:member VALIDATORADDRESS` - -Add or remove members from a Validator Group - -``` -Add or remove members from a Validator Group - -USAGE - $ celocli validatorgroup:member VALIDATORADDRESS - -ARGUMENTS - VALIDATORADDRESS Validator's address - -OPTIONS - --accept Accept a validator whose - affiliation is already set to the - group - - --from=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) ValidatorGroup's address - - --globalHelp View all available global flags - - --remove Remove a validator from the members - list - - --reorder=reorder Reorder a validator within the - members list. Indices are 0 based - - --yes Answer yes to prompt - -EXAMPLES - member --from 0x47e172f6cfb6c7d01c1574fa3e2be7cc73269d95 --accept - 0x97f7333c51897469e8d98e7af8653aab468050a3 - - member --from 0x47e172f6cfb6c7d01c1574fa3e2be7cc73269d95 --remove - 0x97f7333c51897469e8d98e7af8653aab468050a3 - - member --from 0x47e172f6cfb6c7d01c1574fa3e2be7cc73269d95 --reorder 3 - 0x47e172f6cfb6c7d01c1574fa3e2be7cc73269d95 -``` - -_See code: [src/commands/validatorgroup/member.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/validatorgroup/member.ts)_ - -## `celocli validatorgroup:register` - -Register a new Validator Group - -``` -Register a new Validator Group - -USAGE - $ celocli validatorgroup:register - -OPTIONS - --commission=commission (required) The share of the epoch - rewards given to elected Validators - that goes to the group. - - --from=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) Address for the - Validator Group - - --globalHelp View all available global flags - - --yes Answer yes to prompt - -EXAMPLE - register --from 0x47e172F6CfB6c7D01C1574fa3E2Be7CC73269D95 --commission 0.1 -``` - -_See code: [src/commands/validatorgroup/register.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/validatorgroup/register.ts)_ - -## `celocli validatorgroup:reset-slashing-multiplier GROUPADDRESS` - -Reset validator group slashing multiplier. - -``` -Reset validator group slashing multiplier. - -USAGE - $ celocli validatorgroup:reset-slashing-multiplier GROUPADDRESS - -ARGUMENTS - GROUPADDRESS ValidatorGroup's address - -OPTIONS - --globalHelp View all available global flags - -EXAMPLE - reset-slashing-multiplier 0x97f7333c51897469E8D98E7af8653aAb468050a3 -``` - -_See code: [src/commands/validatorgroup/reset-slashing-multiplier.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/validatorgroup/reset-slashing-multiplier.ts)_ - -## `celocli validatorgroup:show GROUPADDRESS` - -Show information about an existing Validator Group - -``` -Show information about an existing Validator Group - -USAGE - $ celocli validatorgroup:show GROUPADDRESS - -ARGUMENTS - GROUPADDRESS ValidatorGroup's address - -OPTIONS - --globalHelp View all available global flags - -EXAMPLE - show 0x97f7333c51897469E8D98E7af8653aAb468050a3 -``` - -_See code: [src/commands/validatorgroup/show.ts](https://github.com/celo-org/celo-monorepo/tree/master/packages/cli/src/commands/validatorgroup/show.ts)_ diff --git a/packages/docs/community/code-of-conduct.md b/packages/docs/community/code-of-conduct.md deleted file mode 100644 index 477fa967876..00000000000 --- a/packages/docs/community/code-of-conduct.md +++ /dev/null @@ -1,3 +0,0 @@ -# Code of Conduct - -All communication and contributions to the Celo project are subject to the [Celo Code of Conduct](https://celo.org/code-of-conduct). diff --git a/packages/docs/community/contributing.md b/packages/docs/community/contributing.md deleted file mode 100644 index 23f3afb8933..00000000000 --- a/packages/docs/community/contributing.md +++ /dev/null @@ -1,79 +0,0 @@ -# Contributing - -Celo is open source and we welcome open participation. We strive to be an open an inclusive community where everyone feels welcome and empowered to contribute, which also means following some ground rules and abiding to Celo’s [Code of Conduct](https://celo.org/code-of-conduct). Thanks for your interest! - -### Getting started - -Find an area that is of interest and you would like to help with. Look for issues that are tagged as "[good first issue](https://github.com/celo-org/celo-monorepo/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22)", "[help wanted](https://github.com/celo-org/celo-monorepo/issues?utf8=%E2%9C%93&q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22)" and "[1 hour tasks](https://github.com/celo-org/celo-monorepo/issues?q=is%3Aopen+is%3Aissue+label%3A%221+hour+tasks%22)" to get started. If you’d like to dig deeper, feel free to look at other labels and TODO’s in code comments. If there’s an issue you’re interested in contributing to or taking over, assign yourself to it and add a comment with your plans to address and target timeline. If there’s already someone assigned to it, please check with them before adding yourself to the assignee list. - -Tasks range from minor to major improvements. Based on your interests, skillset, and level of comfort with the code-base feel free to contribute where you see appropriate. Our only ask is that you follow the guidelines below to ensure a smooth and effective collaboration. - -Participation in the Celo project is subject to the [Code of Conduct](https://celo.org/code-of-conduct). - -#### **Ground Rules** - -There are a few basic ground rules for contributing: - -- PRs \(pull requests\) are preferred to issues, especially for small changes such as typos. Issues should be used for missing features and for broad-based changes. -- For on-going work, use your own side-branch and not the master branch. -- For non-trivial amounts of work, we encourage you to submit PRs regularly to solicit feedback. -- Please double check your work before submitting it. Submissions with typos, spelling, and grammatical errors may not be merged until fixed. -- Try to remain as objective and fact-based as possible. - -#### **Submitting PRs** - -We encourage you to PR \(pull request\) your work regularly and often to solicit feedback and to ensure everyone has an idea of what you’re working on. If you’ve just started, we suggest creating a PR with “WIP” \(Work In Progress\) in the title and let us know when it’s ready to review in the comments. - -##### Please make sure your PR: - -- Requests the appropriate reviewers. When in doubt, consult the CODEOWNERS file for suggestions. -- Provides a comprehensive description of the problem addressed and changes made. -- Explains dependencies and backwards incompatible changes . -- Contains unit and end-to-end tests and a description of how these were run. -- Includes changes to relevant documentation. - -If you are submitting an issue, please double check that there doesn’t already exist and issue for the work you have in mind. - -##### Please make sure your issue: - -- Is created in the correct repository. -- Has a clear detailed title such that it can’t be confused with other Celo issues. -- Provides a comprehensive description of the current and expected behavior including, if relevant, links to external references and specific implementation guidelines. -- Is tagged with the relevant labels. -- Is assigned if you or someone else is already working on it. - -#### Contributing to the documentation - -To edit an existing page in the documentation, create a fork of the repo, commit your edits and submit a PR. - -To add a new page to the documentation, create a fork, add the new pages and update the [table of contents file](https://github.com/celo-org/celo-monorepo/blob/master/packages/docs/SUMMARY.md) to include your new pages in the appropriate location and submit a PR. - -#### **Finding Us and Other Contributors** - -For code-related questions, comments, and discussions please use the [Celo Forum](https://forum.celo.org) or [Discord](https://chat.celo.org). - -### Improving Celo - -Celo’s Improvement Proposals \(CIPs\) describe standards for the Celo platform, including the core protocol specifications, SDK, and contract standards. A CIP is a design document that should provide background information, a rationale for the proposal, detailed solution including technical specifications, and, if any, a list of potential risks. The proposer is responsible for soliciting community feedback and for driving consensus. - -Participation in the Celo project is subject to the [Code of Conduct](https://celo.org/code-of-conduct). - -#### **Submitting CIPs** - -Draft all proposals following the template below and submit to the [CIPs repository](https://github.com/celo-org/celo-proposals) via a PR \(pull request\). - -CIP template: - -- **Summary:** Describe your proposal in 280 characters or less. -- **Abstract**: Provide a short description of the technical issue being addressed. -- **Motivation:** Clearly explain why the proposed change should be made. It should layout the current Celo protocol shortcomings it addresses and why doing so is important. -- **Specification:** Define and explain in detail the technical requirements for new features and/or changes proposed. -- **Rationale**: Explain the reasoning behind your approach. It should cover alternative approaches considered, related work, and trade-offs made. -- **Implementation:** For all proposals going through the governance process, this section should reference the code implementing the proposed change. It’s recommended to get community feedback before writing any code. -- **Risks:** Highlight any risks and concerns that may affect consensus, proof-of-stake, governance, protocol economics, the stability protocol, security, and privacy. - -**Finding Us and Other Contributors** - -A list of active contributors can be found at [celo.org/about](https://celo.org/about#contributors) - -For code-related questions, comments, and discussions please use the [Celo Forum](https://forum.celo.org) or [Discord](https://chat.celo.org). diff --git a/packages/docs/community/grant-playbook.md b/packages/docs/community/grant-playbook.md deleted file mode 100644 index 49ff470b2c4..00000000000 --- a/packages/docs/community/grant-playbook.md +++ /dev/null @@ -1,69 +0,0 @@ -# Grant Playbook - -The Celo Foundation believes in investing in projects that share Celo’s mission of building an open financial system that creates conditions of prosperity for everyone. This document provides a summary of best practices that grantees are encouraged to follow to further this mission. - -Everyone who engages with the Celo ecosystem must abide by the [Code of Conduct](https://celo.org/code-of-conduct). Please take the time to read through it with your team. - -## Communication Guidelines - -### Social Media Engagement - -Creating an ecosystem that supports and encourages each other is important to the Celo community. As a team, please make sure to actively engage in social media. - -- Setup a Twitter handle for your project (if you don’t have one already) -- Publish (at least) one post per week -- Follow @CeloOrg and @CeloDevs -- Follow projects in your space & fellow grant recipients -- Identify and follow influencers who might be interested in your space. To help you get started, here is a [list](https://twitter.com/i/lists/1247200668470915074) of influencers we follow. -- Post links to your blog posts, repos, etc -- Use the hashtag #CeloGrants so you can join the conversation about the grant program - -### Blog - -Each project should have a dedicated blog. Two suggestions are devpost or Medium. - -- Write a blog post at least once per month/milestone outlining your progress to date (i.e. accomplishments and challenges). Include links to repos, demos, or social media. -- If using Medium, please share your Medium profile tag with [community@celo.org](mailto:community@celo.org) so we may add you as a writer for the Celo Medium Publication -- Here are some writing tips: - - [Celo Blogging Guide](https://docs.google.com/document/d/1pzlosMQxnOAxxHnLa7ES8pgQBRWC7ArMObI9OwU8mBI/edit?usp=sharing) - - [How to write a killer press release](https://medium.com/@DaveCorn/how-to-write-a-killer-press-release-cd34791d6533) - - [How to write a new product announcement](https://medium.com/@emilylope18/how-do-you-write-a-new-product-announcement-4706454adbad) - -## Engagement & Documentation - -### Source Code - -In the spirit of decentralization, The Celo Foundation expects all funded projects to be open-source by default -- this means that the codebase is public and under a permissive license (we recommend [Apache 2.0](https://en.wikipedia.org/wiki/Apache_License)). If there are any parts that need to be kept private (eg. an admin key), please let us know ahead of time (at grants@celo.org), and document it in your project’s README. - -To make sure teams are making progress on projects, send us bi-weekly updates to grants@celo.org. The intent is not to create pressure, but to provide structure and guidance in case things get off track. Some suggestions: - -- Create a top-level README.md to provide a description of your project, goals, features, roadmap and installation instructions. -- Ensure that all work is regularly committed to a repo. Track and close issues. - -### Chat - -- Make sure to ask questions in a relevant Discord channel. [You can join the Celo Discord here.](https://chat.celo.org) The cLabs protocol and product teams are all there and available for questions. Try not to take conversations to direct messages -- by having conversations in an open channel, other groups can also benefit from the technical discussions and learnings. You can tag mentors in public channel messages to ensure your messages are seen. cLabs mentors handles are: `@joshc | cLabs` - -- Please make an effort to remain visible on #general-applications and/or #mobile-development channels in the App Developer section. These channels are dedicated to teams working on projects on the Celo ecosystem. There is a good chance someone has encountered similar challenges. It’s also a great way to find ways to integrate with other projects in the space. -- Please make sure your entire team is in this chat room. -- Also please post your tweets and blog posts so that other grantees can share social media. - -### Office Hours via Video Chat - -If you need additional support and would like to schedule a video call, please reach out to [grants@celo.org](mailto:grants@celo.org) to schedule some time during our weekly office hours. - -## Milestone Reviews & Payment - -Once you have completed a grant milestone, please send an email to [grants@celo.org](mailto:grants@celo.org). The grant committee will then review to ensure objectives have been met. - -After your milestone has been approved by the grant committee, payment will be issued. - -## Evaluating Grant Success - -Before the final payment, grants will be evaluated using the following framework: - -- Engagement: How well you follow best practices & engage with the Celo community -- Visibility: Maintaining transparency on your project accomplishments and challenges -- Roadmap: Ability to reference a list of commits that complete your roadmap -- Timeline/Milestones: Ability to meet your timeline and key milestones -- Launch: Successful launch! diff --git a/packages/docs/community/release-process/README.md b/packages/docs/community/release-process/README.md deleted file mode 100644 index 7f1920a53f0..00000000000 --- a/packages/docs/community/release-process/README.md +++ /dev/null @@ -1,11 +0,0 @@ -# Release Process - -It is critical that updates to the Celo platform can be released on a regular basis, and in a way that ensures the security and reliability of the Celo network. In order to facilitate this, the following release processes are published here. - -{% page-ref page="smart-contracts.md" %} - -{% page-ref page="blockchain-client.md" %} - -{% page-ref page="base-cli-contractkit-dappkit-utils.md" %} - -{% page-ref page="attestation-service.md" %} diff --git a/packages/docs/community/release-process/attestation-service.md b/packages/docs/community/release-process/attestation-service.md deleted file mode 100644 index 6b6b72b4b76..00000000000 --- a/packages/docs/community/release-process/attestation-service.md +++ /dev/null @@ -1,155 +0,0 @@ -# Attestation Service Release Process - -This release process will be adopted from Attestation Service v1.2.0 onwards. - -## Versioning - -Releases of Attestation Service are made as needed. Releases are numbered according to semantic versioning, as described at [semver.org](https://semver.org). - -All builds are identified as `unstable` (a development build) or `stable` (a commit released as a particular version number). There should only ever exist one commit with a version `x.y.z` for any `(x, y, z)`. - -## Documentation - -Documentation is maintained under `packages/docs` directory and is hosted on [docs.celo.org](https://docs.celo.org/validator-guide/attestation-service). - -## Identifying releases - -### Git branches - -Each minor version of Attestation Service has its own “release branch”, e.g. `release/attestation-service/1.0`. - -Development is done on the `master` branch, which corresponds to the next major or minor version. Changes to be included in a patch release of an existing minor version are cherry-picked to that existing release branch. - -### Git tags - -Each release should be [created on Github](https://github.com/celo-org/celo-monorepo/releases) and tagged with the version number, e.g. `attestation-service-vX.Y.Z`. Each release should include a summary of the release contents, including links to pull requests and issues with detailed description of any notable changes. - -Tags should be signed and can be verified with the following command. - -```bash -git verify-tag attestation-service-vX.Y.Z -``` - -On Github, each release tag should have attached signatures that can be used to verify the Docker images. - -### Docker tags - -Each Docker image is tagged with `attestation-service-`. Just as a Git tag immutably points to a commit hash, the Docker tag should immutably point to an image hash. - -In addition, each Docker image correspinding to a released version should be tagged with `attestation-service-vx.y.z`. - -The latest image qualified for deployment to various networks are also tagged as follows: - -- Alfajores: `attestation-service-alfajores` -- Baklava: `attestation-service-baklava` -- Mainnet: `attestation-service-mainnet` - -### Signatures - -Artifacts produced by this build process (e.g. tags, Docker images) will be signed by a [core developer key](https://github.com/celo-org/celo-monorepo/blob/master/developer_key_publishing.md). - -Public keys for core developers are hosted on celo.org and can be imported to `gpg` with the following command: - -```bash -gpg --auto-key-locate wkd --locate-keys $EMAIL -``` - -Currently hosted core developer keys used for Attestation Service releases include: - -- tim@clabs.co - -## Build process - -### Docker images - -Docker images are built automatically with [Google Cloud Build](https://cloud.google.com/cloud-build) upon pushes to `master` and all release branches. Automated builds will be tagged in [Google Container Registry](https://cloud.google.com/container-registry) with the corresponding commit hash. - -A signature should be produced over the image automatically built at the corresponding commit hash and included with the Github release. - -Release image signatures can be verified with the following command: - -```bash -docker save $(docker image inspect us.gcr.io/celo-testnet/celo-monorepo:attestation-service-vX.Y.Z -f '{{ .Id }}') | gpg --verify attestation-service-vX.Y.Z.docker.asc - -``` - -## Testing - -As well as monorepo CI tests, all releases are expected to go through manual testing as needed to verify security properties, accuracy of documentation, and compatibility with deployed and anticipated versions of `celocli` and wallets including Valora. - -This testing should include running the Valora e2e tests. Currently, these expect access to cLabs provisioned credentials for SMS providers. Follow the [Valora mobile build instructions](https://github.com/celo-org/wallet/blob/master/packages/mobile/README.md#setup). Then run: - -```bash -git checkout verification-e2e-tests -cd packages/mobile -yarn test:e2e:ios -t e2e/src/RedeemInviteAndVerify.spec.js -i -``` - -## Promotion process - -### Source control - -Patch releases should be constructed by cherry-picking all included commits from `master` to the `release/attestation-service/x.y` branch. The first commit of this process should change the version number encoded in the source from `x.y.z-stable` to `x.y.z+1-unstable` and the final commit should change the version number to `x.y.z+1-stable`. - -Major and minor releases should be constructed by pushing a commit to the `master` branch to change the encoded version number from `x.y.z-unstable` to `x.y.z`. A `release/attestation-service/x.y` branch should be created from this commit. The next commit must change the version number from `x.y.z-stable` to `x.y+1.0-unstable`, or `x+1.0.0-unstable` if the next planned release is a major release. - -Only one commit should ever have a "stable" tag at any given version number. When that commit is created, a tag should be added along with release notes. Once the tag is published it should not be reused for any further release or changes. - -### Distribution - -Distribution of an image should occur along the following schedule: - - - - - - - - - - - - - - - - - - - - - - -
DateAction
T-1w -
    -
  1. Deploy release candidate build to Alfajores testnet
  2. -
-
T -
    -
  1. Confirm Valora production and testing builds against Alfajores experience no issues and that e2e verification tests complete successfully
  2. -
  3. Publish the Git release notes and tag, and signature of Docker image
  4. -
  5. Communicate T+1w Baklava upgrade date.
  6. -
  7. Tag released Docker image with attestation-service-alfajores
  8. and attestation-service-baklava (removing tags from other releases) -
-
T+1w -
    -
  1. Confirm Baklava users have upgraded without issues and that Baklava attestation bots run successfully
  2. -
  3. Communicate T+2w Mainnet upgrade date
  4. -
  5. Tag released Docker image with attestation-service-mainnet (removing tag from other releases)
  6. -
-
T+2w -
    -
  1. Confirm Mainnet users have upgraded without issues
  2. -
-
- -### Emergency Patches - -Bugs which affect the security, stability, or core functionality of the Celo identity protocol or prevent new users onboarding to wallets including Valora may need to be released outside the standard release cycle. In this case, an emergency patch release should be created on top of all supported minor releases which contains the minimal change and corresponding test for the fix. - -If the issue is not exploitable, release notes should describe the issue in detail and the image should be distributed publicly. - -If the issue is exploitable and mitigations are not readily available, a patch should be prepared privately and signed binaries should be distributed from private commits. Establishing trust is key to pushing out the fix. An audit from a reputable third party may be contracted to verify the release to help earn that trust. - -## Vulnerability Disclosure - -Vulnerabilities in Attestation Service releases should be disclosed according to the [security policy](https://github.com/celo-org/celo-monorepo/blob/master/SECURITY.md). diff --git a/packages/docs/community/release-process/base-cli-contractkit-dappkit-utils.md b/packages/docs/community/release-process/base-cli-contractkit-dappkit-utils.md deleted file mode 100644 index 3d2debad0df..00000000000 --- a/packages/docs/community/release-process/base-cli-contractkit-dappkit-utils.md +++ /dev/null @@ -1,80 +0,0 @@ -# Release Process for Celocli and ContractKit - -## Versioning - -Use the standard MAJOR.MINOR.PATCH semantic versioning scheme described at [semver.org](http://semver.org). - -New releases can be expected as follows: - * Major releases: approximately yearly - * Minor releases: approximately 8 times a year - * Patch releases: as needed - -Development builds will be identified as such: `x.y.z-dev`, and will be published as `x.y.z` when stable. - -## Identifying releases - -### NPM - -You can find the npm packages in the following places: - * [@celo/celocli](https://www.npmjs.com/package/@celo/celocli) - * [@celo/contractkit](https://www.npmjs.com/package/@celo/contractkit) - -### Github tags - -To identify the commits included in a specific release and see which new features were added or bugs fixed, please refer to the [release notes](https://github.com/celo-org/celo-monorepo/releases) in the monorepo. Also to keep track of continual updates to the stable and dev versions of the packages, each package has a `CHANGELOG.md` file: [Celocli](https://github.com/celo-org/celo-monorepo/blob/master/packages/cli/CHANGELOG.md) and [Contractkit](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/CHANGELOG.md). -All releases should be tagged with the version number, e.g. `contractkit-vX.Y.Z`. Each release should include a summary of the release contents, including links to pull requests and issues with detailed description of any notable changes. - -### Communication - -The community will be notified of package updates through the following channels: - -For all releases: - * Each package’s `CHANGELOG.md` file, as mentioned above - * Github releases page, as mentioned above - * [Discord](https://chat.celo.org): #developer-chat, #mainnet, and #sdk - -For major releases: - * Twitter: [@CeloDevs](https://twitter.com/CeloDevs) - * Mailing list: cLabs’ Tech Sync - * [Celo Forum](https://forum.celo.org/) - - - -## Build process - -The packages are published by following the instructions [here](https://github.com/celo-org/celo-monorepo/blob/master/README-dev.md). - -## Testing -All builds of these packages are automatically tested for performance and backwards compatibility in CI. Any regressions in these tests should be considered a blocker for a release. -Minor and major releases are expected to go through additional rounds of manual testing as needed to verify behavior under stress conditions. - -{% hint style="warning" %} -Work in progress -{% endhint %} - -## Promotion process - * For a patch release: The first step of this process should be a commit that changes the version number encoded in the source from `x.y.z-dev` to `x.y.z+1-dev` and the final step should change the published version number from `x.y.z-1` to `x.y.z`. - * For minor releases, the same process should be followed, except the `y` value would increment, and the `z` value would become 0. - * For major releases, the same process should be followed, except the `x` value would increment, and `y` and `z` values would become 0. - -Only one commit should ever have a non-dev tag at any given version number. When that commit is created, a tag should be added along with release notes. Once the tag is published it should not be reused for any further release or changes. - -### Emergency patches -Bugs which affect the security, stability, or core functionality of the network may need to be released outside the standard release cycle. In this case, an emergency patch release should be created on top of all supported minor releases which contains the minimal change and corresponding test for the fix. An emergency patch retro will also be published, and will include information such as why the patch was necessary and what code changes it includes. - -## Vulnerability Disclosure - -Vulnerabilities in any of these releases should be disclosed according to the [security policy](https://github.com/celo-org/celo-blockchain/blob/master/SECURITY.md). - -## Dependencies - - * @celo/mobile - Dappkit relies on this - * Celocli - * All the packages under the ["SDK" folder](https://github.com/celo-org/celo-monorepo/tree/master/packages/sdk) -- These all rely on each other quite bit, so triple check that these packages weren’t affected by a change in another. - -## Dependents - - * Celocli - * All the packages under the ["SDK" folder](https://github.com/celo-org/celo-monorepo/tree/master/packages/sdk) - - diff --git a/packages/docs/community/release-process/blockchain-client.md b/packages/docs/community/release-process/blockchain-client.md deleted file mode 100644 index 056718f8532..00000000000 --- a/packages/docs/community/release-process/blockchain-client.md +++ /dev/null @@ -1,178 +0,0 @@ -# Blockchain Client Release Process - -## Versioning - -Releases of celo-blockchain are numbered according to semantic versioning, as described at [semver.org](https://semver.org). - -New releases of celo-blockchain can be expected as follows: - * Major releases: approximately yearly - * Minor releases: approximately 4 times a year - * Patch releases: as needed - -All builds are identified as `unstable` (a development build) or `stable` (a commit released as a particular version number). There should only ever exist one commit with a version `x.y.z-stable` for any `(x, y, z)`. - -### Signatures - -Artifacts produced by this build process (e.g. tags, binaries, Docker images) will be signed. Signatures are produced using any one of the core developer keys listed below. - -Public keys for corek developers are hosted on celo.org and can be imported to `gpg` with the following command: - -```bash -gpg --auto-key-locate wkd --locate-keys $EMAIL -``` - -Currently hosted core developer keys include: - -* joshua@clabs.co -* mariano@clabs.co -* or@clabs.co -* victor@clabs.co - -## Documentation - -Documentation for client features, such as APIs and commands, are maintained in the `docs` directory within the `celo-blockchain` repository. Documentation on protocol features, such as the proof-of-stake protocol, is hosted on [docs.celo.org](https://docs.celo.org/celo-codebase/protocol). - -## Identifying releases: - -### Git branches -Each minor version of celo-blockchain has its own “release branch”, e.g. `release/1.0`. - -Development is done on the `master` branch, which corresponds to the next major or minor version. Changes to be included in a patch release of an existing minor version are cherry-picked to that existing release branch. - -### Git tags -All releases should be tagged with the version number, e.g. `vX.Y.Z`. Each release should include a summary of the release contents, including links to pull requests and issues with detailed description of any notable changes. - -Tags should be signed and can be verified with the following command. - -```bash -git verify-tag vX.Y.Z -``` - -On Github, each release tag should have attached the Geth binaries for supported platforms, along with signatures that can be used to verify the binary and Docker images. - -### Docker tags -Each released Docker image should should be tagged with it’s version number such that for release `x.y.z`, the image should have tags `x`, `x.y`, and `x.y.z`, with the first two tags potentially being moved from a previous image. Just as a Git tag `x.y.z` immutably points to a commit hash, the Docker tag, `x.y.z` should immutably point to an image hash. - -## Build process - -### Binaries -Binaries for common platforms are built automatically with [Google Cloud Build](https://cloud.google.com/cloud-build) upon pushes to `master` and all release branches. - -A signature should be produced over the binary automatically built at the corresponding commit hash and included in the Github release. - -Release binary signatures can be verified with the following command: - -```bash -gpg --verify celo-blockchain-vX.Y.Z-stable.tar.gz.asc celo-blockchain-vX.Y.Z-stable.tar.gz -``` - -### Docker images -Docker images are built automatically with [Google Cloud Build](https://cloud.google.com/cloud-build) upon pushes to `master` and all release branches. Automated builds will be tagged in [Google Container Registry](https://cloud.google.com/container-registry) with the corresponding commit hash. - -A signature should be produced over the image automatically built at the corresponding commit hash and included with the Github release. - -Release image signatures can be verified with the following command: - -```bash -docker save $(docker image inspect us.gcr.io/celo-org/geth:X.Y.Z -f '{{ .Id }}') | gpg --verify celo-blockchain-vX.Y.Z.docker.asc - -``` - -## Testing - -All builds of `celo-blockchain` are automatically tested for performance and backwards compatibility in CI. Any regressions in these tests should be considered a blocker for a release. - -Minor and major releases are expected to go through additional rounds of manual testing as needed to verify behavior under stress conditions, such as a network with faulty nodes, and poor network connectivity. - -## Promotion process - -### Source control -Patch releases should be constructed by cherry-picking all included commits from `master` to the `release/x.y` branch. The first commit of this process should change the version number encoded in the source from `x.y.z-stable` to `x.y.z+1-unstable` and the final commit should change the version number to `x.y.z+1-stable`. - -Major and minor releases should be constructed by pushing a commit to the `master` branch to change the encoded version number from `x.y.z-unstable` to `x.y.z-stable`. A `release/x.y` branch should be created from this commit. The next commit must change the version number from `x.y.z-stable` to `x.y+1.0-unstable`, or `x+1.0.0-unstable` if the next planned release is a major release. - -Only one commit should ever have a “stable” tag at any given version number. When that commit is created, a tag should be added along with release notes. Once the tag is published it should not be reused for any further release or changes. - -### Distribution -Distribution of an image should occur along the following schedule: - - - - - - - - - - - - - - - - - - - - - - -
DateAction
T -
    -
  1. Publish the Git tag and signed release artifacts.
  2. -
  3. Communicate T+1w Baklava upgrade date.
  4. -
  5. Tag released Docker image with baklava.
  6. -
-
T+1w -
    -
  1. Confirm Baklava users have upgraded without issues
  2. -
  3. If release introduces a hard fork
  4. -
      -
    1. Ensure at least a quorum of the validator set has upgraded
    2. -
    3. Submit governance proposal to increment minimum client version
    4. -
    -
  5. Communicate T+2w Alfajores upgrade date
  6. -
  7. Tag released Docker image with alfajores
  8. -
-
T+2w -
    -
  1. Confirm Alfajores users have upgraded without issues
  2. -
  3. If release introduces a hard fork
  4. -
      -
    1. Ensure at least a quorum of the validator set has upgraded
    2. -
    3. Submit governance proposal to increment minimum client version
    4. -
    -
  5. Communicate T+3w Mainnet upgrade date
  6. -
  7. Tag released Docker image with mainnet and latest
  8. -
-
T+3w -
    -
  1. Confirm Mainnet users have upgraded without issues
  2. -
  3. If release introduces a hard fork
  4. -
      -
    1. Ensure at least a quorum of the validator set has upgraded
    2. -
    3. Submit governance proposal to increment minimum client version
    4. -
    -
-
- -### Emergency Patches -Bugs which affect the security, stability, or core functionality of the network may need to be released outside the standard release cycle. In this case, an emergency patch release should be created on top of all supported minor releases which contains the minimal change and corresponding test for the fix. - -If the issue is not exploitable, release notes should describe the issue in detail and the image should be distributed publicly. If network stability is at risk, a Governance proposal may be submitted to increment the minimum client version. - -If the issue is exploitable and mitigations are not readily available, a patch should be prepared privately and signed binaries should be distributed from private commits. Establishing trust is key to pushing out the fix. An audit from a reputable third party may be contracted to verify the release to help earn that trust. A hotfix should be proposed to raise the minimum client version number to the patched release and then patch details made public. - -> Pushing an upgrade with this process will be disruptive to any nodes that do not upgrade quickly. It should _only_ be used when the circumstances require it. - -## Vulnerability Disclosure - -Vulnerabilities in `celo-blockchain` releases should be disclosed according to the [security policy](https://github.com/celo-org/celo-blockchain/blob/master/SECURITY.md). - -## Dependencies - -None - -## Dependents - -None - diff --git a/packages/docs/community/release-process/smart-contracts.md b/packages/docs/community/release-process/smart-contracts.md deleted file mode 100644 index 40a1829bd10..00000000000 --- a/packages/docs/community/release-process/smart-contracts.md +++ /dev/null @@ -1,389 +0,0 @@ -# Smart Contracts Release Process - -{% hint style="warning" %} -This release process is a work in progress. Many infrastructure components required to execute it are not in place, and the process itself is subject to change. -{% endhint %} - -## Versioning - -Each deployed Celo core smart contract is versioned independently, according to semantic versioning, as described at [semver.org](https://semver.org), with the following modifications: - -- STORAGE version when you make incompatible storage layout changes -- MAJOR version when you make incompatible ABI changes -- MINOR version when you add functionality in a backwards compatible manner, and -- PATCH version when you make backwards compatible bug fixes. - -Changes to core smart contracts are made via on-chain Governance, approximately four times a year. When a release is made, **all** smart contracts from the release branch that differ from the deployed smart contracts are released, and included in the **same** governance proposal. Each release is identified by a unique monotonically increasing version number `N`, with `1` being the first release. - -### Core Contracts - -Every deployed Celo core contract has its current version number as a constant which is publicly accessible via the `getVersion()` function, which returns the storage, major, minor, and patch version. Version number is encoded in the Solidity source and updated as part of code changes. - -Celo Core Contracts deployed to a live network without the `getVersion()` function, such as the original set of core contracts, are to be considered version `1.1.0.0`. - -### Mixins and libraries - -Mixin contracts and libraries are considered part of the contracts that consume them. When a mixin or library has changed, all contracts that consume them should be considered to have changed as well, and thus the contracts should have their version numbers incremented and should be re-deployed as part of the next smart contract release. - -### Initialize Data - -Whenever Celo Core Contracts need to be re-initialized, their initialization arguments should be checked into version control under `packages/protocol/releaseData/initializationData/release${N}.json`. - -### Release management in Git/Github - -Github branches/tags and Github releases are used to coordinate past and ongoing releases. Ongoing smart contract development is done on the `master` branch (even after release branches are cut). Every smart contract release has a designated release branch, e.g. `release/celo-core-contracts/${N}` in the celo-monorepo. - -#### When a new release branch is cut: - -1. A new release branch is created `release/celo-core-contracts/${N}` with the contracts to be audited. -2. The latest commit on the release branch is tagged with `celo-core-contracts-v${N}.pre-audit`. -3. On Github, a pre-release Github release should be created pointing at the latest tag on the release branch. -4. On master branch, `.circleci/config.yml` should be edited so that the variable `RELEASE_TAG` points to the tag `celo-core-contracts-v${N}.pre-audit` so that all future changes to master are versioned against the new release. -5. Ongoing audit responses/fixes should continue to go into `release/celo-core-contracts/${N}`. - -#### During the release proposal stage: - -1. Whenever release candidates are available they should be tagged `celo-core-contracts-v${N}.rc1`, `...rc2`, etc. -2. When a release is getting proposed on a Baklava/Alfajores/Mainnet, the commit that was used (which should be the latest release candidate) should be tagged with `celo-core-contracts-v${N}.(baklava | alfajores | mainnet)`. - -#### After a completed release process: - -1. The release branch should be merged into `master` with a merge commit (instead of the usual squash merge strategy). -2. On master branch, `.circleci/config.yml` should be edited so that the variable `RELEASE_TAG` points to the tag `celo-core-contracts-v${N}.mainnet` - -## Release Process - -There are several scripts provided (under `packages/protocol` in [celo-org/celo-monorepo](https://github.com/celo-org/celo-monorepo) and via [celocli](../../command-line-interface/introduction.md)) for use in the release process and with contract upgrade governance proposals to give participating stakeholders increased confidence. - -{% hint style="warning" %}​ -For these to run, you may need to follow the [setup instructions](https://github.com/celo-org/celo-monorepo/blob/master/SETUP.md). These steps include installing Node and setting `nvm` to use the correct version of Node. Successful `yarn install` and `yarn build` in the protocol package signal a completed setup. -{% endhint %} - -Using these tools, a contract release candidate can be built, deployed, and proposed for upgrade automatically on a specified network. Subsequently, stakeholders can verify the release candidate against a governance upgrade proposal's contents on the network. - -Typical script options: - -- By default, the scripts expect a celo-blockchain RPC at port 8545 locally. With `-f` you can specify the scripts to use a hosted forno node -- By default, scripts will output verbose logs under `/tmp/celo-${script-name}.log`. You can change the location of the log output with `-l file.log` - -### View the tagged releases for each network - -```bash -yarn view-tags -``` - -### Verify the previous Release on the Network - -`verify-deployed` is a script that allows you to assess whether the bytecode on the given network matches the source code of a particular commit. It will run through the Celo Core Contracts and verify that the contracts' bytecodes as specified in the `Registry` match. Here, we will want to sanity-check that our network is running the previous release's audited commit. - -```bash -# Run from `packages/protocol` in the celo-monorepo -NETWORK=${"baklava"|"alfajores"|"mainnet"} -PREVIOUS_RELEASE="celo-core-contracts-v${N-1}.${NETWORK}" -# A -f boolean flag can be provided to use a forno full node to connect to the provided network -yarn verify-deployed -n $NETWORK -b $PREVIOUS_RELEASE -f -``` - -A `libraries.json` file is written to disk only necessary for `make-release` that describes linked library addresses. - -### Check Backward Compatibility - -This script performs some automatic checks to ensure that the smart contract versions in source code have been set correctly with respect to the latest release. It is run as part of CI and helps ensure that backwards incompatibilities are not accidentally introduced by requiring that devs manually update version numbers whenever smart contract changes are made. - -Specifically, it compiles the latest and candidate releases and compares smart contracts: - -1. Storage layout, to detect storage version changes -2. ABI, to detect major and minor version changes -3. Bytecode, to detect patch version changes - -Finally, it checks release candidate smart contract version numbers and requires that they have been updated appropriately since the latest release by following semantic versioning as defined in the [Versioning section](#Versioning) above. - -The following exceptions apply: - -- If the STORAGE version has changed, does not perform backwards compatibility checks -- If the MAJOR version has changed, checks storage layout compatibility but not ABI compatibility - -Critically, this ensures that proxied contracts do not experience storage -collisions between implementation versions. See [this -article](https://docs.openzeppelin.com/upgrades-plugins/1.x/proxies#storage-collisions-between-implementation-versions) -by OpenZeppelin for a good overview of this problem and why it's important to -check for it. -​ -The script generates a detailed report on version changes in JSON format. - -```bash -NETWORK=${"baklava"|"alfajores"|"mainnet"} -PREVIOUS_RELEASE="celo-core-contracts-v${N-1}.${NETWORK}" -RELEASE_CANDIDATE="celo-core-contracts-v${N}.rc${X}" -yarn check-versions -a $PREVIOUS_RELEASE -b $RELEASE_CANDIDATE -r "report.json" -``` - -This should be used in tandem with `verify-deployed -b $PREVIOUS_RELEASE -n $NETWORK` to ensure the compatibility checks compare the release candidate to what is actually active on the network. - -### Deploy the release candidate - -Use the following script to build and deploy a candidate release. This takes as input the corresponding backwards compatibility report and canonical library address mapping to deploy **changed** contracts to the specified network. (Use `-d` to dry-run the deploy). -STORAGE updates are adopted by deploying a new proxy/implementation pair. This script outputs a JSON contract upgrade governance proposal. - -```bash -NETWORK=${"baklava"|"alfajores"|"mainnet"} -RELEASE_CANDIDATE="celo-core-contracts-v${N}.rc${X}" -yarn make-release -b $RELEASE_CANDIDATE -n $NETWORK -r "report.json" -i "releaseData/initializationData/release${N}.json" -p "proposal.json" -l "libraries.json" -``` - -The proposal encodes STORAGE updates by repointing the Registry to the new proxy. Storage compatible upgrades are encoded by repointing the existing proxy's implementation. - -### Submit Upgrade Proposal - -Submit the autogenerated upgrade proposal to the Governance contract for review by voters, outputting a unique identifier. - -```bash -# resultant proposal ID should be communicated publicly -celocli governance:propose --deposit 100e18 --from $YOUR_ADDRESS --jsonTransactions "proposal.json" -``` - -### Fetch Upgrade Proposal - -Fetch the upgrade proposal and output the JSON encoded proposal contents. - -```bash -# Make sure you run at least celocli 0.0.60 -celocli governance:show --proposalID --jsonTransactions "upgrade_proposal.json" -``` - -### Verify Proposed Release Candidate - -This script serves the same purpose as `verify-deployed` but for a not-yet -accepted contract upgrade (in the form of the proposal.json you fetched in the step prior). It gives you the confidence that the branch specified in the `-b` flag in (same as `check-versions`) will be the resulting network state of the proposal if executed. It does so by going over all Celo Core Contracts and determining updates to the Registry pointers, proxy or implementation contracts and verifying their implied bytecode against the compiled source code. - -Additionally, include `initialization_data.json` from the CGP if any of the contracts have to be initialized. - -```bash -RELEASE_CANDIDATE="celo-core-contracts-v${N}.rc${X}" -NETWORK=${"baklava"|"alfajores"|"mainnet"} -# A -f boolean flag can be provided to use a forno full node to connect to the provided network -yarn verify-release -p "upgrade_proposal.json" -b $RELEASE_CANDIDATE -n $NETWORK -f -i initialization_data.json -``` - -### Verify Executed Release - -After a release executes via Governance, you can use `verify-deployed` again to check that the resulting network state does indeed reflect the tagged release candidate: - -```bash -RELEASE="celo-core-contracts-v${N}.rc${X}" -NETWORK=${"baklava"|"alfajores"|"mainnet"} -yarn verify-deployed -n $NETWORK -b $RELEASE -f -``` - -## Testing - -All releases should be evaluated according to the following tests. - -### Unit tests - -All changes since the last release should be covered by unit tests. Unit test coverage should be enforced by automated checks run on every commit. - -### Manual Checklist - -After a successful release execution on a testnet, the resulting network state should be spot-checked to ensure that no regressions have been caused by the release. Flows to test include: - -- Do a cUSD and CELO transfer - ```bash - celocli transfer:dollars --from --value --to - celocli transfer:celo --from --value --to - ``` -- Register a Celo account - ```bash - celocli account:register --from --name - ``` -- Report an Oracle rate - ```bash - celocli oracle:report --from --value - ``` -- Do a CP-DOTO exchange - ```bash - celocli exchange:celo --value --from - celocli exchange:dollars --value --from - ``` -- Complete a round of attestation -- Redeem from Escrow -- Register a Vaildator - ```bash - celocli validator:register --blsKey --blsSignature --ecdsaKey --from - ``` -- Vote for a Validator -- Run a mock election - ```bash - celocli election:run - ``` -- Get a valildator slashed for downtime and ejected from the validator set -- Propose a governance proposal and get it executed - ```bash - celocli governance:propose --jsonTransactions --deposit --from --descriptionURL https://gist.github.com/yorhodes/46430eacb8ed2f73f7bf79bef9d58a33 - ``` - -### Automated environment tests - -Stakeholders can use the `env-tests` package in `celo-monorepo` to run an automated test suite against the network - -### Performance - -A ceiling on the gas consumption for all common operations should be defined and enforced by automated checks run on every commit. - -### Backwards compatibility - -Automated checks should ensure that any new commit to `master` does not introduce a breaking change to storage layout, ABI, or other common backwards compatibility issues unless the STORAGE or MAJOR version numbers are incremented. - -Backwards compatibility tests will also be run before every release to confirm that no breaking changes exist between the pending release and deployed smart contracts. - -### Audits - -All changes since the last release should be audited by a reputable third party auditor. - -### Emergency patches - -If patches need to be applied before the next scheduled smart contract release, they should be cherry picked to a new release branch, branched from the latest deployed release branch. - -## Promotion process - -Deploying a new contract release should occur with the following process. On-chain governance proposals should be submitted on Tuesdays for consistency and predictability. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
DateAction
T -
    -
  1. Create a Github issue tracking all these checklist items as an audit log
  2. -
  3. Implement the git management steps for when a new release branch is cut.
  4. -
  5. Submit release branch to a reputable third party auditor for review.
  6. -
  7. Begin drafting release notes.
  8. -
-
T+1w -
    -
  1. Receive report from auditors.
  2. -
  3. Add audit summary to final draft of the release notes.
  4. -
  5. If all issues in the audit report have straightforward fixes: -
      -
    1. Submit a governance proposal draft using this format: https://github.com/celo-org/celo-proposals/blob/master/CGPs/template.md
    2. -
    3. Add any initialization data to the CGP that should be included as part of the proposal
    4. -
    5. Announce forthcoming smart contract release on: https://forum.celo.org/c/governance
    6. -
    -
  6. -
  7. Commit audit fixes to the release branch
  8. -
  9. Submit audit fixes to auditors for review.
  10. -
  11. Tag the first release candidate commit according to the git release management instructions.
  12. -
  13. Let the community know about the upcoming release proposal by posting details to the Governance category on https://forum.celo.org and cross post in the Discord #governance channel. See the 'Communication guidelines' section below for information on what your post should contain.
  14. -
-
T+2w -
    -
  1. On Tuesday: Run the smart contract release script in order to to deploy the contracts to Baklava as well as submit a governance proposal. -
      -
    • Transition proposal through Baklava governance process.
    • -
    • Tag the commit that is being proposed with celo-core-contracts-v${N}.baklava
    • -
    -
  2. -
  3. Update your forum post with the Baklava PROPOSAL_ID, updated timings (if any changes), and notify the community in the Discord #governance channel.
  4. -
-
T+3w -
    -
  1. Confirm all contracts working as intended on Baklava.
  2. -
  3. Run the smart contract release script in order to to deploy the contracts to Alfajores as well as submit a governance proposal.
  4. -
  5. Tag the commit that is being proposed with celo-core-contracts-v${N}.alfajores
  6. -
  7. Update your forum post with the Alfajores PROPOSAL_ID, updated timings (if any changes), and notify the community in the Discord #governance channel.
  8. -
-
T+4w -
    -
  1. Confirm all contracts working as intended on Alfajores.
  2. -
  3. Confirm audit is complete and make the release notes and forum post contain a link to it.
  4. -
  5. On Tuesday: Run the smart contract release script in order to to deploy the contracts to Mainnet as well as submit a governance proposal.
  6. -
  7. Tag the commit that is being proposed with celo-core-contracts-v${N}.mainnet
  8. -
  9. Update the corresponding governance proposal with the updated on-chain PROPOSAL_ID and mark CGP status as "PROPOSED".
  10. -
  11. Update your forum post with the Mainnet PROPOSAL_ID, updated timings (if any changes), and notify the community in the Discord #governance channel.
  12. -
  13. At this point all stakeholders are encouraged to verify the proposed contracts deployed match the contracts from the release branch.
  14. -
  15. Monitor the progress of the proposal through the governance process. -
      -
    • Currently the governance process should take approximately 1 week: 24 hours for the dequeue process, 24 hours for the approval process, and 5 days for the referendum process. After which, the proposal is either declined or is ready to be executed within 3 days.
    • -
    • For updated timeframes, use the celocli: celocli network:parameters
    • -
    -
  16. -
-
T+5w -
    -
  1. If the proposal passed: -
      -
    1. Confirm all contracts working as intended on Mainnet.
    2. -
    3. Update your forum post with the Mainnet governance outcome (Passed or Rejected) and notify the community in the Discord #governance channel.
    4. -
    5. Change corresponding CGP status to EXCECUTED.
    6. -
    7. Merge the release branch into master with a merge commit
    8. -
    -
  2. If the proposal failed: -
      -
    1. Change corresponding CGP status to EXPIRED.
    2. -
    -
  3. -
-
- -If the contents of the release (i.e. source Git commit) change at any point after the release has been tagged in Git, the process should increment the release identifier, and process should start again from the beginning. If the changes are small or do not introduce new code (e.g. reverting a contract to a previous version) the audit step may be accelerated. - -### Communication guidelines - -Communicating the upcoming governance proposal to the community is critical and may help getting it approved. - -Each smart contract release governance proposal should be accompanied by a [Governance category](https://forum.celo.org/c/governance/) forum post that contains the following information: - -- Name of proposer (individual contributor or organization). -- Background information. -- Link to the release on Github. -- Link to the audit report(s). -- Anticipated timings for the Baklava and Alfajores testnets and Mainnet. - -It's recommended to post as early as possible and at minimum one week before the anticipated Baklava testnet governance proposal date. - -Make sure to keep the post up to date. All updates (excluding fixing typos) should be communicated to the community in the [Discord](http://chat.celo.org/) `#governance` channel. - -### Emergency patches - -{% hint style="warning" %} -Work in progress -{% endhint %} - -## Vulnerability Disclosure - -Vulnerabilities in smart contract releases should be disclosed according to the [security policy](https://github.com/celo-org/celo-monorepo/blob/master/SECURITY.md). - -## Dependencies - -None - -## Dependents - -{% hint style="warning" %} -Work in progress -{% endhint %} diff --git a/packages/docs/developer-resources/base/reference/README.md b/packages/docs/developer-resources/base/reference/README.md deleted file mode 100644 index cd031d3ffe8..00000000000 --- a/packages/docs/developer-resources/base/reference/README.md +++ /dev/null @@ -1,162 +0,0 @@ -# @celo/base - -

- - celo logo - -

- -**Celo Monorepo - Official repository for core projects comprising the Celo platform** - -This repository contains the source code for the Celo core projects including the [smart contracts](https://github.com/celo-org/celo-monorepo/tree/master/packages/protocol), [wallet app](https://github.com/celo-org/celo-monorepo/tree/master/packages/mobile), -and other packages. The source code for the Celo Blockchain which operates a node on the Celo Network is kept in a separate repo [here](https://github.com/celo-org/celo-blockchain). - - - -[![CircleCI](https://img.shields.io/circleci/build/github/celo-org/celo-monorepo/master)](https://circleci.com/gh/celo-org/celo-monorepo/tree/master) -[![Codecov](https://img.shields.io/codecov/c/github/celo-org/celo-monorepo)](https://codecov.io/gh/celo-org/celo-monorepo) -[![GitHub contributors](https://img.shields.io/github/contributors/celo-org/celo-monorepo)](https://github.com/celo-org/celo-monorepo/graphs/contributors) -[![GitHub commit activity](https://img.shields.io/github/commit-activity/w/celo-org/celo-monorepo)](https://github.com/celo-org/celo-monorepo/graphs/contributors) -[![GitHub Stars](https://img.shields.io/github/stars/celo-org/celo-monorepo.svg)](https://github.com/celo-org/celo-monorepo/stargazers) -![GitHub repo size](https://img.shields.io/github/repo-size/celo-org/celo-monorepo) -[![GitHub](https://img.shields.io/github/license/celo-org/celo-monorepo?color=blue)](https://github.com/celo-org/celo-monorepo/blob/master/LICENSE) - - - -[![Website celo.org](https://img.shields.io/website-up-down-green-red/https/celo.org.svg)](https://celo.org) -[![Blog](https://img.shields.io/badge/blog-up-green)](https://medium.com/celoorg) -[![docs](https://img.shields.io/badge/docs-up-green)](https://docs.celo.org/) -[![Youtube](https://img.shields.io/badge/YouTube%20channel-up-green)](https://www.youtube.com/channel/UCCZgos_YAJSXm5QX5D5Wkcw/videos?view=0&sort=p&flow=grid) -[![forum](https://img.shields.io/badge/forum-up-green)](https://forum.celo.org) -[![Discord](https://img.shields.io/discord/600834479145353243.svg)](https://discord.gg/RfHQKtY) -[![Twitter CeloDevs](https://img.shields.io/twitter/follow/celodevs?style=social)](https://twitter.com/celodevs) -[![Twitter CeloOrg](https://img.shields.io/twitter/follow/celoorg?style=social)](https://twitter.com/CeloOrg) -[![Subreddit subscribers](https://img.shields.io/reddit/subreddit-subscribers/CeloHQ?style=social)](https://www.reddit.com/r/CeloHQ/) - - - -[![GitHub pull requests by-label](https://img.shields.io/github/issues-pr-raw/celo-org/celo-monorepo)](https://github.com/celo-org/celo-monorepo/pulls) -[![GitHub Issues](https://img.shields.io/github/issues-raw/celo-org/celo-monorepo.svg)](https://github.com/celo-org/celo-monorepo/issues) -[![GitHub issues by-label](https://img.shields.io/github/issues/celo-org/celo-monorepo/1%20hour%20tasks)](https://github.com/celo-org/celo-monorepo/issues?q=is%3Aopen+is%3Aissue+label%3A%221+hour+tasks%22) -[![GitHub issues by-label](https://img.shields.io/github/issues/celo-org/celo-monorepo/betanet-phase-2)](https://github.com/celo-org/celo-monorepo/issues?q=is%3Aopen+is%3Aissue+label%3Abetanet-phase-2) -[![GitHub issues by-label](https://img.shields.io/github/issues/celo-org/celo-monorepo/betanet-phase-3)](https://github.com/celo-org/celo-monorepo/issues?q=is%3Aopen+is%3Aissue+label%3Abetanet-phase-3) - -Contents: - - - -- [Celo's Mission - Prosperity for All](#mission) -- [The Celo Stack](#stack) -- [Documentation](#docs) -- [Issues](#issues) -- [Repo Structure](#repo) -- [Contributing](#contributing) -- [Ask Questions, Find Answers, Get in Touch](#ask) -- [License](#license) - - -## 🥅 Celo's Mission - Prosperity for All - -Celo, pronounced /ˈtselo/, means ‘purpose’ in Esperanto. In a similar spirit, we are aiming to create a new platform to connect people globally and bring financial stability to those who need it most. We believe blockchain technology is one of the most exciting innovations in recent history and as a community we look to push the boundaries of what is possible with it today. More importantly, we are driven by purpose -- to solve real-world problems such as lack of access to sound currency, or friction for cash-transfer programs aimed to alleviate poverty. Our mission is to build a monetary system that creates the conditions for prosperity for all. - - -

- - Play on Youtube - What if money were beautiful - -
- What if money were beautiful? -

- -## 🧱 The Celo Stack - -Celo is oriented around providing the simplest possible experience for end users, who may have no familiarity with cryptocurrencies, and may be using low cost devices with limited connectivity. To achieve this, the project takes a full-stack approach, where each layer of the stack is designed with the end user in mind whilst considering other stakeholders \(e.g. operators of nodes in the network\) involved in enabling the end user experience. - -The Celo stack is structured into the following logical layers: - - -

- Celo protocol -
- The Celo Blockchain and Celo Core Contracts together comprise the Celo Protocol -

- -- **Celo Blockchain**: An open cryptographic protocol that allows applications to make transactions with and run smart contracts in a secure and decentralized fashion. The Celo Blockchain has shared ancestry with [Ethereum](https://www.ethereum.org), and maintains full EVM compatibility for smart contracts. However it uses a [Byzantine Fault Tolerant](http://pmg.csail.mit.edu/papers/osdi99.pdf) \(BFT\) consensus mechanism rather than Proof of Work, and has different block format, transaction format, client synchronization protocols, and gas payment and pricing mechanisms. The network’s native asset is Celo Gold, exposed via an ERC-20 interface. - -- **Celo Core Contracts**: A set of smart contracts running on the Celo Blockchain that comprise much of the logic of the platform features including ERC-20 stable currencies, identity attestations, Proof of Stake and governance. These smart contracts are upgradeable and managed by the decentralized governance process. - - -

- Celo network -
- Topology of a Celo Network -

- -- **Applications:** Applications for end users built on the Celo platform. The Celo Wallet app, the first of an ecosystem of applications, allows end users to manage accounts and make payments securely and simply by taking advantage of the innovations in the Celo protocol. Applications take the form of external mobile or backend software: they interact with the Celo Blockchain to issue transactions and invoke code that forms the Celo Core Contracts’ API. Third parties can also deploy custom smart contracts that their own applications can invoke, which in turn can leverage Celo Core Contracts. Applications may use centralized cloud services to provide some of their functionality: in the case of the Celo Wallet, push notifications and a transaction activity feed. - -## 📚 Documentation - -Follow the instructions in [SETUP.md](SETUP.md) to get a development environment set up. - -See [Developer's Guide](https://docs.celo.org/) for full details about the design of the Celo protocol and other information about running these projects. - -## 🙋 Issues - -See the [issue backlog](https://github.com/celo-org/celo-monorepo/issues) for a list of active or proposed tasks. Feel free to create new issues to report bugs and/or request features. - -## 📂 Repo Structure - -The repository has the following packages (sub projects): - -- [attestation-service](packages/attestation-service) - service run by validators on the Celo network to send SMS messages, enabling attestations of user phone numbers and their accounts on the Celo network -- [blockchain-api](packages/blockchain-api) - service that uses Blockscout to present view of transactions by account for Celo Wallet activity feed -- [celotool](packages/celotool) - scripts for deploying and managing testnets -- [cli](packages/cli) - tool that uses ContractKit to interact with the Celo protocol ([docs](https://docs.celo.org/getting-started/using-the-cli)) -- [contractkit](packages/contractkit) - library to help developers and validators interact with the protocol and it's smart contracts ([docs](https://docs.celo.org/celo-sdk/contractkit)) -- [dappkit](packages/dappkit) - set of functions for mobile DApps to work with the wallet app (ex. sign transactions and access the user's account) ([docs](https://docs.celo.org/celo-sdk/dappkit)) -- [dev-utils](packages/dev-utils) - a utils package for use as a dev dependency -- [docs](packages/docs) - technical documentation for the Celo project ([live](https://docs.celo.org/)) -- [faucet](packages/faucet) - faucet deployment configuration ([live](https://celo.org/build/faucet)) -- [helm-charts](packages/helm-charts) - templatized deployments of entire environments to Kubernetes clusters -- [mobile](packages/mobile) - Android wallet app for the Celo platform ([docs](https://docs.celo.org/getting-started/using-the-mobile-wallet), [live](https://play.google.com/store/apps/details?id=org.celo.mobile.alfajores)) -- [notification-service](packages/notification-service) - service for managing push notifications for Celo Wallet -- [protocol](packages/protocol) - identity, stability and other smart contracts for the Celo protocol ([docs](https://docs.celo.org/celo-codebase/protocol)) -- [react-components](packages/react-components) - generalized react native components -- [reserve-site](packages/reserve-site) - website for ([Celo Reserve.org](https://celoreserve.org/)) -- [terraform-modules](packages/terraform-modules) - templatized deployments of entire VM-based testnets for Google Cloud Platform -- [typescript](packages/typescript) - no README available (improve?) -- [utils](packages/utils) - no README available (improve?) - -Code owners for each package can be found in [.github/CODEOWNERS](.github/CODEOWNERS). - -## ✍️ Contributing - -Feel free to jump on the Celo 🚂🚋🚋🚋. Improvements and contributions are highly encouraged! 🙏👊 - -See the [contributing guide](https://docs.celo.org/community/contributing) for details on how to participate. -[![GitHub issues by-label](https://img.shields.io/github/issues/celo-org/celo-monorepo/1%20hour%20tasks)](https://github.com/celo-org/celo-monorepo/issues?q=is%3Aopen+is%3Aissue+label%3A%221+hour+tasks%22) - -All communication and contributions to the Celo project are subject to the [Celo Code of Conduct](https://celo.org/code-of-conduct). - -Not yet ready to contribute but do like the project? Support Celo with a ⭐ or share the love in a [![Twitter URL](https://img.shields.io/twitter/url?style=social&url=https%3A%2F%2Fcelo.org%2F)](https://twitter.com/intent/tweet?url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DkKggE5OvyhE&via=celohq&text=Checkout%20celo%21%20Love%20what%20they%20are%20building.&hashtags=celo) - - - -## 💬 Ask Questions, Find Answers, Get in Touch - -- [Website](https://celo.org/) -- [Docs](https://docs.celo.org/) -- [Blog](https://medium.com/celohq) -- [YouTube](https://www.youtube.com/channel/UCCZgos_YAJSXm5QX5D5Wkcw/videos?view=0&sort=p&flow=grid) -- [Forum](https://forum.celo.org) -- [Discord](https://discord.gg/vRbExjv) -- [Twitter](https://twitter.com/CeloDevs) -- [Reddit](https://www.reddit.com/r/CeloHQ/) -- [Community Events](https://celo.org/community) - -## 📜 License - -All packages are licensed under the terms of the [Apache 2.0 License](LICENSE) unless otherwise specified in the LICENSE file at package's root. diff --git a/packages/docs/developer-resources/base/reference/SUMMARY.md b/packages/docs/developer-resources/base/reference/SUMMARY.md deleted file mode 100644 index ef52ca4d989..00000000000 --- a/packages/docs/developer-resources/base/reference/SUMMARY.md +++ /dev/null @@ -1,78 +0,0 @@ -* [Globals](globals.md) -* [Modules]() - * [account](modules/_account_.md) - * [MnemonicLanguages](enums/_account_.mnemoniclanguages.md) - * [MnemonicStrength](enums/_account_.mnemonicstrength.md) - * [Bip39](interfaces/_account_.bip39.md) - * [address](modules/_address_.md) - * [async](modules/_async_.md) - * [attestations](modules/_attestations_.md) - * [IdentifierType](enums/_attestations_.identifiertype.md) - * [AttestationsStatus](interfaces/_attestations_.attestationsstatus.md) - * [collections](modules/_collections_.md) - * [AddressListItem](interfaces/_collections_.addresslistitem.md) - * [contacts](modules/_contacts_.md) - * [ContactPhoneNumber](interfaces/_contacts_.contactphonenumber.md) - * [MinimalContact](interfaces/_contacts_.minimalcontact.md) - * [currencies](modules/_currencies_.md) - * [CURRENCY_ENUM](enums/_currencies_.currency_enum.md) - * [SHORT_CURRENCIES](enums/_currencies_.short_currencies.md) - * [displayFormatting](modules/_displayformatting_.md) - * [future](modules/_future_.md) - * [Future](classes/_future_.future.md) - * [inputValidation](modules/_inputvalidation_.md) - * [ValidatorKind](enums/_inputvalidation_.validatorkind.md) - * [BaseProps](interfaces/_inputvalidation_.baseprops.md) - * [io](modules/_io_.md) - * [lock](modules/_lock_.md) - * [Lock](classes/_lock_.lock.md) - * [logger](modules/_logger_.md) - * [parsing](modules/_parsing_.md) - * [phoneNumbers](modules/_phonenumbers_.md) - * [ParsedPhoneNumber](interfaces/_phonenumbers_.parsedphonenumber.md) - * [result](modules/_result_.md) - * [JSONParseError](classes/_result_.jsonparseerror.md) - * [RootError](classes/_result_.rooterror.md) - * [BaseError](interfaces/_result_.baseerror.md) - * [ErrorResult](interfaces/_result_.errorresult.md) - * [OkResult](interfaces/_result_.okresult.md) - * [signatureUtils](modules/_signatureutils_.md) - * [Signature](interfaces/_signatureutils_.signature.md) - * [Signer](interfaces/_signatureutils_.signer.md) - * [string](modules/_string_.md) - * [task](modules/_task_.md) - * [RepeatTaskContext](interfaces/_task_.repeattaskcontext.md) - * [RetryTaskOptions](interfaces/_task_.retrytaskoptions.md) - * [RunningTask](interfaces/_task_.runningtask.md) - * [RunningTaskWithValue](interfaces/_task_.runningtaskwithvalue.md) - * [TaskOptions](interfaces/_task_.taskoptions.md) -* [Classes]() - * [Future](classes/_future_.future.md) - * [Lock](classes/_lock_.lock.md) - * [JSONParseError](classes/_result_.jsonparseerror.md) - * [RootError](classes/_result_.rooterror.md) -* [Enums]() - * [MnemonicLanguages](enums/_account_.mnemoniclanguages.md) - * [MnemonicStrength](enums/_account_.mnemonicstrength.md) - * [IdentifierType](enums/_attestations_.identifiertype.md) - * [CURRENCY_ENUM](enums/_currencies_.currency_enum.md) - * [SHORT_CURRENCIES](enums/_currencies_.short_currencies.md) - * [ValidatorKind](enums/_inputvalidation_.validatorkind.md) -* [Interfaces]() - * [Bip39](interfaces/_account_.bip39.md) - * [AttestationsStatus](interfaces/_attestations_.attestationsstatus.md) - * [AddressListItem](interfaces/_collections_.addresslistitem.md) - * [ContactPhoneNumber](interfaces/_contacts_.contactphonenumber.md) - * [MinimalContact](interfaces/_contacts_.minimalcontact.md) - * [BaseProps](interfaces/_inputvalidation_.baseprops.md) - * [ParsedPhoneNumber](interfaces/_phonenumbers_.parsedphonenumber.md) - * [BaseError](interfaces/_result_.baseerror.md) - * [ErrorResult](interfaces/_result_.errorresult.md) - * [OkResult](interfaces/_result_.okresult.md) - * [Signature](interfaces/_signatureutils_.signature.md) - * [Signer](interfaces/_signatureutils_.signer.md) - * [RepeatTaskContext](interfaces/_task_.repeattaskcontext.md) - * [RetryTaskOptions](interfaces/_task_.retrytaskoptions.md) - * [RunningTask](interfaces/_task_.runningtask.md) - * [RunningTaskWithValue](interfaces/_task_.runningtaskwithvalue.md) - * [TaskOptions](interfaces/_task_.taskoptions.md) \ No newline at end of file diff --git a/packages/docs/developer-resources/base/reference/classes/_future_.future.md b/packages/docs/developer-resources/base/reference/classes/_future_.future.md deleted file mode 100644 index b33ac489e40..00000000000 --- a/packages/docs/developer-resources/base/reference/classes/_future_.future.md +++ /dev/null @@ -1,109 +0,0 @@ -# Class: Future <**T**> - -## Type parameters - -▪ **T** - -## Hierarchy - -* **Future** - -## Index - -### Constructors - -* [constructor](_future_.future.md#constructor) - -### Accessors - -* [error](_future_.future.md#error) -* [finished](_future_.future.md#finished) - -### Methods - -* [asPromise](_future_.future.md#aspromise) -* [reject](_future_.future.md#reject) -* [resolve](_future_.future.md#resolve) -* [wait](_future_.future.md#wait) - -## Constructors - -### constructor - -\+ **new Future**(): *[Future](_future_.future.md)* - -*Defined in [packages/sdk/base/src/future.ts:7](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/future.ts#L7)* - -**Returns:** *[Future](_future_.future.md)* - -## Accessors - -### error - -• **get error**(): *any* - -*Defined in [packages/sdk/base/src/future.ts:20](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/future.ts#L20)* - -**Returns:** *any* - -___ - -### finished - -• **get finished**(): *boolean* - -*Defined in [packages/sdk/base/src/future.ts:16](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/future.ts#L16)* - -**Returns:** *boolean* - -## Methods - -### asPromise - -▸ **asPromise**(): *Promise‹T›* - -*Defined in [packages/sdk/base/src/future.ts:40](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/future.ts#L40)* - -**Returns:** *Promise‹T›* - -___ - -### reject - -▸ **reject**(`error`: any): *void* - -*Defined in [packages/sdk/base/src/future.ts:30](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/future.ts#L30)* - -**Parameters:** - -Name | Type | ------- | ------ | -`error` | any | - -**Returns:** *void* - -___ - -### resolve - -▸ **resolve**(`value`: T): *void* - -*Defined in [packages/sdk/base/src/future.ts:24](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/future.ts#L24)* - -**Parameters:** - -Name | Type | ------- | ------ | -`value` | T | - -**Returns:** *void* - -___ - -### wait - -▸ **wait**(): *Promise‹T›* - -*Defined in [packages/sdk/base/src/future.ts:36](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/future.ts#L36)* - -**Returns:** *Promise‹T›* diff --git a/packages/docs/developer-resources/base/reference/classes/_lock_.lock.md b/packages/docs/developer-resources/base/reference/classes/_lock_.lock.md deleted file mode 100644 index da4f8f714a3..00000000000 --- a/packages/docs/developer-resources/base/reference/classes/_lock_.lock.md +++ /dev/null @@ -1,57 +0,0 @@ -# Class: Lock - -## Hierarchy - -* **Lock** - -## Index - -### Constructors - -* [constructor](_lock_.lock.md#constructor) - -### Methods - -* [acquire](_lock_.lock.md#acquire) -* [release](_lock_.lock.md#release) -* [tryAcquire](_lock_.lock.md#tryacquire) - -## Constructors - -### constructor - -\+ **new Lock**(): *[Lock](_lock_.lock.md)* - -*Defined in [packages/sdk/base/src/lock.ts:12](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/lock.ts#L12)* - -**Returns:** *[Lock](_lock_.lock.md)* - -## Methods - -### acquire - -▸ **acquire**(): *Promise‹void›* - -*Defined in [packages/sdk/base/src/lock.ts:29](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/lock.ts#L29)* - -**Returns:** *Promise‹void›* - -___ - -### release - -▸ **release**(): *void* - -*Defined in [packages/sdk/base/src/lock.ts:54](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/lock.ts#L54)* - -**Returns:** *void* - -___ - -### tryAcquire - -▸ **tryAcquire**(): *boolean* - -*Defined in [packages/sdk/base/src/lock.ts:20](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/lock.ts#L20)* - -**Returns:** *boolean* diff --git a/packages/docs/developer-resources/base/reference/classes/_result_.jsonparseerror.md b/packages/docs/developer-resources/base/reference/classes/_result_.jsonparseerror.md deleted file mode 100644 index 96497dd4efe..00000000000 --- a/packages/docs/developer-resources/base/reference/classes/_result_.jsonparseerror.md +++ /dev/null @@ -1,93 +0,0 @@ -# Class: JSONParseError - -## Hierarchy - - ↳ [RootError](_result_.rooterror.md)‹string› - - ↳ **JSONParseError** - -## Implements - -* [BaseError](../interfaces/_result_.baseerror.md)‹string› - -## Index - -### Constructors - -* [constructor](_result_.jsonparseerror.md#constructor) - -### Properties - -* [error](_result_.jsonparseerror.md#readonly-error) -* [errorType](_result_.jsonparseerror.md#readonly-errortype) -* [message](_result_.jsonparseerror.md#message) -* [name](_result_.jsonparseerror.md#name) -* [stack](_result_.jsonparseerror.md#optional-stack) - -## Constructors - -### constructor - -\+ **new JSONParseError**(`error`: [Error](_result_.rooterror.md#static-error)): *[JSONParseError](_result_.jsonparseerror.md)* - -*Overrides [RootError](_result_.rooterror.md).[constructor](_result_.rooterror.md#constructor)* - -*Defined in [packages/sdk/base/src/result.ts:79](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/result.ts#L79)* - -**Parameters:** - -Name | Type | ------- | ------ | -`error` | [Error](_result_.rooterror.md#static-error) | - -**Returns:** *[JSONParseError](_result_.jsonparseerror.md)* - -## Properties - -### `Readonly` error - -• **error**: *[Error](_result_.rooterror.md#static-error)* - -*Defined in [packages/sdk/base/src/result.ts:80](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/result.ts#L80)* - -___ - -### `Readonly` errorType - -• **errorType**: *string* - -*Implementation of [BaseError](../interfaces/_result_.baseerror.md).[errorType](../interfaces/_result_.baseerror.md#errortype)* - -*Inherited from [RootError](_result_.rooterror.md).[errorType](_result_.rooterror.md#readonly-errortype)* - -*Defined in [packages/sdk/base/src/result.ts:67](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/result.ts#L67)* - -___ - -### message - -• **message**: *string* - -*Inherited from [RootError](_result_.rooterror.md).[message](_result_.rooterror.md#message)* - -Defined in node_modules/typescript/lib/lib.es5.d.ts:974 - -___ - -### name - -• **name**: *string* - -*Inherited from [RootError](_result_.rooterror.md).[name](_result_.rooterror.md#name)* - -Defined in node_modules/typescript/lib/lib.es5.d.ts:973 - -___ - -### `Optional` stack - -• **stack**? : *undefined | string* - -*Inherited from [RootError](_result_.rooterror.md).[stack](_result_.rooterror.md#optional-stack)* - -Defined in node_modules/typescript/lib/lib.es5.d.ts:975 diff --git a/packages/docs/developer-resources/base/reference/classes/_result_.rooterror.md b/packages/docs/developer-resources/base/reference/classes/_result_.rooterror.md deleted file mode 100644 index b980368e76c..00000000000 --- a/packages/docs/developer-resources/base/reference/classes/_result_.rooterror.md +++ /dev/null @@ -1,95 +0,0 @@ -# Class: RootError <**T**> - -## Type parameters - -▪ **T** - -## Hierarchy - -* [Error](_result_.rooterror.md#static-error) - - ↳ **RootError** - - ↳ [JSONParseError](_result_.jsonparseerror.md) - -## Implements - -* [BaseError](../interfaces/_result_.baseerror.md)‹T› - -## Index - -### Constructors - -* [constructor](_result_.rooterror.md#constructor) - -### Properties - -* [errorType](_result_.rooterror.md#readonly-errortype) -* [message](_result_.rooterror.md#message) -* [name](_result_.rooterror.md#name) -* [stack](_result_.rooterror.md#optional-stack) -* [Error](_result_.rooterror.md#static-error) - -## Constructors - -### constructor - -\+ **new RootError**(`errorType`: T): *[RootError](_result_.rooterror.md)* - -*Defined in [packages/sdk/base/src/result.ts:66](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/result.ts#L66)* - -**Parameters:** - -Name | Type | ------- | ------ | -`errorType` | T | - -**Returns:** *[RootError](_result_.rooterror.md)* - -## Properties - -### `Readonly` errorType - -• **errorType**: *T* - -*Implementation of [BaseError](../interfaces/_result_.baseerror.md).[errorType](../interfaces/_result_.baseerror.md#errortype)* - -*Defined in [packages/sdk/base/src/result.ts:67](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/result.ts#L67)* - -___ - -### message - -• **message**: *string* - -*Inherited from [RootError](_result_.rooterror.md).[message](_result_.rooterror.md#message)* - -Defined in node_modules/typescript/lib/lib.es5.d.ts:974 - -___ - -### name - -• **name**: *string* - -*Inherited from [RootError](_result_.rooterror.md).[name](_result_.rooterror.md#name)* - -Defined in node_modules/typescript/lib/lib.es5.d.ts:973 - -___ - -### `Optional` stack - -• **stack**? : *undefined | string* - -*Inherited from [RootError](_result_.rooterror.md).[stack](_result_.rooterror.md#optional-stack)* - -Defined in node_modules/typescript/lib/lib.es5.d.ts:975 - -___ - -### `Static` Error - -▪ **Error**: *ErrorConstructor* - -Defined in node_modules/typescript/lib/lib.es5.d.ts:984 diff --git a/packages/docs/developer-resources/base/reference/enums/_account_.mnemoniclanguages.md b/packages/docs/developer-resources/base/reference/enums/_account_.mnemoniclanguages.md deleted file mode 100644 index f8938a57d68..00000000000 --- a/packages/docs/developer-resources/base/reference/enums/_account_.mnemoniclanguages.md +++ /dev/null @@ -1,87 +0,0 @@ -# Enumeration: MnemonicLanguages - -## Index - -### Enumeration members - -* [chinese_simplified](_account_.mnemoniclanguages.md#chinese_simplified) -* [chinese_traditional](_account_.mnemoniclanguages.md#chinese_traditional) -* [english](_account_.mnemoniclanguages.md#english) -* [french](_account_.mnemoniclanguages.md#french) -* [italian](_account_.mnemoniclanguages.md#italian) -* [japanese](_account_.mnemoniclanguages.md#japanese) -* [korean](_account_.mnemoniclanguages.md#korean) -* [portuguese](_account_.mnemoniclanguages.md#portuguese) -* [spanish](_account_.mnemoniclanguages.md#spanish) - -## Enumeration members - -### chinese_simplified - -• **chinese_simplified**: - -*Defined in [packages/sdk/base/src/account.ts:9](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/account.ts#L9)* - -___ - -### chinese_traditional - -• **chinese_traditional**: - -*Defined in [packages/sdk/base/src/account.ts:10](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/account.ts#L10)* - -___ - -### english - -• **english**: - -*Defined in [packages/sdk/base/src/account.ts:11](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/account.ts#L11)* - -___ - -### french - -• **french**: - -*Defined in [packages/sdk/base/src/account.ts:12](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/account.ts#L12)* - -___ - -### italian - -• **italian**: - -*Defined in [packages/sdk/base/src/account.ts:13](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/account.ts#L13)* - -___ - -### japanese - -• **japanese**: - -*Defined in [packages/sdk/base/src/account.ts:14](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/account.ts#L14)* - -___ - -### korean - -• **korean**: - -*Defined in [packages/sdk/base/src/account.ts:15](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/account.ts#L15)* - -___ - -### portuguese - -• **portuguese**: - -*Defined in [packages/sdk/base/src/account.ts:17](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/account.ts#L17)* - -___ - -### spanish - -• **spanish**: - -*Defined in [packages/sdk/base/src/account.ts:16](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/account.ts#L16)* diff --git a/packages/docs/developer-resources/base/reference/enums/_account_.mnemonicstrength.md b/packages/docs/developer-resources/base/reference/enums/_account_.mnemonicstrength.md deleted file mode 100644 index ab38d5b7237..00000000000 --- a/packages/docs/developer-resources/base/reference/enums/_account_.mnemonicstrength.md +++ /dev/null @@ -1,24 +0,0 @@ -# Enumeration: MnemonicStrength - -## Index - -### Enumeration members - -* [s128_12words](_account_.mnemonicstrength.md#s128_12words) -* [s256_24words](_account_.mnemonicstrength.md#s256_24words) - -## Enumeration members - -### s128_12words - -• **s128_12words**: = 128 - -*Defined in [packages/sdk/base/src/account.ts:4](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/account.ts#L4)* - -___ - -### s256_24words - -• **s256_24words**: = 256 - -*Defined in [packages/sdk/base/src/account.ts:5](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/account.ts#L5)* diff --git a/packages/docs/developer-resources/base/reference/enums/_attestations_.identifiertype.md b/packages/docs/developer-resources/base/reference/enums/_attestations_.identifiertype.md deleted file mode 100644 index 9c5578d7e05..00000000000 --- a/packages/docs/developer-resources/base/reference/enums/_attestations_.identifiertype.md +++ /dev/null @@ -1,15 +0,0 @@ -# Enumeration: IdentifierType - -## Index - -### Enumeration members - -* [PHONE_NUMBER](_attestations_.identifiertype.md#phone_number) - -## Enumeration members - -### PHONE_NUMBER - -• **PHONE_NUMBER**: = 0 - -*Defined in [packages/sdk/base/src/attestations.ts:8](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/attestations.ts#L8)* diff --git a/packages/docs/developer-resources/base/reference/enums/_currencies_.currency_enum.md b/packages/docs/developer-resources/base/reference/enums/_currencies_.currency_enum.md deleted file mode 100644 index 88b21a08a47..00000000000 --- a/packages/docs/developer-resources/base/reference/enums/_currencies_.currency_enum.md +++ /dev/null @@ -1,24 +0,0 @@ -# Enumeration: CURRENCY_ENUM - -## Index - -### Enumeration members - -* [DOLLAR](_currencies_.currency_enum.md#dollar) -* [GOLD](_currencies_.currency_enum.md#gold) - -## Enumeration members - -### DOLLAR - -• **DOLLAR**: = "Celo Dollar" - -*Defined in [packages/sdk/base/src/currencies.ts:3](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/currencies.ts#L3)* - -___ - -### GOLD - -• **GOLD**: = "Celo Gold" - -*Defined in [packages/sdk/base/src/currencies.ts:2](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/currencies.ts#L2)* diff --git a/packages/docs/developer-resources/base/reference/enums/_currencies_.short_currencies.md b/packages/docs/developer-resources/base/reference/enums/_currencies_.short_currencies.md deleted file mode 100644 index 0fb787644f2..00000000000 --- a/packages/docs/developer-resources/base/reference/enums/_currencies_.short_currencies.md +++ /dev/null @@ -1,24 +0,0 @@ -# Enumeration: SHORT_CURRENCIES - -## Index - -### Enumeration members - -* [DOLLAR](_currencies_.short_currencies.md#dollar) -* [GOLD](_currencies_.short_currencies.md#gold) - -## Enumeration members - -### DOLLAR - -• **DOLLAR**: = "dollar" - -*Defined in [packages/sdk/base/src/currencies.ts:39](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/currencies.ts#L39)* - -___ - -### GOLD - -• **GOLD**: = "gold" - -*Defined in [packages/sdk/base/src/currencies.ts:40](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/currencies.ts#L40)* diff --git a/packages/docs/developer-resources/base/reference/enums/_inputvalidation_.validatorkind.md b/packages/docs/developer-resources/base/reference/enums/_inputvalidation_.validatorkind.md deleted file mode 100644 index 1c572fa91b6..00000000000 --- a/packages/docs/developer-resources/base/reference/enums/_inputvalidation_.validatorkind.md +++ /dev/null @@ -1,42 +0,0 @@ -# Enumeration: ValidatorKind - -## Index - -### Enumeration members - -* [Custom](_inputvalidation_.validatorkind.md#custom) -* [Decimal](_inputvalidation_.validatorkind.md#decimal) -* [Integer](_inputvalidation_.validatorkind.md#integer) -* [Phone](_inputvalidation_.validatorkind.md#phone) - -## Enumeration members - -### Custom - -• **Custom**: = "custom" - -*Defined in [packages/sdk/base/src/inputValidation.ts:2](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/inputValidation.ts#L2)* - -___ - -### Decimal - -• **Decimal**: = "decimal" - -*Defined in [packages/sdk/base/src/inputValidation.ts:3](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/inputValidation.ts#L3)* - -___ - -### Integer - -• **Integer**: = "integer" - -*Defined in [packages/sdk/base/src/inputValidation.ts:4](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/inputValidation.ts#L4)* - -___ - -### Phone - -• **Phone**: = "phone" - -*Defined in [packages/sdk/base/src/inputValidation.ts:5](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/inputValidation.ts#L5)* diff --git a/packages/docs/developer-resources/base/reference/globals.md b/packages/docs/developer-resources/base/reference/globals.md deleted file mode 100644 index 6e2e794e584..00000000000 --- a/packages/docs/developer-resources/base/reference/globals.md +++ /dev/null @@ -1,25 +0,0 @@ -# @celo/base - -## Index - -### Modules - -* ["account"](modules/_account_.md) -* ["address"](modules/_address_.md) -* ["async"](modules/_async_.md) -* ["attestations"](modules/_attestations_.md) -* ["collections"](modules/_collections_.md) -* ["contacts"](modules/_contacts_.md) -* ["currencies"](modules/_currencies_.md) -* ["displayFormatting"](modules/_displayformatting_.md) -* ["future"](modules/_future_.md) -* ["inputValidation"](modules/_inputvalidation_.md) -* ["io"](modules/_io_.md) -* ["lock"](modules/_lock_.md) -* ["logger"](modules/_logger_.md) -* ["parsing"](modules/_parsing_.md) -* ["phoneNumbers"](modules/_phonenumbers_.md) -* ["result"](modules/_result_.md) -* ["signatureUtils"](modules/_signatureutils_.md) -* ["string"](modules/_string_.md) -* ["task"](modules/_task_.md) diff --git a/packages/docs/developer-resources/base/reference/interfaces/_account_.bip39.md b/packages/docs/developer-resources/base/reference/interfaces/_account_.bip39.md deleted file mode 100644 index 222a0f6d323..00000000000 --- a/packages/docs/developer-resources/base/reference/interfaces/_account_.bip39.md +++ /dev/null @@ -1,91 +0,0 @@ -# Interface: Bip39 - -## Hierarchy - -* **Bip39** - -## Index - -### Properties - -* [generateMnemonic](_account_.bip39.md#generatemnemonic) -* [mnemonicToSeed](_account_.bip39.md#mnemonictoseed) -* [mnemonicToSeedSync](_account_.bip39.md#mnemonictoseedsync) -* [validateMnemonic](_account_.bip39.md#validatemnemonic) - -## Properties - -### generateMnemonic - -• **generateMnemonic**: *function* - -*Defined in [packages/sdk/base/src/account.ts:28](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/account.ts#L28)* - -#### Type declaration: - -▸ (`strength?`: undefined | number, `rng?`: [RandomNumberGenerator](../modules/_account_.md#randomnumbergenerator), `wordlist?`: string[]): *Promise‹string›* - -**Parameters:** - -Name | Type | ------- | ------ | -`strength?` | undefined | number | -`rng?` | [RandomNumberGenerator](../modules/_account_.md#randomnumbergenerator) | -`wordlist?` | string[] | - -___ - -### mnemonicToSeed - -• **mnemonicToSeed**: *function* - -*Defined in [packages/sdk/base/src/account.ts:27](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/account.ts#L27)* - -#### Type declaration: - -▸ (`mnemonic`: string, `password?`: undefined | string): *Promise‹Buffer›* - -**Parameters:** - -Name | Type | ------- | ------ | -`mnemonic` | string | -`password?` | undefined | string | - -___ - -### mnemonicToSeedSync - -• **mnemonicToSeedSync**: *function* - -*Defined in [packages/sdk/base/src/account.ts:26](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/account.ts#L26)* - -#### Type declaration: - -▸ (`mnemonic`: string, `password?`: undefined | string): *Buffer* - -**Parameters:** - -Name | Type | ------- | ------ | -`mnemonic` | string | -`password?` | undefined | string | - -___ - -### validateMnemonic - -• **validateMnemonic**: *function* - -*Defined in [packages/sdk/base/src/account.ts:33](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/account.ts#L33)* - -#### Type declaration: - -▸ (`mnemonic`: string, `wordlist?`: string[]): *boolean* - -**Parameters:** - -Name | Type | ------- | ------ | -`mnemonic` | string | -`wordlist?` | string[] | diff --git a/packages/docs/developer-resources/base/reference/interfaces/_attestations_.attestationsstatus.md b/packages/docs/developer-resources/base/reference/interfaces/_attestations_.attestationsstatus.md deleted file mode 100644 index 74a6db73b51..00000000000 --- a/packages/docs/developer-resources/base/reference/interfaces/_attestations_.attestationsstatus.md +++ /dev/null @@ -1,46 +0,0 @@ -# Interface: AttestationsStatus - -## Hierarchy - -* **AttestationsStatus** - -## Index - -### Properties - -* [completed](_attestations_.attestationsstatus.md#completed) -* [isVerified](_attestations_.attestationsstatus.md#isverified) -* [numAttestationsRemaining](_attestations_.attestationsstatus.md#numattestationsremaining) -* [total](_attestations_.attestationsstatus.md#total) - -## Properties - -### completed - -• **completed**: *number* - -*Defined in [packages/sdk/base/src/attestations.ts:71](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/attestations.ts#L71)* - -___ - -### isVerified - -• **isVerified**: *boolean* - -*Defined in [packages/sdk/base/src/attestations.ts:68](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/attestations.ts#L68)* - -___ - -### numAttestationsRemaining - -• **numAttestationsRemaining**: *number* - -*Defined in [packages/sdk/base/src/attestations.ts:69](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/attestations.ts#L69)* - -___ - -### total - -• **total**: *number* - -*Defined in [packages/sdk/base/src/attestations.ts:70](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/attestations.ts#L70)* diff --git a/packages/docs/developer-resources/base/reference/interfaces/_collections_.addresslistitem.md b/packages/docs/developer-resources/base/reference/interfaces/_collections_.addresslistitem.md deleted file mode 100644 index 99c2d348ce6..00000000000 --- a/packages/docs/developer-resources/base/reference/interfaces/_collections_.addresslistitem.md +++ /dev/null @@ -1,32 +0,0 @@ -# Interface: AddressListItem <**T**> - -## Type parameters - -▪ **T** - -## Hierarchy - -* **AddressListItem** - -## Index - -### Properties - -* [address](_collections_.addresslistitem.md#address) -* [value](_collections_.addresslistitem.md#value) - -## Properties - -### address - -• **address**: *string* - -*Defined in [packages/sdk/base/src/collections.ts:54](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/collections.ts#L54)* - -___ - -### value - -• **value**: *T* - -*Defined in [packages/sdk/base/src/collections.ts:55](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/collections.ts#L55)* diff --git a/packages/docs/developer-resources/base/reference/interfaces/_contacts_.contactphonenumber.md b/packages/docs/developer-resources/base/reference/interfaces/_contacts_.contactphonenumber.md deleted file mode 100644 index cdc23ea6d58..00000000000 --- a/packages/docs/developer-resources/base/reference/interfaces/_contacts_.contactphonenumber.md +++ /dev/null @@ -1,28 +0,0 @@ -# Interface: ContactPhoneNumber - -## Hierarchy - -* **ContactPhoneNumber** - -## Index - -### Properties - -* [label](_contacts_.contactphonenumber.md#optional-label) -* [number](_contacts_.contactphonenumber.md#optional-number) - -## Properties - -### `Optional` label - -• **label**? : *undefined | string* - -*Defined in [packages/sdk/base/src/contacts.ts:2](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/contacts.ts#L2)* - -___ - -### `Optional` number - -• **number**? : *undefined | string* - -*Defined in [packages/sdk/base/src/contacts.ts:3](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/contacts.ts#L3)* diff --git a/packages/docs/developer-resources/base/reference/interfaces/_contacts_.minimalcontact.md b/packages/docs/developer-resources/base/reference/interfaces/_contacts_.minimalcontact.md deleted file mode 100644 index 9012392e92e..00000000000 --- a/packages/docs/developer-resources/base/reference/interfaces/_contacts_.minimalcontact.md +++ /dev/null @@ -1,46 +0,0 @@ -# Interface: MinimalContact - -## Hierarchy - -* **MinimalContact** - -## Index - -### Properties - -* [displayName](_contacts_.minimalcontact.md#optional-displayname) -* [phoneNumbers](_contacts_.minimalcontact.md#optional-phonenumbers) -* [recordID](_contacts_.minimalcontact.md#recordid) -* [thumbnailPath](_contacts_.minimalcontact.md#optional-thumbnailpath) - -## Properties - -### `Optional` displayName - -• **displayName**? : *undefined | string* - -*Defined in [packages/sdk/base/src/contacts.ts:8](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/contacts.ts#L8)* - -___ - -### `Optional` phoneNumbers - -• **phoneNumbers**? : *[ContactPhoneNumber](_contacts_.contactphonenumber.md)[]* - -*Defined in [packages/sdk/base/src/contacts.ts:9](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/contacts.ts#L9)* - -___ - -### recordID - -• **recordID**: *string* - -*Defined in [packages/sdk/base/src/contacts.ts:7](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/contacts.ts#L7)* - -___ - -### `Optional` thumbnailPath - -• **thumbnailPath**? : *undefined | string* - -*Defined in [packages/sdk/base/src/contacts.ts:10](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/contacts.ts#L10)* diff --git a/packages/docs/developer-resources/base/reference/interfaces/_inputvalidation_.baseprops.md b/packages/docs/developer-resources/base/reference/interfaces/_inputvalidation_.baseprops.md deleted file mode 100644 index a723a19b6e0..00000000000 --- a/packages/docs/developer-resources/base/reference/interfaces/_inputvalidation_.baseprops.md +++ /dev/null @@ -1,46 +0,0 @@ -# Interface: BaseProps - -## Hierarchy - -* **BaseProps** - -## Index - -### Properties - -* [countryCallingCode](_inputvalidation_.baseprops.md#optional-countrycallingcode) -* [customValidator](_inputvalidation_.baseprops.md#optional-customvalidator) -* [decimalSeparator](_inputvalidation_.baseprops.md#optional-decimalseparator) -* [validator](_inputvalidation_.baseprops.md#optional-validator) - -## Properties - -### `Optional` countryCallingCode - -• **countryCallingCode**? : *undefined | string* - -*Defined in [packages/sdk/base/src/inputValidation.ts:11](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/inputValidation.ts#L11)* - -___ - -### `Optional` customValidator - -• **customValidator**? : *undefined | function* - -*Defined in [packages/sdk/base/src/inputValidation.ts:10](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/inputValidation.ts#L10)* - -___ - -### `Optional` decimalSeparator - -• **decimalSeparator**? : *undefined | string* - -*Defined in [packages/sdk/base/src/inputValidation.ts:12](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/inputValidation.ts#L12)* - -___ - -### `Optional` validator - -• **validator**? : *[ValidatorKind](../enums/_inputvalidation_.validatorkind.md)* - -*Defined in [packages/sdk/base/src/inputValidation.ts:9](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/inputValidation.ts#L9)* diff --git a/packages/docs/developer-resources/base/reference/interfaces/_phonenumbers_.parsedphonenumber.md b/packages/docs/developer-resources/base/reference/interfaces/_phonenumbers_.parsedphonenumber.md deleted file mode 100644 index 4a83eed87be..00000000000 --- a/packages/docs/developer-resources/base/reference/interfaces/_phonenumbers_.parsedphonenumber.md +++ /dev/null @@ -1,55 +0,0 @@ -# Interface: ParsedPhoneNumber - -## Hierarchy - -* **ParsedPhoneNumber** - -## Index - -### Properties - -* [countryCode](_phonenumbers_.parsedphonenumber.md#optional-countrycode) -* [displayNumber](_phonenumbers_.parsedphonenumber.md#displaynumber) -* [displayNumberInternational](_phonenumbers_.parsedphonenumber.md#displaynumberinternational) -* [e164Number](_phonenumbers_.parsedphonenumber.md#e164number) -* [regionCode](_phonenumbers_.parsedphonenumber.md#optional-regioncode) - -## Properties - -### `Optional` countryCode - -• **countryCode**? : *undefined | number* - -*Defined in [packages/sdk/base/src/phoneNumbers.ts:7](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/phoneNumbers.ts#L7)* - -___ - -### displayNumber - -• **displayNumber**: *string* - -*Defined in [packages/sdk/base/src/phoneNumbers.ts:5](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/phoneNumbers.ts#L5)* - -___ - -### displayNumberInternational - -• **displayNumberInternational**: *string* - -*Defined in [packages/sdk/base/src/phoneNumbers.ts:6](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/phoneNumbers.ts#L6)* - -___ - -### e164Number - -• **e164Number**: *string* - -*Defined in [packages/sdk/base/src/phoneNumbers.ts:4](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/phoneNumbers.ts#L4)* - -___ - -### `Optional` regionCode - -• **regionCode**? : *undefined | string* - -*Defined in [packages/sdk/base/src/phoneNumbers.ts:8](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/phoneNumbers.ts#L8)* diff --git a/packages/docs/developer-resources/base/reference/interfaces/_result_.baseerror.md b/packages/docs/developer-resources/base/reference/interfaces/_result_.baseerror.md deleted file mode 100644 index f9bfe2eee3c..00000000000 --- a/packages/docs/developer-resources/base/reference/interfaces/_result_.baseerror.md +++ /dev/null @@ -1,28 +0,0 @@ -# Interface: BaseError <**T**> - -## Type parameters - -▪ **T** - -## Hierarchy - -* **BaseError** - -## Implemented by - -* [JSONParseError](../classes/_result_.jsonparseerror.md) -* [RootError](../classes/_result_.rooterror.md) - -## Index - -### Properties - -* [errorType](_result_.baseerror.md#errortype) - -## Properties - -### errorType - -• **errorType**: *T* - -*Defined in [packages/sdk/base/src/result.ts:63](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/result.ts#L63)* diff --git a/packages/docs/developer-resources/base/reference/interfaces/_result_.errorresult.md b/packages/docs/developer-resources/base/reference/interfaces/_result_.errorresult.md deleted file mode 100644 index dcbbd82bbb1..00000000000 --- a/packages/docs/developer-resources/base/reference/interfaces/_result_.errorresult.md +++ /dev/null @@ -1,32 +0,0 @@ -# Interface: ErrorResult <**TError**> - -## Type parameters - -▪ **TError**: *[Error](../classes/_result_.rooterror.md#static-error)* - -## Hierarchy - -* **ErrorResult** - -## Index - -### Properties - -* [error](_result_.errorresult.md#error) -* [ok](_result_.errorresult.md#ok) - -## Properties - -### error - -• **error**: *TError* - -*Defined in [packages/sdk/base/src/result.ts:7](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/result.ts#L7)* - -___ - -### ok - -• **ok**: *false* - -*Defined in [packages/sdk/base/src/result.ts:6](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/result.ts#L6)* diff --git a/packages/docs/developer-resources/base/reference/interfaces/_result_.okresult.md b/packages/docs/developer-resources/base/reference/interfaces/_result_.okresult.md deleted file mode 100644 index 55d70065e54..00000000000 --- a/packages/docs/developer-resources/base/reference/interfaces/_result_.okresult.md +++ /dev/null @@ -1,32 +0,0 @@ -# Interface: OkResult <**TResult**> - -## Type parameters - -▪ **TResult** - -## Hierarchy - -* **OkResult** - -## Index - -### Properties - -* [ok](_result_.okresult.md#ok) -* [result](_result_.okresult.md#result) - -## Properties - -### ok - -• **ok**: *true* - -*Defined in [packages/sdk/base/src/result.ts:2](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/result.ts#L2)* - -___ - -### result - -• **result**: *TResult* - -*Defined in [packages/sdk/base/src/result.ts:3](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/result.ts#L3)* diff --git a/packages/docs/developer-resources/base/reference/interfaces/_signatureutils_.signature.md b/packages/docs/developer-resources/base/reference/interfaces/_signatureutils_.signature.md deleted file mode 100644 index 2d2c1e986a5..00000000000 --- a/packages/docs/developer-resources/base/reference/interfaces/_signatureutils_.signature.md +++ /dev/null @@ -1,37 +0,0 @@ -# Interface: Signature - -## Hierarchy - -* **Signature** - -## Index - -### Properties - -* [r](_signatureutils_.signature.md#r) -* [s](_signatureutils_.signature.md#s) -* [v](_signatureutils_.signature.md#v) - -## Properties - -### r - -• **r**: *string* - -*Defined in [packages/sdk/base/src/signatureUtils.ts:21](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/signatureUtils.ts#L21)* - -___ - -### s - -• **s**: *string* - -*Defined in [packages/sdk/base/src/signatureUtils.ts:22](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/signatureUtils.ts#L22)* - -___ - -### v - -• **v**: *number* - -*Defined in [packages/sdk/base/src/signatureUtils.ts:20](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/signatureUtils.ts#L20)* diff --git a/packages/docs/developer-resources/base/reference/interfaces/_signatureutils_.signer.md b/packages/docs/developer-resources/base/reference/interfaces/_signatureutils_.signer.md deleted file mode 100644 index 111714d180e..00000000000 --- a/packages/docs/developer-resources/base/reference/interfaces/_signatureutils_.signer.md +++ /dev/null @@ -1,29 +0,0 @@ -# Interface: Signer - -## Hierarchy - -* **Signer** - -## Index - -### Properties - -* [sign](_signatureutils_.signer.md#sign) - -## Properties - -### sign - -• **sign**: *function* - -*Defined in [packages/sdk/base/src/signatureUtils.ts:4](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/signatureUtils.ts#L4)* - -#### Type declaration: - -▸ (`message`: string): *Promise‹string›* - -**Parameters:** - -Name | Type | ------- | ------ | -`message` | string | diff --git a/packages/docs/developer-resources/base/reference/interfaces/_task_.repeattaskcontext.md b/packages/docs/developer-resources/base/reference/interfaces/_task_.repeattaskcontext.md deleted file mode 100644 index d36ac14e871..00000000000 --- a/packages/docs/developer-resources/base/reference/interfaces/_task_.repeattaskcontext.md +++ /dev/null @@ -1,37 +0,0 @@ -# Interface: RepeatTaskContext - -## Hierarchy - -* **RepeatTaskContext** - -## Index - -### Properties - -* [executionNumber](_task_.repeattaskcontext.md#executionnumber) - -### Methods - -* [stopTask](_task_.repeattaskcontext.md#stoptask) - -## Properties - -### executionNumber - -• **executionNumber**: *number* - -*Defined in [packages/sdk/base/src/task.ts:45](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/task.ts#L45)* - -Number of times the task has been executed (starts in 1) - -## Methods - -### stopTask - -▸ **stopTask**(): *void* - -*Defined in [packages/sdk/base/src/task.ts:47](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/task.ts#L47)* - -Flag task to be stopped. Might not be inmediate - -**Returns:** *void* diff --git a/packages/docs/developer-resources/base/reference/interfaces/_task_.retrytaskoptions.md b/packages/docs/developer-resources/base/reference/interfaces/_task_.retrytaskoptions.md deleted file mode 100644 index 3a48e0e1b9e..00000000000 --- a/packages/docs/developer-resources/base/reference/interfaces/_task_.retrytaskoptions.md +++ /dev/null @@ -1,79 +0,0 @@ -# Interface: RetryTaskOptions <**A**> - -## Type parameters - -▪ **A** - -## Hierarchy - -* [TaskOptions](_task_.taskoptions.md) - - ↳ **RetryTaskOptions** - -## Index - -### Properties - -* [logger](_task_.retrytaskoptions.md#optional-logger) -* [maxAttemps](_task_.retrytaskoptions.md#maxattemps) -* [name](_task_.retrytaskoptions.md#name) -* [timeInBetweenMS](_task_.retrytaskoptions.md#timeinbetweenms) -* [tryGetValue](_task_.retrytaskoptions.md#trygetvalue) - -## Properties - -### `Optional` logger - -• **logger**? : *[Logger](../modules/_logger_.md#logger)* - -*Inherited from [TaskOptions](_task_.taskoptions.md).[logger](_task_.taskoptions.md#optional-logger)* - -*Defined in [packages/sdk/base/src/task.ts:20](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/task.ts#L20)* - -Logger function - -___ - -### maxAttemps - -• **maxAttemps**: *number* - -*Defined in [packages/sdk/base/src/task.ts:123](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/task.ts#L123)* - -Maximum number of attemps - -___ - -### name - -• **name**: *string* - -*Inherited from [TaskOptions](_task_.taskoptions.md).[name](_task_.taskoptions.md#name)* - -*Defined in [packages/sdk/base/src/task.ts:18](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/task.ts#L18)* - -Name for the task. To be used in logging messages - -___ - -### timeInBetweenMS - -• **timeInBetweenMS**: *number* - -*Defined in [packages/sdk/base/src/task.ts:121](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/task.ts#L121)* - -seconds between repetition - -___ - -### tryGetValue - -• **tryGetValue**: *function* - -*Defined in [packages/sdk/base/src/task.ts:125](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/task.ts#L125)* - -Function that tries to obtain a value A or returns null - -#### Type declaration: - -▸ (): *Promise‹A | null›* diff --git a/packages/docs/developer-resources/base/reference/interfaces/_task_.runningtask.md b/packages/docs/developer-resources/base/reference/interfaces/_task_.runningtask.md deleted file mode 100644 index 5405645bc13..00000000000 --- a/packages/docs/developer-resources/base/reference/interfaces/_task_.runningtask.md +++ /dev/null @@ -1,42 +0,0 @@ -# Interface: RunningTask - -Represent a running task that can be stopped - -Examples: A poller, a watcher. - -## Hierarchy - -* **RunningTask** - - ↳ [RunningTaskWithValue](_task_.runningtaskwithvalue.md) - -## Index - -### Methods - -* [isRunning](_task_.runningtask.md#isrunning) -* [stop](_task_.runningtask.md#stop) - -## Methods - -### isRunning - -▸ **isRunning**(): *boolean* - -*Defined in [packages/sdk/base/src/task.ts:13](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/task.ts#L13)* - -Indicates wether the task is running - -**Returns:** *boolean* - -___ - -### stop - -▸ **stop**(): *void* - -*Defined in [packages/sdk/base/src/task.ts:11](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/task.ts#L11)* - -Flag task to be stopped. Might not be inmediate - -**Returns:** *void* diff --git a/packages/docs/developer-resources/base/reference/interfaces/_task_.runningtaskwithvalue.md b/packages/docs/developer-resources/base/reference/interfaces/_task_.runningtaskwithvalue.md deleted file mode 100644 index 4c4bcc43c99..00000000000 --- a/packages/docs/developer-resources/base/reference/interfaces/_task_.runningtaskwithvalue.md +++ /dev/null @@ -1,57 +0,0 @@ -# Interface: RunningTaskWithValue <**A**> - -## Type parameters - -▪ **A** - -## Hierarchy - -* [RunningTask](_task_.runningtask.md) - - ↳ **RunningTaskWithValue** - -## Index - -### Methods - -* [isRunning](_task_.runningtaskwithvalue.md#isrunning) -* [onValue](_task_.runningtaskwithvalue.md#onvalue) -* [stop](_task_.runningtaskwithvalue.md#stop) - -## Methods - -### isRunning - -▸ **isRunning**(): *boolean* - -*Inherited from [RunningTask](_task_.runningtask.md).[isRunning](_task_.runningtask.md#isrunning)* - -*Defined in [packages/sdk/base/src/task.ts:13](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/task.ts#L13)* - -Indicates wether the task is running - -**Returns:** *boolean* - -___ - -### onValue - -▸ **onValue**(): *Promise‹A›* - -*Defined in [packages/sdk/base/src/task.ts:116](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/task.ts#L116)* - -**Returns:** *Promise‹A›* - -___ - -### stop - -▸ **stop**(): *void* - -*Inherited from [RunningTask](_task_.runningtask.md).[stop](_task_.runningtask.md#stop)* - -*Defined in [packages/sdk/base/src/task.ts:11](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/task.ts#L11)* - -Flag task to be stopped. Might not be inmediate - -**Returns:** *void* diff --git a/packages/docs/developer-resources/base/reference/interfaces/_task_.taskoptions.md b/packages/docs/developer-resources/base/reference/interfaces/_task_.taskoptions.md deleted file mode 100644 index e9a4bce5f36..00000000000 --- a/packages/docs/developer-resources/base/reference/interfaces/_task_.taskoptions.md +++ /dev/null @@ -1,34 +0,0 @@ -# Interface: TaskOptions - -## Hierarchy - -* **TaskOptions** - - ↳ [RetryTaskOptions](_task_.retrytaskoptions.md) - -## Index - -### Properties - -* [logger](_task_.taskoptions.md#optional-logger) -* [name](_task_.taskoptions.md#name) - -## Properties - -### `Optional` logger - -• **logger**? : *[Logger](../modules/_logger_.md#logger)* - -*Defined in [packages/sdk/base/src/task.ts:20](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/task.ts#L20)* - -Logger function - -___ - -### name - -• **name**: *string* - -*Defined in [packages/sdk/base/src/task.ts:18](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/task.ts#L18)* - -Name for the task. To be used in logging messages diff --git a/packages/docs/developer-resources/base/reference/modules/_account_.md b/packages/docs/developer-resources/base/reference/modules/_account_.md deleted file mode 100644 index 25479b222f4..00000000000 --- a/packages/docs/developer-resources/base/reference/modules/_account_.md +++ /dev/null @@ -1,55 +0,0 @@ -# Module: "account" - -## Index - -### Enumerations - -* [MnemonicLanguages](../enums/_account_.mnemoniclanguages.md) -* [MnemonicStrength](../enums/_account_.mnemonicstrength.md) - -### Interfaces - -* [Bip39](../interfaces/_account_.bip39.md) - -### Type aliases - -* [RandomNumberGenerator](_account_.md#randomnumbergenerator) - -### Variables - -* [CELO_DERIVATION_PATH_BASE](_account_.md#const-celo_derivation_path_base) - -## Type aliases - -### RandomNumberGenerator - -Ƭ **RandomNumberGenerator**: *function* - -*Defined in [packages/sdk/base/src/account.ts:20](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/account.ts#L20)* - -#### Type declaration: - -▸ (`size`: number, `callback`: function): *void* - -**Parameters:** - -▪ **size**: *number* - -▪ **callback**: *function* - -▸ (`err`: [Error](../classes/_result_.rooterror.md#static-error) | null, `buf`: Buffer): *void* - -**Parameters:** - -Name | Type | ------- | ------ | -`err` | [Error](../classes/_result_.rooterror.md#static-error) | null | -`buf` | Buffer | - -## Variables - -### `Const` CELO_DERIVATION_PATH_BASE - -• **CELO_DERIVATION_PATH_BASE**: *"m/44'/52752'/0'"* = "m/44'/52752'/0'" - -*Defined in [packages/sdk/base/src/account.ts:1](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/account.ts#L1)* diff --git a/packages/docs/developer-resources/base/reference/modules/_address_.md b/packages/docs/developer-resources/base/reference/modules/_address_.md deleted file mode 100644 index dae42f93a74..00000000000 --- a/packages/docs/developer-resources/base/reference/modules/_address_.md +++ /dev/null @@ -1,261 +0,0 @@ -# Module: "address" - -## Index - -### Type aliases - -* [Address](_address_.md#address) - -### Variables - -* [NULL_ADDRESS](_address_.md#const-null_address) - -### Functions - -* [bufferToHex](_address_.md#const-buffertohex) -* [ensureLeading0x](_address_.md#const-ensureleading0x) -* [eqAddress](_address_.md#const-eqaddress) -* [findAddressIndex](_address_.md#const-findaddressindex) -* [getAddressChunks](_address_.md#const-getaddresschunks) -* [hexToBuffer](_address_.md#const-hextobuffer) -* [isHexString](_address_.md#const-ishexstring) -* [isNullAddress](_address_.md#const-isnulladdress) -* [mapAddressListDataOnto](_address_.md#mapaddresslistdataonto) -* [mapAddressListOnto](_address_.md#const-mapaddresslistonto) -* [normalizeAddress](_address_.md#const-normalizeaddress) -* [normalizeAddressWith0x](_address_.md#const-normalizeaddresswith0x) -* [trimLeading0x](_address_.md#const-trimleading0x) - -## Type aliases - -### Address - -Ƭ **Address**: *string* - -*Defined in [packages/sdk/base/src/address.ts:5](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/address.ts#L5)* - -## Variables - -### `Const` NULL_ADDRESS - -• **NULL_ADDRESS**: *"0x0000000000000000000000000000000000000000"* = "0x0000000000000000000000000000000000000000" - -*Defined in [packages/sdk/base/src/address.ts:30](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/address.ts#L30)* - -## Functions - -### `Const` bufferToHex - -▸ **bufferToHex**(`buf`: Buffer): *string* - -*Defined in [packages/sdk/base/src/address.ts:28](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/address.ts#L28)* - -**Parameters:** - -Name | Type | ------- | ------ | -`buf` | Buffer | - -**Returns:** *string* - -___ - -### `Const` ensureLeading0x - -▸ **ensureLeading0x**(`input`: string): *string* - -*Defined in [packages/sdk/base/src/address.ts:17](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/address.ts#L17)* - -**Parameters:** - -Name | Type | ------- | ------ | -`input` | string | - -**Returns:** *string* - -___ - -### `Const` eqAddress - -▸ **eqAddress**(`a`: [Address](_address_.md#address), `b`: [Address](_address_.md#address)): *boolean* - -*Defined in [packages/sdk/base/src/address.ts:7](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/address.ts#L7)* - -**Parameters:** - -Name | Type | ------- | ------ | -`a` | [Address](_address_.md#address) | -`b` | [Address](_address_.md#address) | - -**Returns:** *boolean* - -___ - -### `Const` findAddressIndex - -▸ **findAddressIndex**(`address`: [Address](_address_.md#address), `addresses`: [Address](_address_.md#address)[]): *number* - -*Defined in [packages/sdk/base/src/address.ts:32](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/address.ts#L32)* - -**Parameters:** - -Name | Type | ------- | ------ | -`address` | [Address](_address_.md#address) | -`addresses` | [Address](_address_.md#address)[] | - -**Returns:** *number* - -___ - -### `Const` getAddressChunks - -▸ **getAddressChunks**(`input`: string): *string[]* - -*Defined in [packages/sdk/base/src/address.ts:21](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/address.ts#L21)* - -**Parameters:** - -Name | Type | ------- | ------ | -`input` | string | - -**Returns:** *string[]* - -___ - -### `Const` hexToBuffer - -▸ **hexToBuffer**(`input`: string): *Buffer‹›* - -*Defined in [packages/sdk/base/src/address.ts:26](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/address.ts#L26)* - -**Parameters:** - -Name | Type | ------- | ------ | -`input` | string | - -**Returns:** *Buffer‹›* - -___ - -### `Const` isHexString - -▸ **isHexString**(`input`: string): *boolean* - -*Defined in [packages/sdk/base/src/address.ts:24](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/address.ts#L24)* - -**Parameters:** - -Name | Type | ------- | ------ | -`input` | string | - -**Returns:** *boolean* - -___ - -### `Const` isNullAddress - -▸ **isNullAddress**(`a`: [Address](_address_.md#address)): *boolean* - -*Defined in [packages/sdk/base/src/address.ts:11](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/address.ts#L11)* - -**Parameters:** - -Name | Type | ------- | ------ | -`a` | [Address](_address_.md#address) | - -**Returns:** *boolean* - -___ - -### mapAddressListDataOnto - -▸ **mapAddressListDataOnto**<**T**>(`data`: T[], `oldAddress`: [Address](_address_.md#address)[], `newAddress`: [Address](_address_.md#address)[], `initialValue`: T): *T[]* - -*Defined in [packages/sdk/base/src/address.ts:69](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/address.ts#L69)* - -**Type parameters:** - -▪ **T** - -**Parameters:** - -Name | Type | ------- | ------ | -`data` | T[] | -`oldAddress` | [Address](_address_.md#address)[] | -`newAddress` | [Address](_address_.md#address)[] | -`initialValue` | T | - -**Returns:** *T[]* - -___ - -### `Const` mapAddressListOnto - -▸ **mapAddressListOnto**(`oldAddress`: [Address](_address_.md#address)[], `newAddress`: [Address](_address_.md#address)[]): *any[]* - -*Defined in [packages/sdk/base/src/address.ts:36](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/address.ts#L36)* - -**Parameters:** - -Name | Type | ------- | ------ | -`oldAddress` | [Address](_address_.md#address)[] | -`newAddress` | [Address](_address_.md#address)[] | - -**Returns:** *any[]* - -___ - -### `Const` normalizeAddress - -▸ **normalizeAddress**(`a`: [Address](_address_.md#address)): *string* - -*Defined in [packages/sdk/base/src/address.ts:9](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/address.ts#L9)* - -**Parameters:** - -Name | Type | ------- | ------ | -`a` | [Address](_address_.md#address) | - -**Returns:** *string* - -___ - -### `Const` normalizeAddressWith0x - -▸ **normalizeAddressWith0x**(`a`: [Address](_address_.md#address)): *string* - -*Defined in [packages/sdk/base/src/address.ts:13](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/address.ts#L13)* - -**Parameters:** - -Name | Type | ------- | ------ | -`a` | [Address](_address_.md#address) | - -**Returns:** *string* - -___ - -### `Const` trimLeading0x - -▸ **trimLeading0x**(`input`: string): *string* - -*Defined in [packages/sdk/base/src/address.ts:15](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/address.ts#L15)* - -**Parameters:** - -Name | Type | ------- | ------ | -`input` | string | - -**Returns:** *string* diff --git a/packages/docs/developer-resources/base/reference/modules/_async_.md b/packages/docs/developer-resources/base/reference/modules/_async_.md deleted file mode 100644 index afef26d7602..00000000000 --- a/packages/docs/developer-resources/base/reference/modules/_async_.md +++ /dev/null @@ -1,252 +0,0 @@ -# Module: "async" - -## Index - -### Functions - -* [concurrentMap](_async_.md#concurrentmap) -* [concurrentValuesMap](_async_.md#concurrentvaluesmap) -* [retryAsync](_async_.md#const-retryasync) -* [retryAsyncWithBackOff](_async_.md#const-retryasyncwithbackoff) -* [retryAsyncWithBackOffAndTimeout](_async_.md#const-retryasyncwithbackoffandtimeout) -* [selectiveRetryAsyncWithBackOff](_async_.md#const-selectiveretryasyncwithbackoff) -* [sleep](_async_.md#sleep) -* [timeout](_async_.md#const-timeout) - -## Functions - -### concurrentMap - -▸ **concurrentMap**<**A**, **B**>(`concurrency`: number, `xs`: A[], `mapFn`: function): *Promise‹B[]›* - -*Defined in [packages/sdk/base/src/async.ts:128](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/async.ts#L128)* - -Map an async function over a list xs with a given concurrency level - -**Type parameters:** - -▪ **A** - -▪ **B** - -**Parameters:** - -▪ **concurrency**: *number* - -number of `mapFn` concurrent executions - -▪ **xs**: *A[]* - -list of value - -▪ **mapFn**: *function* - -mapping function - -▸ (`val`: A, `idx`: number): *Promise‹B›* - -**Parameters:** - -Name | Type | ------- | ------ | -`val` | A | -`idx` | number | - -**Returns:** *Promise‹B[]›* - -___ - -### concurrentValuesMap - -▸ **concurrentValuesMap**<**IN**, **OUT**>(`concurrency`: number, `x`: Record‹string, IN›, `mapFn`: function): *Promise‹Record‹string, OUT››* - -*Defined in [packages/sdk/base/src/async.ts:150](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/async.ts#L150)* - -Map an async function over the values in Object x with a given concurrency level - -**Type parameters:** - -▪ **IN**: *any* - -▪ **OUT**: *any* - -**Parameters:** - -▪ **concurrency**: *number* - -number of `mapFn` concurrent executions - -▪ **x**: *Record‹string, IN›* - -associative array of values - -▪ **mapFn**: *function* - -mapping function - -▸ (`val`: IN, `key`: string): *Promise‹OUT›* - -**Parameters:** - -Name | Type | ------- | ------ | -`val` | IN | -`key` | string | - -**Returns:** *Promise‹Record‹string, OUT››* - -___ - -### `Const` retryAsync - -▸ **retryAsync**<**T**, **U**>(`inFunction`: InFunction‹T, U›, `tries`: number, `params`: T, `delay`: number, `logger`: [Logger](_logger_.md#logger) | null): *Promise‹U›* - -*Defined in [packages/sdk/base/src/async.ts:14](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/async.ts#L14)* - -**Type parameters:** - -▪ **T**: *any[]* - -▪ **U** - -**Parameters:** - -Name | Type | Default | ------- | ------ | ------ | -`inFunction` | InFunction‹T, U› | - | -`tries` | number | - | -`params` | T | - | -`delay` | number | 100 | -`logger` | [Logger](_logger_.md#logger) | null | null | - -**Returns:** *Promise‹U›* - -___ - -### `Const` retryAsyncWithBackOff - -▸ **retryAsyncWithBackOff**<**T**, **U**>(`inFunction`: InFunction‹T, U›, `tries`: number, `params`: T, `delay`: number, `factor`: number, `logger`: [Logger](_logger_.md#logger) | null): *Promise‹U›* - -*Defined in [packages/sdk/base/src/async.ts:40](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/async.ts#L40)* - -**Type parameters:** - -▪ **T**: *any[]* - -▪ **U** - -**Parameters:** - -Name | Type | Default | ------- | ------ | ------ | -`inFunction` | InFunction‹T, U› | - | -`tries` | number | - | -`params` | T | - | -`delay` | number | 100 | -`factor` | number | 1.5 | -`logger` | [Logger](_logger_.md#logger) | null | null | - -**Returns:** *Promise‹U›* - -___ - -### `Const` retryAsyncWithBackOffAndTimeout - -▸ **retryAsyncWithBackOffAndTimeout**<**T**, **U**>(`inFunction`: InFunction‹T, U›, `tries`: number, `params`: T, `delayMs`: number, `factor`: number, `timeoutMs`: number, `logger`: [Logger](_logger_.md#logger) | null): *Promise‹U›* - -*Defined in [packages/sdk/base/src/async.ts:102](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/async.ts#L102)* - -**Type parameters:** - -▪ **T**: *any[]* - -▪ **U** - -**Parameters:** - -Name | Type | Default | ------- | ------ | ------ | -`inFunction` | InFunction‹T, U› | - | -`tries` | number | - | -`params` | T | - | -`delayMs` | number | 100 | -`factor` | number | 1.5 | -`timeoutMs` | number | 2000 | -`logger` | [Logger](_logger_.md#logger) | null | null | - -**Returns:** *Promise‹U›* - -___ - -### `Const` selectiveRetryAsyncWithBackOff - -▸ **selectiveRetryAsyncWithBackOff**<**T**, **U**>(`inFunction`: InFunction‹T, U›, `tries`: number, `dontRetry`: string[], `params`: T, `delay`: number, `factor`: number, `logger`: [Logger](_logger_.md#logger) | null): *Promise‹U›* - -*Defined in [packages/sdk/base/src/async.ts:68](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/async.ts#L68)* - -**Type parameters:** - -▪ **T**: *any[]* - -▪ **U** - -**Parameters:** - -Name | Type | Default | ------- | ------ | ------ | -`inFunction` | InFunction‹T, U› | - | -`tries` | number | - | -`dontRetry` | string[] | - | -`params` | T | - | -`delay` | number | 100 | -`factor` | number | 1.5 | -`logger` | [Logger](_logger_.md#logger) | null | null | - -**Returns:** *Promise‹U›* - -___ - -### sleep - -▸ **sleep**(`ms`: number): *Promise‹void›* - -*Defined in [packages/sdk/base/src/async.ts:6](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/async.ts#L6)* - -Sleep for a number of milliseconds - -**Parameters:** - -Name | Type | ------- | ------ | -`ms` | number | - -**Returns:** *Promise‹void›* - -___ - -### `Const` timeout - -▸ **timeout**<**T**, **U**>(`inFunction`: InFunction‹T, U›, `params`: T, `timeoutMs`: number, `timeoutError`: any, `timeoutLogMsg`: string | null, `logger`: [Logger](_logger_.md#logger) | null): *Promise‹U›* - -*Defined in [packages/sdk/base/src/async.ts:173](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/async.ts#L173)* - -Wraps an async function in a timeout before calling it. - -**Type parameters:** - -▪ **T**: *any[]* - -▪ **U** - -**Parameters:** - -Name | Type | Default | Description | ------- | ------ | ------ | ------ | -`inFunction` | InFunction‹T, U› | - | The async function to call | -`params` | T | - | The parameters of the async function | -`timeoutMs` | number | - | The timeout in milliseconds | -`timeoutError` | any | - | The value to which the returned Promise should reject to | -`timeoutLogMsg` | string | null | null | - | -`logger` | [Logger](_logger_.md#logger) | null | null | - | - -**Returns:** *Promise‹U›* diff --git a/packages/docs/developer-resources/base/reference/modules/_attestations_.md b/packages/docs/developer-resources/base/reference/modules/_attestations_.md deleted file mode 100644 index fdc8f04786f..00000000000 --- a/packages/docs/developer-resources/base/reference/modules/_attestations_.md +++ /dev/null @@ -1,210 +0,0 @@ -# Module: "attestations" - -## Index - -### Enumerations - -* [IdentifierType](../enums/_attestations_.identifiertype.md) - -### Interfaces - -* [AttestationsStatus](../interfaces/_attestations_.attestationsstatus.md) - -### Functions - -* [base64ToHex](_attestations_.md#base64tohex) -* [extractAttestationCodeFromMessage](_attestations_.md#extractattestationcodefrommessage) -* [getIdentifierPrefix](_attestations_.md#getidentifierprefix) -* [hashIdentifier](_attestations_.md#hashidentifier) -* [isAccountConsideredVerified](_attestations_.md#isaccountconsideredverified) -* [messageContainsAttestationCode](_attestations_.md#messagecontainsattestationcode) -* [sanitizeMessageBase64](_attestations_.md#sanitizemessagebase64) - -### Object literals - -* [AttestationBase](_attestations_.md#const-attestationbase) - -## Functions - -### base64ToHex - -▸ **base64ToHex**(`base64String`: string): *string* - -*Defined in [packages/sdk/base/src/attestations.ts:36](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/attestations.ts#L36)* - -**Parameters:** - -Name | Type | ------- | ------ | -`base64String` | string | - -**Returns:** *string* - -___ - -### extractAttestationCodeFromMessage - -▸ **extractAttestationCodeFromMessage**(`message`: string): *null | string* - -*Defined in [packages/sdk/base/src/attestations.ts:53](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/attestations.ts#L53)* - -**Parameters:** - -Name | Type | ------- | ------ | -`message` | string | - -**Returns:** *null | string* - -___ - -### getIdentifierPrefix - -▸ **getIdentifierPrefix**(`type`: [IdentifierType](../enums/_attestations_.identifiertype.md)): *string* - -*Defined in [packages/sdk/base/src/attestations.ts:13](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/attestations.ts#L13)* - -**Parameters:** - -Name | Type | ------- | ------ | -`type` | [IdentifierType](../enums/_attestations_.identifiertype.md) | - -**Returns:** *string* - -___ - -### hashIdentifier - -▸ **hashIdentifier**(`sha3`: function, `identifier`: string, `type`: [IdentifierType](../enums/_attestations_.identifiertype.md), `salt?`: undefined | string): *string* - -*Defined in [packages/sdk/base/src/attestations.ts:22](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/attestations.ts#L22)* - -**Parameters:** - -▪ **sha3**: *function* - -▸ (`a`: string): *string | null* - -**Parameters:** - -Name | Type | ------- | ------ | -`a` | string | - -▪ **identifier**: *string* - -▪ **type**: *[IdentifierType](../enums/_attestations_.identifiertype.md)* - -▪`Optional` **salt**: *undefined | string* - -**Returns:** *string* - -___ - -### isAccountConsideredVerified - -▸ **isAccountConsideredVerified**(`stats`: AttestationStat | undefined, `numAttestationsRequired`: number, `attestationThreshold`: number): *[AttestationsStatus](../interfaces/_attestations_.attestationsstatus.md)* - -*Defined in [packages/sdk/base/src/attestations.ts:88](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/attestations.ts#L88)* - -Returns true if an AttestationStat is considered verified using the given factors, -or defaults if factors are ommited. - -**Parameters:** - -Name | Type | Default | Description | ------- | ------ | ------ | ------ | -`stats` | AttestationStat | undefined | - | AttestationStat of the account's attestation identitifer, retrievable via lookupIdentitfiers | -`numAttestationsRequired` | number | DEFAULT_NUM_ATTESTATIONS_REQUIRED | Optional number of attestations required. Will default to hardcoded value if absent. | -`attestationThreshold` | number | DEFAULT_ATTESTATION_THRESHOLD | Optional threshold for fraction attestations completed. Will default to hardcoded value if absent. | - -**Returns:** *[AttestationsStatus](../interfaces/_attestations_.attestationsstatus.md)* - -___ - -### messageContainsAttestationCode - -▸ **messageContainsAttestationCode**(`message`: string): *boolean* - -*Defined in [packages/sdk/base/src/attestations.ts:49](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/attestations.ts#L49)* - -**Parameters:** - -Name | Type | ------- | ------ | -`message` | string | - -**Returns:** *boolean* - -___ - -### sanitizeMessageBase64 - -▸ **sanitizeMessageBase64**(`base64String`: string): *string* - -*Defined in [packages/sdk/base/src/attestations.ts:40](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/attestations.ts#L40)* - -**Parameters:** - -Name | Type | ------- | ------ | -`base64String` | string | - -**Returns:** *string* - -## Object literals - -### `Const` AttestationBase - -### ▪ **AttestationBase**: *object* - -*Defined in [packages/sdk/base/src/attestations.ts:115](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/attestations.ts#L115)* - -### IdentifierType - -• **IdentifierType**: *[IdentifierType](../enums/_attestations_.identifiertype.md)* - -*Defined in [packages/sdk/base/src/attestations.ts:116](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/attestations.ts#L116)* - -### base64ToHex - -• **base64ToHex**: *[base64ToHex](_attestations_.md#base64tohex)* - -*Defined in [packages/sdk/base/src/attestations.ts:119](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/attestations.ts#L119)* - -### extractAttestationCodeFromMessage - -• **extractAttestationCodeFromMessage**: *[extractAttestationCodeFromMessage](_attestations_.md#extractattestationcodefrommessage)* - -*Defined in [packages/sdk/base/src/attestations.ts:122](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/attestations.ts#L122)* - -### getIdentifierPrefix - -• **getIdentifierPrefix**: *[getIdentifierPrefix](_attestations_.md#getidentifierprefix)* - -*Defined in [packages/sdk/base/src/attestations.ts:117](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/attestations.ts#L117)* - -### hashIdentifier - -• **hashIdentifier**: *[hashIdentifier](_attestations_.md#hashidentifier)* - -*Defined in [packages/sdk/base/src/attestations.ts:118](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/attestations.ts#L118)* - -### isAccountConsideredVerified - -• **isAccountConsideredVerified**: *[isAccountConsideredVerified](_attestations_.md#isaccountconsideredverified)* - -*Defined in [packages/sdk/base/src/attestations.ts:123](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/attestations.ts#L123)* - -### messageContainsAttestationCode - -• **messageContainsAttestationCode**: *[messageContainsAttestationCode](_attestations_.md#messagecontainsattestationcode)* - -*Defined in [packages/sdk/base/src/attestations.ts:121](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/attestations.ts#L121)* - -### sanitizeMessageBase64 - -• **sanitizeMessageBase64**: *[sanitizeMessageBase64](_attestations_.md#sanitizemessagebase64)* - -*Defined in [packages/sdk/base/src/attestations.ts:120](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/attestations.ts#L120)* diff --git a/packages/docs/developer-resources/base/reference/modules/_collections_.md b/packages/docs/developer-resources/base/reference/modules/_collections_.md deleted file mode 100644 index bb344fbf903..00000000000 --- a/packages/docs/developer-resources/base/reference/modules/_collections_.md +++ /dev/null @@ -1,213 +0,0 @@ -# Module: "collections" - -## Index - -### Interfaces - -* [AddressListItem](../interfaces/_collections_.addresslistitem.md) - -### Type aliases - -* [Comparator](_collections_.md#comparator) - -### Functions - -* [intersection](_collections_.md#intersection) -* [linkedListChange](_collections_.md#linkedlistchange) -* [linkedListChanges](_collections_.md#linkedlistchanges) -* [notEmpty](_collections_.md#notempty) -* [zeroRange](_collections_.md#zerorange) -* [zip](_collections_.md#zip) -* [zip3](_collections_.md#zip3) - -## Type aliases - -### Comparator - -Ƭ **Comparator**: *function* - -*Defined in [packages/sdk/base/src/collections.ts:50](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/collections.ts#L50)* - -#### Type declaration: - -▸ (`a`: T, `b`: T): *boolean* - -**Parameters:** - -Name | Type | ------- | ------ | -`a` | T | -`b` | T | - -## Functions - -### intersection - -▸ **intersection**<**T**>(`arrays`: T[][]): *T[]* - -*Defined in [packages/sdk/base/src/collections.ts:32](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/collections.ts#L32)* - -**Type parameters:** - -▪ **T** - -**Parameters:** - -Name | Type | ------- | ------ | -`arrays` | T[][] | - -**Returns:** *T[]* - -___ - -### linkedListChange - -▸ **linkedListChange**<**T**>(`sortedList`: Array‹[AddressListItem](../interfaces/_collections_.addresslistitem.md)‹T››, `change`: [AddressListItem](../interfaces/_collections_.addresslistitem.md)‹T›, `comparator`: [Comparator](_collections_.md#comparator)‹T›): *object* - -*Defined in [packages/sdk/base/src/collections.ts:90](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/collections.ts#L90)* - -**Type parameters:** - -▪ **T** - -**Parameters:** - -Name | Type | ------- | ------ | -`sortedList` | Array‹[AddressListItem](../interfaces/_collections_.addresslistitem.md)‹T›› | -`change` | [AddressListItem](../interfaces/_collections_.addresslistitem.md)‹T› | -`comparator` | [Comparator](_collections_.md#comparator)‹T› | - -**Returns:** *object* - -* **greater**: *string* - -* **lesser**: *string* - -* **list**: *Array‹[AddressListItem](../interfaces/_collections_.addresslistitem.md)‹T››* - -___ - -### linkedListChanges - -▸ **linkedListChanges**<**T**>(`sortedList`: Array‹[AddressListItem](../interfaces/_collections_.addresslistitem.md)‹T››, `changeList`: Array‹[AddressListItem](../interfaces/_collections_.addresslistitem.md)‹T››, `comparator`: [Comparator](_collections_.md#comparator)‹T›): *object* - -*Defined in [packages/sdk/base/src/collections.ts:100](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/collections.ts#L100)* - -**Type parameters:** - -▪ **T** - -**Parameters:** - -Name | Type | ------- | ------ | -`sortedList` | Array‹[AddressListItem](../interfaces/_collections_.addresslistitem.md)‹T›› | -`changeList` | Array‹[AddressListItem](../interfaces/_collections_.addresslistitem.md)‹T›› | -`comparator` | [Comparator](_collections_.md#comparator)‹T› | - -**Returns:** *object* - -* **greaters**: *string[]* - -* **lessers**: *string[]* - -* **list**: *Array‹[AddressListItem](../interfaces/_collections_.addresslistitem.md)‹T››* - -___ - -### notEmpty - -▸ **notEmpty**<**TValue**>(`value`: TValue | null | undefined): *value is TValue* - -*Defined in [packages/sdk/base/src/collections.ts:28](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/collections.ts#L28)* - -**Type parameters:** - -▪ **TValue** - -**Parameters:** - -Name | Type | ------- | ------ | -`value` | TValue | null | undefined | - -**Returns:** *value is TValue* - -___ - -### zeroRange - -▸ **zeroRange**(`to`: number): *number[]* - -*Defined in [packages/sdk/base/src/collections.ts:23](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/collections.ts#L23)* - -**Parameters:** - -Name | Type | ------- | ------ | -`to` | number | - -**Returns:** *number[]* - -___ - -### zip - -▸ **zip**<**A**, **B**, **C**>(`fn`: function, `as`: A[], `bs`: B[]): *C[]* - -*Defined in [packages/sdk/base/src/collections.ts:3](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/collections.ts#L3)* - -**Type parameters:** - -▪ **A** - -▪ **B** - -▪ **C** - -**Parameters:** - -▪ **fn**: *function* - -▸ (`a`: A, `b`: B): *C* - -**Parameters:** - -Name | Type | ------- | ------ | -`a` | A | -`b` | B | - -▪ **as**: *A[]* - -▪ **bs**: *B[]* - -**Returns:** *C[]* - -___ - -### zip3 - -▸ **zip3**<**A**, **B**, **C**>(`as`: A[], `bs`: B[], `cs`: C[]): *[A, B, C][]* - -*Defined in [packages/sdk/base/src/collections.ts:13](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/collections.ts#L13)* - -**Type parameters:** - -▪ **A** - -▪ **B** - -▪ **C** - -**Parameters:** - -Name | Type | ------- | ------ | -`as` | A[] | -`bs` | B[] | -`cs` | C[] | - -**Returns:** *[A, B, C][]* diff --git a/packages/docs/developer-resources/base/reference/modules/_contacts_.md b/packages/docs/developer-resources/base/reference/modules/_contacts_.md deleted file mode 100644 index 4f8e73d6ab0..00000000000 --- a/packages/docs/developer-resources/base/reference/modules/_contacts_.md +++ /dev/null @@ -1,45 +0,0 @@ -# Module: "contacts" - -## Index - -### Interfaces - -* [ContactPhoneNumber](../interfaces/_contacts_.contactphonenumber.md) -* [MinimalContact](../interfaces/_contacts_.minimalcontact.md) - -### Functions - -* [getContactPhoneNumber](_contacts_.md#const-getcontactphonenumber) -* [isContact](_contacts_.md#iscontact) - -## Functions - -### `Const` getContactPhoneNumber - -▸ **getContactPhoneNumber**(`contact`: [MinimalContact](../interfaces/_contacts_.minimalcontact.md)): *undefined | null | string* - -*Defined in [packages/sdk/base/src/contacts.ts:13](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/contacts.ts#L13)* - -**Parameters:** - -Name | Type | ------- | ------ | -`contact` | [MinimalContact](../interfaces/_contacts_.minimalcontact.md) | - -**Returns:** *undefined | null | string* - -___ - -### isContact - -▸ **isContact**(`contactOrNumber`: any): *contactOrNumber is MinimalContact* - -*Defined in [packages/sdk/base/src/contacts.ts:26](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/contacts.ts#L26)* - -**Parameters:** - -Name | Type | ------- | ------ | -`contactOrNumber` | any | - -**Returns:** *contactOrNumber is MinimalContact* diff --git a/packages/docs/developer-resources/base/reference/modules/_currencies_.md b/packages/docs/developer-resources/base/reference/modules/_currencies_.md deleted file mode 100644 index 8e9a1eba2a1..00000000000 --- a/packages/docs/developer-resources/base/reference/modules/_currencies_.md +++ /dev/null @@ -1,81 +0,0 @@ -# Module: "currencies" - -## Index - -### Enumerations - -* [CURRENCY_ENUM](../enums/_currencies_.currency_enum.md) -* [SHORT_CURRENCIES](../enums/_currencies_.short_currencies.md) - -### Functions - -* [resolveCurrency](_currencies_.md#const-resolvecurrency) - -### Object literals - -* [CURRENCIES](_currencies_.md#const-currencies) -* [currencyToShortMap](_currencies_.md#const-currencytoshortmap) - -## Functions - -### `Const` resolveCurrency - -▸ **resolveCurrency**(`label`: string): *[CURRENCY_ENUM](../enums/_currencies_.currency_enum.md)* - -*Defined in [packages/sdk/base/src/currencies.ts:27](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/currencies.ts#L27)* - -**Parameters:** - -Name | Type | ------- | ------ | -`label` | string | - -**Returns:** *[CURRENCY_ENUM](../enums/_currencies_.currency_enum.md)* - -## Object literals - -### `Const` CURRENCIES - -### ▪ **CURRENCIES**: *object* - -*Defined in [packages/sdk/base/src/currencies.ts:14](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/currencies.ts#L14)* - -▪ **[CURRENCY_ENUM.DOLLAR]**: *object* - -*Defined in [packages/sdk/base/src/currencies.ts:20](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/currencies.ts#L20)* - -* **code**: *string* = "cUSD" - -* **displayDecimals**: *number* = 2 - -* **symbol**: *string* = "$" - -▪ **[CURRENCY_ENUM.GOLD]**: *object* - -*Defined in [packages/sdk/base/src/currencies.ts:15](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/currencies.ts#L15)* - -* **code**: *string* = "cGLD" - -* **displayDecimals**: *number* = 3 - -* **symbol**: *string* = "" - -___ - -### `Const` currencyToShortMap - -### ▪ **currencyToShortMap**: *object* - -*Defined in [packages/sdk/base/src/currencies.ts:43](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/currencies.ts#L43)* - -### [CURRENCY_ENUM.DOLLAR] - -• **[CURRENCY_ENUM.DOLLAR]**: *[SHORT_CURRENCIES](../enums/_currencies_.short_currencies.md)* = SHORT_CURRENCIES.DOLLAR - -*Defined in [packages/sdk/base/src/currencies.ts:44](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/currencies.ts#L44)* - -### [CURRENCY_ENUM.GOLD] - -• **[CURRENCY_ENUM.GOLD]**: *[SHORT_CURRENCIES](../enums/_currencies_.short_currencies.md)* = SHORT_CURRENCIES.GOLD - -*Defined in [packages/sdk/base/src/currencies.ts:45](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/currencies.ts#L45)* diff --git a/packages/docs/developer-resources/base/reference/modules/_displayformatting_.md b/packages/docs/developer-resources/base/reference/modules/_displayformatting_.md deleted file mode 100644 index c20caad9a32..00000000000 --- a/packages/docs/developer-resources/base/reference/modules/_displayformatting_.md +++ /dev/null @@ -1,23 +0,0 @@ -# Module: "displayFormatting" - -## Index - -### Functions - -* [getErrorMessage](_displayformatting_.md#geterrormessage) - -## Functions - -### getErrorMessage - -▸ **getErrorMessage**(`error`: [Error](../classes/_result_.rooterror.md#static-error)): *string* - -*Defined in [packages/sdk/base/src/displayFormatting.ts:1](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/displayFormatting.ts#L1)* - -**Parameters:** - -Name | Type | ------- | ------ | -`error` | [Error](../classes/_result_.rooterror.md#static-error) | - -**Returns:** *string* diff --git a/packages/docs/developer-resources/base/reference/modules/_future_.md b/packages/docs/developer-resources/base/reference/modules/_future_.md deleted file mode 100644 index 29288a31ae6..00000000000 --- a/packages/docs/developer-resources/base/reference/modules/_future_.md +++ /dev/null @@ -1,53 +0,0 @@ -# Module: "future" - -## Index - -### Classes - -* [Future](../classes/_future_.future.md) - -### Functions - -* [pipeToFuture](_future_.md#pipetofuture) -* [toFuture](_future_.md#tofuture) - -## Functions - -### pipeToFuture - -▸ **pipeToFuture**<**A**>(`p`: Promise‹A›, `future`: [Future](../classes/_future_.future.md)‹A›): *[Future](../classes/_future_.future.md)‹A›* - -*Defined in [packages/sdk/base/src/future.ts:50](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/future.ts#L50)* - -**Type parameters:** - -▪ **A** - -**Parameters:** - -Name | Type | ------- | ------ | -`p` | Promise‹A› | -`future` | [Future](../classes/_future_.future.md)‹A› | - -**Returns:** *[Future](../classes/_future_.future.md)‹A›* - -___ - -### toFuture - -▸ **toFuture**<**A**>(`p`: Promise‹A›): *[Future](../classes/_future_.future.md)‹A›* - -*Defined in [packages/sdk/base/src/future.ts:45](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/future.ts#L45)* - -**Type parameters:** - -▪ **A** - -**Parameters:** - -Name | Type | ------- | ------ | -`p` | Promise‹A› | - -**Returns:** *[Future](../classes/_future_.future.md)‹A›* diff --git a/packages/docs/developer-resources/base/reference/modules/_inputvalidation_.md b/packages/docs/developer-resources/base/reference/modules/_inputvalidation_.md deleted file mode 100644 index d4d80cba9f7..00000000000 --- a/packages/docs/developer-resources/base/reference/modules/_inputvalidation_.md +++ /dev/null @@ -1,49 +0,0 @@ -# Module: "inputValidation" - -## Index - -### Enumerations - -* [ValidatorKind](../enums/_inputvalidation_.validatorkind.md) - -### Interfaces - -* [BaseProps](../interfaces/_inputvalidation_.baseprops.md) - -### Functions - -* [validateDecimal](_inputvalidation_.md#validatedecimal) -* [validateInteger](_inputvalidation_.md#validateinteger) - -## Functions - -### validateDecimal - -▸ **validateDecimal**(`input`: string, `decimalSeparator`: string): *string* - -*Defined in [packages/sdk/base/src/inputValidation.ts:19](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/inputValidation.ts#L19)* - -**Parameters:** - -Name | Type | Default | ------- | ------ | ------ | -`input` | string | - | -`decimalSeparator` | string | "." | - -**Returns:** *string* - -___ - -### validateInteger - -▸ **validateInteger**(`input`: string): *string* - -*Defined in [packages/sdk/base/src/inputValidation.ts:15](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/inputValidation.ts#L15)* - -**Parameters:** - -Name | Type | ------- | ------ | -`input` | string | - -**Returns:** *string* diff --git a/packages/docs/developer-resources/base/reference/modules/_io_.md b/packages/docs/developer-resources/base/reference/modules/_io_.md deleted file mode 100644 index 211ebd739b4..00000000000 --- a/packages/docs/developer-resources/base/reference/modules/_io_.md +++ /dev/null @@ -1,37 +0,0 @@ -# Module: "io" - -## Index - -### Variables - -* [URL_REGEX](_io_.md#const-url_regex) - -### Functions - -* [isValidUrl](_io_.md#const-isvalidurl) - -## Variables - -### `Const` URL_REGEX - -• **URL_REGEX**: *RegExp‹›* = new RegExp( - /((([A-Za-z]{3,9}:(?:\/\/)?)(?:[\-;:&=\+\$,\w]+@)?[A-Za-z0-9\.\-]+|(?:www\.|[\-;:&=\+\$,\w]+@)[A-Za-z0-9\.\-]+)((?:\/[\+~%\/\.\w\-_]*)?\??(?:[\-\+=&;%@\.\w_]*)#?(?:[\.\!\/\\\w]*))?)/ -) - -*Defined in [packages/sdk/base/src/io.ts:2](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/io.ts#L2)* - -## Functions - -### `Const` isValidUrl - -▸ **isValidUrl**(`url`: string): *boolean* - -*Defined in [packages/sdk/base/src/io.ts:6](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/io.ts#L6)* - -**Parameters:** - -Name | Type | ------- | ------ | -`url` | string | - -**Returns:** *boolean* diff --git a/packages/docs/developer-resources/base/reference/modules/_lock_.md b/packages/docs/developer-resources/base/reference/modules/_lock_.md deleted file mode 100644 index 0f964f33f57..00000000000 --- a/packages/docs/developer-resources/base/reference/modules/_lock_.md +++ /dev/null @@ -1,7 +0,0 @@ -# Module: "lock" - -## Index - -### Classes - -* [Lock](../classes/_lock_.lock.md) diff --git a/packages/docs/developer-resources/base/reference/modules/_logger_.md b/packages/docs/developer-resources/base/reference/modules/_logger_.md deleted file mode 100644 index 4c48c1f5bb1..00000000000 --- a/packages/docs/developer-resources/base/reference/modules/_logger_.md +++ /dev/null @@ -1,69 +0,0 @@ -# Module: "logger" - -## Index - -### Type aliases - -* [Logger](_logger_.md#logger) - -### Variables - -* [consoleLogger](_logger_.md#const-consolelogger) - -### Functions - -* [noopLogger](_logger_.md#const-nooplogger) -* [prefixLogger](_logger_.md#const-prefixlogger) - -## Type aliases - -### Logger - -Ƭ **Logger**: *function* - -*Defined in [packages/sdk/base/src/logger.ts:1](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/logger.ts#L1)* - -#### Type declaration: - -▸ (...`args`: any[]): *void* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | any[] | - -## Variables - -### `Const` consoleLogger - -• **consoleLogger**: *[Logger](_logger_.md#logger)* = console.log - -*Defined in [packages/sdk/base/src/logger.ts:15](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/logger.ts#L15)* - -## Functions - -### `Const` noopLogger - -▸ **noopLogger**(): *void* - -*Defined in [packages/sdk/base/src/logger.ts:3](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/logger.ts#L3)* - -**Returns:** *void* - -___ - -### `Const` prefixLogger - -▸ **prefixLogger**(`prefix`: string, `logger`: [Logger](_logger_.md#logger)): *[Logger](_logger_.md#logger)* - -*Defined in [packages/sdk/base/src/logger.ts:7](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/logger.ts#L7)* - -**Parameters:** - -Name | Type | ------- | ------ | -`prefix` | string | -`logger` | [Logger](_logger_.md#logger) | - -**Returns:** *[Logger](_logger_.md#logger)* diff --git a/packages/docs/developer-resources/base/reference/modules/_parsing_.md b/packages/docs/developer-resources/base/reference/modules/_parsing_.md deleted file mode 100644 index e79834e7e66..00000000000 --- a/packages/docs/developer-resources/base/reference/modules/_parsing_.md +++ /dev/null @@ -1,43 +0,0 @@ -# Module: "parsing" - -## Index - -### Functions - -* [parseSolidityStringArray](_parsing_.md#const-parsesoliditystringarray) -* [stringToBoolean](_parsing_.md#const-stringtoboolean) - -## Functions - -### `Const` parseSolidityStringArray - -▸ **parseSolidityStringArray**(`stringLengths`: number[], `data`: string): *string[]* - -*Defined in [packages/sdk/base/src/parsing.ts:17](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/parsing.ts#L17)* - -Parses an "array of strings" that is returned from a Solidity function - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`stringLengths` | number[] | length of each string in bytes | -`data` | string | 0x-prefixed, hex-encoded string data in utf-8 bytes | - -**Returns:** *string[]* - -___ - -### `Const` stringToBoolean - -▸ **stringToBoolean**(`inputString`: string): *boolean* - -*Defined in [packages/sdk/base/src/parsing.ts:1](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/parsing.ts#L1)* - -**Parameters:** - -Name | Type | ------- | ------ | -`inputString` | string | - -**Returns:** *boolean* diff --git a/packages/docs/developer-resources/base/reference/modules/_phonenumbers_.md b/packages/docs/developer-resources/base/reference/modules/_phonenumbers_.md deleted file mode 100644 index 606bbf7e43d..00000000000 --- a/packages/docs/developer-resources/base/reference/modules/_phonenumbers_.md +++ /dev/null @@ -1,95 +0,0 @@ -# Module: "phoneNumbers" - -## Index - -### Interfaces - -* [ParsedPhoneNumber](../interfaces/_phonenumbers_.parsedphonenumber.md) - -### Functions - -* [anonymizedPhone](_phonenumbers_.md#anonymizedphone) -* [getPhoneHash](_phonenumbers_.md#const-getphonehash) -* [isE164Number](_phonenumbers_.md#ise164number) - -### Object literals - -* [PhoneNumberBase](_phonenumbers_.md#const-phonenumberbase) - -## Functions - -### anonymizedPhone - -▸ **anonymizedPhone**(`phoneNumber`: string): *string* - -*Defined in [packages/sdk/base/src/phoneNumbers.ts:31](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/phoneNumbers.ts#L31)* - -**Parameters:** - -Name | Type | ------- | ------ | -`phoneNumber` | string | - -**Returns:** *string* - -___ - -### `Const` getPhoneHash - -▸ **getPhoneHash**(`sha3`: function, `phoneNumber`: string, `salt?`: undefined | string): *string* - -*Defined in [packages/sdk/base/src/phoneNumbers.ts:14](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/phoneNumbers.ts#L14)* - -**Parameters:** - -▪ **sha3**: *function* - -▸ (`a`: string): *string | null* - -**Parameters:** - -Name | Type | ------- | ------ | -`a` | string | - -▪ **phoneNumber**: *string* - -▪`Optional` **salt**: *undefined | string* - -**Returns:** *string* - -___ - -### isE164Number - -▸ **isE164Number**(`phoneNumber`: string): *boolean* - -*Defined in [packages/sdk/base/src/phoneNumbers.ts:27](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/phoneNumbers.ts#L27)* - -**Parameters:** - -Name | Type | ------- | ------ | -`phoneNumber` | string | - -**Returns:** *boolean* - -## Object literals - -### `Const` PhoneNumberBase - -### ▪ **PhoneNumberBase**: *object* - -*Defined in [packages/sdk/base/src/phoneNumbers.ts:35](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/phoneNumbers.ts#L35)* - -### getPhoneHash - -• **getPhoneHash**: *getPhoneHash* - -*Defined in [packages/sdk/base/src/phoneNumbers.ts:36](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/phoneNumbers.ts#L36)* - -### isE164Number - -• **isE164Number**: *[isE164Number](_phonenumbers_.md#ise164number)* - -*Defined in [packages/sdk/base/src/phoneNumbers.ts:37](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/phoneNumbers.ts#L37)* diff --git a/packages/docs/developer-resources/base/reference/modules/_result_.md b/packages/docs/developer-resources/base/reference/modules/_result_.md deleted file mode 100644 index ad367fc3b85..00000000000 --- a/packages/docs/developer-resources/base/reference/modules/_result_.md +++ /dev/null @@ -1,196 +0,0 @@ -# Module: "result" - -## Index - -### Classes - -* [JSONParseError](../classes/_result_.jsonparseerror.md) -* [RootError](../classes/_result_.rooterror.md) - -### Interfaces - -* [BaseError](../interfaces/_result_.baseerror.md) -* [ErrorResult](../interfaces/_result_.errorresult.md) -* [OkResult](../interfaces/_result_.okresult.md) - -### Type aliases - -* [Result](_result_.md#result) - -### Variables - -* [JSONParseErrorType](_result_.md#const-jsonparseerrortype) - -### Functions - -* [Err](_result_.md#const-err) -* [Ok](_result_.md#const-ok) -* [makeAsyncThrowable](_result_.md#makeasyncthrowable) -* [makeThrowable](_result_.md#makethrowable) -* [parseJsonAsResult](_result_.md#parsejsonasresult) -* [throwIfError](_result_.md#throwiferror) - -## Type aliases - -### Result - -Ƭ **Result**: *[OkResult](../interfaces/_result_.okresult.md)‹TResult› | [ErrorResult](../interfaces/_result_.errorresult.md)‹TError›* - -*Defined in [packages/sdk/base/src/result.ts:10](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/result.ts#L10)* - -## Variables - -### `Const` JSONParseErrorType - -• **JSONParseErrorType**: *"JsonParseError"* = "JsonParseError" - -*Defined in [packages/sdk/base/src/result.ts:77](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/result.ts#L77)* - -## Functions - -### `Const` Err - -▸ **Err**<**TError**>(`error`: TError): *[ErrorResult](../interfaces/_result_.errorresult.md)‹TError›* - -*Defined in [packages/sdk/base/src/result.ts:16](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/result.ts#L16)* - -**Type parameters:** - -▪ **TError**: *[Error](../classes/_result_.rooterror.md#static-error)* - -**Parameters:** - -Name | Type | ------- | ------ | -`error` | TError | - -**Returns:** *[ErrorResult](../interfaces/_result_.errorresult.md)‹TError›* - -___ - -### `Const` Ok - -▸ **Ok**<**TResult**>(`result`: TResult): *[OkResult](../interfaces/_result_.okresult.md)‹TResult›* - -*Defined in [packages/sdk/base/src/result.ts:12](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/result.ts#L12)* - -**Type parameters:** - -▪ **TResult** - -**Parameters:** - -Name | Type | ------- | ------ | -`result` | TResult | - -**Returns:** *[OkResult](../interfaces/_result_.okresult.md)‹TResult›* - -___ - -### makeAsyncThrowable - -▸ **makeAsyncThrowable**<**TArgs**, **TResult**, **TError**, **TModifiedError**>(`f`: function, `errorModifier?`: undefined | function): *(Anonymous function)* - -*Defined in [packages/sdk/base/src/result.ts:47](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/result.ts#L47)* - -**Type parameters:** - -▪ **TArgs**: *any[]* - -▪ **TResult** - -▪ **TError**: *[Error](../classes/_result_.rooterror.md#static-error)* - -▪ **TModifiedError**: *[Error](../classes/_result_.rooterror.md#static-error)* - -**Parameters:** - -▪ **f**: *function* - -▸ (...`args`: TArgs): *Promise‹[Result](_result_.md#result)‹TResult, TError››* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | TArgs | - -▪`Optional` **errorModifier**: *undefined | function* - -**Returns:** *(Anonymous function)* - -___ - -### makeThrowable - -▸ **makeThrowable**<**TArgs**, **TResult**, **TError**, **TModifiedError**>(`f`: function, `errorModifier?`: undefined | function): *(Anonymous function)* - -*Defined in [packages/sdk/base/src/result.ts:35](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/result.ts#L35)* - -**Type parameters:** - -▪ **TArgs**: *any[]* - -▪ **TResult** - -▪ **TError**: *[Error](../classes/_result_.rooterror.md#static-error)* - -▪ **TModifiedError**: *[Error](../classes/_result_.rooterror.md#static-error)* - -**Parameters:** - -▪ **f**: *function* - -▸ (...`args`: TArgs): *[Result](_result_.md#result)‹TResult, TError›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | TArgs | - -▪`Optional` **errorModifier**: *undefined | function* - -**Returns:** *(Anonymous function)* - -___ - -### parseJsonAsResult - -▸ **parseJsonAsResult**(`data`: string): *[OkResult](../interfaces/_result_.okresult.md)‹any› | [ErrorResult](../interfaces/_result_.errorresult.md)‹[JSONParseError](../classes/_result_.jsonparseerror.md)‹››* - -*Defined in [packages/sdk/base/src/result.ts:84](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/result.ts#L84)* - -**Parameters:** - -Name | Type | ------- | ------ | -`data` | string | - -**Returns:** *[OkResult](../interfaces/_result_.okresult.md)‹any› | [ErrorResult](../interfaces/_result_.errorresult.md)‹[JSONParseError](../classes/_result_.jsonparseerror.md)‹››* - -___ - -### throwIfError - -▸ **throwIfError**<**TResult**, **TError**, **TModifiedError**>(`result`: [Result](_result_.md#result)‹TResult, TError›, `errorModifier?`: undefined | function): *TResult* - -*Defined in [packages/sdk/base/src/result.ts:21](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/result.ts#L21)* - -**Type parameters:** - -▪ **TResult** - -▪ **TError**: *[Error](../classes/_result_.rooterror.md#static-error)* - -▪ **TModifiedError**: *[Error](../classes/_result_.rooterror.md#static-error)* - -**Parameters:** - -Name | Type | ------- | ------ | -`result` | [Result](_result_.md#result)‹TResult, TError› | -`errorModifier?` | undefined | function | - -**Returns:** *TResult* diff --git a/packages/docs/developer-resources/base/reference/modules/_signatureutils_.md b/packages/docs/developer-resources/base/reference/modules/_signatureutils_.md deleted file mode 100644 index 7cf0ceb4c36..00000000000 --- a/packages/docs/developer-resources/base/reference/modules/_signatureutils_.md +++ /dev/null @@ -1,90 +0,0 @@ -# Module: "signatureUtils" - -## Index - -### Interfaces - -* [Signature](../interfaces/_signatureutils_.signature.md) -* [Signer](../interfaces/_signatureutils_.signer.md) - -### Variables - -* [POP_SIZE](_signatureutils_.md#const-pop_size) - -### Functions - -* [NativeSigner](_signatureutils_.md#nativesigner) -* [serializeSignature](_signatureutils_.md#serializesignature) - -### Object literals - -* [SignatureBase](_signatureutils_.md#const-signaturebase) - -## Variables - -### `Const` POP_SIZE - -• **POP_SIZE**: *65* = 65 - -*Defined in [packages/sdk/base/src/signatureUtils.ts:1](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/signatureUtils.ts#L1)* - -## Functions - -### NativeSigner - -▸ **NativeSigner**(`signFn`: function, `signer`: string): *[Signer](../interfaces/_signatureutils_.signer.md)* - -*Defined in [packages/sdk/base/src/signatureUtils.ts:8](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/signatureUtils.ts#L8)* - -**Parameters:** - -▪ **signFn**: *function* - -▸ (`message`: string, `signer`: string): *Promise‹string›* - -**Parameters:** - -Name | Type | ------- | ------ | -`message` | string | -`signer` | string | - -▪ **signer**: *string* - -**Returns:** *[Signer](../interfaces/_signatureutils_.signer.md)* - -___ - -### serializeSignature - -▸ **serializeSignature**(`signature`: [Signature](../interfaces/_signatureutils_.signature.md)): *string* - -*Defined in [packages/sdk/base/src/signatureUtils.ts:25](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/signatureUtils.ts#L25)* - -**Parameters:** - -Name | Type | ------- | ------ | -`signature` | [Signature](../interfaces/_signatureutils_.signature.md) | - -**Returns:** *string* - -## Object literals - -### `Const` SignatureBase - -### ▪ **SignatureBase**: *object* - -*Defined in [packages/sdk/base/src/signatureUtils.ts:32](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/signatureUtils.ts#L32)* - -### NativeSigner - -• **NativeSigner**: *[NativeSigner](_signatureutils_.md#nativesigner)* - -*Defined in [packages/sdk/base/src/signatureUtils.ts:33](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/signatureUtils.ts#L33)* - -### serializeSignature - -• **serializeSignature**: *[serializeSignature](_signatureutils_.md#serializesignature)* - -*Defined in [packages/sdk/base/src/signatureUtils.ts:34](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/signatureUtils.ts#L34)* diff --git a/packages/docs/developer-resources/base/reference/modules/_string_.md b/packages/docs/developer-resources/base/reference/modules/_string_.md deleted file mode 100644 index ef5057f7c25..00000000000 --- a/packages/docs/developer-resources/base/reference/modules/_string_.md +++ /dev/null @@ -1,65 +0,0 @@ -# Module: "string" - -## Index - -### Functions - -* [appendPath](_string_.md#appendpath) -* [normalizeAccents](_string_.md#normalizeaccents) - -### Object literals - -* [StringBase](_string_.md#const-stringbase) - -## Functions - -### appendPath - -▸ **appendPath**(`baseUrl`: string, `path`: string): *string* - -*Defined in [packages/sdk/base/src/string.ts:1](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/string.ts#L1)* - -**Parameters:** - -Name | Type | ------- | ------ | -`baseUrl` | string | -`path` | string | - -**Returns:** *string* - -___ - -### normalizeAccents - -▸ **normalizeAccents**(`str`: string): *string* - -*Defined in [packages/sdk/base/src/string.ts:10](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/string.ts#L10)* - -**Parameters:** - -Name | Type | ------- | ------ | -`str` | string | - -**Returns:** *string* - -## Object literals - -### `Const` StringBase - -### ▪ **StringBase**: *object* - -*Defined in [packages/sdk/base/src/string.ts:14](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/string.ts#L14)* - -### appendPath - -• **appendPath**: *[appendPath](_string_.md#appendpath)* - -*Defined in [packages/sdk/base/src/string.ts:15](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/string.ts#L15)* - -### normalizeAccents - -• **normalizeAccents**: *[normalizeAccents](_string_.md#normalizeaccents)* - -*Defined in [packages/sdk/base/src/string.ts:16](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/string.ts#L16)* diff --git a/packages/docs/developer-resources/base/reference/modules/_task_.md b/packages/docs/developer-resources/base/reference/modules/_task_.md deleted file mode 100644 index e7eb1eb74a3..00000000000 --- a/packages/docs/developer-resources/base/reference/modules/_task_.md +++ /dev/null @@ -1,81 +0,0 @@ -# Module: "task" - -## Index - -### Interfaces - -* [RepeatTaskContext](../interfaces/_task_.repeattaskcontext.md) -* [RetryTaskOptions](../interfaces/_task_.retrytaskoptions.md) -* [RunningTask](../interfaces/_task_.runningtask.md) -* [RunningTaskWithValue](../interfaces/_task_.runningtaskwithvalue.md) -* [TaskOptions](../interfaces/_task_.taskoptions.md) - -### Functions - -* [conditionWatcher](_task_.md#conditionwatcher) -* [repeatTask](_task_.md#repeattask) -* [tryObtainValueWithRetries](_task_.md#tryobtainvaluewithretries) - -## Functions - -### conditionWatcher - -▸ **conditionWatcher**(`opts`: RepeatTaskOptions & object): *[RunningTask](../interfaces/_task_.runningtask.md)* - -*Defined in [packages/sdk/base/src/task.ts:100](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/task.ts#L100)* - -**Parameters:** - -Name | Type | ------- | ------ | -`opts` | RepeatTaskOptions & object | - -**Returns:** *[RunningTask](../interfaces/_task_.runningtask.md)* - -___ - -### repeatTask - -▸ **repeatTask**(`opts`: RepeatTaskOptions, `fn`: function): *[RunningTask](../interfaces/_task_.runningtask.md)* - -*Defined in [packages/sdk/base/src/task.ts:54](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/task.ts#L54)* - -Runs an async function eternally until stopped - -**Parameters:** - -▪ **opts**: *RepeatTaskOptions* - -▪ **fn**: *function* - -function to run - -▸ (`ctx`: [RepeatTaskContext](../interfaces/_task_.repeattaskcontext.md)): *Promise‹void›* - -**Parameters:** - -Name | Type | ------- | ------ | -`ctx` | [RepeatTaskContext](../interfaces/_task_.repeattaskcontext.md) | - -**Returns:** *[RunningTask](../interfaces/_task_.runningtask.md)* - -___ - -### tryObtainValueWithRetries - -▸ **tryObtainValueWithRetries**<**A**>(`opts`: [RetryTaskOptions](../interfaces/_task_.retrytaskoptions.md)‹A›): *[RunningTaskWithValue](../interfaces/_task_.runningtaskwithvalue.md)‹A›* - -*Defined in [packages/sdk/base/src/task.ts:128](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/base/src/task.ts#L128)* - -**Type parameters:** - -▪ **A** - -**Parameters:** - -Name | Type | ------- | ------ | -`opts` | [RetryTaskOptions](../interfaces/_task_.retrytaskoptions.md)‹A› | - -**Returns:** *[RunningTaskWithValue](../interfaces/_task_.runningtaskwithvalue.md)‹A›* diff --git a/packages/docs/developer-resources/celo-dapp-gallery.md b/packages/docs/developer-resources/celo-dapp-gallery.md deleted file mode 100644 index 6a0ab28a7ff..00000000000 --- a/packages/docs/developer-resources/celo-dapp-gallery.md +++ /dev/null @@ -1,130 +0,0 @@ -# Celo DApp Gallery - -Welcome to the DApp Gallery! Here are some featured examples to help you get started building on Celo. - -Additionally, head over to [Celo Hub](https://celohub.org) and [Electric Capital Ecosystem Gallery](https://electric-capital.github.io/?p=/ecosystem/celo) to track new projects being built on Celo. If you're building on Celo, be sure to add your project information there. - -## [Celo Camp](https://www.celocamp.com/) Projects - -### GoodGhosting -[GoodGosting](https://www.goodghosting.com) is a no-loss DeFi saving game. Users can compete with others to get higher interest rates than when they would save by themselves. We created a shared saving pool smart contract, which plugs into existing Celo DeFi projects (e.g. Moola) to generate interest for all winning players. -[Github](https://github.com/Good-Ghosting/goodghosting-smart-contracts/tree/feature/celo) - -### Infibridge - -[Infibridge](https://www.infibridge.com) is a "Metamask like" browser extension wallet for Celo. It will support payment of gas fees in Celo or stable currencies like cUSD and cEUR. It has deep integration with Celo to allow staking, voting and token swaps. [Github](https://github.com/infibridge/browser-extension-wallet) - -### Biscoint DollarSave - -[Biscoint](https://biscoint.io) is working on an out-of-the-box [CELO and Celo Dollar hot wallet](https://github.com/Biscoint/celo-hot-wallet) to be used by projects that require automated processing of withdrawals. They also created a cUSD SPV client written in Typescript ([GitHub link](https://github.com/Biscoint/celo-spv)) - -### Paychant - -[Paychant](https://paychant.com) is developing an open source web wallet developed on the Celo blockchain. [GitHub](https://github.com/paychant/) - -### Moola - -[Moola](https://moola.market) is working on algorithmic money markets on Celo. [GitHub](https://github.com/moolamarket/moola) - -### LeafCelo - -[LeafCelo](https://leafglobalfintech.com/) is developing [lenrefugee](https://github.com/LeafGlobalFintech/leafcelo.git), a guarantor-backed DeFi lending platform for refugees. - -### El Dorado - -[El Dorado](https://eldorado.io/) is building "the crypto dollar wallet of LATAM. We are reinventing the way financial products and services are designed, especially for people living in unstable economies. We are going to provide all the services a Bank can offer and more. USD savings accounts and P2P payments/exchange. All powered by Open Blockchains." [GitHub](https://github.com/eldoradoio) - -### ReSource Network - -The [ReSource Network](http://www.resourcenetwork.co/) is building a resource-based mutual credit blockchain protocol. The initial version is deployed in CELO mainnet on address: [0x39049c02a56c3ecd046f6c2a9be0cffa2bc29c08](https://explorer.celo.org/address/0x39049c02a56c3ecd046f6c2a9be0cffa2bc29c08/transactions), [GitHub](https://github.com/ReSource-Network/Resource-Ethereum) - -### Pesabase - -An integration of a Celo Dollar (Stablecoin) and Mpesa, showing flows of payment between an Mpesa User and a Celo Blockchain wallet from anywhere in the world. Our aim with Pesabase is to provide African’s with a cheap and social option to remit and pay for goods and services. [Github](https://github.com/Kesholabs/celoBackend), [Android app](https://play.google.com/store/apps/details?id=com.pesabase.app) - -### Wallet as a Service - -Tangany's custody solution [Wallet as a Service](https://docs.tangany.com/?version=latest) enables you to create and manage HSM-secured wallets and interact with the underlying blockchain. Our API makes it incredibly easy for developers to execute transactions, check details of past transactions or query account balances without any worries about private key safekeeping. For the Celo Camp 2020 we have developed a prototype version of our product that integrates the Celo blockchain. The [demo project](https://github.com/adrianmitter/celo-camp) presents the new features and provides some code snippets to get started. - -### impactMarket - -[impactMarket](https://github.com/impactMarket) enables any vulnerable community to create its own unconditional basic income system for their beneficiaries, where each one can claim a fixed amount on a regular basis and make payments for free. - -### Celo Toolkit by MugglePay - -[MugglePay](https://mugglepay.com/) provides a payment SDK for merchants to accept cryptocurrencies. Mugglepay makes crypto payment easy and thousands of merchants are onboarded with MugglePay SDK. For the Celo Camp 2020, we will integrate with cUSD/CELO for payments on Celo blockchain. - -[Celo Toolkit](https://celo.mugglepay.com) is the [open source](https://github.com/MugglePay/celo-toolkit) interface for managing Celo accounts on Web. Celo developer might start with a funded Celo account (Testnet) now in 1 minute. Phone number or app downloads are not necessary. - -### Dunia Pay Wallet - -At Dunia Payment, we are building an electronic wallet that will let people in Sub Saharan Africa send and receive money directly on their phone.The app will use the Celo light client to process transactions faster, even in low internet connection areas common in Africa. The wallet will be built on top of the Celo platform and also using a set of external open source smart contracts. [Github](https://github.com/duniapay/Dunia-Wallet-Celo) - -### Cryptum Woocommerce Checkout - -Based on Cryptum APIs, the open source Plugin connects to WordPress e-commerces checkouts, providing fast and easy integration for Celo and cUSD acceptance and management for merchants. [Github](https://github.com/blockforce-official/cryptum-checkout-wordpress-plugin) - -### Cryptum Woocommerce NFT - -Based on Cryptum APIs, the open source Plugin connects to WordPress e-commerces, providing easy and fast Celo NFT creation and integration through a nocode interface - with marketplace goods for merchants, offering customers unique experiences and extending NFT possibilities for many marketplaces. [Github](https://github.com/blockforce-official/cryptum-nft-wordpress-plugin) - -### Bloinx by BX Smart Labs - -A decentralized app that helps users to create reliable savings communities by using smart contracts, in a transparent, verifiable, and trustworthy environment. [Bloinx](https://bloinx.io/) is upgrading the way to manage TANDAS, which are rotating, saving, and credit associations, used in Latin American communities. [Github](https://github.com/Bloinx/bloinx-mobile) - -### Poof.cash - -[Poof.cash](https://poof.cash) is a protocol for decentralized, private transactions. It is the first native privacy tool for Celo users. [GitHub](https://github.com/poofcash) - -## [Decentralized Impact Incubator](https://blockchainforsocialimpact.com/incubator-winners-2020/) Winners - -### Multiply.Charity by Abundance - -[Multiply](https://multiply.charity/) the impact of charitable donations by providing liquidity in credit tokens where the legacy financial system fails. Compared to cash donations, like GiveDirectly, this process has two major advantages: The credit tokens 1) fill a demand for liquidity (which banks fail to deliver), thus increasing the incentive to produce goods and services and 2) stay in the local economy longer, resulting in a larger impact (or lower cost overhead) per donation. Early field tests demonstrate up to 20x impact over traditional donations and double the velocity (the rate at which the money is traded) to the US Dollar. [Github](https://github.com/abundance-stack) - -### Bienvenir - -Decentralized application to help coordinate and improve the impact metric of non-profit organizations that work with migrants in Latin America. [GitHub](https://github.com/nestorbonilla/bienvenir) - -## Additional DApps - -### Ubeswap - -[Ubeswap](https://ubeswap.org/) is a mobile-first DeFi exchange, a mobile compatible fork of Uniswap running on the Celo blockchain. Ubeswap is [open source on GitHub](https://github.com/ubeswap) and available on Safari for iOS and any browser on Android. - -### Celo Vote - -[Celovote](https://celovote.com/) automatically distributes your stake to preferred validator groups that have high estimated APY (annual percentage yield) and automatically rebalances votes if any of the voted groups fails to maintain high uptime. You retain full custody of your CELO and receive 100% of your rewards. - -### Celo Tools - -[Celo Tools](https://celotools.com/) is an accessible frontend to the [Celo CLI](../command-line-interface/introduction.md). Anyone and everyone participating in the Celo network should be able to stake and vote on governance proposals, Celo Tools provides this functionality for those without the know-how to access a command line. - -### Savings Circle - -Savings Circles let you pool funds with your friends to save for large purchases. They are known by a variety of names around the world and are a common way to get liquidity and access to loans without access to formal financial institutions. [Github](https://github.com/celo-org/savings-circle-demo) - -### Lovecrypto - -[Lovecrypto](https://www.lovecrypto.net/) enables people to earn cUSD to do tasks in their phones. [Github](https://github.com/lucaszsd/LovecryptoAppScreenshots) - -### Cent Wallet - -[Cent](https://cent.finance/) is a mobile wallet for buying and holding crypto as well as using Wallet Connect to authorise transactions on exchanges and other services. Cent is [open source on GitHub](https://github.com/centfinance/Cent.Wallet) and available on Android and iOS through the app store. - -### Symmetric - -[Symmetric](https://symmetric.finance/) is a fork of Balancer for Celo. Symmetric is [open source on GitHub](https://github.com/centfinance), has a tokenomics model that includes a risk fund protecting traders, is to be DAO controlled and has a roadmap of new features. - -### Tradegen - -[Tradegen](https://www.tradegen.io/) is a decentralized social trading platform that aims to make algo trading more inclusive and transparent. The platform consists of trading strategies, user-managed pools, and a marketplace for custom indicators/comparators to use in on-chain trading bots. Tradegen is [open source on GitHub](https://github.com/Tradegen/tradegen). - -## Umoja - -UMOJA is an open banking platform that enables NGOs and FSPs to provide flexible micro-financing to anyone with a phone. Umoja is [open source on GitHub](https://github.com/Emerging-Impact) and consists of a suite of APIs and products to make digital money accounts more accessible (and more easily to develop for other financial applications). - - -## Add your app to this list - -_Are you building on Celo? To add your project, please submit a pull request updating this page!_ diff --git a/packages/docs/developer-resources/celo-for-eth-devs.md b/packages/docs/developer-resources/celo-for-eth-devs.md deleted file mode 100644 index dd5d098650d..00000000000 --- a/packages/docs/developer-resources/celo-for-eth-devs.md +++ /dev/null @@ -1,82 +0,0 @@ -# Celo for Ethereum Developers - -For a general overview of the Celo network and architecture, see [the Celo Overview page](../overview.md). - -## What is Celo's Relationship to Ethereum? - -Celo is a layer 1 protocol and blockchain platform, and the Celo Mainnet is entirely separate from the Ethereum network. -While the Celo client originated as a fork of Ethereum Go langauge client, [go-ethereum](https://github.com/ethereum/go-ethereum) (or geth), it has several significant differences, including a proof-of-stake based PBFT consensus mechanism. All the cryptoassets on Celo have ERC-20 compliant interfaces, meaning that while they are not ERC-20 tokens on the Ethereum Mainnet, all familiar tooling and code that support ERC-20 tokens can be easily adapted for Celo assets, including the Celo Native Asset (CELO) and the Celo Dollar (cUSD). - -In terms of programmability, Celo is similar to Ethereum. Both networks run the Ethereum Virtual Machine (EVM) to support smart contract functionality. -This means that all programming languages, developer tooling and standards that target the EVM are relevant for both Celo and Ethereum. -Developers building on Celo can write smart contracts in [Solidity](https://solidity.readthedocs.io/en/latest/), use [Truffle](https://www.trufflesuite.com/) for smart contract management and -take advantage of smart contract standards that have already been developed for Ethereum. - -## The ERC-20 Token Standard - -The [ERC20 token standard](https://eips.ethereum.org/EIPS/eip-20) is a standard API for tokens within smart contracts. -This standard interface allows any tokens to be re-used by different applications. -The ERC20 token standard is blockchain agnostic, so ERC20 tokens can be implemented on any blockchain. - -The standard includes the __*optional*__ functions - -```javascript -function name() public view returns (string) -function symbol() public view returns (string) -function decimals() public view returns (uint8) -``` - -and the __*required*__ functions - -```javascript -function totalSupply() public view returns (uint256) -function balanceOf(address _owner) public view returns (uint256 balance) -function transfer(address _to, uint256 _value) public returns (bool success) -function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) -function approve(address _spender, uint256 _value) public returns (bool success) -function allowance(address _owner, address _spender) public view returns (uint256 remaining) -``` - -and includes the following events - -```js -event Transfer(address indexed _from, address indexed _to, uint256 _value) -event Approval(address indexed _owner, address indexed _spender, uint256 _value) -``` - -An ERC20 compliant contract must include the required functions and events at *minimum*. -It can include additional functions and events and still be ERC20 compliant. - -## The Celo Native Asset and the Celo Dollar - -This interface is relevant for two important assets on the Celo network, the Celo native asset (CELO) and the Celo Dollar (cUSD). - -CELO was called Celo Gold (cGLD) when the contract was deployed, so you will often see references to Celo Gold in the codebase. -CELO and cGLD are the same thing. You can [view the CELO implementation here.](https://explorer.celo.org/address/0x8dd4f800851db9dc219fdfaeb82f8d69e2b13582/contracts) - -CELO has an ERC20 interface, so users can interact with CELO via the token standard, but it is important to note that not all CELO transfers are required to go through the token contract. -CELO can also be transferred by specifying the value field of a transaction, in the same way that ETH can be transferred in Ethereum. -To properly monitor balance changing operations of CELO, it can be helpful to use [Celo Rosetta.](https://github.com/celo-org/rosetta) -Celo Rosetta provides an easy way to obtain changes that are not easily queryable using the celo-blockchain RPC. - -The Celo Dollar (cUSD) is implemented solely as a smart contract, so all cUSD actions are mediated by the smart contract. -You can [view the implementation here.](https://explorer.celo.org/address/0xaa933baf03cfc55b8e4e0d7de479bcc12f189352/contracts) - -## Key differences between Celo and Ethereum - -### Features exclusive to Celo - - 1. Celo allows users to pay transaction fees in cryptoassets other than the native asset. On Ethereum, users must pay transaction fees in Ether. For example, users can send cUSD, and then pay any transaction fees in cUSD as well. - 2. The Celo protocol uses BFT Proof-of-Stake for maintaining consensus. This allows blocks on Celo to be created in 5 seconds, as compared to ~12+ seconds on Ethereum. In addition, all blocks are finalized immediately, so there is no need to wait for more than 1 block confirmation to ensure that a transaction won't be reverted. - -### Things to watch out for - - 1. As previously mentioned, CELO transfers are not required to happen via the ERC20 interface. A user's CELO balance may change without any interaction with the CELO contract, as they may transfer CELO natively. - - 2. Celo transaction objects are slightly different from transaction objects on Ethereum. - Ethereum transaction objects include fields to, value, gas, gasPrice, data, nonce, signature (v,r,s). - Celo transaction objects include the same fields as Ethereum transaction objects, plus feeCurrency, gatewayFee and gatewayFeeRecipient. - These additional fields are included to provide [full node incentives](../overview.md#incentives-for-operating-full-nodes) - and to allow users to [pay transaction fees in different currencies.](../overview.md#richer-transactions) As of May 19th, 2021, with the [Donut hardfork](https://medium.com/celoorg/dissecting-the-donut-hardfork-23cad6015fa2), the Celo network accepts both Celo transaction objects and Ethereum transaction objects as valid Celo transactions. This means that you can use most Ethereum tools with Celo, right out of the box (just point them at the Celo network). When sending Ethereum formatted transactions on Celo, you will not be able to use Celo features of specifying transaction fee currencies or full node incentives. - - 3. When using mnemonic seed phrases (or secret phrases), Celo accounts (a private key and corresponding address) are derived differently from Ethereum accounts. The Celo key derivation path is `m/44'/52752'/0'/0` whereas Ethereum’s is `m/44'/60'/0'/0`. This means that going from a seed phrase to accounts will be different when using Ethereum vs Celo wallets. diff --git a/packages/docs/developer-resources/connect/reference/README.md b/packages/docs/developer-resources/connect/reference/README.md deleted file mode 100644 index 956abfd4835..00000000000 --- a/packages/docs/developer-resources/connect/reference/README.md +++ /dev/null @@ -1,162 +0,0 @@ -# @celo/connect - -

- - celo logo - -

- -**Celo Monorepo - Official repository for core projects comprising the Celo platform** - -This repository contains the source code for the Celo core projects including the [smart contracts](https://github.com/celo-org/celo-monorepo/tree/master/packages/protocol), [wallet app](https://github.com/celo-org/celo-monorepo/tree/master/packages/mobile), -and other packages. The source code for the Celo Blockchain which operates a node on the Celo Network is kept in a separate repo [here](https://github.com/celo-org/celo-blockchain). - - - -[![CircleCI](https://img.shields.io/circleci/build/github/celo-org/celo-monorepo/master)](https://circleci.com/gh/celo-org/celo-monorepo/tree/master) -[![Codecov](https://img.shields.io/codecov/c/github/celo-org/celo-monorepo)](https://codecov.io/gh/celo-org/celo-monorepo) -[![GitHub contributors](https://img.shields.io/github/contributors/celo-org/celo-monorepo)](https://github.com/celo-org/celo-monorepo/graphs/contributors) -[![GitHub commit activity](https://img.shields.io/github/commit-activity/w/celo-org/celo-monorepo)](https://github.com/celo-org/celo-monorepo/graphs/contributors) -[![GitHub Stars](https://img.shields.io/github/stars/celo-org/celo-monorepo.svg)](https://github.com/celo-org/celo-monorepo/stargazers) -![GitHub repo size](https://img.shields.io/github/repo-size/celo-org/celo-monorepo) -[![GitHub](https://img.shields.io/github/license/celo-org/celo-monorepo?color=blue)](https://github.com/celo-org/celo-monorepo/blob/master/LICENSE) - - - -[![Website celo.org](https://img.shields.io/website-up-down-green-red/https/celo.org.svg)](https://celo.org) -[![Blog](https://img.shields.io/badge/blog-up-green)](https://medium.com/celoorg) -[![docs](https://img.shields.io/badge/docs-up-green)](https://docs.celo.org/) -[![Youtube](https://img.shields.io/badge/YouTube%20channel-up-green)](https://www.youtube.com/channel/UCCZgos_YAJSXm5QX5D5Wkcw/videos?view=0&sort=p&flow=grid) -[![forum](https://img.shields.io/badge/forum-up-green)](https://forum.celo.org) -[![Discord](https://img.shields.io/discord/600834479145353243.svg)](https://discord.gg/RfHQKtY) -[![Twitter CeloDevs](https://img.shields.io/twitter/follow/celodevs?style=social)](https://twitter.com/celodevs) -[![Twitter CeloOrg](https://img.shields.io/twitter/follow/celoorg?style=social)](https://twitter.com/CeloOrg) -[![Subreddit subscribers](https://img.shields.io/reddit/subreddit-subscribers/CeloHQ?style=social)](https://www.reddit.com/r/CeloHQ/) - - - -[![GitHub pull requests by-label](https://img.shields.io/github/issues-pr-raw/celo-org/celo-monorepo)](https://github.com/celo-org/celo-monorepo/pulls) -[![GitHub Issues](https://img.shields.io/github/issues-raw/celo-org/celo-monorepo.svg)](https://github.com/celo-org/celo-monorepo/issues) -[![GitHub issues by-label](https://img.shields.io/github/issues/celo-org/celo-monorepo/1%20hour%20tasks)](https://github.com/celo-org/celo-monorepo/issues?q=is%3Aopen+is%3Aissue+label%3A%221+hour+tasks%22) -[![GitHub issues by-label](https://img.shields.io/github/issues/celo-org/celo-monorepo/betanet-phase-2)](https://github.com/celo-org/celo-monorepo/issues?q=is%3Aopen+is%3Aissue+label%3Abetanet-phase-2) -[![GitHub issues by-label](https://img.shields.io/github/issues/celo-org/celo-monorepo/betanet-phase-3)](https://github.com/celo-org/celo-monorepo/issues?q=is%3Aopen+is%3Aissue+label%3Abetanet-phase-3) - -Contents: - - - -- [Celo's Mission - Prosperity for All](#mission) -- [The Celo Stack](#stack) -- [Documentation](#docs) -- [Issues](#issues) -- [Repo Structure](#repo) -- [Contributing](#contributing) -- [Ask Questions, Find Answers, Get in Touch](#ask) -- [License](#license) - - -## 🥅 Celo's Mission - Prosperity for All - -Celo, pronounced /ˈtselo/, means ‘purpose’ in Esperanto. In a similar spirit, we are aiming to create a new platform to connect people globally and bring financial stability to those who need it most. We believe blockchain technology is one of the most exciting innovations in recent history and as a community we look to push the boundaries of what is possible with it today. More importantly, we are driven by purpose -- to solve real-world problems such as lack of access to sound currency, or friction for cash-transfer programs aimed to alleviate poverty. Our mission is to build a monetary system that creates the conditions for prosperity for all. - - -

- - Play on Youtube - What if money were beautiful - -
- What if money were beautiful? -

- -## 🧱 The Celo Stack - -Celo is oriented around providing the simplest possible experience for end users, who may have no familiarity with cryptocurrencies, and may be using low cost devices with limited connectivity. To achieve this, the project takes a full-stack approach, where each layer of the stack is designed with the end user in mind whilst considering other stakeholders \(e.g. operators of nodes in the network\) involved in enabling the end user experience. - -The Celo stack is structured into the following logical layers: - - -

- Celo protocol -
- The Celo Blockchain and Celo Core Contracts together comprise the Celo Protocol -

- -- **Celo Blockchain**: An open cryptographic protocol that allows applications to make transactions with and run smart contracts in a secure and decentralized fashion. The Celo Blockchain has shared ancestry with [Ethereum](https://www.ethereum.org), and maintains full EVM compatibility for smart contracts. However it uses a [Byzantine Fault Tolerant](http://pmg.csail.mit.edu/papers/osdi99.pdf) \(BFT\) consensus mechanism rather than Proof of Work, and has different block format, transaction format, client synchronization protocols, and gas payment and pricing mechanisms. The network’s native asset is Celo Gold, exposed via an ERC-20 interface. - -- **Celo Core Contracts**: A set of smart contracts running on the Celo Blockchain that comprise much of the logic of the platform features including ERC-20 stable currencies, identity attestations, Proof of Stake and governance. These smart contracts are upgradeable and managed by the decentralized governance process. - - -

- Celo network -
- Topology of a Celo Network -

- -- **Applications:** Applications for end users built on the Celo platform. The Celo Wallet app, the first of an ecosystem of applications, allows end users to manage accounts and make payments securely and simply by taking advantage of the innovations in the Celo protocol. Applications take the form of external mobile or backend software: they interact with the Celo Blockchain to issue transactions and invoke code that forms the Celo Core Contracts’ API. Third parties can also deploy custom smart contracts that their own applications can invoke, which in turn can leverage Celo Core Contracts. Applications may use centralized cloud services to provide some of their functionality: in the case of the Celo Wallet, push notifications and a transaction activity feed. - -## 📚 Documentation - -Follow the instructions in [SETUP.md](SETUP.md) to get a development environment set up. - -See [Developer's Guide](https://docs.celo.org/) for full details about the design of the Celo protocol and other information about running these projects. - -## 🙋 Issues - -See the [issue backlog](https://github.com/celo-org/celo-monorepo/issues) for a list of active or proposed tasks. Feel free to create new issues to report bugs and/or request features. - -## 📂 Repo Structure - -The repository has the following packages (sub projects): - -- [attestation-service](packages/attestation-service) - service run by validators on the Celo network to send SMS messages, enabling attestations of user phone numbers and their accounts on the Celo network -- [blockchain-api](packages/blockchain-api) - service that uses Blockscout to present view of transactions by account for Celo Wallet activity feed -- [celotool](packages/celotool) - scripts for deploying and managing testnets -- [cli](packages/cli) - tool that uses ContractKit to interact with the Celo protocol ([docs](https://docs.celo.org/getting-started/using-the-cli)) -- [contractkit](packages/contractkit) - library to help developers and validators interact with the protocol and it's smart contracts ([docs](https://docs.celo.org/celo-sdk/contractkit)) -- [dappkit](packages/dappkit) - set of functions for mobile DApps to work with the wallet app (ex. sign transactions and access the user's account) ([docs](https://docs.celo.org/celo-sdk/dappkit)) -- [dev-utils](packages/dev-utils) - a utils package for use as a dev dependency -- [docs](packages/docs) - technical documentation for the Celo project ([live](https://docs.celo.org/)) -- [faucet](packages/faucet) - faucet deployment configuration ([live](https://celo.org/build/faucet)) -- [helm-charts](packages/helm-charts) - templatized deployments of entire environments to Kubernetes clusters -- [mobile](packages/mobile) - Android wallet app for the Celo platform ([docs](https://docs.celo.org/getting-started/using-the-mobile-wallet), [live](https://play.google.com/store/apps/details?id=org.celo.mobile.alfajores)) -- [notification-service](packages/notification-service) - service for managing push notifications for Celo Wallet -- [protocol](packages/protocol) - identity, stability and other smart contracts for the Celo protocol ([docs](https://docs.celo.org/celo-codebase/protocol)) -- [react-components](packages/react-components) - generalized react native components -- [reserve-site](packages/reserve-site) - website for ([Celo Reserve.org](https://celoreserve.org/)) -- [terraform-modules](packages/terraform-modules) - templatized deployments of entire VM-based testnets for Google Cloud Platform -- [typescript](packages/typescript) - no README available (improve?) -- [utils](packages/utils) - no README available (improve?) - -Code owners for each package can be found in [.github/CODEOWNERS](.github/CODEOWNERS). - -## ✍️ Contributing - -Feel free to jump on the Celo 🚂🚋🚋🚋. Improvements and contributions are highly encouraged! 🙏👊 - -See the [contributing guide](https://docs.celo.org/community/contributing) for details on how to participate. -[![GitHub issues by-label](https://img.shields.io/github/issues/celo-org/celo-monorepo/1%20hour%20tasks)](https://github.com/celo-org/celo-monorepo/issues?q=is%3Aopen+is%3Aissue+label%3A%221+hour+tasks%22) - -All communication and contributions to the Celo project are subject to the [Celo Code of Conduct](https://celo.org/code-of-conduct). - -Not yet ready to contribute but do like the project? Support Celo with a ⭐ or share the love in a [![Twitter URL](https://img.shields.io/twitter/url?style=social&url=https%3A%2F%2Fcelo.org%2F)](https://twitter.com/intent/tweet?url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DkKggE5OvyhE&via=celohq&text=Checkout%20celo%21%20Love%20what%20they%20are%20building.&hashtags=celo) - - - -## 💬 Ask Questions, Find Answers, Get in Touch - -- [Website](https://celo.org/) -- [Docs](https://docs.celo.org/) -- [Blog](https://medium.com/celohq) -- [YouTube](https://www.youtube.com/channel/UCCZgos_YAJSXm5QX5D5Wkcw/videos?view=0&sort=p&flow=grid) -- [Forum](https://forum.celo.org) -- [Discord](https://discord.gg/vRbExjv) -- [Twitter](https://twitter.com/CeloDevs) -- [Reddit](https://www.reddit.com/r/CeloHQ/) -- [Community Events](https://celo.org/community) - -## 📜 License - -All packages are licensed under the terms of the [Apache 2.0 License](LICENSE) unless otherwise specified in the LICENSE file at package's root. diff --git a/packages/docs/developer-resources/connect/reference/SUMMARY.md b/packages/docs/developer-resources/connect/reference/SUMMARY.md deleted file mode 100644 index cf616e0a683..00000000000 --- a/packages/docs/developer-resources/connect/reference/SUMMARY.md +++ /dev/null @@ -1,58 +0,0 @@ -* [Globals](globals.md) -* [Modules]() - * [abi-types](modules/_abi_types_.md) - * [ABIDefinition](interfaces/_abi_types_.abidefinition.md) - * [AbiCoder](interfaces/_abi_types_.abicoder.md) - * [DecodedParamsArray](interfaces/_abi_types_.decodedparamsarray.md) - * [DecodedParamsObject](interfaces/_abi_types_.decodedparamsobject.md) - * [celo-provider](modules/_celo_provider_.md) - * [CeloProvider](classes/_celo_provider_.celoprovider.md) - * [connection](modules/_connection_.md) - * [Connection](classes/_connection_.connection.md) - * [ConnectionOptions](interfaces/_connection_.connectionoptions.md) - * [types](modules/_types_.md) - * [CeloParams](interfaces/_types_.celoparams.md) - * [CeloTxObject](interfaces/_types_.celotxobject.md) - * [EncodedTransaction](interfaces/_types_.encodedtransaction.md) - * [JsonRpcPayload](interfaces/_types_.jsonrpcpayload.md) - * [JsonRpcResponse](interfaces/_types_.jsonrpcresponse.md) - * [Provider](interfaces/_types_.provider.md) - * [RLPEncodedTx](interfaces/_types_.rlpencodedtx.md) - * [utils/abi-utils](modules/_utils_abi_utils_.md) - * [utils/celo-transaction-object](modules/_utils_celo_transaction_object_.md) - * [CeloTransactionObject](classes/_utils_celo_transaction_object_.celotransactionobject.md) - * [utils/formatter](modules/_utils_formatter_.md) - * [utils/provider-utils](modules/_utils_provider_utils_.md) - * [utils/rpc-caller](modules/_utils_rpc_caller_.md) - * [DefaultRpcCaller](classes/_utils_rpc_caller_.defaultrpccaller.md) - * [RpcCaller](interfaces/_utils_rpc_caller_.rpccaller.md) - * [utils/tx-params-normalizer](modules/_utils_tx_params_normalizer_.md) - * [TxParamsNormalizer](classes/_utils_tx_params_normalizer_.txparamsnormalizer.md) - * [utils/tx-result](modules/_utils_tx_result_.md) - * [TransactionResult](classes/_utils_tx_result_.transactionresult.md) - * [wallet](modules/_wallet_.md) - * [ReadOnlyWallet](interfaces/_wallet_.readonlywallet.md) - * [Signer](interfaces/_wallet_.signer.md) -* [Classes]() - * [CeloProvider](classes/_celo_provider_.celoprovider.md) - * [Connection](classes/_connection_.connection.md) - * [CeloTransactionObject](classes/_utils_celo_transaction_object_.celotransactionobject.md) - * [DefaultRpcCaller](classes/_utils_rpc_caller_.defaultrpccaller.md) - * [TxParamsNormalizer](classes/_utils_tx_params_normalizer_.txparamsnormalizer.md) - * [TransactionResult](classes/_utils_tx_result_.transactionresult.md) -* [Interfaces]() - * [ABIDefinition](interfaces/_abi_types_.abidefinition.md) - * [AbiCoder](interfaces/_abi_types_.abicoder.md) - * [DecodedParamsArray](interfaces/_abi_types_.decodedparamsarray.md) - * [DecodedParamsObject](interfaces/_abi_types_.decodedparamsobject.md) - * [ConnectionOptions](interfaces/_connection_.connectionoptions.md) - * [CeloParams](interfaces/_types_.celoparams.md) - * [CeloTxObject](interfaces/_types_.celotxobject.md) - * [EncodedTransaction](interfaces/_types_.encodedtransaction.md) - * [JsonRpcPayload](interfaces/_types_.jsonrpcpayload.md) - * [JsonRpcResponse](interfaces/_types_.jsonrpcresponse.md) - * [Provider](interfaces/_types_.provider.md) - * [RLPEncodedTx](interfaces/_types_.rlpencodedtx.md) - * [RpcCaller](interfaces/_utils_rpc_caller_.rpccaller.md) - * [ReadOnlyWallet](interfaces/_wallet_.readonlywallet.md) - * [Signer](interfaces/_wallet_.signer.md) \ No newline at end of file diff --git a/packages/docs/developer-resources/connect/reference/classes/_celo_provider_.celoprovider.md b/packages/docs/developer-resources/connect/reference/classes/_celo_provider_.celoprovider.md deleted file mode 100644 index 214dc3b0056..00000000000 --- a/packages/docs/developer-resources/connect/reference/classes/_celo_provider_.celoprovider.md +++ /dev/null @@ -1,176 +0,0 @@ -# Class: CeloProvider - -## Hierarchy - -* **CeloProvider** - -## Implements - -* [Provider](../interfaces/_types_.provider.md) - -## Index - -### Constructors - -* [constructor](_celo_provider_.celoprovider.md#constructor) - -### Properties - -* [connection](_celo_provider_.celoprovider.md#readonly-connection) -* [existingProvider](_celo_provider_.celoprovider.md#readonly-existingprovider) - -### Accessors - -* [connected](_celo_provider_.celoprovider.md#connected) - -### Methods - -* [addAccount](_celo_provider_.celoprovider.md#addaccount) -* [getAccounts](_celo_provider_.celoprovider.md#getaccounts) -* [isLocalAccount](_celo_provider_.celoprovider.md#islocalaccount) -* [removeAccount](_celo_provider_.celoprovider.md#removeaccount) -* [send](_celo_provider_.celoprovider.md#send) -* [stop](_celo_provider_.celoprovider.md#stop) -* [supportsSubscriptions](_celo_provider_.celoprovider.md#supportssubscriptions) - -## Constructors - -### constructor - -\+ **new CeloProvider**(`existingProvider`: [Provider](../interfaces/_types_.provider.md), `connection`: [Connection](_connection_.connection.md)): *[CeloProvider](_celo_provider_.celoprovider.md)* - -*Defined in [packages/sdk/connect/src/celo-provider.ts:37](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/celo-provider.ts#L37)* - -**Parameters:** - -Name | Type | ------- | ------ | -`existingProvider` | [Provider](../interfaces/_types_.provider.md) | -`connection` | [Connection](_connection_.connection.md) | - -**Returns:** *[CeloProvider](_celo_provider_.celoprovider.md)* - -## Properties - -### `Readonly` connection - -• **connection**: *[Connection](_connection_.connection.md)* - -*Defined in [packages/sdk/connect/src/celo-provider.ts:39](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/celo-provider.ts#L39)* - -___ - -### `Readonly` existingProvider - -• **existingProvider**: *[Provider](../interfaces/_types_.provider.md)* - -*Defined in [packages/sdk/connect/src/celo-provider.ts:39](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/celo-provider.ts#L39)* - -## Accessors - -### connected - -• **get connected**(): *any* - -*Defined in [packages/sdk/connect/src/celo-provider.ts:242](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/celo-provider.ts#L242)* - -**Returns:** *any* - -## Methods - -### addAccount - -▸ **addAccount**(`privateKey`: string): *void* - -*Defined in [packages/sdk/connect/src/celo-provider.ts:44](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/celo-provider.ts#L44)* - -**Parameters:** - -Name | Type | ------- | ------ | -`privateKey` | string | - -**Returns:** *void* - -___ - -### getAccounts - -▸ **getAccounts**(): *Promise‹string[]›* - -*Defined in [packages/sdk/connect/src/celo-provider.ts:54](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/celo-provider.ts#L54)* - -**Returns:** *Promise‹string[]›* - -___ - -### isLocalAccount - -▸ **isLocalAccount**(`address?`: undefined | string): *boolean* - -*Defined in [packages/sdk/connect/src/celo-provider.ts:58](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/celo-provider.ts#L58)* - -**Parameters:** - -Name | Type | ------- | ------ | -`address?` | undefined | string | - -**Returns:** *boolean* - -___ - -### removeAccount - -▸ **removeAccount**(`address`: string): *void* - -*Defined in [packages/sdk/connect/src/celo-provider.ts:49](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/celo-provider.ts#L49)* - -**Parameters:** - -Name | Type | ------- | ------ | -`address` | string | - -**Returns:** *void* - -___ - -### send - -▸ **send**(`payload`: [JsonRpcPayload](../interfaces/_types_.jsonrpcpayload.md), `callback`: [Callback](../modules/_types_.md#callback)‹[JsonRpcResponse](../interfaces/_types_.jsonrpcresponse.md)›): *void* - -*Implementation of [Provider](../interfaces/_types_.provider.md)* - -*Defined in [packages/sdk/connect/src/celo-provider.ts:65](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/celo-provider.ts#L65)* - -Send method as expected by web3.js - -**Parameters:** - -Name | Type | ------- | ------ | -`payload` | [JsonRpcPayload](../interfaces/_types_.jsonrpcpayload.md) | -`callback` | [Callback](../modules/_types_.md#callback)‹[JsonRpcResponse](../interfaces/_types_.jsonrpcresponse.md)› | - -**Returns:** *void* - -___ - -### stop - -▸ **stop**(): *void* - -*Defined in [packages/sdk/connect/src/celo-provider.ts:140](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/celo-provider.ts#L140)* - -**Returns:** *void* - -___ - -### supportsSubscriptions - -▸ **supportsSubscriptions**(): *any* - -*Defined in [packages/sdk/connect/src/celo-provider.ts:246](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/celo-provider.ts#L246)* - -**Returns:** *any* diff --git a/packages/docs/developer-resources/connect/reference/classes/_connection_.connection.md b/packages/docs/developer-resources/connect/reference/classes/_connection_.connection.md deleted file mode 100644 index 9b015cc6d2b..00000000000 --- a/packages/docs/developer-resources/connect/reference/classes/_connection_.connection.md +++ /dev/null @@ -1,663 +0,0 @@ -# Class: Connection - -## Hierarchy - -* **Connection** - -## Index - -### Constructors - -* [constructor](_connection_.connection.md#constructor) - -### Properties - -* [paramsPopulator](_connection_.connection.md#readonly-paramspopulator) -* [rpcCaller](_connection_.connection.md#rpccaller) -* [wallet](_connection_.connection.md#optional-wallet) -* [web3](_connection_.connection.md#readonly-web3) - -### Accessors - -* [defaultAccount](_connection_.connection.md#defaultaccount) -* [defaultFeeCurrency](_connection_.connection.md#defaultfeecurrency) -* [defaultGasInflationFactor](_connection_.connection.md#defaultgasinflationfactor) -* [defaultGasPrice](_connection_.connection.md#defaultgasprice) - -### Methods - -* [addAccount](_connection_.connection.md#addaccount) -* [chainId](_connection_.connection.md#chainid) -* [coinbase](_connection_.connection.md#coinbase) -* [estimateGas](_connection_.connection.md#estimategas) -* [estimateGasWithInflationFactor](_connection_.connection.md#estimategaswithinflationfactor) -* [fillGasPrice](_connection_.connection.md#fillgasprice) -* [gasPrice](_connection_.connection.md#gasprice) -* [getAbiCoder](_connection_.connection.md#getabicoder) -* [getAccounts](_connection_.connection.md#getaccounts) -* [getBalance](_connection_.connection.md#getbalance) -* [getBlock](_connection_.connection.md#getblock) -* [getBlockNumber](_connection_.connection.md#getblocknumber) -* [getLocalAccounts](_connection_.connection.md#getlocalaccounts) -* [getNodeAccounts](_connection_.connection.md#getnodeaccounts) -* [getTransaction](_connection_.connection.md#gettransaction) -* [getTransactionCount](_connection_.connection.md#gettransactioncount) -* [getTransactionReceipt](_connection_.connection.md#gettransactionreceipt) -* [isListening](_connection_.connection.md#islistening) -* [isLocalAccount](_connection_.connection.md#islocalaccount) -* [isSyncing](_connection_.connection.md#issyncing) -* [nonce](_connection_.connection.md#nonce) -* [removeAccount](_connection_.connection.md#removeaccount) -* [sendSignedTransaction](_connection_.connection.md#sendsignedtransaction) -* [sendTransaction](_connection_.connection.md#sendtransaction) -* [sendTransactionObject](_connection_.connection.md#sendtransactionobject) -* [setGasPriceForCurrency](_connection_.connection.md#setgaspriceforcurrency) -* [setProvider](_connection_.connection.md#setprovider) -* [sign](_connection_.connection.md#sign) -* [signTypedData](_connection_.connection.md#signtypeddata) -* [stop](_connection_.connection.md#stop) - -## Constructors - -### constructor - -\+ **new Connection**(`web3`: Web3, `wallet?`: [ReadOnlyWallet](../interfaces/_wallet_.readonlywallet.md), `handleRevert`: boolean): *[Connection](_connection_.connection.md)* - -*Defined in [packages/sdk/connect/src/connection.ts:52](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/connection.ts#L52)* - -**Parameters:** - -Name | Type | Default | ------- | ------ | ------ | -`web3` | Web3 | - | -`wallet?` | [ReadOnlyWallet](../interfaces/_wallet_.readonlywallet.md) | - | -`handleRevert` | boolean | true | - -**Returns:** *[Connection](_connection_.connection.md)* - -## Properties - -### `Readonly` paramsPopulator - -• **paramsPopulator**: *[TxParamsNormalizer](_utils_tx_params_normalizer_.txparamsnormalizer.md)* - -*Defined in [packages/sdk/connect/src/connection.ts:48](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/connection.ts#L48)* - -___ - -### rpcCaller - -• **rpcCaller**: *[RpcCaller](../interfaces/_utils_rpc_caller_.rpccaller.md)* - -*Defined in [packages/sdk/connect/src/connection.ts:49](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/connection.ts#L49)* - -___ - -### `Optional` wallet - -• **wallet**? : *[ReadOnlyWallet](../interfaces/_wallet_.readonlywallet.md)* - -*Defined in [packages/sdk/connect/src/connection.ts:54](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/connection.ts#L54)* - -___ - -### `Readonly` web3 - -• **web3**: *Web3* - -*Defined in [packages/sdk/connect/src/connection.ts:54](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/connection.ts#L54)* - -## Accessors - -### defaultAccount - -• **get defaultAccount**(): *[Address](../modules/_types_.md#address) | undefined* - -*Defined in [packages/sdk/connect/src/connection.ts:98](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/connection.ts#L98)* - -Default account for generated transactions (eg. tx.from) - -**Returns:** *[Address](../modules/_types_.md#address) | undefined* - -• **set defaultAccount**(`address`: [Address](../modules/_types_.md#address) | undefined): *void* - -*Defined in [packages/sdk/connect/src/connection.ts:90](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/connection.ts#L90)* - -Set default account for generated transactions (eg. tx.from ) - -**Parameters:** - -Name | Type | ------- | ------ | -`address` | [Address](../modules/_types_.md#address) | undefined | - -**Returns:** *void* - -___ - -### defaultFeeCurrency - -• **get defaultFeeCurrency**(): *undefined | string* - -*Defined in [packages/sdk/connect/src/connection.ts:130](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/connection.ts#L130)* - -Set the ERC20 address for the token to use to pay for transaction fees. -The ERC20 must be whitelisted for gas. - -Set to `null` to use CELO - -**Returns:** *undefined | string* - -• **set defaultFeeCurrency**(`address`: [Address](../modules/_types_.md#address) | undefined): *void* - -*Defined in [packages/sdk/connect/src/connection.ts:126](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/connection.ts#L126)* - -Set the ERC20 address for the token to use to pay for transaction fees. -The ERC20 must be whitelisted for gas. - -Set to `null` to use CELO - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`address` | [Address](../modules/_types_.md#address) | undefined | ERC20 address | - -**Returns:** *void* - -___ - -### defaultGasInflationFactor - -• **get defaultGasInflationFactor**(): *number* - -*Defined in [packages/sdk/connect/src/connection.ts:106](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/connection.ts#L106)* - -**Returns:** *number* - -• **set defaultGasInflationFactor**(`factor`: number): *void* - -*Defined in [packages/sdk/connect/src/connection.ts:102](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/connection.ts#L102)* - -**Parameters:** - -Name | Type | ------- | ------ | -`factor` | number | - -**Returns:** *void* - -___ - -### defaultGasPrice - -• **get defaultGasPrice**(): *number* - -*Defined in [packages/sdk/connect/src/connection.ts:114](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/connection.ts#L114)* - -**Returns:** *number* - -• **set defaultGasPrice**(`price`: number): *void* - -*Defined in [packages/sdk/connect/src/connection.ts:110](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/connection.ts#L110)* - -**Parameters:** - -Name | Type | ------- | ------ | -`price` | number | - -**Returns:** *void* - -## Methods - -### addAccount - -▸ **addAccount**(`privateKey`: string): *void* - -*Defined in [packages/sdk/connect/src/connection.ts:138](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/connection.ts#L138)* - -**Parameters:** - -Name | Type | ------- | ------ | -`privateKey` | string | - -**Returns:** *void* - -___ - -### chainId - -▸ **chainId**(): *Promise‹number›* - -*Defined in [packages/sdk/connect/src/connection.ts:371](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/connection.ts#L371)* - -**Returns:** *Promise‹number›* - -___ - -### coinbase - -▸ **coinbase**(): *Promise‹string›* - -*Defined in [packages/sdk/connect/src/connection.ts:388](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/connection.ts#L388)* - -**Returns:** *Promise‹string›* - -___ - -### estimateGas - -▸ **estimateGas**(`tx`: [CeloTx](../modules/_types_.md#celotx), `gasEstimator`: function, `caller`: function): *Promise‹number›* - -*Defined in [packages/sdk/connect/src/connection.ts:324](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/connection.ts#L324)* - -**Parameters:** - -▪ **tx**: *[CeloTx](../modules/_types_.md#celotx)* - -▪`Default value` **gasEstimator**: *function*= this.web3.eth.estimateGas - -▸ (`tx`: [CeloTx](../modules/_types_.md#celotx)): *Promise‹number›* - -**Parameters:** - -Name | Type | ------- | ------ | -`tx` | [CeloTx](../modules/_types_.md#celotx) | - -▪`Default value` **caller**: *function*= this.web3.eth.call - -▸ (`tx`: [CeloTx](../modules/_types_.md#celotx)): *Promise‹string›* - -**Parameters:** - -Name | Type | ------- | ------ | -`tx` | [CeloTx](../modules/_types_.md#celotx) | - -**Returns:** *Promise‹number›* - -___ - -### estimateGasWithInflationFactor - -▸ **estimateGasWithInflationFactor**(`tx`: [CeloTx](../modules/_types_.md#celotx), `gasEstimator?`: undefined | function, `caller?`: undefined | function): *Promise‹number›* - -*Defined in [packages/sdk/connect/src/connection.ts:355](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/connection.ts#L355)* - -**Parameters:** - -Name | Type | ------- | ------ | -`tx` | [CeloTx](../modules/_types_.md#celotx) | -`gasEstimator?` | undefined | function | -`caller?` | undefined | function | - -**Returns:** *Promise‹number›* - -___ - -### fillGasPrice - -▸ **fillGasPrice**(`tx`: [CeloTx](../modules/_types_.md#celotx)): *[CeloTx](../modules/_types_.md#celotx)* - -*Defined in [packages/sdk/connect/src/connection.ts:310](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/connection.ts#L310)* - -**Parameters:** - -Name | Type | ------- | ------ | -`tx` | [CeloTx](../modules/_types_.md#celotx) | - -**Returns:** *[CeloTx](../modules/_types_.md#celotx)* - -___ - -### gasPrice - -▸ **gasPrice**(`feeCurrency?`: [Address](../modules/_types_.md#address)): *Promise‹string›* - -*Defined in [packages/sdk/connect/src/connection.ts:394](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/connection.ts#L394)* - -**Parameters:** - -Name | Type | ------- | ------ | -`feeCurrency?` | [Address](../modules/_types_.md#address) | - -**Returns:** *Promise‹string›* - -___ - -### getAbiCoder - -▸ **getAbiCoder**(): *[AbiCoder](../interfaces/_abi_types_.abicoder.md)* - -*Defined in [packages/sdk/connect/src/connection.ts:351](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/connection.ts#L351)* - -**Returns:** *[AbiCoder](../interfaces/_abi_types_.abicoder.md)* - -___ - -### getAccounts - -▸ **getAccounts**(): *Promise‹string[]›* - -*Defined in [packages/sdk/connect/src/connection.ts:171](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/connection.ts#L171)* - -**Returns:** *Promise‹string[]›* - -___ - -### getBalance - -▸ **getBalance**(`address`: [Address](../modules/_types_.md#address), `defaultBlock?`: [BlockNumber](../modules/_types_.md#blocknumber)): *Promise‹string›* - -*Defined in [packages/sdk/connect/src/connection.ts:429](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/connection.ts#L429)* - -**Parameters:** - -Name | Type | ------- | ------ | -`address` | [Address](../modules/_types_.md#address) | -`defaultBlock?` | [BlockNumber](../modules/_types_.md#blocknumber) | - -**Returns:** *Promise‹string›* - -___ - -### getBlock - -▸ **getBlock**(`blockHashOrBlockNumber`: [BlockNumber](../modules/_types_.md#blocknumber), `fullTxObjects`: boolean): *Promise‹Block›* - -*Defined in [packages/sdk/connect/src/connection.ts:410](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/connection.ts#L410)* - -**Parameters:** - -Name | Type | Default | ------- | ------ | ------ | -`blockHashOrBlockNumber` | [BlockNumber](../modules/_types_.md#blocknumber) | - | -`fullTxObjects` | boolean | true | - -**Returns:** *Promise‹Block›* - -___ - -### getBlockNumber - -▸ **getBlockNumber**(): *Promise‹number›* - -*Defined in [packages/sdk/connect/src/connection.ts:404](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/connection.ts#L404)* - -**Returns:** *Promise‹number›* - -___ - -### getLocalAccounts - -▸ **getLocalAccounts**(): *string[]* - -*Defined in [packages/sdk/connect/src/connection.ts:167](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/connection.ts#L167)* - -**Returns:** *string[]* - -___ - -### getNodeAccounts - -▸ **getNodeAccounts**(): *Promise‹string[]›* - -*Defined in [packages/sdk/connect/src/connection.ts:162](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/connection.ts#L162)* - -**Returns:** *Promise‹string[]›* - -___ - -### getTransaction - -▸ **getTransaction**(`transactionHash`: string): *Promise‹[CeloTxPending](../modules/_types_.md#celotxpending)›* - -*Defined in [packages/sdk/connect/src/connection.ts:438](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/connection.ts#L438)* - -**Parameters:** - -Name | Type | ------- | ------ | -`transactionHash` | string | - -**Returns:** *Promise‹[CeloTxPending](../modules/_types_.md#celotxpending)›* - -___ - -### getTransactionCount - -▸ **getTransactionCount**(`address`: [Address](../modules/_types_.md#address)): *Promise‹number›* - -*Defined in [packages/sdk/connect/src/connection.ts:377](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/connection.ts#L377)* - -**Parameters:** - -Name | Type | ------- | ------ | -`address` | [Address](../modules/_types_.md#address) | - -**Returns:** *Promise‹number›* - -___ - -### getTransactionReceipt - -▸ **getTransactionReceipt**(`txhash`: string): *Promise‹[CeloTxReceipt](../modules/_types_.md#celotxreceipt) | null›* - -*Defined in [packages/sdk/connect/src/connection.ts:446](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/connection.ts#L446)* - -**Parameters:** - -Name | Type | ------- | ------ | -`txhash` | string | - -**Returns:** *Promise‹[CeloTxReceipt](../modules/_types_.md#celotxreceipt) | null›* - -___ - -### isListening - -▸ **isListening**(): *Promise‹boolean›* - -*Defined in [packages/sdk/connect/src/connection.ts:179](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/connection.ts#L179)* - -**Returns:** *Promise‹boolean›* - -___ - -### isLocalAccount - -▸ **isLocalAccount**(`address?`: [Address](../modules/_types_.md#address)): *boolean* - -*Defined in [packages/sdk/connect/src/connection.ts:134](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/connection.ts#L134)* - -**Parameters:** - -Name | Type | ------- | ------ | -`address?` | [Address](../modules/_types_.md#address) | - -**Returns:** *boolean* - -___ - -### isSyncing - -▸ **isSyncing**(): *Promise‹boolean›* - -*Defined in [packages/sdk/connect/src/connection.ts:183](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/connection.ts#L183)* - -**Returns:** *Promise‹boolean›* - -___ - -### nonce - -▸ **nonce**(`address`: [Address](../modules/_types_.md#address)): *Promise‹number›* - -*Defined in [packages/sdk/connect/src/connection.ts:384](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/connection.ts#L384)* - -**Parameters:** - -Name | Type | ------- | ------ | -`address` | [Address](../modules/_types_.md#address) | - -**Returns:** *Promise‹number›* - -___ - -### removeAccount - -▸ **removeAccount**(`address`: string): *void* - -*Defined in [packages/sdk/connect/src/connection.ts:150](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/connection.ts#L150)* - -**Parameters:** - -Name | Type | ------- | ------ | -`address` | string | - -**Returns:** *void* - -___ - -### sendSignedTransaction - -▸ **sendSignedTransaction**(`signedTransactionData`: string): *Promise‹[TransactionResult](_utils_tx_result_.transactionresult.md)›* - -*Defined in [packages/sdk/connect/src/connection.ts:305](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/connection.ts#L305)* - -**Parameters:** - -Name | Type | ------- | ------ | -`signedTransactionData` | string | - -**Returns:** *Promise‹[TransactionResult](_utils_tx_result_.transactionresult.md)›* - -___ - -### sendTransaction - -▸ **sendTransaction**(`tx`: [CeloTx](../modules/_types_.md#celotx)): *Promise‹[TransactionResult](_utils_tx_result_.transactionresult.md)›* - -*Defined in [packages/sdk/connect/src/connection.ts:207](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/connection.ts#L207)* - -Send a transaction to celo-blockchain. - -Similar to `web3.eth.sendTransaction()` but with following differences: - - applies kit tx's defaults - - estimatesGas before sending - - returns a `TransactionResult` instead of `PromiEvent` - -**Parameters:** - -Name | Type | ------- | ------ | -`tx` | [CeloTx](../modules/_types_.md#celotx) | - -**Returns:** *Promise‹[TransactionResult](_utils_tx_result_.transactionresult.md)›* - -___ - -### sendTransactionObject - -▸ **sendTransactionObject**(`txObj`: [CeloTxObject](../interfaces/_types_.celotxobject.md)‹any›, `tx?`: Omit‹[CeloTx](../modules/_types_.md#celotx), "data"›): *Promise‹[TransactionResult](_utils_tx_result_.transactionresult.md)›* - -*Defined in [packages/sdk/connect/src/connection.ts:224](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/connection.ts#L224)* - -**Parameters:** - -Name | Type | ------- | ------ | -`txObj` | [CeloTxObject](../interfaces/_types_.celotxobject.md)‹any› | -`tx?` | Omit‹[CeloTx](../modules/_types_.md#celotx), "data"› | - -**Returns:** *Promise‹[TransactionResult](_utils_tx_result_.transactionresult.md)›* - -___ - -### setGasPriceForCurrency - -▸ **setGasPriceForCurrency**(`address`: [Address](../modules/_types_.md#address), `gasPrice`: string): *Promise‹void›* - -*Defined in [packages/sdk/connect/src/connection.ts:320](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/connection.ts#L320)* - -**Parameters:** - -Name | Type | ------- | ------ | -`address` | [Address](../modules/_types_.md#address) | -`gasPrice` | string | - -**Returns:** *Promise‹void›* - -___ - -### setProvider - -▸ **setProvider**(`provider`: [Provider](../interfaces/_types_.provider.md)): *boolean* - -*Defined in [packages/sdk/connect/src/connection.ts:71](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/connection.ts#L71)* - -**Parameters:** - -Name | Type | ------- | ------ | -`provider` | [Provider](../interfaces/_types_.provider.md) | - -**Returns:** *boolean* - -___ - -### sign - -▸ **sign**(`dataToSign`: string, `address`: [Address](../modules/_types_.md#address) | number): *Promise‹string›* - -*Defined in [packages/sdk/connect/src/connection.ts:278](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/connection.ts#L278)* - -**Parameters:** - -Name | Type | ------- | ------ | -`dataToSign` | string | -`address` | [Address](../modules/_types_.md#address) | number | - -**Returns:** *Promise‹string›* - -___ - -### signTypedData - -▸ **signTypedData**(`signer`: string, `typedData`: EIP712TypedData): *Promise‹Signature›* - -*Defined in [packages/sdk/connect/src/connection.ts:250](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/connection.ts#L250)* - -**Parameters:** - -Name | Type | ------- | ------ | -`signer` | string | -`typedData` | EIP712TypedData | - -**Returns:** *Promise‹Signature›* - -___ - -### stop - -▸ **stop**(): *void* - -*Defined in [packages/sdk/connect/src/connection.ts:472](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/connection.ts#L472)* - -**Returns:** *void* diff --git a/packages/docs/developer-resources/connect/reference/classes/_utils_celo_transaction_object_.celotransactionobject.md b/packages/docs/developer-resources/connect/reference/classes/_utils_celo_transaction_object_.celotransactionobject.md deleted file mode 100644 index a1b37357f8a..00000000000 --- a/packages/docs/developer-resources/connect/reference/classes/_utils_celo_transaction_object_.celotransactionobject.md +++ /dev/null @@ -1,95 +0,0 @@ -# Class: CeloTransactionObject <**O**> - -## Type parameters - -▪ **O** - -## Hierarchy - -* **CeloTransactionObject** - -## Index - -### Constructors - -* [constructor](_utils_celo_transaction_object_.celotransactionobject.md#constructor) - -### Properties - -* [defaultParams](_utils_celo_transaction_object_.celotransactionobject.md#optional-readonly-defaultparams) -* [txo](_utils_celo_transaction_object_.celotransactionobject.md#readonly-txo) - -### Methods - -* [send](_utils_celo_transaction_object_.celotransactionobject.md#send) -* [sendAndWaitForReceipt](_utils_celo_transaction_object_.celotransactionobject.md#sendandwaitforreceipt) - -## Constructors - -### constructor - -\+ **new CeloTransactionObject**(`connection`: [Connection](_connection_.connection.md), `txo`: [CeloTxObject](../interfaces/_types_.celotxobject.md)‹O›, `defaultParams?`: [CeloTransactionParams](../modules/_utils_celo_transaction_object_.md#celotransactionparams)): *[CeloTransactionObject](_utils_celo_transaction_object_.celotransactionobject.md)* - -*Defined in [packages/sdk/connect/src/utils/celo-transaction-object.ts:15](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/utils/celo-transaction-object.ts#L15)* - -**Parameters:** - -Name | Type | ------- | ------ | -`connection` | [Connection](_connection_.connection.md) | -`txo` | [CeloTxObject](../interfaces/_types_.celotxobject.md)‹O› | -`defaultParams?` | [CeloTransactionParams](../modules/_utils_celo_transaction_object_.md#celotransactionparams) | - -**Returns:** *[CeloTransactionObject](_utils_celo_transaction_object_.celotransactionobject.md)* - -## Properties - -### `Optional` `Readonly` defaultParams - -• **defaultParams**? : *[CeloTransactionParams](../modules/_utils_celo_transaction_object_.md#celotransactionparams)* - -*Defined in [packages/sdk/connect/src/utils/celo-transaction-object.ts:19](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/utils/celo-transaction-object.ts#L19)* - -___ - -### `Readonly` txo - -• **txo**: *[CeloTxObject](../interfaces/_types_.celotxobject.md)‹O›* - -*Defined in [packages/sdk/connect/src/utils/celo-transaction-object.ts:18](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/utils/celo-transaction-object.ts#L18)* - -## Methods - -### send - -▸ **send**(`params?`: [CeloTransactionParams](../modules/_utils_celo_transaction_object_.md#celotransactionparams)): *Promise‹[TransactionResult](_utils_tx_result_.transactionresult.md)›* - -*Defined in [packages/sdk/connect/src/utils/celo-transaction-object.ts:23](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/utils/celo-transaction-object.ts#L23)* - -send the transaction to the chain - -**Parameters:** - -Name | Type | ------- | ------ | -`params?` | [CeloTransactionParams](../modules/_utils_celo_transaction_object_.md#celotransactionparams) | - -**Returns:** *Promise‹[TransactionResult](_utils_tx_result_.transactionresult.md)›* - -___ - -### sendAndWaitForReceipt - -▸ **sendAndWaitForReceipt**(`params?`: [CeloTransactionParams](../modules/_utils_celo_transaction_object_.md#celotransactionparams)): *Promise‹[CeloTxReceipt](../modules/_types_.md#celotxreceipt)›* - -*Defined in [packages/sdk/connect/src/utils/celo-transaction-object.ts:28](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/utils/celo-transaction-object.ts#L28)* - -send the transaction and waits for the receipt - -**Parameters:** - -Name | Type | ------- | ------ | -`params?` | [CeloTransactionParams](../modules/_utils_celo_transaction_object_.md#celotransactionparams) | - -**Returns:** *Promise‹[CeloTxReceipt](../modules/_types_.md#celotxreceipt)›* diff --git a/packages/docs/developer-resources/connect/reference/classes/_utils_rpc_caller_.defaultrpccaller.md b/packages/docs/developer-resources/connect/reference/classes/_utils_rpc_caller_.defaultrpccaller.md deleted file mode 100644 index 4f814c3432f..00000000000 --- a/packages/docs/developer-resources/connect/reference/classes/_utils_rpc_caller_.defaultrpccaller.md +++ /dev/null @@ -1,92 +0,0 @@ -# Class: DefaultRpcCaller - -## Hierarchy - -* **DefaultRpcCaller** - -## Implements - -* [RpcCaller](../interfaces/_utils_rpc_caller_.rpccaller.md) - -## Index - -### Constructors - -* [constructor](_utils_rpc_caller_.defaultrpccaller.md#constructor) - -### Properties - -* [defaultProvider](_utils_rpc_caller_.defaultrpccaller.md#readonly-defaultprovider) -* [jsonrpcVersion](_utils_rpc_caller_.defaultrpccaller.md#readonly-jsonrpcversion) - -### Methods - -* [call](_utils_rpc_caller_.defaultrpccaller.md#call) -* [send](_utils_rpc_caller_.defaultrpccaller.md#send) - -## Constructors - -### constructor - -\+ **new DefaultRpcCaller**(`defaultProvider`: [Provider](../interfaces/_types_.provider.md), `jsonrpcVersion`: string): *[DefaultRpcCaller](_utils_rpc_caller_.defaultrpccaller.md)* - -*Defined in [packages/sdk/connect/src/utils/rpc-caller.ts:67](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/utils/rpc-caller.ts#L67)* - -**Parameters:** - -Name | Type | Default | ------- | ------ | ------ | -`defaultProvider` | [Provider](../interfaces/_types_.provider.md) | - | -`jsonrpcVersion` | string | "2.0" | - -**Returns:** *[DefaultRpcCaller](_utils_rpc_caller_.defaultrpccaller.md)* - -## Properties - -### `Readonly` defaultProvider - -• **defaultProvider**: *[Provider](../interfaces/_types_.provider.md)* - -*Defined in [packages/sdk/connect/src/utils/rpc-caller.ts:68](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/utils/rpc-caller.ts#L68)* - -___ - -### `Readonly` jsonrpcVersion - -• **jsonrpcVersion**: *string* - -*Defined in [packages/sdk/connect/src/utils/rpc-caller.ts:68](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/utils/rpc-caller.ts#L68)* - -## Methods - -### call - -▸ **call**(`method`: string, `params`: any[]): *Promise‹[JsonRpcResponse](../interfaces/_types_.jsonrpcresponse.md)›* - -*Defined in [packages/sdk/connect/src/utils/rpc-caller.ts:70](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/utils/rpc-caller.ts#L70)* - -**Parameters:** - -Name | Type | ------- | ------ | -`method` | string | -`params` | any[] | - -**Returns:** *Promise‹[JsonRpcResponse](../interfaces/_types_.jsonrpcresponse.md)›* - -___ - -### send - -▸ **send**(`payload`: [JsonRpcPayload](../interfaces/_types_.jsonrpcpayload.md), `callback`: [Callback](../modules/_types_.md#callback)‹[JsonRpcResponse](../interfaces/_types_.jsonrpcresponse.md)›): *void* - -*Defined in [packages/sdk/connect/src/utils/rpc-caller.ts:88](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/utils/rpc-caller.ts#L88)* - -**Parameters:** - -Name | Type | ------- | ------ | -`payload` | [JsonRpcPayload](../interfaces/_types_.jsonrpcpayload.md) | -`callback` | [Callback](../modules/_types_.md#callback)‹[JsonRpcResponse](../interfaces/_types_.jsonrpcresponse.md)› | - -**Returns:** *void* diff --git a/packages/docs/developer-resources/connect/reference/classes/_utils_tx_params_normalizer_.txparamsnormalizer.md b/packages/docs/developer-resources/connect/reference/classes/_utils_tx_params_normalizer_.txparamsnormalizer.md deleted file mode 100644 index 4ce390099b1..00000000000 --- a/packages/docs/developer-resources/connect/reference/classes/_utils_tx_params_normalizer_.txparamsnormalizer.md +++ /dev/null @@ -1,59 +0,0 @@ -# Class: TxParamsNormalizer - -## Hierarchy - -* **TxParamsNormalizer** - -## Index - -### Constructors - -* [constructor](_utils_tx_params_normalizer_.txparamsnormalizer.md#constructor) - -### Properties - -* [connection](_utils_tx_params_normalizer_.txparamsnormalizer.md#readonly-connection) - -### Methods - -* [populate](_utils_tx_params_normalizer_.txparamsnormalizer.md#populate) - -## Constructors - -### constructor - -\+ **new TxParamsNormalizer**(`connection`: [Connection](_connection_.connection.md)): *[TxParamsNormalizer](_utils_tx_params_normalizer_.txparamsnormalizer.md)* - -*Defined in [packages/sdk/connect/src/utils/tx-params-normalizer.ts:16](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/utils/tx-params-normalizer.ts#L16)* - -**Parameters:** - -Name | Type | ------- | ------ | -`connection` | [Connection](_connection_.connection.md) | - -**Returns:** *[TxParamsNormalizer](_utils_tx_params_normalizer_.txparamsnormalizer.md)* - -## Properties - -### `Readonly` connection - -• **connection**: *[Connection](_connection_.connection.md)* - -*Defined in [packages/sdk/connect/src/utils/tx-params-normalizer.ts:18](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/utils/tx-params-normalizer.ts#L18)* - -## Methods - -### populate - -▸ **populate**(`celoTxParams`: [CeloTx](../modules/_types_.md#celotx)): *Promise‹[CeloTx](../modules/_types_.md#celotx)›* - -*Defined in [packages/sdk/connect/src/utils/tx-params-normalizer.ts:20](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/utils/tx-params-normalizer.ts#L20)* - -**Parameters:** - -Name | Type | ------- | ------ | -`celoTxParams` | [CeloTx](../modules/_types_.md#celotx) | - -**Returns:** *Promise‹[CeloTx](../modules/_types_.md#celotx)›* diff --git a/packages/docs/developer-resources/connect/reference/classes/_utils_tx_result_.transactionresult.md b/packages/docs/developer-resources/connect/reference/classes/_utils_tx_result_.transactionresult.md deleted file mode 100644 index 8908c689712..00000000000 --- a/packages/docs/developer-resources/connect/reference/classes/_utils_tx_result_.transactionresult.md +++ /dev/null @@ -1,60 +0,0 @@ -# Class: TransactionResult - -Replacement interface for web3's `PromiEvent`. Instead of emiting events -to signal different stages, eveything is exposed as a promise. Which ends -up being nicer when doing promise/async based programming. - -## Hierarchy - -* **TransactionResult** - -## Index - -### Constructors - -* [constructor](_utils_tx_result_.transactionresult.md#constructor) - -### Methods - -* [getHash](_utils_tx_result_.transactionresult.md#gethash) -* [waitReceipt](_utils_tx_result_.transactionresult.md#waitreceipt) - -## Constructors - -### constructor - -\+ **new TransactionResult**(`pe`: PromiEvent‹any›): *[TransactionResult](_utils_tx_result_.transactionresult.md)* - -*Defined in [packages/sdk/connect/src/utils/tx-result.ts:21](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/utils/tx-result.ts#L21)* - -**Parameters:** - -Name | Type | ------- | ------ | -`pe` | PromiEvent‹any› | - -**Returns:** *[TransactionResult](_utils_tx_result_.transactionresult.md)* - -## Methods - -### getHash - -▸ **getHash**(): *Promise‹string›* - -*Defined in [packages/sdk/connect/src/utils/tx-result.ts:45](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/utils/tx-result.ts#L45)* - -Get (& wait for) transaction hash - -**Returns:** *Promise‹string›* - -___ - -### waitReceipt - -▸ **waitReceipt**(): *Promise‹[CeloTxReceipt](../modules/_types_.md#celotxreceipt)›* - -*Defined in [packages/sdk/connect/src/utils/tx-result.ts:57](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/utils/tx-result.ts#L57)* - -Get (& wait for) transaction receipt - -**Returns:** *Promise‹[CeloTxReceipt](../modules/_types_.md#celotxreceipt)›* diff --git a/packages/docs/developer-resources/connect/reference/globals.md b/packages/docs/developer-resources/connect/reference/globals.md deleted file mode 100644 index e37c15cc57f..00000000000 --- a/packages/docs/developer-resources/connect/reference/globals.md +++ /dev/null @@ -1,18 +0,0 @@ -# @celo/connect - -## Index - -### Modules - -* ["abi-types"](modules/_abi_types_.md) -* ["celo-provider"](modules/_celo_provider_.md) -* ["connection"](modules/_connection_.md) -* ["types"](modules/_types_.md) -* ["utils/abi-utils"](modules/_utils_abi_utils_.md) -* ["utils/celo-transaction-object"](modules/_utils_celo_transaction_object_.md) -* ["utils/formatter"](modules/_utils_formatter_.md) -* ["utils/provider-utils"](modules/_utils_provider_utils_.md) -* ["utils/rpc-caller"](modules/_utils_rpc_caller_.md) -* ["utils/tx-params-normalizer"](modules/_utils_tx_params_normalizer_.md) -* ["utils/tx-result"](modules/_utils_tx_result_.md) -* ["wallet"](modules/_wallet_.md) diff --git a/packages/docs/developer-resources/connect/reference/interfaces/_abi_types_.abicoder.md b/packages/docs/developer-resources/connect/reference/interfaces/_abi_types_.abicoder.md deleted file mode 100644 index 3e36a86d735..00000000000 --- a/packages/docs/developer-resources/connect/reference/interfaces/_abi_types_.abicoder.md +++ /dev/null @@ -1,166 +0,0 @@ -# Interface: AbiCoder - -## Hierarchy - -* **AbiCoder** - -## Index - -### Methods - -* [decodeLog](_abi_types_.abicoder.md#decodelog) -* [decodeParameter](_abi_types_.abicoder.md#decodeparameter) -* [decodeParameters](_abi_types_.abicoder.md#decodeparameters) -* [encodeEventSignature](_abi_types_.abicoder.md#encodeeventsignature) -* [encodeFunctionCall](_abi_types_.abicoder.md#encodefunctioncall) -* [encodeFunctionSignature](_abi_types_.abicoder.md#encodefunctionsignature) -* [encodeParameter](_abi_types_.abicoder.md#encodeparameter) -* [encodeParameters](_abi_types_.abicoder.md#encodeparameters) - -## Methods - -### decodeLog - -▸ **decodeLog**(`inputs`: AbiInput[], `hexString`: string, `topics`: string[]): *EventLog* - -*Defined in [packages/sdk/connect/src/abi-types.ts:22](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/abi-types.ts#L22)* - -**Parameters:** - -Name | Type | ------- | ------ | -`inputs` | AbiInput[] | -`hexString` | string | -`topics` | string[] | - -**Returns:** *EventLog* - -___ - -### decodeParameter - -▸ **decodeParameter**(`type`: [ABIType](../modules/_abi_types_.md#abitype), `hex`: string): *any* - -*Defined in [packages/sdk/connect/src/abi-types.ts:31](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/abi-types.ts#L31)* - -**Parameters:** - -Name | Type | ------- | ------ | -`type` | [ABIType](../modules/_abi_types_.md#abitype) | -`hex` | string | - -**Returns:** *any* - -___ - -### decodeParameters - -▸ **decodeParameters**(`types`: [ABIType](../modules/_abi_types_.md#abitype)[], `hex`: string): *[DecodedParamsArray](_abi_types_.decodedparamsarray.md)* - -*Defined in [packages/sdk/connect/src/abi-types.ts:33](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/abi-types.ts#L33)* - -**Parameters:** - -Name | Type | ------- | ------ | -`types` | [ABIType](../modules/_abi_types_.md#abitype)[] | -`hex` | string | - -**Returns:** *[DecodedParamsArray](_abi_types_.decodedparamsarray.md)* - -▸ **decodeParameters**(`types`: AbiInput[], `hex`: string): *[DecodedParamsObject](_abi_types_.decodedparamsobject.md)* - -*Defined in [packages/sdk/connect/src/abi-types.ts:34](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/abi-types.ts#L34)* - -**Parameters:** - -Name | Type | ------- | ------ | -`types` | AbiInput[] | -`hex` | string | - -**Returns:** *[DecodedParamsObject](_abi_types_.decodedparamsobject.md)* - -___ - -### encodeEventSignature - -▸ **encodeEventSignature**(`name`: string | object): *string* - -*Defined in [packages/sdk/connect/src/abi-types.ts:27](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/abi-types.ts#L27)* - -**Parameters:** - -Name | Type | ------- | ------ | -`name` | string | object | - -**Returns:** *string* - -___ - -### encodeFunctionCall - -▸ **encodeFunctionCall**(`jsonInterface`: object, `parameters`: any[]): *string* - -*Defined in [packages/sdk/connect/src/abi-types.ts:28](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/abi-types.ts#L28)* - -**Parameters:** - -Name | Type | ------- | ------ | -`jsonInterface` | object | -`parameters` | any[] | - -**Returns:** *string* - -___ - -### encodeFunctionSignature - -▸ **encodeFunctionSignature**(`name`: string | object): *string* - -*Defined in [packages/sdk/connect/src/abi-types.ts:29](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/abi-types.ts#L29)* - -**Parameters:** - -Name | Type | ------- | ------ | -`name` | string | object | - -**Returns:** *string* - -___ - -### encodeParameter - -▸ **encodeParameter**(`type`: [ABIType](../modules/_abi_types_.md#abitype), `parameter`: any): *string* - -*Defined in [packages/sdk/connect/src/abi-types.ts:24](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/abi-types.ts#L24)* - -**Parameters:** - -Name | Type | ------- | ------ | -`type` | [ABIType](../modules/_abi_types_.md#abitype) | -`parameter` | any | - -**Returns:** *string* - -___ - -### encodeParameters - -▸ **encodeParameters**(`types`: [ABIType](../modules/_abi_types_.md#abitype)[], `paramaters`: any[]): *string* - -*Defined in [packages/sdk/connect/src/abi-types.ts:25](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/abi-types.ts#L25)* - -**Parameters:** - -Name | Type | ------- | ------ | -`types` | [ABIType](../modules/_abi_types_.md#abitype)[] | -`paramaters` | any[] | - -**Returns:** *string* diff --git a/packages/docs/developer-resources/connect/reference/interfaces/_abi_types_.abidefinition.md b/packages/docs/developer-resources/connect/reference/interfaces/_abi_types_.abidefinition.md deleted file mode 100644 index a91d5a1fdbd..00000000000 --- a/packages/docs/developer-resources/connect/reference/interfaces/_abi_types_.abidefinition.md +++ /dev/null @@ -1,120 +0,0 @@ -# Interface: ABIDefinition - -## Hierarchy - -* AbiItem - - ↳ **ABIDefinition** - -## Index - -### Properties - -* [anonymous](_abi_types_.abidefinition.md#optional-anonymous) -* [constant](_abi_types_.abidefinition.md#optional-constant) -* [gas](_abi_types_.abidefinition.md#optional-gas) -* [inputs](_abi_types_.abidefinition.md#optional-inputs) -* [name](_abi_types_.abidefinition.md#optional-name) -* [outputs](_abi_types_.abidefinition.md#optional-outputs) -* [payable](_abi_types_.abidefinition.md#optional-payable) -* [signature](_abi_types_.abidefinition.md#signature) -* [stateMutability](_abi_types_.abidefinition.md#optional-statemutability) -* [type](_abi_types_.abidefinition.md#type) - -## Properties - -### `Optional` anonymous - -• **anonymous**? : *undefined | false | true* - -*Inherited from [ABIDefinition](_abi_types_.abidefinition.md).[anonymous](_abi_types_.abidefinition.md#optional-anonymous)* - -Defined in node_modules/web3-utils/types/index.d.ts:217 - -___ - -### `Optional` constant - -• **constant**? : *undefined | false | true* - -*Inherited from [ABIDefinition](_abi_types_.abidefinition.md).[constant](_abi_types_.abidefinition.md#optional-constant)* - -Defined in node_modules/web3-utils/types/index.d.ts:218 - -___ - -### `Optional` gas - -• **gas**? : *undefined | number* - -*Inherited from [ABIDefinition](_abi_types_.abidefinition.md).[gas](_abi_types_.abidefinition.md#optional-gas)* - -Defined in node_modules/web3-utils/types/index.d.ts:225 - -___ - -### `Optional` inputs - -• **inputs**? : *AbiInput[]* - -*Inherited from [ABIDefinition](_abi_types_.abidefinition.md).[inputs](_abi_types_.abidefinition.md#optional-inputs)* - -Defined in node_modules/web3-utils/types/index.d.ts:219 - -___ - -### `Optional` name - -• **name**? : *undefined | string* - -*Inherited from [ABIDefinition](_abi_types_.abidefinition.md).[name](_abi_types_.abidefinition.md#optional-name)* - -Defined in node_modules/web3-utils/types/index.d.ts:220 - -___ - -### `Optional` outputs - -• **outputs**? : *AbiOutput[]* - -*Inherited from [ABIDefinition](_abi_types_.abidefinition.md).[outputs](_abi_types_.abidefinition.md#optional-outputs)* - -Defined in node_modules/web3-utils/types/index.d.ts:221 - -___ - -### `Optional` payable - -• **payable**? : *undefined | false | true* - -*Inherited from [ABIDefinition](_abi_types_.abidefinition.md).[payable](_abi_types_.abidefinition.md#optional-payable)* - -Defined in node_modules/web3-utils/types/index.d.ts:222 - -___ - -### signature - -• **signature**: *string* - -*Defined in [packages/sdk/connect/src/abi-types.ts:18](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/abi-types.ts#L18)* - -___ - -### `Optional` stateMutability - -• **stateMutability**? : *StateMutabilityType* - -*Inherited from [ABIDefinition](_abi_types_.abidefinition.md).[stateMutability](_abi_types_.abidefinition.md#optional-statemutability)* - -Defined in node_modules/web3-utils/types/index.d.ts:223 - -___ - -### type - -• **type**: *AbiType* - -*Inherited from [ABIDefinition](_abi_types_.abidefinition.md).[type](_abi_types_.abidefinition.md#type)* - -Defined in node_modules/web3-utils/types/index.d.ts:224 diff --git a/packages/docs/developer-resources/connect/reference/interfaces/_abi_types_.decodedparamsarray.md b/packages/docs/developer-resources/connect/reference/interfaces/_abi_types_.decodedparamsarray.md deleted file mode 100644 index 0117384bdcb..00000000000 --- a/packages/docs/developer-resources/connect/reference/interfaces/_abi_types_.decodedparamsarray.md +++ /dev/null @@ -1,25 +0,0 @@ -# Interface: DecodedParamsArray - -## Hierarchy - -* **DecodedParamsArray** - - ↳ [DecodedParamsObject](_abi_types_.decodedparamsobject.md) - -## Indexable - -* \[ **index**: *number*\]: any - -## Index - -### Properties - -* [__length__](_abi_types_.decodedparamsarray.md#__length__) - -## Properties - -### __length__ - -• **__length__**: *number* - -*Defined in [packages/sdk/connect/src/abi-types.ts:8](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/abi-types.ts#L8)* diff --git a/packages/docs/developer-resources/connect/reference/interfaces/_abi_types_.decodedparamsobject.md b/packages/docs/developer-resources/connect/reference/interfaces/_abi_types_.decodedparamsobject.md deleted file mode 100644 index 52d56e1d52e..00000000000 --- a/packages/docs/developer-resources/connect/reference/interfaces/_abi_types_.decodedparamsobject.md +++ /dev/null @@ -1,27 +0,0 @@ -# Interface: DecodedParamsObject - -## Hierarchy - -* [DecodedParamsArray](_abi_types_.decodedparamsarray.md) - - ↳ **DecodedParamsObject** - -## Indexable - -* \[ **index**: *number*\]: any - -## Index - -### Properties - -* [__length__](_abi_types_.decodedparamsobject.md#__length__) - -## Properties - -### __length__ - -• **__length__**: *number* - -*Inherited from [DecodedParamsArray](_abi_types_.decodedparamsarray.md).[__length__](_abi_types_.decodedparamsarray.md#__length__)* - -*Defined in [packages/sdk/connect/src/abi-types.ts:8](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/abi-types.ts#L8)* diff --git a/packages/docs/developer-resources/connect/reference/interfaces/_connection_.connectionoptions.md b/packages/docs/developer-resources/connect/reference/interfaces/_connection_.connectionoptions.md deleted file mode 100644 index f0916c79e89..00000000000 --- a/packages/docs/developer-resources/connect/reference/interfaces/_connection_.connectionoptions.md +++ /dev/null @@ -1,46 +0,0 @@ -# Interface: ConnectionOptions - -## Hierarchy - -* **ConnectionOptions** - -## Index - -### Properties - -* [feeCurrency](_connection_.connectionoptions.md#optional-feecurrency) -* [from](_connection_.connectionoptions.md#optional-from) -* [gasInflationFactor](_connection_.connectionoptions.md#gasinflationfactor) -* [gasPrice](_connection_.connectionoptions.md#gasprice) - -## Properties - -### `Optional` feeCurrency - -• **feeCurrency**? : *[Address](../modules/_types_.md#address)* - -*Defined in [packages/sdk/connect/src/connection.ts:42](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/connection.ts#L42)* - -___ - -### `Optional` from - -• **from**? : *[Address](../modules/_types_.md#address)* - -*Defined in [packages/sdk/connect/src/connection.ts:43](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/connection.ts#L43)* - -___ - -### gasInflationFactor - -• **gasInflationFactor**: *number* - -*Defined in [packages/sdk/connect/src/connection.ts:40](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/connection.ts#L40)* - -___ - -### gasPrice - -• **gasPrice**: *string* - -*Defined in [packages/sdk/connect/src/connection.ts:41](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/connection.ts#L41)* diff --git a/packages/docs/developer-resources/connect/reference/interfaces/_types_.celoparams.md b/packages/docs/developer-resources/connect/reference/interfaces/_types_.celoparams.md deleted file mode 100644 index 004ee2318e6..00000000000 --- a/packages/docs/developer-resources/connect/reference/interfaces/_types_.celoparams.md +++ /dev/null @@ -1,37 +0,0 @@ -# Interface: CeloParams - -## Hierarchy - -* **CeloParams** - -## Index - -### Properties - -* [feeCurrency](_types_.celoparams.md#feecurrency) -* [gatewayFee](_types_.celoparams.md#gatewayfee) -* [gatewayFeeRecipient](_types_.celoparams.md#gatewayfeerecipient) - -## Properties - -### feeCurrency - -• **feeCurrency**: *string* - -*Defined in [packages/sdk/connect/src/types.ts:7](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/types.ts#L7)* - -___ - -### gatewayFee - -• **gatewayFee**: *string* - -*Defined in [packages/sdk/connect/src/types.ts:9](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/types.ts#L9)* - -___ - -### gatewayFeeRecipient - -• **gatewayFeeRecipient**: *string* - -*Defined in [packages/sdk/connect/src/types.ts:8](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/types.ts#L8)* diff --git a/packages/docs/developer-resources/connect/reference/interfaces/_types_.celotxobject.md b/packages/docs/developer-resources/connect/reference/interfaces/_types_.celotxobject.md deleted file mode 100644 index 265cc989c59..00000000000 --- a/packages/docs/developer-resources/connect/reference/interfaces/_types_.celotxobject.md +++ /dev/null @@ -1,97 +0,0 @@ -# Interface: CeloTxObject <**T**> - -## Type parameters - -▪ **T** - -## Hierarchy - -* **CeloTxObject** - -## Index - -### Properties - -* [_parent](_types_.celotxobject.md#_parent) -* [arguments](_types_.celotxobject.md#arguments) - -### Methods - -* [call](_types_.celotxobject.md#call) -* [encodeABI](_types_.celotxobject.md#encodeabi) -* [estimateGas](_types_.celotxobject.md#estimategas) -* [send](_types_.celotxobject.md#send) - -## Properties - -### _parent - -• **_parent**: *Contract* - -*Defined in [packages/sdk/connect/src/types.ts:20](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/types.ts#L20)* - -___ - -### arguments - -• **arguments**: *any[]* - -*Defined in [packages/sdk/connect/src/types.ts:15](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/types.ts#L15)* - -## Methods - -### call - -▸ **call**(`tx?`: [CeloTx](../modules/_types_.md#celotx)): *Promise‹T›* - -*Defined in [packages/sdk/connect/src/types.ts:16](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/types.ts#L16)* - -**Parameters:** - -Name | Type | ------- | ------ | -`tx?` | [CeloTx](../modules/_types_.md#celotx) | - -**Returns:** *Promise‹T›* - -___ - -### encodeABI - -▸ **encodeABI**(): *string* - -*Defined in [packages/sdk/connect/src/types.ts:19](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/types.ts#L19)* - -**Returns:** *string* - -___ - -### estimateGas - -▸ **estimateGas**(`tx?`: [CeloTx](../modules/_types_.md#celotx)): *Promise‹number›* - -*Defined in [packages/sdk/connect/src/types.ts:18](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/types.ts#L18)* - -**Parameters:** - -Name | Type | ------- | ------ | -`tx?` | [CeloTx](../modules/_types_.md#celotx) | - -**Returns:** *Promise‹number›* - -___ - -### send - -▸ **send**(`tx?`: [CeloTx](../modules/_types_.md#celotx)): *PromiEvent‹[CeloTxReceipt](../modules/_types_.md#celotxreceipt)›* - -*Defined in [packages/sdk/connect/src/types.ts:17](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/types.ts#L17)* - -**Parameters:** - -Name | Type | ------- | ------ | -`tx?` | [CeloTx](../modules/_types_.md#celotx) | - -**Returns:** *PromiEvent‹[CeloTxReceipt](../modules/_types_.md#celotxreceipt)›* diff --git a/packages/docs/developer-resources/connect/reference/interfaces/_types_.encodedtransaction.md b/packages/docs/developer-resources/connect/reference/interfaces/_types_.encodedtransaction.md deleted file mode 100644 index 6ab192be640..00000000000 --- a/packages/docs/developer-resources/connect/reference/interfaces/_types_.encodedtransaction.md +++ /dev/null @@ -1,56 +0,0 @@ -# Interface: EncodedTransaction - -## Hierarchy - -* **EncodedTransaction** - -## Index - -### Properties - -* [raw](_types_.encodedtransaction.md#raw) -* [tx](_types_.encodedtransaction.md#tx) - -## Properties - -### raw - -• **raw**: *string* - -*Defined in [packages/sdk/connect/src/types.ts:28](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/types.ts#L28)* - -___ - -### tx - -• **tx**: *object* - -*Defined in [packages/sdk/connect/src/types.ts:29](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/types.ts#L29)* - -#### Type declaration: - -* **feeCurrency**: *string* - -* **gas**: *string* - -* **gasPrice**: *string* - -* **gatewayFee**: *string* - -* **gatewayFeeRecipient**: *string* - -* **hash**: *string* - -* **input**: *string* - -* **nonce**: *string* - -* **r**: *string* - -* **s**: *string* - -* **to**: *string* - -* **v**: *string* - -* **value**: *string* diff --git a/packages/docs/developer-resources/connect/reference/interfaces/_types_.jsonrpcpayload.md b/packages/docs/developer-resources/connect/reference/interfaces/_types_.jsonrpcpayload.md deleted file mode 100644 index c1c36420cc7..00000000000 --- a/packages/docs/developer-resources/connect/reference/interfaces/_types_.jsonrpcpayload.md +++ /dev/null @@ -1,46 +0,0 @@ -# Interface: JsonRpcPayload - -## Hierarchy - -* **JsonRpcPayload** - -## Index - -### Properties - -* [id](_types_.jsonrpcpayload.md#optional-id) -* [jsonrpc](_types_.jsonrpcpayload.md#jsonrpc) -* [method](_types_.jsonrpcpayload.md#method) -* [params](_types_.jsonrpcpayload.md#params) - -## Properties - -### `Optional` id - -• **id**? : *string | number* - -*Defined in [packages/sdk/connect/src/types.ts:62](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/types.ts#L62)* - -___ - -### jsonrpc - -• **jsonrpc**: *string* - -*Defined in [packages/sdk/connect/src/types.ts:59](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/types.ts#L59)* - -___ - -### method - -• **method**: *string* - -*Defined in [packages/sdk/connect/src/types.ts:60](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/types.ts#L60)* - -___ - -### params - -• **params**: *any[]* - -*Defined in [packages/sdk/connect/src/types.ts:61](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/types.ts#L61)* diff --git a/packages/docs/developer-resources/connect/reference/interfaces/_types_.jsonrpcresponse.md b/packages/docs/developer-resources/connect/reference/interfaces/_types_.jsonrpcresponse.md deleted file mode 100644 index deae2df4ba6..00000000000 --- a/packages/docs/developer-resources/connect/reference/interfaces/_types_.jsonrpcresponse.md +++ /dev/null @@ -1,46 +0,0 @@ -# Interface: JsonRpcResponse - -## Hierarchy - -* **JsonRpcResponse** - -## Index - -### Properties - -* [error](_types_.jsonrpcresponse.md#optional-error) -* [id](_types_.jsonrpcresponse.md#id) -* [jsonrpc](_types_.jsonrpcresponse.md#jsonrpc) -* [result](_types_.jsonrpcresponse.md#optional-result) - -## Properties - -### `Optional` error - -• **error**? : *string | object* - -*Defined in [packages/sdk/connect/src/types.ts:55](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/types.ts#L55)* - -___ - -### id - -• **id**: *number* - -*Defined in [packages/sdk/connect/src/types.ts:53](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/types.ts#L53)* - -___ - -### jsonrpc - -• **jsonrpc**: *string* - -*Defined in [packages/sdk/connect/src/types.ts:52](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/types.ts#L52)* - -___ - -### `Optional` result - -• **result**? : *any* - -*Defined in [packages/sdk/connect/src/types.ts:54](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/types.ts#L54)* diff --git a/packages/docs/developer-resources/connect/reference/interfaces/_types_.provider.md b/packages/docs/developer-resources/connect/reference/interfaces/_types_.provider.md deleted file mode 100644 index 45d55fafd97..00000000000 --- a/packages/docs/developer-resources/connect/reference/interfaces/_types_.provider.md +++ /dev/null @@ -1,32 +0,0 @@ -# Interface: Provider - -## Hierarchy - -* **Provider** - -## Implemented by - -* [CeloProvider](../classes/_celo_provider_.celoprovider.md) - -## Index - -### Methods - -* [send](_types_.provider.md#send) - -## Methods - -### send - -▸ **send**(`payload`: [JsonRpcPayload](_types_.jsonrpcpayload.md), `callback`: [Callback](../modules/_types_.md#callback)‹[JsonRpcResponse](_types_.jsonrpcresponse.md)›): *void* - -*Defined in [packages/sdk/connect/src/types.ts:66](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/types.ts#L66)* - -**Parameters:** - -Name | Type | ------- | ------ | -`payload` | [JsonRpcPayload](_types_.jsonrpcpayload.md) | -`callback` | [Callback](../modules/_types_.md#callback)‹[JsonRpcResponse](_types_.jsonrpcresponse.md)› | - -**Returns:** *void* diff --git a/packages/docs/developer-resources/connect/reference/interfaces/_types_.rlpencodedtx.md b/packages/docs/developer-resources/connect/reference/interfaces/_types_.rlpencodedtx.md deleted file mode 100644 index a09b283f73f..00000000000 --- a/packages/docs/developer-resources/connect/reference/interfaces/_types_.rlpencodedtx.md +++ /dev/null @@ -1,28 +0,0 @@ -# Interface: RLPEncodedTx - -## Hierarchy - -* **RLPEncodedTx** - -## Index - -### Properties - -* [rlpEncode](_types_.rlpencodedtx.md#rlpencode) -* [transaction](_types_.rlpencodedtx.md#transaction) - -## Properties - -### rlpEncode - -• **rlpEncode**: *string* - -*Defined in [packages/sdk/connect/src/types.ts:71](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/types.ts#L71)* - -___ - -### transaction - -• **transaction**: *[CeloTx](../modules/_types_.md#celotx)* - -*Defined in [packages/sdk/connect/src/types.ts:70](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/types.ts#L70)* diff --git a/packages/docs/developer-resources/connect/reference/interfaces/_utils_rpc_caller_.rpccaller.md b/packages/docs/developer-resources/connect/reference/interfaces/_utils_rpc_caller_.rpccaller.md deleted file mode 100644 index f441a2c4881..00000000000 --- a/packages/docs/developer-resources/connect/reference/interfaces/_utils_rpc_caller_.rpccaller.md +++ /dev/null @@ -1,54 +0,0 @@ -# Interface: RpcCaller - -## Hierarchy - -* **RpcCaller** - -## Implemented by - -* [DefaultRpcCaller](../classes/_utils_rpc_caller_.defaultrpccaller.md) - -## Index - -### Properties - -* [call](_utils_rpc_caller_.rpccaller.md#call) -* [send](_utils_rpc_caller_.rpccaller.md#send) - -## Properties - -### call - -• **call**: *function* - -*Defined in [packages/sdk/connect/src/utils/rpc-caller.ts:64](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/utils/rpc-caller.ts#L64)* - -#### Type declaration: - -▸ (`method`: string, `params`: any[]): *Promise‹[JsonRpcResponse](_types_.jsonrpcresponse.md)›* - -**Parameters:** - -Name | Type | ------- | ------ | -`method` | string | -`params` | any[] | - -___ - -### send - -• **send**: *function* - -*Defined in [packages/sdk/connect/src/utils/rpc-caller.ts:65](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/utils/rpc-caller.ts#L65)* - -#### Type declaration: - -▸ (`payload`: [JsonRpcPayload](_types_.jsonrpcpayload.md), `callback`: [Callback](../modules/_types_.md#callback)‹[JsonRpcResponse](_types_.jsonrpcresponse.md)›): *void* - -**Parameters:** - -Name | Type | ------- | ------ | -`payload` | [JsonRpcPayload](_types_.jsonrpcpayload.md) | -`callback` | [Callback](../modules/_types_.md#callback)‹[JsonRpcResponse](_types_.jsonrpcresponse.md)› | diff --git a/packages/docs/developer-resources/connect/reference/interfaces/_wallet_.readonlywallet.md b/packages/docs/developer-resources/connect/reference/interfaces/_wallet_.readonlywallet.md deleted file mode 100644 index 11c1d40d098..00000000000 --- a/packages/docs/developer-resources/connect/reference/interfaces/_wallet_.readonlywallet.md +++ /dev/null @@ -1,160 +0,0 @@ -# Interface: ReadOnlyWallet - -## Hierarchy - -* **ReadOnlyWallet** - -## Index - -### Properties - -* [computeSharedSecret](_wallet_.readonlywallet.md#computesharedsecret) -* [decrypt](_wallet_.readonlywallet.md#decrypt) -* [getAccounts](_wallet_.readonlywallet.md#getaccounts) -* [hasAccount](_wallet_.readonlywallet.md#hasaccount) -* [removeAccount](_wallet_.readonlywallet.md#removeaccount) -* [signPersonalMessage](_wallet_.readonlywallet.md#signpersonalmessage) -* [signTransaction](_wallet_.readonlywallet.md#signtransaction) -* [signTypedData](_wallet_.readonlywallet.md#signtypeddata) - -## Properties - -### computeSharedSecret - -• **computeSharedSecret**: *function* - -*Defined in [packages/sdk/connect/src/wallet.ts:12](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/wallet.ts#L12)* - -#### Type declaration: - -▸ (`address`: [Address](../modules/_types_.md#address), `publicKey`: string): *Promise‹Buffer›* - -**Parameters:** - -Name | Type | ------- | ------ | -`address` | [Address](../modules/_types_.md#address) | -`publicKey` | string | - -___ - -### decrypt - -• **decrypt**: *function* - -*Defined in [packages/sdk/connect/src/wallet.ts:11](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/wallet.ts#L11)* - -#### Type declaration: - -▸ (`address`: [Address](../modules/_types_.md#address), `ciphertext`: Buffer): *Promise‹Buffer›* - -**Parameters:** - -Name | Type | ------- | ------ | -`address` | [Address](../modules/_types_.md#address) | -`ciphertext` | Buffer | - -___ - -### getAccounts - -• **getAccounts**: *function* - -*Defined in [packages/sdk/connect/src/wallet.ts:5](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/wallet.ts#L5)* - -#### Type declaration: - -▸ (): *[Address](../modules/_types_.md#address)[]* - -___ - -### hasAccount - -• **hasAccount**: *function* - -*Defined in [packages/sdk/connect/src/wallet.ts:7](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/wallet.ts#L7)* - -#### Type declaration: - -▸ (`address?`: [Address](../modules/_types_.md#address)): *boolean* - -**Parameters:** - -Name | Type | ------- | ------ | -`address?` | [Address](../modules/_types_.md#address) | - -___ - -### removeAccount - -• **removeAccount**: *function* - -*Defined in [packages/sdk/connect/src/wallet.ts:6](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/wallet.ts#L6)* - -#### Type declaration: - -▸ (`address`: [Address](../modules/_types_.md#address)): *void* - -**Parameters:** - -Name | Type | ------- | ------ | -`address` | [Address](../modules/_types_.md#address) | - -___ - -### signPersonalMessage - -• **signPersonalMessage**: *function* - -*Defined in [packages/sdk/connect/src/wallet.ts:10](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/wallet.ts#L10)* - -#### Type declaration: - -▸ (`address`: [Address](../modules/_types_.md#address), `data`: string): *Promise‹string›* - -**Parameters:** - -Name | Type | ------- | ------ | -`address` | [Address](../modules/_types_.md#address) | -`data` | string | - -___ - -### signTransaction - -• **signTransaction**: *function* - -*Defined in [packages/sdk/connect/src/wallet.ts:8](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/wallet.ts#L8)* - -#### Type declaration: - -▸ (`txParams`: [CeloTx](../modules/_types_.md#celotx)): *Promise‹[EncodedTransaction](_types_.encodedtransaction.md)›* - -**Parameters:** - -Name | Type | ------- | ------ | -`txParams` | [CeloTx](../modules/_types_.md#celotx) | - -___ - -### signTypedData - -• **signTypedData**: *function* - -*Defined in [packages/sdk/connect/src/wallet.ts:9](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/wallet.ts#L9)* - -#### Type declaration: - -▸ (`address`: [Address](../modules/_types_.md#address), `typedData`: EIP712TypedData): *Promise‹string›* - -**Parameters:** - -Name | Type | ------- | ------ | -`address` | [Address](../modules/_types_.md#address) | -`typedData` | EIP712TypedData | diff --git a/packages/docs/developer-resources/connect/reference/interfaces/_wallet_.signer.md b/packages/docs/developer-resources/connect/reference/interfaces/_wallet_.signer.md deleted file mode 100644 index e1c84b49927..00000000000 --- a/packages/docs/developer-resources/connect/reference/interfaces/_wallet_.signer.md +++ /dev/null @@ -1,125 +0,0 @@ -# Interface: Signer - -## Hierarchy - -* **Signer** - -## Index - -### Properties - -* [computeSharedSecret](_wallet_.signer.md#computesharedsecret) -* [decrypt](_wallet_.signer.md#decrypt) -* [getNativeKey](_wallet_.signer.md#getnativekey) -* [signPersonalMessage](_wallet_.signer.md#signpersonalmessage) -* [signTransaction](_wallet_.signer.md#signtransaction) -* [signTypedData](_wallet_.signer.md#signtypeddata) - -## Properties - -### computeSharedSecret - -• **computeSharedSecret**: *function* - -*Defined in [packages/sdk/connect/src/wallet.ts:29](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/wallet.ts#L29)* - -#### Type declaration: - -▸ (`publicKey`: string): *Promise‹Buffer›* - -**Parameters:** - -Name | Type | ------- | ------ | -`publicKey` | string | - -___ - -### decrypt - -• **decrypt**: *function* - -*Defined in [packages/sdk/connect/src/wallet.ts:28](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/wallet.ts#L28)* - -#### Type declaration: - -▸ (`ciphertext`: Buffer): *Promise‹Buffer›* - -**Parameters:** - -Name | Type | ------- | ------ | -`ciphertext` | Buffer | - -___ - -### getNativeKey - -• **getNativeKey**: *function* - -*Defined in [packages/sdk/connect/src/wallet.ts:27](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/wallet.ts#L27)* - -#### Type declaration: - -▸ (): *string* - -___ - -### signPersonalMessage - -• **signPersonalMessage**: *function* - -*Defined in [packages/sdk/connect/src/wallet.ts:25](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/wallet.ts#L25)* - -#### Type declaration: - -▸ (`data`: string): *Promise‹object›* - -**Parameters:** - -Name | Type | ------- | ------ | -`data` | string | - -___ - -### signTransaction - -• **signTransaction**: *function* - -*Defined in [packages/sdk/connect/src/wallet.ts:21](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/wallet.ts#L21)* - -Signs the message and returns an EVM transaction - -**`param`** represents the chainId and is added to the recoveryId to prevent replay - -**`param`** is the RLPEncoded transaction object - -#### Type declaration: - -▸ (`addToV`: number, `encodedTx`: [RLPEncodedTx](_types_.rlpencodedtx.md)): *Promise‹object›* - -**Parameters:** - -Name | Type | ------- | ------ | -`addToV` | number | -`encodedTx` | [RLPEncodedTx](_types_.rlpencodedtx.md) | - -___ - -### signTypedData - -• **signTypedData**: *function* - -*Defined in [packages/sdk/connect/src/wallet.ts:26](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/wallet.ts#L26)* - -#### Type declaration: - -▸ (`typedData`: EIP712TypedData): *Promise‹object›* - -**Parameters:** - -Name | Type | ------- | ------ | -`typedData` | EIP712TypedData | diff --git a/packages/docs/developer-resources/connect/reference/modules/_abi_types_.md b/packages/docs/developer-resources/connect/reference/modules/_abi_types_.md deleted file mode 100644 index 3381fe8afd2..00000000000 --- a/packages/docs/developer-resources/connect/reference/modules/_abi_types_.md +++ /dev/null @@ -1,22 +0,0 @@ -# Module: "abi-types" - -## Index - -### Interfaces - -* [ABIDefinition](../interfaces/_abi_types_.abidefinition.md) -* [AbiCoder](../interfaces/_abi_types_.abicoder.md) -* [DecodedParamsArray](../interfaces/_abi_types_.decodedparamsarray.md) -* [DecodedParamsObject](../interfaces/_abi_types_.decodedparamsobject.md) - -### Type aliases - -* [ABIType](_abi_types_.md#abitype) - -## Type aliases - -### ABIType - -Ƭ **ABIType**: *"uint256" | "boolean" | "string" | "bytes" | string* - -*Defined in [packages/sdk/connect/src/abi-types.ts:4](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/abi-types.ts#L4)* diff --git a/packages/docs/developer-resources/connect/reference/modules/_celo_provider_.md b/packages/docs/developer-resources/connect/reference/modules/_celo_provider_.md deleted file mode 100644 index 7a0aed2111d..00000000000 --- a/packages/docs/developer-resources/connect/reference/modules/_celo_provider_.md +++ /dev/null @@ -1,27 +0,0 @@ -# Module: "celo-provider" - -## Index - -### Classes - -* [CeloProvider](../classes/_celo_provider_.celoprovider.md) - -### Functions - -* [assertIsCeloProvider](_celo_provider_.md#assertisceloprovider) - -## Functions - -### assertIsCeloProvider - -▸ **assertIsCeloProvider**(`provider`: any): *asserts provider is CeloProvider* - -*Defined in [packages/sdk/connect/src/celo-provider.ts:23](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/celo-provider.ts#L23)* - -**Parameters:** - -Name | Type | ------- | ------ | -`provider` | any | - -**Returns:** *asserts provider is CeloProvider* diff --git a/packages/docs/developer-resources/connect/reference/modules/_connection_.md b/packages/docs/developer-resources/connect/reference/modules/_connection_.md deleted file mode 100644 index 4a517c0c7fc..00000000000 --- a/packages/docs/developer-resources/connect/reference/modules/_connection_.md +++ /dev/null @@ -1,11 +0,0 @@ -# Module: "connection" - -## Index - -### Classes - -* [Connection](../classes/_connection_.connection.md) - -### Interfaces - -* [ConnectionOptions](../interfaces/_connection_.connectionoptions.md) diff --git a/packages/docs/developer-resources/connect/reference/modules/_types_.md b/packages/docs/developer-resources/connect/reference/modules/_types_.md deleted file mode 100644 index 0a77eeee7ae..00000000000 --- a/packages/docs/developer-resources/connect/reference/modules/_types_.md +++ /dev/null @@ -1,152 +0,0 @@ -# Module: "types" - -## Index - -### References - -* [Block](_types_.md#block) -* [BlockHeader](_types_.md#blockheader) -* [BlockNumber](_types_.md#blocknumber) -* [Contract](_types_.md#contract) -* [ContractSendMethod](_types_.md#contractsendmethod) -* [EventLog](_types_.md#eventlog) -* [Log](_types_.md#log) -* [PastEventOptions](_types_.md#pasteventoptions) -* [PromiEvent](_types_.md#promievent) -* [Sign](_types_.md#sign) -* [Syncing](_types_.md#syncing) - -### Interfaces - -* [CeloParams](../interfaces/_types_.celoparams.md) -* [CeloTxObject](../interfaces/_types_.celotxobject.md) -* [EncodedTransaction](../interfaces/_types_.encodedtransaction.md) -* [JsonRpcPayload](../interfaces/_types_.jsonrpcpayload.md) -* [JsonRpcResponse](../interfaces/_types_.jsonrpcresponse.md) -* [Provider](../interfaces/_types_.provider.md) -* [RLPEncodedTx](../interfaces/_types_.rlpencodedtx.md) - -### Type aliases - -* [Address](_types_.md#address) -* [Callback](_types_.md#callback) -* [CeloTx](_types_.md#celotx) -* [CeloTxPending](_types_.md#celotxpending) -* [CeloTxReceipt](_types_.md#celotxreceipt) - -## References - -### Block - -• **Block**: - -___ - -### BlockHeader - -• **BlockHeader**: - -___ - -### BlockNumber - -• **BlockNumber**: - -___ - -### Contract - -• **Contract**: - -___ - -### ContractSendMethod - -• **ContractSendMethod**: - -___ - -### EventLog - -• **EventLog**: - -___ - -### Log - -• **Log**: - -___ - -### PastEventOptions - -• **PastEventOptions**: - -___ - -### PromiEvent - -• **PromiEvent**: - -___ - -### Sign - -• **Sign**: - -___ - -### Syncing - -• **Syncing**: - -## Type aliases - -### Address - -Ƭ **Address**: *string* - -*Defined in [packages/sdk/connect/src/types.ts:4](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/types.ts#L4)* - -___ - -### Callback - -Ƭ **Callback**: *function* - -*Defined in [packages/sdk/connect/src/types.ts:49](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/types.ts#L49)* - -#### Type declaration: - -▸ (`error`: Error | null, `result?`: T): *void* - -**Parameters:** - -Name | Type | ------- | ------ | -`error` | Error | null | -`result?` | T | - -___ - -### CeloTx - -Ƭ **CeloTx**: *TransactionConfig & Partial‹[CeloParams](../interfaces/_types_.celoparams.md)›* - -*Defined in [packages/sdk/connect/src/types.ts:12](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/types.ts#L12)* - -___ - -### CeloTxPending - -Ƭ **CeloTxPending**: *Transaction & Partial‹[CeloParams](../interfaces/_types_.celoparams.md)›* - -*Defined in [packages/sdk/connect/src/types.ts:46](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/types.ts#L46)* - -___ - -### CeloTxReceipt - -Ƭ **CeloTxReceipt**: *TransactionReceipt & Partial‹[CeloParams](../interfaces/_types_.celoparams.md)›* - -*Defined in [packages/sdk/connect/src/types.ts:47](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/types.ts#L47)* diff --git a/packages/docs/developer-resources/connect/reference/modules/_utils_abi_utils_.md b/packages/docs/developer-resources/connect/reference/modules/_utils_abi_utils_.md deleted file mode 100644 index 4886de12ac3..00000000000 --- a/packages/docs/developer-resources/connect/reference/modules/_utils_abi_utils_.md +++ /dev/null @@ -1,63 +0,0 @@ -# Module: "utils/abi-utils" - -## Index - -### Functions - -* [decodeStringParameter](_utils_abi_utils_.md#const-decodestringparameter) -* [getAbiTypes](_utils_abi_utils_.md#const-getabitypes) -* [parseDecodedParams](_utils_abi_utils_.md#const-parsedecodedparams) - -## Functions - -### `Const` decodeStringParameter - -▸ **decodeStringParameter**(`ethAbi`: [AbiCoder](../interfaces/_abi_types_.abicoder.md), `str`: string): *any* - -*Defined in [packages/sdk/connect/src/utils/abi-utils.ts:20](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/utils/abi-utils.ts#L20)* - -**Parameters:** - -Name | Type | ------- | ------ | -`ethAbi` | [AbiCoder](../interfaces/_abi_types_.abicoder.md) | -`str` | string | - -**Returns:** *any* - -___ - -### `Const` getAbiTypes - -▸ **getAbiTypes**(`abi`: AbiItem[], `methodName`: string): *string[]* - -*Defined in [packages/sdk/connect/src/utils/abi-utils.ts:4](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/utils/abi-utils.ts#L4)* - -**Parameters:** - -Name | Type | ------- | ------ | -`abi` | AbiItem[] | -`methodName` | string | - -**Returns:** *string[]* - -___ - -### `Const` parseDecodedParams - -▸ **parseDecodedParams**(`params`: [DecodedParamsObject](../interfaces/_abi_types_.decodedparamsobject.md)): *object* - -*Defined in [packages/sdk/connect/src/utils/abi-utils.ts:7](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/utils/abi-utils.ts#L7)* - -**Parameters:** - -Name | Type | ------- | ------ | -`params` | [DecodedParamsObject](../interfaces/_abi_types_.decodedparamsobject.md) | - -**Returns:** *object* - -* **args**: *any[]* - -* **params**: *[DecodedParamsObject](../interfaces/_abi_types_.decodedparamsobject.md)* diff --git a/packages/docs/developer-resources/connect/reference/modules/_utils_celo_transaction_object_.md b/packages/docs/developer-resources/connect/reference/modules/_utils_celo_transaction_object_.md deleted file mode 100644 index f26b9658e9a..00000000000 --- a/packages/docs/developer-resources/connect/reference/modules/_utils_celo_transaction_object_.md +++ /dev/null @@ -1,45 +0,0 @@ -# Module: "utils/celo-transaction-object" - -## Index - -### Classes - -* [CeloTransactionObject](../classes/_utils_celo_transaction_object_.celotransactionobject.md) - -### Type aliases - -* [CeloTransactionParams](_utils_celo_transaction_object_.md#celotransactionparams) - -### Functions - -* [toTransactionObject](_utils_celo_transaction_object_.md#totransactionobject) - -## Type aliases - -### CeloTransactionParams - -Ƭ **CeloTransactionParams**: *Omit‹[CeloTx](_types_.md#celotx), "data"›* - -*Defined in [packages/sdk/connect/src/utils/celo-transaction-object.ts:5](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/utils/celo-transaction-object.ts#L5)* - -## Functions - -### toTransactionObject - -▸ **toTransactionObject**<**O**>(`connection`: [Connection](../classes/_connection_.connection.md), `txo`: [CeloTxObject](../interfaces/_types_.celotxobject.md)‹O›, `defaultParams?`: [CeloTransactionParams](_utils_celo_transaction_object_.md#celotransactionparams)): *[CeloTransactionObject](../classes/_utils_celo_transaction_object_.celotransactionobject.md)‹O›* - -*Defined in [packages/sdk/connect/src/utils/celo-transaction-object.ts:7](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/utils/celo-transaction-object.ts#L7)* - -**Type parameters:** - -▪ **O** - -**Parameters:** - -Name | Type | ------- | ------ | -`connection` | [Connection](../classes/_connection_.connection.md) | -`txo` | [CeloTxObject](../interfaces/_types_.celotxobject.md)‹O› | -`defaultParams?` | [CeloTransactionParams](_utils_celo_transaction_object_.md#celotransactionparams) | - -**Returns:** *[CeloTransactionObject](../classes/_utils_celo_transaction_object_.celotransactionobject.md)‹O›* diff --git a/packages/docs/developer-resources/connect/reference/modules/_utils_formatter_.md b/packages/docs/developer-resources/connect/reference/modules/_utils_formatter_.md deleted file mode 100644 index 8f5832747db..00000000000 --- a/packages/docs/developer-resources/connect/reference/modules/_utils_formatter_.md +++ /dev/null @@ -1,195 +0,0 @@ -# Module: "utils/formatter" - -## Index - -### Functions - -* [hexToNumber](_utils_formatter_.md#hextonumber) -* [inputAddressFormatter](_utils_formatter_.md#inputaddressformatter) -* [inputBlockNumberFormatter](_utils_formatter_.md#inputblocknumberformatter) -* [inputCeloTxFormatter](_utils_formatter_.md#inputcelotxformatter) -* [inputDefaultBlockNumberFormatter](_utils_formatter_.md#inputdefaultblocknumberformatter) -* [inputSignFormatter](_utils_formatter_.md#inputsignformatter) -* [outputBigNumberFormatter](_utils_formatter_.md#outputbignumberformatter) -* [outputBlockFormatter](_utils_formatter_.md#outputblockformatter) -* [outputCeloTxFormatter](_utils_formatter_.md#outputcelotxformatter) -* [outputCeloTxReceiptFormatter](_utils_formatter_.md#outputcelotxreceiptformatter) -* [outputLogFormatter](_utils_formatter_.md#outputlogformatter) - -## Functions - -### hexToNumber - -▸ **hexToNumber**(`hex?`: undefined | string): *number | undefined* - -*Defined in [packages/sdk/connect/src/utils/formatter.ts:159](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/utils/formatter.ts#L159)* - -**Parameters:** - -Name | Type | ------- | ------ | -`hex?` | undefined | string | - -**Returns:** *number | undefined* - -___ - -### inputAddressFormatter - -▸ **inputAddressFormatter**(`address?`: undefined | string): *string | undefined* - -*Defined in [packages/sdk/connect/src/utils/formatter.ts:204](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/utils/formatter.ts#L204)* - -**Parameters:** - -Name | Type | ------- | ------ | -`address?` | undefined | string | - -**Returns:** *string | undefined* - -___ - -### inputBlockNumberFormatter - -▸ **inputBlockNumberFormatter**(`blockNumber`: [BlockNumber](_types_.md#blocknumber)): *undefined | string | number | BN‹› | BigNumber‹›* - -*Defined in [packages/sdk/connect/src/utils/formatter.ts:109](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/utils/formatter.ts#L109)* - -**Parameters:** - -Name | Type | ------- | ------ | -`blockNumber` | [BlockNumber](_types_.md#blocknumber) | - -**Returns:** *undefined | string | number | BN‹› | BigNumber‹›* - -___ - -### inputCeloTxFormatter - -▸ **inputCeloTxFormatter**(`tx`: [CeloTx](_types_.md#celotx)): *[CeloTx](_types_.md#celotx)* - -*Defined in [packages/sdk/connect/src/utils/formatter.ts:11](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/utils/formatter.ts#L11)* - -Formats the input of a transaction and converts all values to HEX - -**Parameters:** - -Name | Type | ------- | ------ | -`tx` | [CeloTx](_types_.md#celotx) | - -**Returns:** *[CeloTx](_types_.md#celotx)* - -___ - -### inputDefaultBlockNumberFormatter - -▸ **inputDefaultBlockNumberFormatter**(`blockNumber`: [BlockNumber](_types_.md#blocknumber) | null | undefined): *undefined | string | number | BN‹› | BigNumber‹›* - -*Defined in [packages/sdk/connect/src/utils/formatter.ts:101](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/utils/formatter.ts#L101)* - -**Parameters:** - -Name | Type | ------- | ------ | -`blockNumber` | [BlockNumber](_types_.md#blocknumber) | null | undefined | - -**Returns:** *undefined | string | number | BN‹› | BigNumber‹›* - -___ - -### inputSignFormatter - -▸ **inputSignFormatter**(`data`: string): *string* - -*Defined in [packages/sdk/connect/src/utils/formatter.ts:214](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/utils/formatter.ts#L214)* - -**Parameters:** - -Name | Type | ------- | ------ | -`data` | string | - -**Returns:** *string* - -___ - -### outputBigNumberFormatter - -▸ **outputBigNumberFormatter**(`hex`: string): *string* - -*Defined in [packages/sdk/connect/src/utils/formatter.ts:200](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/utils/formatter.ts#L200)* - -**Parameters:** - -Name | Type | ------- | ------ | -`hex` | string | - -**Returns:** *string* - -___ - -### outputBlockFormatter - -▸ **outputBlockFormatter**(`block`: any): *Block* - -*Defined in [packages/sdk/connect/src/utils/formatter.ts:127](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/utils/formatter.ts#L127)* - -**Parameters:** - -Name | Type | ------- | ------ | -`block` | any | - -**Returns:** *Block* - -___ - -### outputCeloTxFormatter - -▸ **outputCeloTxFormatter**(`tx`: any): *[CeloTxPending](_types_.md#celotxpending)* - -*Defined in [packages/sdk/connect/src/utils/formatter.ts:38](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/utils/formatter.ts#L38)* - -**Parameters:** - -Name | Type | ------- | ------ | -`tx` | any | - -**Returns:** *[CeloTxPending](_types_.md#celotxpending)* - -___ - -### outputCeloTxReceiptFormatter - -▸ **outputCeloTxReceiptFormatter**(`receipt`: any): *[CeloTxReceipt](_types_.md#celotxreceipt)* - -*Defined in [packages/sdk/connect/src/utils/formatter.ts:72](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/utils/formatter.ts#L72)* - -**Parameters:** - -Name | Type | ------- | ------ | -`receipt` | any | - -**Returns:** *[CeloTxReceipt](_types_.md#celotxreceipt)* - -___ - -### outputLogFormatter - -▸ **outputLogFormatter**(`log`: any): *Log* - -*Defined in [packages/sdk/connect/src/utils/formatter.ts:166](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/utils/formatter.ts#L166)* - -**Parameters:** - -Name | Type | ------- | ------ | -`log` | any | - -**Returns:** *Log* diff --git a/packages/docs/developer-resources/connect/reference/modules/_utils_provider_utils_.md b/packages/docs/developer-resources/connect/reference/modules/_utils_provider_utils_.md deleted file mode 100644 index 8db60cd0210..00000000000 --- a/packages/docs/developer-resources/connect/reference/modules/_utils_provider_utils_.md +++ /dev/null @@ -1,45 +0,0 @@ -# Module: "utils/provider-utils" - -## Index - -### Functions - -* [hasProperty](_utils_provider_utils_.md#hasproperty) -* [stopProvider](_utils_provider_utils_.md#stopprovider) - -## Functions - -### hasProperty - -▸ **hasProperty**<**T**>(`object`: any, `property`: string): *object is T* - -*Defined in [packages/sdk/connect/src/utils/provider-utils.ts:3](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/utils/provider-utils.ts#L3)* - -**Type parameters:** - -▪ **T** - -**Parameters:** - -Name | Type | ------- | ------ | -`object` | any | -`property` | string | - -**Returns:** *object is T* - -___ - -### stopProvider - -▸ **stopProvider**(`defaultProvider`: [Provider](../interfaces/_types_.provider.md)): *void* - -*Defined in [packages/sdk/connect/src/utils/provider-utils.ts:7](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/utils/provider-utils.ts#L7)* - -**Parameters:** - -Name | Type | ------- | ------ | -`defaultProvider` | [Provider](../interfaces/_types_.provider.md) | - -**Returns:** *void* diff --git a/packages/docs/developer-resources/connect/reference/modules/_utils_rpc_caller_.md b/packages/docs/developer-resources/connect/reference/modules/_utils_rpc_caller_.md deleted file mode 100644 index dfeec734528..00000000000 --- a/packages/docs/developer-resources/connect/reference/modules/_utils_rpc_caller_.md +++ /dev/null @@ -1,52 +0,0 @@ -# Module: "utils/rpc-caller" - -## Index - -### Classes - -* [DefaultRpcCaller](../classes/_utils_rpc_caller_.defaultrpccaller.md) - -### Interfaces - -* [RpcCaller](../interfaces/_utils_rpc_caller_.rpccaller.md) - -### Functions - -* [getRandomId](_utils_rpc_caller_.md#getrandomid) -* [rpcCallHandler](_utils_rpc_caller_.md#rpccallhandler) - -## Functions - -### getRandomId - -▸ **getRandomId**(): *number* - -*Defined in [packages/sdk/connect/src/utils/rpc-caller.ts:36](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/utils/rpc-caller.ts#L36)* - -**Returns:** *number* - -___ - -### rpcCallHandler - -▸ **rpcCallHandler**(`payload`: [JsonRpcPayload](../interfaces/_types_.jsonrpcpayload.md), `handler`: function, `callback`: [Callback](_types_.md#callback)‹[JsonRpcResponse](../interfaces/_types_.jsonrpcresponse.md)›): *void* - -*Defined in [packages/sdk/connect/src/utils/rpc-caller.ts:8](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/utils/rpc-caller.ts#L8)* - -**Parameters:** - -▪ **payload**: *[JsonRpcPayload](../interfaces/_types_.jsonrpcpayload.md)* - -▪ **handler**: *function* - -▸ (`p`: [JsonRpcPayload](../interfaces/_types_.jsonrpcpayload.md)): *Promise‹any›* - -**Parameters:** - -Name | Type | ------- | ------ | -`p` | [JsonRpcPayload](../interfaces/_types_.jsonrpcpayload.md) | - -▪ **callback**: *[Callback](_types_.md#callback)‹[JsonRpcResponse](../interfaces/_types_.jsonrpcresponse.md)›* - -**Returns:** *void* diff --git a/packages/docs/developer-resources/connect/reference/modules/_utils_tx_params_normalizer_.md b/packages/docs/developer-resources/connect/reference/modules/_utils_tx_params_normalizer_.md deleted file mode 100644 index 5ab9df88e7e..00000000000 --- a/packages/docs/developer-resources/connect/reference/modules/_utils_tx_params_normalizer_.md +++ /dev/null @@ -1,7 +0,0 @@ -# Module: "utils/tx-params-normalizer" - -## Index - -### Classes - -* [TxParamsNormalizer](../classes/_utils_tx_params_normalizer_.txparamsnormalizer.md) diff --git a/packages/docs/developer-resources/connect/reference/modules/_utils_tx_result_.md b/packages/docs/developer-resources/connect/reference/modules/_utils_tx_result_.md deleted file mode 100644 index a0d3b1ba00e..00000000000 --- a/packages/docs/developer-resources/connect/reference/modules/_utils_tx_result_.md +++ /dev/null @@ -1,29 +0,0 @@ -# Module: "utils/tx-result" - -## Index - -### Classes - -* [TransactionResult](../classes/_utils_tx_result_.transactionresult.md) - -### Functions - -* [toTxResult](_utils_tx_result_.md#totxresult) - -## Functions - -### toTxResult - -▸ **toTxResult**(`pe`: PromiEvent‹any›): *[TransactionResult](../classes/_utils_tx_result_.transactionresult.md)‹›* - -*Defined in [packages/sdk/connect/src/utils/tx-result.ts:10](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/connect/src/utils/tx-result.ts#L10)* - -Transforms a `PromiEvent` to a `TransactionResult`. - -**Parameters:** - -Name | Type | ------- | ------ | -`pe` | PromiEvent‹any› | - -**Returns:** *[TransactionResult](../classes/_utils_tx_result_.transactionresult.md)‹›* diff --git a/packages/docs/developer-resources/connect/reference/modules/_wallet_.md b/packages/docs/developer-resources/connect/reference/modules/_wallet_.md deleted file mode 100644 index 00cae226b12..00000000000 --- a/packages/docs/developer-resources/connect/reference/modules/_wallet_.md +++ /dev/null @@ -1,8 +0,0 @@ -# Module: "wallet" - -## Index - -### Interfaces - -* [ReadOnlyWallet](../interfaces/_wallet_.readonlywallet.md) -* [Signer](../interfaces/_wallet_.signer.md) diff --git a/packages/docs/developer-resources/contractkit/README.md b/packages/docs/developer-resources/contractkit/README.md deleted file mode 100644 index 6c50c28092d..00000000000 --- a/packages/docs/developer-resources/contractkit/README.md +++ /dev/null @@ -1,20 +0,0 @@ -# Celo ContractKit - -ContractKit is a library to help developers and validators to interact with the celo-blockchain and is well suited to developers looking for an easy way to integrate Celo Smart Contracts within their applications. - -## What you can do? - -ContractKit supports the following functionality: - -- Connect to a node -- Access web3 object to interact with node's Json RPC API -- Send Transaction with celo's extra fields: (feeCurrency, gatewayFeeRecipient and gatewayFee) -- Simple interface to interact with CELO and cUSD -- Simple interface to interact with Celo Core contracts -- Local sign transactions -- Utilities -- Query on-chain identifier for a phone number - -{% page-ref page="setup.md" %} - -{% page-ref page="usage.md" %} diff --git a/packages/docs/developer-resources/contractkit/contracts-wrappers-registry.md b/packages/docs/developer-resources/contractkit/contracts-wrappers-registry.md deleted file mode 100644 index ad466ff1c81..00000000000 --- a/packages/docs/developer-resources/contractkit/contracts-wrappers-registry.md +++ /dev/null @@ -1,110 +0,0 @@ -# Examples - -## Interacting with CELO & cUSD - -celo-blockchain has two initial coins: CELO and cUSD (stableToken). -Both implement the ERC20 standard, and to interact with them is as simple as: - -```ts -const goldtoken = await kit.contract.getGoldToken() - -const balance = await goldtoken.balanceOf(someAddress) -``` - -To send funds: - -```ts -const oneGold = kit.web3.utils.toWei('1', 'ether') -const tx = await goldtoken.transfer(someAddress, oneGold).send({ - from: myAddress, -}) - -const hash = await tx.getHash() -const receipt = await tx.waitReceipt() -``` - -To interact with cUSD, is the same but with a different contract: - -```ts -const stabletoken = await kit.contract.getStableToken() -``` - -## Interacting with Other Celo Contracts - -Apart from GoldToken and StableToken, there are many core contracts. - -For the moment, we have contract wrappers for: - -- Accounts -- Attestations -- BlockchainParameters -- DobleSigningSlasher -- DowntimeSlasher -- Election -- Escrow -- Exchange (Uniswap kind exchange between Gold and Stable tokens) -- GasPriceMinimum -- GoldToken -- Gobernance -- LockedGold -- Reserve -- SortedOracles -- Validators -- StableToken - -## A Note About Contract Addresses - -Celo Core Contracts addresses, can be obtained by looking at the `Registry` contract. -That's actually how `kit` obtain them. - -We expose the registry api, which can be accessed by: - -```ts -const goldTokenAddress = await kit.registry.addressFor(CeloContract.GoldToken) -``` - -## Accessing web3 contract wrappers - -Some user might want to access web3 native contract wrappers. -*We encourage to use the Celo contracts instead to avoid mistakes.* - -To do so, you can: - -```ts -const web3Exchange = await kit._web3Contracts.getExchange() -``` - -We expose native wrappers for all Web3 contracts. - -The complete list is: - -- Accounts -- Attestations -- BlockchainParameters -- DoubleSigningSlasher -- DowntimeSlasher -- Election -- EpochRewards -- Escrow -- Exchange -- FeeCurrencyWhiteList -- GasPriceMinimum -- GoldToken -- Governance -- LockedGold -- Random -- Registry -- Reserve -- SortedOracles -- StableToken -- Validators - -## Debugging - -If you need to debug `kit`, we use the well known [debug](https://github.com/visionmedia/debug) node library. - -So set the environment variable `DEBUG` as: - -```bash -DEBUG="kit:*, -``` diff --git a/packages/docs/developer-resources/contractkit/data-encryption-key.md b/packages/docs/developer-resources/contractkit/data-encryption-key.md deleted file mode 100644 index 09e63320045..00000000000 --- a/packages/docs/developer-resources/contractkit/data-encryption-key.md +++ /dev/null @@ -1,24 +0,0 @@ -# Data Encryption Key - -An account may register a data encryption key (DEK) that can be used for lightweight signing or encryption operations. Some examples of DEK usage are: - -1. Supporting private payment comments between two users -2. Signing authentication headers to the Oblivious Decentralized Identifier Service -3. Sharing profile picture and name privately between two users - -Most Valora users automatically register a DEK with their wallet when they go through the onboarding flow. The DEK can be set during account creation or registered after as follows: - -```ts - const accountWrapper: AccountsWrapper = await contractKit.contracts.getAccounts() - const setKeyTx = accountWrapper.setAccountDataEncryptionKey(dekPublicKey) -``` - -When using the DEK, it's important to check that the DEK is the latest that's registered for a user. This can be done by querying the account contract and comparing the resulting public key with the key that's expected. - -```ts - // Query the on-chain data encryption key for a user - const accountWrapper: AccountsWrapper = await contractKit.contracts.getAccounts() - const dataEncryptionKey = accountWrapper.getDataEncryptionKey(address) - // Check that this matches with the public key - ... -``` diff --git a/packages/docs/developer-resources/contractkit/migrating-to-contractkit-v1.md b/packages/docs/developer-resources/contractkit/migrating-to-contractkit-v1.md deleted file mode 100644 index 3140d142633..00000000000 --- a/packages/docs/developer-resources/contractkit/migrating-to-contractkit-v1.md +++ /dev/null @@ -1,109 +0,0 @@ -# Migrating to ContractKit v1.x.y - -cLabs recently released [ContractKit version 1.0.0](https://medium.com/celoorg/contractkit-1-0-0-9c0412462d45). In it, the original ContractKit package has been split into several separate packages that all make up the Celo SDK. This document explains the key differences and shows you how you can start using the updated SDK. - -If you are using a previous version of ContractKit (anything below 1.0.0), you can continue using that version and you will only need to make the following changes when you upgrade. - -The main benefit of using the new version include: - - Reduced bundle size - - Better Typescript support - - Improved maintenance by making it easier to use other libraries - -## ContractKit packages - -ContractKit is now a [suite of packages](https://github.com/celo-org/celo-monorepo/tree/master/packages/sdk). - -### Main packages - - - `Connect` handles how we communicate to the our chain nodes. It wraps the `web3` library and has its own `rpcCaller` class, to make custom calls to the node. It's the layer in charge of knowing how and which parameters are added by Celo, connect to the node, build the message, send it and handle those responses. - - `ContractKit` is a reduced subset of the previous versions of ContractKit. This is the layer in charge of loading and using our [core contracts](contracts-wrappers-registry.md). Internally, uses the `connect` package described above. It has our contracts generated from the ABIs, their wrappers, and also the logic to make claims. - -### Complementary Packages - - - `Explorer` depends on `contractkit` and `connect`. It provides some utility functions that make it easy to listen for new block and log information. - - `Governance` depends on `contractkit` and `explorer`. It provides functions to read and interact with Celo Governance Proposals (CGPs). - - `Identity` simplifies interacting with [ODIS](odis.md), Celo’s lightweight identity layer based on phone numbers. - - `Network-utils` provides utilities for getting genesis block and static node information. - - `Transactions-uri` makes it easy to generate Celo transaction URIs and QR codes. - -### Wallets and Wallet Utility packages - - - `Wallet-hsm-azure` is a Azure Key Vault implementation of a RemoteWallet. - - `Wallet-hsm-aws` allows you to easily interact with a cloud HSM wallet built on AWS KMS. - - `Wallet-ledger` provides utilities for interacting with a Ledger hardware wallet. - - `Wallet-local`provides utilities for locally managing wallet by importing a private key string. - - `Wallet-rpc` provides utilities for performing wallet functions via RPC. - - `Wallet-base` provides base utilities for creating Celo wallets. - - `Wallet-hsm` provides signature utilities for using HSMs. - - `Wallet-remote` provides utilities for interacting with remote wallets. This is useful for interacting with wallets on secure remote servers. - -## Importing packages - -Importing the packages is slightly different now that many packages are separate from the main `ContractKit` package. You will have to explicitly import these packages instead of just importing all of them with `ContractKit`. - -For example: - -```javascript -// Previously this would work to import the block-explorer -import { newBlockExplorer } from '@celo/contractkit/lib/explorer/block-explorer' - -// With ContractKit v1.x.y, import the block-explorer explicitly -import { newBlockExplorer } from '@celo/explorer/lib/block-explorer' -``` - -## Connecting to the network - -### Older versions of ContractKit: - -```javascript -// version ^0.4.0 -const ContractKit = require('@celo/contractkit') - -// Older versions of ContractKit create a new Web3 instance internally -const kit = ContractKit.newKit('https://forno.celo.org') -``` - -### Version 1.x.y - -```javascript -// Since ContractKit no longer instantiates web3, you'll need to explicitly require it -const Web3 = require('web3') -const web3 = new Web3('https://forno.celo.org') - -// Require ContractKit and newKitFromWeb3 -const { ContractKit, newKitFromWeb3 } = require('@celo/contractkit') -let contractKit = newKitFromWeb3(web3) -``` -## Accessing Web3 functions - -You can access `web3` functions through the `connection` module. - -```javascript -// version ^0.4.0 -let amount = kit.web3.utils.fromWei("1000000", "ether") - -// version 1.x.y -let amount = kit.connection.web3.utils.fromWei("1000000", "ether") -``` -## Backward Compatibility - -[These ContractKit functions](https://github.com/celo-org/celo-monorepo/blob/a7579fc9bdc0c1b4ce1d9fec702938accf82be2a/packages/sdk/contractkit/src/kit.ts#L278) will still work when accessed directly from `kit`, but it is advised to consume it via `connection` to avoid future deprecation. - -``` -// This still works -kit.addAccount - -// recommended: -kit.connection.addAccount -``` - -## `Connection` package - -The `connection` package update includes implementations of some common web3 functions. Here are a few examples: - - - `kit.web3.eth.isSyncing` --> `kit.connection.isSyncing` - - `kit.web3.eth.getBlock` --> `kit.connection.getBlock` - - `kit.web3.eth.getBlockNumber` --> `kit.connection.getBlockNumber` - - `kit.web3.eth.sign` --> `kit.connection.sign` - - `kit.isListening` --> `kit.connection.isListening` - - `kit.addAccount` --> `kit.connection.addAccount` diff --git a/packages/docs/developer-resources/contractkit/notes-web3-with-contractkit.md b/packages/docs/developer-resources/contractkit/notes-web3-with-contractkit.md deleted file mode 100644 index 1ec9cf85123..00000000000 --- a/packages/docs/developer-resources/contractkit/notes-web3-with-contractkit.md +++ /dev/null @@ -1,38 +0,0 @@ -# Using Web3 with ContractKit - -Although the [Web3 library](https://web3js.readthedocs.io/) was intended to be used only with `Ethereum`, due to the nature of `Celo`, we can still use the majority of its features. -The ContractKit, for every interaction with the node, uses internally a Web3 instance. - -Because of this, the `Ethereum` JSON-RPC calls done via the web3 (except some specific calls that we will explain in this page) are also supported - -For example: - -```ts -const web3 = kit.web3 - -web3.eth.getBalance(someAddress) -``` - -or - -```ts -const web3 = kit.web3 - -web3.eth.getBlock("latest") -``` - -will work the same way. - -## Web3 limitations - -As you have read in our guide, Celo uses some extra fields: `feeCurrency`, `gatewayFeeRecipient` and `gatewayFee`, that among other things allows you to pay gas with ERC20 Tokens. These fields are expected by the node. - -To facilitate the life of every developer, we decided to wrap the `Provider` set in the `Web3` instance, and add our way to handle local signing using these new fields. Similar to what *Metamask* does, we intercept every transaction and perform a local signing when required. This wrapper is called `CeloProvider`. - -This let you use the Web3 instance to interact with node's Json RPC API in a transparent way, just deciding which Provider do you need. - -This is also the reason that the `Kit` requires a valid provider from the beginning. - -## Local Signing - -As part of the [Donut hardfork](https://medium.com/celoorg/dissecting-the-donut-hardfork-23cad6015fa2) network upgrade that occurred on May 19th, 2021, the Celo network now accepts Ethereum-style transactions as well as Celo transactions. This means that you can use Ethereum transaction signing tools (like [Metamask](../../getting-started/using-metamask-with-celo), web3.js and ethers.js) to sign transactions for the Celo network. Remember that Celo is a separate layer 1 blockchain from Ethereum, so do not send Ethereum assets directly to your Celo account address on Ethereum. diff --git a/packages/docs/developer-resources/contractkit/odis.md b/packages/docs/developer-resources/contractkit/odis.md deleted file mode 100644 index fc28a285b14..00000000000 --- a/packages/docs/developer-resources/contractkit/odis.md +++ /dev/null @@ -1,91 +0,0 @@ -# Calling Oblivious Decentralized Identifier Service (ODIS) - -This guide walks through using ContractKit to query the on-chain identifier given a phone number. See [this overview document](../../celo-codebase/protocol/identity/phone-number-privacy.md) for more details on ODIS. One of Celo's key features is the ability to associate a phone number to a Celo address. This provides a convenient payment experience for Celo users. To map a phone number to an address, the on-chain identifier for a given phone number must first be retrieved. With this identifier, the address can be looked up on-chain. - -{% hint style="info" %} -ODIS requests are rate-limited based on transaction history and balance. Ensure the account that is performing the queries has a balance and has performed transactions on the network. If an out of quota error is hit, this indicates that more transactions need to be sent from the querying account. -{% endhint %} - -There are two methods for ODIS: - -1. `getPhoneNumberIdentifier` - Query and compute the identifier for a phone number -2. `getContactMatches` - Find mutual connections between users - -## Authentication - -Both methods require authentication to the ODIS server, which can be performed by either the main wallet key or the data-encryption key (DEK) associated with the wallet key. This is managed by `AuthSigner`, which can be either a `WalletKeySigner` for a wallet key or an `EncryptionKeySigner` for the DEK. The DEK method is preferred, since it doesn't require the user to access the same key that manages their funds. [You can learn more about DEK here.](./data-encryption-key.md) - -You may use the `EncryptionKeySigner` for your `AuthSigner` by passing in the raw private key: - -```ts -const authSigner: AuthSigner = { - authenticationMethod: OdisUtils.Query.AuthenticationMethod.ENCRYPTION_KEY, - rawKey: privateDataKey, -} -``` - -Alternatively, you may use the `WalletKeySigner` by passing in a contractkit instance with the account unlocked: - -```ts -const authSigner: AuthSigner = { - authenticationMethod: OdisUtils.Query.AuthenticationMethod.WALLET_KEY, - contractKit, -} -``` - -## Service Context - -The `ServiceContext` object provides the ODIS endpoint URL and the ODIS public key (same as above). - -```ts -const serviceContext: ServiceContext = { - odisUrl, - odisPubKey, -} -``` - -The ODIS endpoint URL for each environment can be found here: -| Environment | Key | -|---|---| -| Alfajores Staging | https://us-central1-celo-phone-number-privacy-stg.cloudfunctions.net | -| Alfajores | https://us-central1-celo-phone-number-privacy.cloudfunctions.net | -| Mainnet | https://us-central1-celo-pgpnp-mainnet.cloudfunctions.net | - -The ODIS public key for each environment can be found here: -| Environment | Key | -|---|---| -| Alfajores Staging | 7FsWGsFnmVvRfMDpzz95Np76wf/1sPaK0Og9yiB+P8QbjiC8FV67NBans9hzZEkBaQMhiapzgMR6CkZIZPvgwQboAxl65JWRZecGe5V3XO4sdKeNemdAZ2TzQuWkuZoA | -| Alfajores | kPoRxWdEdZ/Nd3uQnp3FJFs54zuiS+ksqvOm9x8vY6KHPG8jrfqysvIRU0wtqYsBKA7SoAsICMBv8C/Fb2ZpDOqhSqvr/sZbZoHmQfvbqrzbtDIPvUIrHgRS0ydJCMsA | -| Mainnet | FvreHfLmhBjwxHxsxeyrcOLtSonC9j7K3WrS4QapYsQH6LdaDTaNGmnlQMfFY04Bp/K4wAvqQwO9/bqPVCKf8Ze8OZo8Frmog4JY4xAiwrsqOXxug11+htjEe1pj4uMA | - -## Query phone number identifier - -This call consumes quota. When the user runs out of quota, it's recommended to prompt the user to "purchase" more quota by sending a transaction to themselves. This method returns the pepper retrieved from the service as well as the the computed on-chain identifier that is generated using this pepper and the phone number. - -### BLS Blinding Client - -It's important for user privacy that the ODIS servers don't have the ability to view the raw phone number. Before making the request, the library first blinds the phone number using a BLS library. This prevents the ODIS from being able to see the phone number but still makes the resulting signature recoverable to the original phone number. The blinding client is written in [Rust](https://github.com/celo-org/celo-threshold-bls-rs) and compiled to Web Assembly, which is not compatible with React native. If you choose not to pass in a `BLSBlindingClient` it will default to the Web Assembly version. You may create a `ReactBlindingClient` by calling the constructor with the ODIS public key: - -```ts -const blsBlindingClient = new ReactBlsBlindingClient(odisPubKey) -``` - -Or use the `WasmBlsBlindingClient` if your runtime environment supports Web Assembly: - -```ts -const blsBlindingClient = new WasmBlsBlindingClient(odisPubKey) -``` - -Now you're ready to get the phone number identifier. `OdisUtils.PhoneNumberIdentifier.getPhoneNumberIdentifier` [documentation can be found here](../identity/reference/modules/_odis_phone_number_identifier_.md#getphonenumberidentifier). - -The response will be [an object](../identity/reference/interfaces/_odis_phone_number_identifier_.phonenumberhashdetails.md) with the original phone number, the on-chain identifier (phoneHash), and the phone number's pepper. - -You can view an example of this call in [our mobile project here](https://github.com/celo-org/wallet/blob/master/packages/mobile/src/identity/privateHashing.ts). - -## Matchmaking - -Instead of querying for all the user's contact's peppers and consuming the user's quota, it's recommended to only query the pepper before it's actually used (ex. just before sending funds). However, sometimes it's helpful to let your users know that they have contacts already using the Celo network. To do this, you can make use of the matchmaking interface. Given two phone numbers, it will let you know whether the other party has also registered on the Celo network with this identifier. `OdisUtils.Matchmaking.getContactMatches` [documentation can be found here](reference/modules/_identity_claims_account_.md). - -The response will be a subset of the input `e164NumberContacts` that are matched by the matchmaking service. - -You can view an example of this call in [our mobile project here](https://github.com/celo-org/wallet/blob/master/packages/mobile/src/identity/matchmaking.ts). diff --git a/packages/docs/developer-resources/contractkit/reference/README.md b/packages/docs/developer-resources/contractkit/reference/README.md deleted file mode 100644 index 9c6b1d47a4a..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/README.md +++ /dev/null @@ -1,219 +0,0 @@ -# @celo/contractkit - -# ContractKit - -Celo's ContractKit is a library to help developers and validators to interact with the celo-blockchain. - -ContractKit supports the following functionality: - -- Connect to a node -- Access web3 object to interact with node's Json RPC API -- Send Transaction with celo's extra fields: (feeCurrency) -- Simple interface to interact with CELO and cUSD -- Simple interface to interact with Celo Core contracts -- Utilities - -## User Guide - -### Getting Started - -To install: - -```bash -npm install @celo/contractkit -// or -yarn add @celo/contractkit -``` - -You will need Node.js v12.x. - -To start working with contractkit you need a `kit` instance: - -```ts -import { newKit } from '@celo/contractkit' - -// Remotely connect to the Alfajores testnet -const kit = newKit('https://alfajores-forno.celo-testnet.org') -``` - -To access web3: - -```ts -await kit.web3.eth.getBalance(someAddress) -``` - -### Setting Default Tx Options - -`kit` allows you to set default transaction options: - -```ts -import { newKit, CeloContract } from '@celo/contractkit' - -async function getKit(myAddress: string, privateKey: string) { - const kit = newKit('https://alfajores-forno.celo-testnet.org') - - // default from account - kit.defaultAccount = myAddress - - // add the account private key for tx signing when connecting to a remote node - kit.connection.addAccount(privateKey) - - // paid gas in celo dollars - await kit.setFeeCurrency(CeloContract.StableToken) - - return kit -} -``` - -### Interacting with CELO & cUSD - -celo-blockchain has two initial coins: CELO and cUSD (stableToken). -Both implement the ERC20 standard, and to interact with them is as simple as: - -```ts -// get the CELO contract -const celoToken = await kit.contracts.getGoldToken() - -// get the cUSD contract -const stableToken = await kit.contracts.getStableToken() - -const celoBalance = await celoToken.balanceOf(someAddress) -const cusdBalance = await stableToken.balanceOf(someAddress) -``` - -To send funds: - -```ts -const oneGold = kit.connection.web3.utils.toWei('1', 'ether') -const tx = await goldToken.transfer(someAddress, oneGold).send({ - from: myAddress -}) - -const hash = await tx.getHash() -const receipt = await tx.waitReceipt() -``` - -If you would like to pay fees in cUSD, set the gas price manually: - -```ts -const stableTokenAddress = await kit.registry.addressFor(CeloContract.StableToken) -const gasPriceMinimumContract = await kit.contracts.getGasPriceMinimum() -const gasPriceMinimum = await gasPriceMinimumContract.getGasPriceMinimum(stableTokenAddress) -const gasPrice = Math.ceil(gasPriceMinimum * 1.3) // Wiggle room if gas price minimum changes before tx is sent -contractKit.setFeeCurrency(CeloContract.StableToken) // Default to paying fees in cUSD - -const stableTokenContract = kit.contracts.getStableToken() -const tx = await stableTokenContract - .transfer(recipient, weiTransferAmount) - .send({ from: myAddress, gasPrice }) -const hash = await tx.getHash() -const receipt = await tx.waitReceipt() -``` - -### Interacting with Other Contracts - -Apart from GoldToken and StableToken, there are many core contracts. - -For the moment, we have contract wrappers for: - -- Accounts -- Exchange (Uniswap kind exchange between Gold and Stable tokens) -- Validators -- LockedGold -- GoldToken -- StableToken -- Attestations - -In the following weeks will add wrapper for all other contracts - -### Accessing web3 contract wrappers - -Some user might want to access web3 native contract wrappers. - -To do so, you can: - -```ts -const web3Exchange = await kit._web3Contracts.getExchange() -``` - -We expose native wrappers for all Celo core contracts. - -The complete list of Celo Core contracts is: - -- Accounts -- Attestations -- LockedGold -- Escrow -- Exchange -- FeeCurrencyWhitelist -- GasPriceMinimum -- GoldToken -- Governance -- MultiSig -- Random -- Registry -- Reserve -- SortedOracles -- StableToken -- Validators - -## A Note About Contract Addresses - -Celo Core Contracts addresses, can be obtained by looking at the `Registry` contract. -That's actually how `kit` obtain them. - -We expose the registry api, which can be accessed by: - -```ts -const goldTokenAddress = await kit.registry.addressFor(CeloContract.GoldToken) -``` - -### Sending Custom Transactions - -Celo transaction object is not the same as Ethereum's. There are three new fields present: - -- feeCurrency (address of the ERC20 contract to use to pay for gas and the gateway fee) -- gatewayFeeRecipient (coinbase address of the full serving the light client's trasactions) -- gatewayFee (value paid to the gateway fee recipient, denominated in the fee currency) - -This means that using `web3.eth.sendTransaction` or `myContract.methods.transfer().send()` should be avoided. - -Instead, `kit` provides an utility method to send transaction in both scenarios. **If you use contract wrappers, there is no need to use this.** - -For a raw transaction: - -```ts -const tx = kit.sendTransaction({ - from: myAddress, - to: someAddress, - value: oneGold, -}) -const hash = await tx.getHash() -const receipt = await tx.waitReceipt() -``` - -When interacting with a web3 contract object: - -```ts -const goldtoken = await kit._web3Contracts.getGoldToken() -const oneGold = kit.connection.web3.utils.toWei('1', 'ether') - -const txo = await goldtoken.methods.transfer(someAddress, oneGold) -const tx = await kit.sendTransactionObject(txo, { from: myAddress }) -const hash = await tx.getHash() -const receipt = await tx.waitReceipt() -``` - -### More Information - -You can find more information about the ContractKit in the Celo docs at [https://docs.celo.org/developer-guide/contractkit](https://docs.celo.org/developer-guide/contractkit). - -### Debugging - -If you need to debug `kit`, we use the well known [debug](https://github.com/visionmedia/debug) node library. - -So set the environment variable `DEBUG` as: - -```bash -DEBUG="kit:*, -``` diff --git a/packages/docs/developer-resources/contractkit/reference/SUMMARY.md b/packages/docs/developer-resources/contractkit/reference/SUMMARY.md deleted file mode 100644 index a2c8e88b23c..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/SUMMARY.md +++ /dev/null @@ -1,224 +0,0 @@ -* [Globals](globals.md) -* [Modules]() - * [address-registry](modules/_address_registry_.md) - * [AddressRegistry](classes/_address_registry_.addressregistry.md) - * [base](modules/_base_.md) - * [CeloContract](enums/_base_.celocontract.md) - * [contract-cache](modules/_contract_cache_.md) - * [WrapperCache](classes/_contract_cache_.wrappercache.md) - * [identity/claims/account](modules/_identity_claims_account_.md) - * [identity/claims/attestation-service-url](modules/_identity_claims_attestation_service_url_.md) - * [identity/claims/claim](modules/_identity_claims_claim_.md) - * [identity/claims/keybase](modules/_identity_claims_keybase_.md) - * [identity/claims/types](modules/_identity_claims_types_.md) - * [ClaimTypes](enums/_identity_claims_types_.claimtypes.md) - * [identity/claims/verify](modules/_identity_claims_verify_.md) - * [identity/metadata](modules/_identity_metadata_.md) - * [IdentityMetadataWrapper](classes/_identity_metadata_.identitymetadatawrapper.md) - * [kit](modules/_kit_.md) - * [ContractKit](classes/_kit_.contractkit.md) - * [NetworkConfig](interfaces/_kit_.networkconfig.md) - * [proxy](modules/_proxy_.md) - * [test-utils/PromiEventStub](modules/_test_utils_promieventstub_.md) - * [test-utils/setup.global](modules/_test_utils_setup_global_.md) - * [test-utils/teardown.global](modules/_test_utils_teardown_global_.md) - * [web3-contract-cache](modules/_web3_contract_cache_.md) - * [Web3ContractCache](classes/_web3_contract_cache_.web3contractcache.md) - * [wrappers/Accounts](modules/_wrappers_accounts_.md) - * [AccountsWrapper](classes/_wrappers_accounts_.accountswrapper.md) - * [wrappers/Attestations](modules/_wrappers_attestations_.md) - * [AttestationServiceStatusState](enums/_wrappers_attestations_.attestationservicestatusstate.md) - * [AttestationState](enums/_wrappers_attestations_.attestationstate.md) - * [AttestationsWrapper](classes/_wrappers_attestations_.attestationswrapper.md) - * [ActionableAttestation](interfaces/_wrappers_attestations_.actionableattestation.md) - * [AttestationServiceStatusResponse](interfaces/_wrappers_attestations_.attestationservicestatusresponse.md) - * [AttestationStat](interfaces/_wrappers_attestations_.attestationstat.md) - * [AttestationStateForIssuer](interfaces/_wrappers_attestations_.attestationstateforissuer.md) - * [AttestationsConfig](interfaces/_wrappers_attestations_.attestationsconfig.md) - * [AttestationsToken](interfaces/_wrappers_attestations_.attestationstoken.md) - * [UnselectedRequest](interfaces/_wrappers_attestations_.unselectedrequest.md) - * [wrappers/BaseSlasher](modules/_wrappers_baseslasher_.md) - * [BaseSlasher](classes/_wrappers_baseslasher_.baseslasher.md) - * [wrappers/BaseWrapper](modules/_wrappers_basewrapper_.md) - * [BaseWrapper](classes/_wrappers_basewrapper_.basewrapper.md) - * [wrappers/BlockchainParameters](modules/_wrappers_blockchainparameters_.md) - * [BlockchainParametersWrapper](classes/_wrappers_blockchainparameters_.blockchainparameterswrapper.md) - * [BlockchainParametersConfig](interfaces/_wrappers_blockchainparameters_.blockchainparametersconfig.md) - * [ClientVersion](interfaces/_wrappers_blockchainparameters_.clientversion.md) - * [wrappers/DoubleSigningSlasher](modules/_wrappers_doublesigningslasher_.md) - * [DoubleSigningSlasherWrapper](classes/_wrappers_doublesigningslasher_.doublesigningslasherwrapper.md) - * [wrappers/DowntimeSlasher](modules/_wrappers_downtimeslasher_.md) - * [DowntimeSlasherWrapper](classes/_wrappers_downtimeslasher_.downtimeslasherwrapper.md) - * [DowntimeSlasherConfig](interfaces/_wrappers_downtimeslasher_.downtimeslasherconfig.md) - * [Interval](interfaces/_wrappers_downtimeslasher_.interval.md) - * [wrappers/Election](modules/_wrappers_election_.md) - * [ElectionWrapper](classes/_wrappers_election_.electionwrapper.md) - * [ElectableValidators](interfaces/_wrappers_election_.electablevalidators.md) - * [ElectionConfig](interfaces/_wrappers_election_.electionconfig.md) - * [GroupVote](interfaces/_wrappers_election_.groupvote.md) - * [GroupVoterReward](interfaces/_wrappers_election_.groupvoterreward.md) - * [ValidatorGroupVote](interfaces/_wrappers_election_.validatorgroupvote.md) - * [Voter](interfaces/_wrappers_election_.voter.md) - * [VoterReward](interfaces/_wrappers_election_.voterreward.md) - * [wrappers/Escrow](modules/_wrappers_escrow_.md) - * [EscrowWrapper](classes/_wrappers_escrow_.escrowwrapper.md) - * [wrappers/Exchange](modules/_wrappers_exchange_.md) - * [ExchangeWrapper](classes/_wrappers_exchange_.exchangewrapper.md) - * [ExchangeConfig](interfaces/_wrappers_exchange_.exchangeconfig.md) - * [wrappers/Freezer](modules/_wrappers_freezer_.md) - * [FreezerWrapper](classes/_wrappers_freezer_.freezerwrapper.md) - * [wrappers/GasPriceMinimum](modules/_wrappers_gaspriceminimum_.md) - * [GasPriceMinimumWrapper](classes/_wrappers_gaspriceminimum_.gaspriceminimumwrapper.md) - * [GasPriceMinimumConfig](interfaces/_wrappers_gaspriceminimum_.gaspriceminimumconfig.md) - * [wrappers/GoldTokenWrapper](modules/_wrappers_goldtokenwrapper_.md) - * [GoldTokenWrapper](classes/_wrappers_goldtokenwrapper_.goldtokenwrapper.md) - * [wrappers/Governance](modules/_wrappers_governance_.md) - * [ProposalStage](enums/_wrappers_governance_.proposalstage.md) - * [VoteValue](enums/_wrappers_governance_.votevalue.md) - * [GovernanceWrapper](classes/_wrappers_governance_.governancewrapper.md) - * [GovernanceConfig](interfaces/_wrappers_governance_.governanceconfig.md) - * [HotfixRecord](interfaces/_wrappers_governance_.hotfixrecord.md) - * [ParticipationParameters](interfaces/_wrappers_governance_.participationparameters.md) - * [ProposalMetadata](interfaces/_wrappers_governance_.proposalmetadata.md) - * [ProposalRecord](interfaces/_wrappers_governance_.proposalrecord.md) - * [ProposalStageDurations](interfaces/_wrappers_governance_.proposalstagedurations.md) - * [UpvoteRecord](interfaces/_wrappers_governance_.upvoterecord.md) - * [VoteRecord](interfaces/_wrappers_governance_.voterecord.md) - * [Voter](interfaces/_wrappers_governance_.voter.md) - * [Votes](interfaces/_wrappers_governance_.votes.md) - * [wrappers/LockedGold](modules/_wrappers_lockedgold_.md) - * [LockedGoldWrapper](classes/_wrappers_lockedgold_.lockedgoldwrapper.md) - * [AccountSlashed](interfaces/_wrappers_lockedgold_.accountslashed.md) - * [LockedGoldConfig](interfaces/_wrappers_lockedgold_.lockedgoldconfig.md) - * [PendingWithdrawal](interfaces/_wrappers_lockedgold_.pendingwithdrawal.md) - * [VotingDetails](interfaces/_wrappers_lockedgold_.votingdetails.md) - * [wrappers/MetaTransactionWallet](modules/_wrappers_metatransactionwallet_.md) - * [MetaTransactionWalletWrapper](classes/_wrappers_metatransactionwallet_.metatransactionwalletwrapper.md) - * [RawTransaction](interfaces/_wrappers_metatransactionwallet_.rawtransaction.md) - * [TransactionObjectWithValue](interfaces/_wrappers_metatransactionwallet_.transactionobjectwithvalue.md) - * [wrappers/MetaTransactionWalletDeployer](modules/_wrappers_metatransactionwalletdeployer_.md) - * [MetaTransactionWalletDeployerWrapper](classes/_wrappers_metatransactionwalletdeployer_.metatransactionwalletdeployerwrapper.md) - * [wrappers/MultiSig](modules/_wrappers_multisig_.md) - * [MultiSigWrapper](classes/_wrappers_multisig_.multisigwrapper.md) - * [TransactionData](interfaces/_wrappers_multisig_.transactiondata.md) - * [wrappers/ReleaseGold](modules/_wrappers_releasegold_.md) - * [ReleaseGoldWrapper](classes/_wrappers_releasegold_.releasegoldwrapper.md) - * [BalanceState](interfaces/_wrappers_releasegold_.balancestate.md) - * [ReleaseGoldInfo](interfaces/_wrappers_releasegold_.releasegoldinfo.md) - * [wrappers/Reserve](modules/_wrappers_reserve_.md) - * [ReserveWrapper](classes/_wrappers_reserve_.reservewrapper.md) - * [ReserveConfig](interfaces/_wrappers_reserve_.reserveconfig.md) - * [wrappers/SortedOracles](modules/_wrappers_sortedoracles_.md) - * [MedianRelation](enums/_wrappers_sortedoracles_.medianrelation.md) - * [SortedOraclesWrapper](classes/_wrappers_sortedoracles_.sortedoracleswrapper.md) - * [MedianRate](interfaces/_wrappers_sortedoracles_.medianrate.md) - * [OracleRate](interfaces/_wrappers_sortedoracles_.oraclerate.md) - * [OracleReport](interfaces/_wrappers_sortedoracles_.oraclereport.md) - * [OracleTimestamp](interfaces/_wrappers_sortedoracles_.oracletimestamp.md) - * [SortedOraclesConfig](interfaces/_wrappers_sortedoracles_.sortedoraclesconfig.md) - * [wrappers/StableTokenWrapper](modules/_wrappers_stabletokenwrapper_.md) - * [StableTokenWrapper](classes/_wrappers_stabletokenwrapper_.stabletokenwrapper.md) - * [InflationParameters](interfaces/_wrappers_stabletokenwrapper_.inflationparameters.md) - * [StableTokenConfig](interfaces/_wrappers_stabletokenwrapper_.stabletokenconfig.md) - * [wrappers/Validators](modules/_wrappers_validators_.md) - * [ValidatorsWrapper](classes/_wrappers_validators_.validatorswrapper.md) - * [GroupMembership](interfaces/_wrappers_validators_.groupmembership.md) - * [LockedGoldRequirements](interfaces/_wrappers_validators_.lockedgoldrequirements.md) - * [MembershipHistoryExtraData](interfaces/_wrappers_validators_.membershiphistoryextradata.md) - * [Validator](interfaces/_wrappers_validators_.validator.md) - * [ValidatorGroup](interfaces/_wrappers_validators_.validatorgroup.md) - * [ValidatorReward](interfaces/_wrappers_validators_.validatorreward.md) - * [ValidatorsConfig](interfaces/_wrappers_validators_.validatorsconfig.md) -* [Classes]() - * [AddressRegistry](classes/_address_registry_.addressregistry.md) - * [WrapperCache](classes/_contract_cache_.wrappercache.md) - * [IdentityMetadataWrapper](classes/_identity_metadata_.identitymetadatawrapper.md) - * [ContractKit](classes/_kit_.contractkit.md) - * [Web3ContractCache](classes/_web3_contract_cache_.web3contractcache.md) - * [AccountsWrapper](classes/_wrappers_accounts_.accountswrapper.md) - * [AttestationsWrapper](classes/_wrappers_attestations_.attestationswrapper.md) - * [BaseSlasher](classes/_wrappers_baseslasher_.baseslasher.md) - * [BaseWrapper](classes/_wrappers_basewrapper_.basewrapper.md) - * [BlockchainParametersWrapper](classes/_wrappers_blockchainparameters_.blockchainparameterswrapper.md) - * [DoubleSigningSlasherWrapper](classes/_wrappers_doublesigningslasher_.doublesigningslasherwrapper.md) - * [DowntimeSlasherWrapper](classes/_wrappers_downtimeslasher_.downtimeslasherwrapper.md) - * [ElectionWrapper](classes/_wrappers_election_.electionwrapper.md) - * [EscrowWrapper](classes/_wrappers_escrow_.escrowwrapper.md) - * [ExchangeWrapper](classes/_wrappers_exchange_.exchangewrapper.md) - * [FreezerWrapper](classes/_wrappers_freezer_.freezerwrapper.md) - * [GasPriceMinimumWrapper](classes/_wrappers_gaspriceminimum_.gaspriceminimumwrapper.md) - * [GoldTokenWrapper](classes/_wrappers_goldtokenwrapper_.goldtokenwrapper.md) - * [GovernanceWrapper](classes/_wrappers_governance_.governancewrapper.md) - * [LockedGoldWrapper](classes/_wrappers_lockedgold_.lockedgoldwrapper.md) - * [MetaTransactionWalletWrapper](classes/_wrappers_metatransactionwallet_.metatransactionwalletwrapper.md) - * [MetaTransactionWalletDeployerWrapper](classes/_wrappers_metatransactionwalletdeployer_.metatransactionwalletdeployerwrapper.md) - * [MultiSigWrapper](classes/_wrappers_multisig_.multisigwrapper.md) - * [ReleaseGoldWrapper](classes/_wrappers_releasegold_.releasegoldwrapper.md) - * [ReserveWrapper](classes/_wrappers_reserve_.reservewrapper.md) - * [SortedOraclesWrapper](classes/_wrappers_sortedoracles_.sortedoracleswrapper.md) - * [StableTokenWrapper](classes/_wrappers_stabletokenwrapper_.stabletokenwrapper.md) - * [ValidatorsWrapper](classes/_wrappers_validators_.validatorswrapper.md) -* [Enums]() - * [CeloContract](enums/_base_.celocontract.md) - * [ClaimTypes](enums/_identity_claims_types_.claimtypes.md) - * [AttestationServiceStatusState](enums/_wrappers_attestations_.attestationservicestatusstate.md) - * [AttestationState](enums/_wrappers_attestations_.attestationstate.md) - * [ProposalStage](enums/_wrappers_governance_.proposalstage.md) - * [VoteValue](enums/_wrappers_governance_.votevalue.md) - * [MedianRelation](enums/_wrappers_sortedoracles_.medianrelation.md) -* [Interfaces]() - * [NetworkConfig](interfaces/_kit_.networkconfig.md) - * [ActionableAttestation](interfaces/_wrappers_attestations_.actionableattestation.md) - * [AttestationServiceStatusResponse](interfaces/_wrappers_attestations_.attestationservicestatusresponse.md) - * [AttestationStat](interfaces/_wrappers_attestations_.attestationstat.md) - * [AttestationStateForIssuer](interfaces/_wrappers_attestations_.attestationstateforissuer.md) - * [AttestationsConfig](interfaces/_wrappers_attestations_.attestationsconfig.md) - * [AttestationsToken](interfaces/_wrappers_attestations_.attestationstoken.md) - * [UnselectedRequest](interfaces/_wrappers_attestations_.unselectedrequest.md) - * [BlockchainParametersConfig](interfaces/_wrappers_blockchainparameters_.blockchainparametersconfig.md) - * [ClientVersion](interfaces/_wrappers_blockchainparameters_.clientversion.md) - * [DowntimeSlasherConfig](interfaces/_wrappers_downtimeslasher_.downtimeslasherconfig.md) - * [Interval](interfaces/_wrappers_downtimeslasher_.interval.md) - * [ElectableValidators](interfaces/_wrappers_election_.electablevalidators.md) - * [ElectionConfig](interfaces/_wrappers_election_.electionconfig.md) - * [GroupVote](interfaces/_wrappers_election_.groupvote.md) - * [GroupVoterReward](interfaces/_wrappers_election_.groupvoterreward.md) - * [ValidatorGroupVote](interfaces/_wrappers_election_.validatorgroupvote.md) - * [Voter](interfaces/_wrappers_election_.voter.md) - * [VoterReward](interfaces/_wrappers_election_.voterreward.md) - * [ExchangeConfig](interfaces/_wrappers_exchange_.exchangeconfig.md) - * [GasPriceMinimumConfig](interfaces/_wrappers_gaspriceminimum_.gaspriceminimumconfig.md) - * [GovernanceConfig](interfaces/_wrappers_governance_.governanceconfig.md) - * [HotfixRecord](interfaces/_wrappers_governance_.hotfixrecord.md) - * [ParticipationParameters](interfaces/_wrappers_governance_.participationparameters.md) - * [ProposalMetadata](interfaces/_wrappers_governance_.proposalmetadata.md) - * [ProposalRecord](interfaces/_wrappers_governance_.proposalrecord.md) - * [ProposalStageDurations](interfaces/_wrappers_governance_.proposalstagedurations.md) - * [UpvoteRecord](interfaces/_wrappers_governance_.upvoterecord.md) - * [VoteRecord](interfaces/_wrappers_governance_.voterecord.md) - * [Voter](interfaces/_wrappers_governance_.voter.md) - * [Votes](interfaces/_wrappers_governance_.votes.md) - * [AccountSlashed](interfaces/_wrappers_lockedgold_.accountslashed.md) - * [LockedGoldConfig](interfaces/_wrappers_lockedgold_.lockedgoldconfig.md) - * [PendingWithdrawal](interfaces/_wrappers_lockedgold_.pendingwithdrawal.md) - * [VotingDetails](interfaces/_wrappers_lockedgold_.votingdetails.md) - * [RawTransaction](interfaces/_wrappers_metatransactionwallet_.rawtransaction.md) - * [TransactionObjectWithValue](interfaces/_wrappers_metatransactionwallet_.transactionobjectwithvalue.md) - * [TransactionData](interfaces/_wrappers_multisig_.transactiondata.md) - * [BalanceState](interfaces/_wrappers_releasegold_.balancestate.md) - * [ReleaseGoldInfo](interfaces/_wrappers_releasegold_.releasegoldinfo.md) - * [ReserveConfig](interfaces/_wrappers_reserve_.reserveconfig.md) - * [MedianRate](interfaces/_wrappers_sortedoracles_.medianrate.md) - * [OracleRate](interfaces/_wrappers_sortedoracles_.oraclerate.md) - * [OracleReport](interfaces/_wrappers_sortedoracles_.oraclereport.md) - * [OracleTimestamp](interfaces/_wrappers_sortedoracles_.oracletimestamp.md) - * [SortedOraclesConfig](interfaces/_wrappers_sortedoracles_.sortedoraclesconfig.md) - * [InflationParameters](interfaces/_wrappers_stabletokenwrapper_.inflationparameters.md) - * [StableTokenConfig](interfaces/_wrappers_stabletokenwrapper_.stabletokenconfig.md) - * [GroupMembership](interfaces/_wrappers_validators_.groupmembership.md) - * [LockedGoldRequirements](interfaces/_wrappers_validators_.lockedgoldrequirements.md) - * [MembershipHistoryExtraData](interfaces/_wrappers_validators_.membershiphistoryextradata.md) - * [Validator](interfaces/_wrappers_validators_.validator.md) - * [ValidatorGroup](interfaces/_wrappers_validators_.validatorgroup.md) - * [ValidatorReward](interfaces/_wrappers_validators_.validatorreward.md) - * [ValidatorsConfig](interfaces/_wrappers_validators_.validatorsconfig.md) \ No newline at end of file diff --git a/packages/docs/developer-resources/contractkit/reference/classes/_address_registry_.addressregistry.md b/packages/docs/developer-resources/contractkit/reference/classes/_address_registry_.addressregistry.md deleted file mode 100644 index aaca695d371..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/classes/_address_registry_.addressregistry.md +++ /dev/null @@ -1,64 +0,0 @@ -# Class: AddressRegistry - -Celo Core Contract's Address Registry - -## Hierarchy - -* **AddressRegistry** - -## Index - -### Constructors - -* [constructor](_address_registry_.addressregistry.md#constructor) - -### Methods - -* [addressFor](_address_registry_.addressregistry.md#addressfor) -* [addressMapping](_address_registry_.addressregistry.md#addressmapping) - -## Constructors - -### constructor - -\+ **new AddressRegistry**(`kit`: [ContractKit](_kit_.contractkit.md)): *[AddressRegistry](_address_registry_.addressregistry.md)* - -*Defined in [contractkit/src/address-registry.ts:18](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/address-registry.ts#L18)* - -**Parameters:** - -Name | Type | ------- | ------ | -`kit` | [ContractKit](_kit_.contractkit.md) | - -**Returns:** *[AddressRegistry](_address_registry_.addressregistry.md)* - -## Methods - -### addressFor - -▸ **addressFor**(`contract`: [CeloContract](../enums/_base_.celocontract.md)): *Promise‹Address›* - -*Defined in [contractkit/src/address-registry.ts:28](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/address-registry.ts#L28)* - -Get the address for a `CeloContract` - -**Parameters:** - -Name | Type | ------- | ------ | -`contract` | [CeloContract](../enums/_base_.celocontract.md) | - -**Returns:** *Promise‹Address›* - -___ - -### addressMapping - -▸ **addressMapping**(): *Promise‹Map‹[CeloContract](../enums/_base_.celocontract.md), string››* - -*Defined in [contractkit/src/address-registry.ts:47](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/address-registry.ts#L47)* - -Get the address mapping for known registered contracts - -**Returns:** *Promise‹Map‹[CeloContract](../enums/_base_.celocontract.md), string››* diff --git a/packages/docs/developer-resources/contractkit/reference/classes/_contract_cache_.wrappercache.md b/packages/docs/developer-resources/contractkit/reference/classes/_contract_cache_.wrappercache.md deleted file mode 100644 index 2571d496033..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/classes/_contract_cache_.wrappercache.md +++ /dev/null @@ -1,308 +0,0 @@ -# Class: WrapperCache - -Kit ContractWrappers factory & cache. - -Provides access to all contract wrappers for celo core contracts - -## Hierarchy - -* **WrapperCache** - -## Index - -### Constructors - -* [constructor](_contract_cache_.wrappercache.md#constructor) - -### Properties - -* [kit](_contract_cache_.wrappercache.md#readonly-kit) - -### Methods - -* [getAccounts](_contract_cache_.wrappercache.md#getaccounts) -* [getAttestations](_contract_cache_.wrappercache.md#getattestations) -* [getBlockchainParameters](_contract_cache_.wrappercache.md#getblockchainparameters) -* [getContract](_contract_cache_.wrappercache.md#getcontract) -* [getDoubleSigningSlasher](_contract_cache_.wrappercache.md#getdoublesigningslasher) -* [getDowntimeSlasher](_contract_cache_.wrappercache.md#getdowntimeslasher) -* [getElection](_contract_cache_.wrappercache.md#getelection) -* [getEscrow](_contract_cache_.wrappercache.md#getescrow) -* [getExchange](_contract_cache_.wrappercache.md#getexchange) -* [getFreezer](_contract_cache_.wrappercache.md#getfreezer) -* [getGasPriceMinimum](_contract_cache_.wrappercache.md#getgaspriceminimum) -* [getGoldToken](_contract_cache_.wrappercache.md#getgoldtoken) -* [getGovernance](_contract_cache_.wrappercache.md#getgovernance) -* [getLockedGold](_contract_cache_.wrappercache.md#getlockedgold) -* [getMetaTransactionWallet](_contract_cache_.wrappercache.md#getmetatransactionwallet) -* [getMetaTransactionWalletDeployer](_contract_cache_.wrappercache.md#getmetatransactionwalletdeployer) -* [getMultiSig](_contract_cache_.wrappercache.md#getmultisig) -* [getReserve](_contract_cache_.wrappercache.md#getreserve) -* [getSortedOracles](_contract_cache_.wrappercache.md#getsortedoracles) -* [getStableToken](_contract_cache_.wrappercache.md#getstabletoken) -* [getValidators](_contract_cache_.wrappercache.md#getvalidators) - -## Constructors - -### constructor - -\+ **new WrapperCache**(`kit`: [ContractKit](_kit_.contractkit.md)): *[WrapperCache](_contract_cache_.wrappercache.md)* - -*Defined in [contractkit/src/contract-cache.ts:89](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/contract-cache.ts#L89)* - -**Parameters:** - -Name | Type | ------- | ------ | -`kit` | [ContractKit](_kit_.contractkit.md) | - -**Returns:** *[WrapperCache](_contract_cache_.wrappercache.md)* - -## Properties - -### `Readonly` kit - -• **kit**: *[ContractKit](_kit_.contractkit.md)* - -*Defined in [contractkit/src/contract-cache.ts:91](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/contract-cache.ts#L91)* - -## Methods - -### getAccounts - -▸ **getAccounts**(): *Promise‹[AccountsWrapper](_wrappers_accounts_.accountswrapper.md)‹››* - -*Defined in [contractkit/src/contract-cache.ts:93](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/contract-cache.ts#L93)* - -**Returns:** *Promise‹[AccountsWrapper](_wrappers_accounts_.accountswrapper.md)‹››* - -___ - -### getAttestations - -▸ **getAttestations**(): *Promise‹[AttestationsWrapper](_wrappers_attestations_.attestationswrapper.md)‹››* - -*Defined in [contractkit/src/contract-cache.ts:96](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/contract-cache.ts#L96)* - -**Returns:** *Promise‹[AttestationsWrapper](_wrappers_attestations_.attestationswrapper.md)‹››* - -___ - -### getBlockchainParameters - -▸ **getBlockchainParameters**(): *Promise‹[BlockchainParametersWrapper](_wrappers_blockchainparameters_.blockchainparameterswrapper.md)‹››* - -*Defined in [contractkit/src/contract-cache.ts:99](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/contract-cache.ts#L99)* - -**Returns:** *Promise‹[BlockchainParametersWrapper](_wrappers_blockchainparameters_.blockchainparameterswrapper.md)‹››* - -___ - -### getContract - -▸ **getContract**<**C**>(`contract`: C, `address?`: undefined | string): *Promise‹NonNullable‹WrapperCacheMap[C]››* - -*Defined in [contractkit/src/contract-cache.ts:166](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/contract-cache.ts#L166)* - -Get Contract wrapper - -**Type parameters:** - -▪ **C**: *[ValidWrappers](../modules/_contract_cache_.md#validwrappers)* - -**Parameters:** - -Name | Type | ------- | ------ | -`contract` | C | -`address?` | undefined | string | - -**Returns:** *Promise‹NonNullable‹WrapperCacheMap[C]››* - -___ - -### getDoubleSigningSlasher - -▸ **getDoubleSigningSlasher**(): *Promise‹[DoubleSigningSlasherWrapper](_wrappers_doublesigningslasher_.doublesigningslasherwrapper.md)‹››* - -*Defined in [contractkit/src/contract-cache.ts:102](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/contract-cache.ts#L102)* - -**Returns:** *Promise‹[DoubleSigningSlasherWrapper](_wrappers_doublesigningslasher_.doublesigningslasherwrapper.md)‹››* - -___ - -### getDowntimeSlasher - -▸ **getDowntimeSlasher**(): *Promise‹[DowntimeSlasherWrapper](_wrappers_downtimeslasher_.downtimeslasherwrapper.md)‹››* - -*Defined in [contractkit/src/contract-cache.ts:105](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/contract-cache.ts#L105)* - -**Returns:** *Promise‹[DowntimeSlasherWrapper](_wrappers_downtimeslasher_.downtimeslasherwrapper.md)‹››* - -___ - -### getElection - -▸ **getElection**(): *Promise‹[ElectionWrapper](_wrappers_election_.electionwrapper.md)‹››* - -*Defined in [contractkit/src/contract-cache.ts:108](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/contract-cache.ts#L108)* - -**Returns:** *Promise‹[ElectionWrapper](_wrappers_election_.electionwrapper.md)‹››* - -___ - -### getEscrow - -▸ **getEscrow**(): *Promise‹[EscrowWrapper](_wrappers_escrow_.escrowwrapper.md)‹››* - -*Defined in [contractkit/src/contract-cache.ts:114](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/contract-cache.ts#L114)* - -**Returns:** *Promise‹[EscrowWrapper](_wrappers_escrow_.escrowwrapper.md)‹››* - -___ - -### getExchange - -▸ **getExchange**(): *Promise‹[ExchangeWrapper](_wrappers_exchange_.exchangewrapper.md)‹››* - -*Defined in [contractkit/src/contract-cache.ts:117](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/contract-cache.ts#L117)* - -**Returns:** *Promise‹[ExchangeWrapper](_wrappers_exchange_.exchangewrapper.md)‹››* - -___ - -### getFreezer - -▸ **getFreezer**(): *Promise‹[FreezerWrapper](_wrappers_freezer_.freezerwrapper.md)‹››* - -*Defined in [contractkit/src/contract-cache.ts:120](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/contract-cache.ts#L120)* - -**Returns:** *Promise‹[FreezerWrapper](_wrappers_freezer_.freezerwrapper.md)‹››* - -___ - -### getGasPriceMinimum - -▸ **getGasPriceMinimum**(): *Promise‹[GasPriceMinimumWrapper](_wrappers_gaspriceminimum_.gaspriceminimumwrapper.md)‹››* - -*Defined in [contractkit/src/contract-cache.ts:126](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/contract-cache.ts#L126)* - -**Returns:** *Promise‹[GasPriceMinimumWrapper](_wrappers_gaspriceminimum_.gaspriceminimumwrapper.md)‹››* - -___ - -### getGoldToken - -▸ **getGoldToken**(): *Promise‹[GoldTokenWrapper](_wrappers_goldtokenwrapper_.goldtokenwrapper.md)‹››* - -*Defined in [contractkit/src/contract-cache.ts:129](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/contract-cache.ts#L129)* - -**Returns:** *Promise‹[GoldTokenWrapper](_wrappers_goldtokenwrapper_.goldtokenwrapper.md)‹››* - -___ - -### getGovernance - -▸ **getGovernance**(): *Promise‹[GovernanceWrapper](_wrappers_governance_.governancewrapper.md)‹››* - -*Defined in [contractkit/src/contract-cache.ts:132](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/contract-cache.ts#L132)* - -**Returns:** *Promise‹[GovernanceWrapper](_wrappers_governance_.governancewrapper.md)‹››* - -___ - -### getLockedGold - -▸ **getLockedGold**(): *Promise‹[LockedGoldWrapper](_wrappers_lockedgold_.lockedgoldwrapper.md)‹››* - -*Defined in [contractkit/src/contract-cache.ts:135](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/contract-cache.ts#L135)* - -**Returns:** *Promise‹[LockedGoldWrapper](_wrappers_lockedgold_.lockedgoldwrapper.md)‹››* - -___ - -### getMetaTransactionWallet - -▸ **getMetaTransactionWallet**(`address`: string): *Promise‹[MetaTransactionWalletWrapper](_wrappers_metatransactionwallet_.metatransactionwalletwrapper.md)‹››* - -*Defined in [contractkit/src/contract-cache.ts:138](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/contract-cache.ts#L138)* - -**Parameters:** - -Name | Type | ------- | ------ | -`address` | string | - -**Returns:** *Promise‹[MetaTransactionWalletWrapper](_wrappers_metatransactionwallet_.metatransactionwalletwrapper.md)‹››* - -___ - -### getMetaTransactionWalletDeployer - -▸ **getMetaTransactionWalletDeployer**(`address`: string): *Promise‹[MetaTransactionWalletDeployerWrapper](_wrappers_metatransactionwalletdeployer_.metatransactionwalletdeployerwrapper.md)‹››* - -*Defined in [contractkit/src/contract-cache.ts:141](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/contract-cache.ts#L141)* - -**Parameters:** - -Name | Type | ------- | ------ | -`address` | string | - -**Returns:** *Promise‹[MetaTransactionWalletDeployerWrapper](_wrappers_metatransactionwalletdeployer_.metatransactionwalletdeployerwrapper.md)‹››* - -___ - -### getMultiSig - -▸ **getMultiSig**(`address`: string): *Promise‹[MultiSigWrapper](_wrappers_multisig_.multisigwrapper.md)‹››* - -*Defined in [contractkit/src/contract-cache.ts:144](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/contract-cache.ts#L144)* - -**Parameters:** - -Name | Type | ------- | ------ | -`address` | string | - -**Returns:** *Promise‹[MultiSigWrapper](_wrappers_multisig_.multisigwrapper.md)‹››* - -___ - -### getReserve - -▸ **getReserve**(): *Promise‹[ReserveWrapper](_wrappers_reserve_.reservewrapper.md)‹››* - -*Defined in [contractkit/src/contract-cache.ts:150](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/contract-cache.ts#L150)* - -**Returns:** *Promise‹[ReserveWrapper](_wrappers_reserve_.reservewrapper.md)‹››* - -___ - -### getSortedOracles - -▸ **getSortedOracles**(): *Promise‹[SortedOraclesWrapper](_wrappers_sortedoracles_.sortedoracleswrapper.md)‹››* - -*Defined in [contractkit/src/contract-cache.ts:153](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/contract-cache.ts#L153)* - -**Returns:** *Promise‹[SortedOraclesWrapper](_wrappers_sortedoracles_.sortedoracleswrapper.md)‹››* - -___ - -### getStableToken - -▸ **getStableToken**(): *Promise‹[StableTokenWrapper](_wrappers_stabletokenwrapper_.stabletokenwrapper.md)‹››* - -*Defined in [contractkit/src/contract-cache.ts:156](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/contract-cache.ts#L156)* - -**Returns:** *Promise‹[StableTokenWrapper](_wrappers_stabletokenwrapper_.stabletokenwrapper.md)‹››* - -___ - -### getValidators - -▸ **getValidators**(): *Promise‹[ValidatorsWrapper](_wrappers_validators_.validatorswrapper.md)‹››* - -*Defined in [contractkit/src/contract-cache.ts:159](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/contract-cache.ts#L159)* - -**Returns:** *Promise‹[ValidatorsWrapper](_wrappers_validators_.validatorswrapper.md)‹››* diff --git a/packages/docs/developer-resources/contractkit/reference/classes/_identity_metadata_.identitymetadatawrapper.md b/packages/docs/developer-resources/contractkit/reference/classes/_identity_metadata_.identitymetadatawrapper.md deleted file mode 100644 index 9b847123eae..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/classes/_identity_metadata_.identitymetadatawrapper.md +++ /dev/null @@ -1,250 +0,0 @@ -# Class: IdentityMetadataWrapper - -## Hierarchy - -* **IdentityMetadataWrapper** - -## Index - -### Constructors - -* [constructor](_identity_metadata_.identitymetadatawrapper.md#constructor) - -### Properties - -* [data](_identity_metadata_.identitymetadatawrapper.md#data) - -### Accessors - -* [claims](_identity_metadata_.identitymetadatawrapper.md#claims) - -### Methods - -* [addClaim](_identity_metadata_.identitymetadatawrapper.md#addclaim) -* [filterClaims](_identity_metadata_.identitymetadatawrapper.md#filterclaims) -* [findClaim](_identity_metadata_.identitymetadatawrapper.md#findclaim) -* [hashOfClaims](_identity_metadata_.identitymetadatawrapper.md#hashofclaims) -* [toString](_identity_metadata_.identitymetadatawrapper.md#tostring) -* [fetchFromURL](_identity_metadata_.identitymetadatawrapper.md#static-fetchfromurl) -* [fromEmpty](_identity_metadata_.identitymetadatawrapper.md#static-fromempty) -* [fromFile](_identity_metadata_.identitymetadatawrapper.md#static-fromfile) -* [fromRawString](_identity_metadata_.identitymetadatawrapper.md#static-fromrawstring) -* [verifySigner](_identity_metadata_.identitymetadatawrapper.md#static-verifysigner) -* [verifySignerForAddress](_identity_metadata_.identitymetadatawrapper.md#static-verifysignerforaddress) - -## Constructors - -### constructor - -\+ **new IdentityMetadataWrapper**(`data`: [IdentityMetadata](../modules/_identity_metadata_.md#identitymetadata)): *[IdentityMetadataWrapper](_identity_metadata_.identitymetadatawrapper.md)* - -*Defined in [contractkit/src/identity/metadata.ts:128](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/identity/metadata.ts#L128)* - -**Parameters:** - -Name | Type | ------- | ------ | -`data` | [IdentityMetadata](../modules/_identity_metadata_.md#identitymetadata) | - -**Returns:** *[IdentityMetadataWrapper](_identity_metadata_.identitymetadatawrapper.md)* - -## Properties - -### data - -• **data**: *[IdentityMetadata](../modules/_identity_metadata_.md#identitymetadata)* - -*Defined in [contractkit/src/identity/metadata.ts:29](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/identity/metadata.ts#L29)* - -## Accessors - -### claims - -• **get claims**(): *object | object | object | object | object | object[]* - -*Defined in [contractkit/src/identity/metadata.ts:134](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/identity/metadata.ts#L134)* - -**Returns:** *object | object | object | object | object | object[]* - -## Methods - -### addClaim - -▸ **addClaim**(`claim`: [Claim](../modules/_identity_claims_claim_.md#claim), `signer`: Signer): *Promise‹object | object | object | object | object | object›* - -*Defined in [contractkit/src/identity/metadata.ts:149](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/identity/metadata.ts#L149)* - -**Parameters:** - -Name | Type | ------- | ------ | -`claim` | [Claim](../modules/_identity_claims_claim_.md#claim) | -`signer` | Signer | - -**Returns:** *Promise‹object | object | object | object | object | object›* - -___ - -### filterClaims - -▸ **filterClaims**<**K**>(`type`: K): *Array‹[ClaimPayload](../modules/_identity_claims_claim_.md#claimpayload)‹K››* - -*Defined in [contractkit/src/identity/metadata.ts:189](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/identity/metadata.ts#L189)* - -**Type parameters:** - -▪ **K**: *[ClaimTypes](../modules/_identity_metadata_.md#claimtypes)* - -**Parameters:** - -Name | Type | ------- | ------ | -`type` | K | - -**Returns:** *Array‹[ClaimPayload](../modules/_identity_claims_claim_.md#claimpayload)‹K››* - -___ - -### findClaim - -▸ **findClaim**<**K**>(`type`: K): *[ClaimPayload](../modules/_identity_claims_claim_.md#claimpayload)‹K› | undefined* - -*Defined in [contractkit/src/identity/metadata.ts:185](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/identity/metadata.ts#L185)* - -**Type parameters:** - -▪ **K**: *[ClaimTypes](../modules/_identity_metadata_.md#claimtypes)* - -**Parameters:** - -Name | Type | ------- | ------ | -`type` | K | - -**Returns:** *[ClaimPayload](../modules/_identity_claims_claim_.md#claimpayload)‹K› | undefined* - -___ - -### hashOfClaims - -▸ **hashOfClaims**(): *string* - -*Defined in [contractkit/src/identity/metadata.ts:138](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/identity/metadata.ts#L138)* - -**Returns:** *string* - -___ - -### toString - -▸ **toString**(): *string* - -*Defined in [contractkit/src/identity/metadata.ts:142](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/identity/metadata.ts#L142)* - -**Returns:** *string* - -___ - -### `Static` fetchFromURL - -▸ **fetchFromURL**(`kit`: [ContractKit](_kit_.contractkit.md), `url`: string, `tries`: number): *Promise‹[IdentityMetadataWrapper](_identity_metadata_.identitymetadatawrapper.md)‹››* - -*Defined in [contractkit/src/identity/metadata.ts:41](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/identity/metadata.ts#L41)* - -**Parameters:** - -Name | Type | Default | ------- | ------ | ------ | -`kit` | [ContractKit](_kit_.contractkit.md) | - | -`url` | string | - | -`tries` | number | 3 | - -**Returns:** *Promise‹[IdentityMetadataWrapper](_identity_metadata_.identitymetadatawrapper.md)‹››* - -___ - -### `Static` fromEmpty - -▸ **fromEmpty**(`address`: Address): *[IdentityMetadataWrapper](_identity_metadata_.identitymetadatawrapper.md)‹›* - -*Defined in [contractkit/src/identity/metadata.ts:31](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/identity/metadata.ts#L31)* - -**Parameters:** - -Name | Type | ------- | ------ | -`address` | Address | - -**Returns:** *[IdentityMetadataWrapper](_identity_metadata_.identitymetadatawrapper.md)‹›* - -___ - -### `Static` fromFile - -▸ **fromFile**(`kit`: [ContractKit](_kit_.contractkit.md), `path`: string): *Promise‹[IdentityMetadataWrapper](_identity_metadata_.identitymetadatawrapper.md)‹››* - -*Defined in [contractkit/src/identity/metadata.ts:56](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/identity/metadata.ts#L56)* - -**Parameters:** - -Name | Type | ------- | ------ | -`kit` | [ContractKit](_kit_.contractkit.md) | -`path` | string | - -**Returns:** *Promise‹[IdentityMetadataWrapper](_identity_metadata_.identitymetadatawrapper.md)‹››* - -___ - -### `Static` fromRawString - -▸ **fromRawString**(`kit`: [ContractKit](_kit_.contractkit.md), `rawData`: string): *Promise‹[IdentityMetadataWrapper](_identity_metadata_.identitymetadatawrapper.md)‹››* - -*Defined in [contractkit/src/identity/metadata.ts:87](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/identity/metadata.ts#L87)* - -**Parameters:** - -Name | Type | ------- | ------ | -`kit` | [ContractKit](_kit_.contractkit.md) | -`rawData` | string | - -**Returns:** *Promise‹[IdentityMetadataWrapper](_identity_metadata_.identitymetadatawrapper.md)‹››* - -___ - -### `Static` verifySigner - -▸ **verifySigner**(`kit`: [ContractKit](_kit_.contractkit.md), `hash`: any, `signature`: any, `metadata`: any): *Promise‹boolean›* - -*Defined in [contractkit/src/identity/metadata.ts:60](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/identity/metadata.ts#L60)* - -**Parameters:** - -Name | Type | ------- | ------ | -`kit` | [ContractKit](_kit_.contractkit.md) | -`hash` | any | -`signature` | any | -`metadata` | any | - -**Returns:** *Promise‹boolean›* - -___ - -### `Static` verifySignerForAddress - -▸ **verifySignerForAddress**(`kit`: [ContractKit](_kit_.contractkit.md), `hash`: any, `signature`: any, `address`: Address): *Promise‹boolean›* - -*Defined in [contractkit/src/identity/metadata.ts:64](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/identity/metadata.ts#L64)* - -**Parameters:** - -Name | Type | ------- | ------ | -`kit` | [ContractKit](_kit_.contractkit.md) | -`hash` | any | -`signature` | any | -`address` | Address | - -**Returns:** *Promise‹boolean›* diff --git a/packages/docs/developer-resources/contractkit/reference/classes/_kit_.contractkit.md b/packages/docs/developer-resources/contractkit/reference/classes/_kit_.contractkit.md deleted file mode 100644 index b24a1ae32a2..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/classes/_kit_.contractkit.md +++ /dev/null @@ -1,458 +0,0 @@ -# Class: ContractKit - -## Hierarchy - -* **ContractKit** - -## Index - -### Constructors - -* [constructor](_kit_.contractkit.md#constructor) - -### Properties - -* [_web3Contracts](_kit_.contractkit.md#readonly-_web3contracts) -* [connection](_kit_.contractkit.md#readonly-connection) -* [contracts](_kit_.contractkit.md#readonly-contracts) -* [gasPriceSuggestionMultiplier](_kit_.contractkit.md#gaspricesuggestionmultiplier) -* [registry](_kit_.contractkit.md#readonly-registry) - -### Accessors - -* [defaultAccount](_kit_.contractkit.md#defaultaccount) -* [defaultFeeCurrency](_kit_.contractkit.md#defaultfeecurrency) -* [gasInflationFactor](_kit_.contractkit.md#gasinflationfactor) -* [gasPrice](_kit_.contractkit.md#gasprice) -* [web3](_kit_.contractkit.md#web3) - -### Methods - -* [addAccount](_kit_.contractkit.md#addaccount) -* [fillGasPrice](_kit_.contractkit.md#fillgasprice) -* [getEpochNumberOfBlock](_kit_.contractkit.md#getepochnumberofblock) -* [getEpochSize](_kit_.contractkit.md#getepochsize) -* [getFirstBlockNumberForEpoch](_kit_.contractkit.md#getfirstblocknumberforepoch) -* [getHumanReadableNetworkConfig](_kit_.contractkit.md#gethumanreadablenetworkconfig) -* [getLastBlockNumberForEpoch](_kit_.contractkit.md#getlastblocknumberforepoch) -* [getNetworkConfig](_kit_.contractkit.md#getnetworkconfig) -* [getTotalBalance](_kit_.contractkit.md#gettotalbalance) -* [getWallet](_kit_.contractkit.md#getwallet) -* [isListening](_kit_.contractkit.md#islistening) -* [isSyncing](_kit_.contractkit.md#issyncing) -* [sendTransaction](_kit_.contractkit.md#sendtransaction) -* [sendTransactionObject](_kit_.contractkit.md#sendtransactionobject) -* [setFeeCurrency](_kit_.contractkit.md#setfeecurrency) -* [signTypedData](_kit_.contractkit.md#signtypeddata) -* [stop](_kit_.contractkit.md#stop) -* [updateGasPriceInConnectionLayer](_kit_.contractkit.md#updategaspriceinconnectionlayer) - -## Constructors - -### constructor - -\+ **new ContractKit**(`connection`: Connection): *[ContractKit](_kit_.contractkit.md)* - -*Defined in [contractkit/src/kit.ts:86](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/kit.ts#L86)* - -**Parameters:** - -Name | Type | ------- | ------ | -`connection` | Connection | - -**Returns:** *[ContractKit](_kit_.contractkit.md)* - -## Properties - -### `Readonly` _web3Contracts - -• **_web3Contracts**: *[Web3ContractCache](_web3_contract_cache_.web3contractcache.md)* - -*Defined in [contractkit/src/kit.ts:81](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/kit.ts#L81)* - -factory for core contract's native web3 wrappers - -___ - -### `Readonly` connection - -• **connection**: *Connection* - -*Defined in [contractkit/src/kit.ts:88](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/kit.ts#L88)* - -___ - -### `Readonly` contracts - -• **contracts**: *[WrapperCache](_contract_cache_.wrappercache.md)* - -*Defined in [contractkit/src/kit.ts:83](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/kit.ts#L83)* - -factory for core contract's kit wrappers - -___ - -### gasPriceSuggestionMultiplier - -• **gasPriceSuggestionMultiplier**: *number* = 5 - -*Defined in [contractkit/src/kit.ts:86](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/kit.ts#L86)* - -___ - -### `Readonly` registry - -• **registry**: *[AddressRegistry](_address_registry_.addressregistry.md)* - -*Defined in [contractkit/src/kit.ts:79](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/kit.ts#L79)* - -core contract's address registry - -## Accessors - -### defaultAccount - -• **get defaultAccount**(): *Address | undefined* - -*Defined in [contractkit/src/kit.ts:290](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/kit.ts#L290)* - -**Returns:** *Address | undefined* - -• **set defaultAccount**(`address`: Address | undefined): *void* - -*Defined in [contractkit/src/kit.ts:286](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/kit.ts#L286)* - -**Parameters:** - -Name | Type | ------- | ------ | -`address` | Address | undefined | - -**Returns:** *void* - -___ - -### defaultFeeCurrency - -• **get defaultFeeCurrency**(): *undefined | string* - -*Defined in [contractkit/src/kit.ts:314](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/kit.ts#L314)* - -**Returns:** *undefined | string* - -• **set defaultFeeCurrency**(`address`: Address | undefined): *void* - -*Defined in [contractkit/src/kit.ts:310](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/kit.ts#L310)* - -**Parameters:** - -Name | Type | ------- | ------ | -`address` | Address | undefined | - -**Returns:** *void* - -___ - -### gasInflationFactor - -• **get gasInflationFactor**(): *number* - -*Defined in [contractkit/src/kit.ts:298](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/kit.ts#L298)* - -**Returns:** *number* - -• **set gasInflationFactor**(`factor`: number): *void* - -*Defined in [contractkit/src/kit.ts:294](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/kit.ts#L294)* - -**Parameters:** - -Name | Type | ------- | ------ | -`factor` | number | - -**Returns:** *void* - -___ - -### gasPrice - -• **get gasPrice**(): *number* - -*Defined in [contractkit/src/kit.ts:306](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/kit.ts#L306)* - -**Returns:** *number* - -• **set gasPrice**(`price`: number): *void* - -*Defined in [contractkit/src/kit.ts:302](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/kit.ts#L302)* - -**Parameters:** - -Name | Type | ------- | ------ | -`price` | number | - -**Returns:** *void* - -___ - -### web3 - -• **get web3**(): *Web3‹›* - -*Defined in [contractkit/src/kit.ts:352](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/kit.ts#L352)* - -**Returns:** *Web3‹›* - -## Methods - -### addAccount - -▸ **addAccount**(`privateKey`: string): *void* - -*Defined in [contractkit/src/kit.ts:282](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/kit.ts#L282)* - -**Parameters:** - -Name | Type | ------- | ------ | -`privateKey` | string | - -**Returns:** *void* - -___ - -### fillGasPrice - -▸ **fillGasPrice**(`tx`: CeloTx): *Promise‹CeloTx›* - -*Defined in [contractkit/src/kit.ts:326](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/kit.ts#L326)* - -**Parameters:** - -Name | Type | ------- | ------ | -`tx` | CeloTx | - -**Returns:** *Promise‹CeloTx›* - -___ - -### getEpochNumberOfBlock - -▸ **getEpochNumberOfBlock**(`blockNumber`: number): *Promise‹number›* - -*Defined in [contractkit/src/kit.ts:267](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/kit.ts#L267)* - -**Parameters:** - -Name | Type | ------- | ------ | -`blockNumber` | number | - -**Returns:** *Promise‹number›* - -___ - -### getEpochSize - -▸ **getEpochSize**(): *Promise‹number›* - -*Defined in [contractkit/src/kit.ts:240](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/kit.ts#L240)* - -**Returns:** *Promise‹number›* - -___ - -### getFirstBlockNumberForEpoch - -▸ **getFirstBlockNumberForEpoch**(`epochNumber`: number): *Promise‹number›* - -*Defined in [contractkit/src/kit.ts:247](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/kit.ts#L247)* - -**Parameters:** - -Name | Type | ------- | ------ | -`epochNumber` | number | - -**Returns:** *Promise‹number›* - -___ - -### getHumanReadableNetworkConfig - -▸ **getHumanReadableNetworkConfig**(): *Promise‹object›* - -*Defined in [contractkit/src/kit.ts:171](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/kit.ts#L171)* - -**Returns:** *Promise‹object›* - -___ - -### getLastBlockNumberForEpoch - -▸ **getLastBlockNumberForEpoch**(`epochNumber`: number): *Promise‹number›* - -*Defined in [contractkit/src/kit.ts:257](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/kit.ts#L257)* - -**Parameters:** - -Name | Type | ------- | ------ | -`epochNumber` | number | - -**Returns:** *Promise‹number›* - -___ - -### getNetworkConfig - -▸ **getNetworkConfig**(): *Promise‹[NetworkConfig](../interfaces/_kit_.networkconfig.md)›* - -*Defined in [contractkit/src/kit.ts:120](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/kit.ts#L120)* - -**Returns:** *Promise‹[NetworkConfig](../interfaces/_kit_.networkconfig.md)›* - -___ - -### getTotalBalance - -▸ **getTotalBalance**(`address`: string): *Promise‹AccountBalance›* - -*Defined in [contractkit/src/kit.ts:98](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/kit.ts#L98)* - -**Parameters:** - -Name | Type | ------- | ------ | -`address` | string | - -**Returns:** *Promise‹AccountBalance›* - -___ - -### getWallet - -▸ **getWallet**(): *undefined | ReadOnlyWallet* - -*Defined in [contractkit/src/kit.ts:94](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/kit.ts#L94)* - -**Returns:** *undefined | ReadOnlyWallet* - -___ - -### isListening - -▸ **isListening**(): *Promise‹boolean›* - -*Defined in [contractkit/src/kit.ts:318](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/kit.ts#L318)* - -**Returns:** *Promise‹boolean›* - -___ - -### isSyncing - -▸ **isSyncing**(): *Promise‹boolean›* - -*Defined in [contractkit/src/kit.ts:322](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/kit.ts#L322)* - -**Returns:** *Promise‹boolean›* - -___ - -### sendTransaction - -▸ **sendTransaction**(`tx`: CeloTx): *Promise‹TransactionResult›* - -*Defined in [contractkit/src/kit.ts:333](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/kit.ts#L333)* - -**Parameters:** - -Name | Type | ------- | ------ | -`tx` | CeloTx | - -**Returns:** *Promise‹TransactionResult›* - -___ - -### sendTransactionObject - -▸ **sendTransactionObject**(`txObj`: CeloTxObject‹any›, `tx?`: Omit‹CeloTx, "data"›): *Promise‹TransactionResult›* - -*Defined in [contractkit/src/kit.ts:337](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/kit.ts#L337)* - -**Parameters:** - -Name | Type | ------- | ------ | -`txObj` | CeloTxObject‹any› | -`tx?` | Omit‹CeloTx, "data"› | - -**Returns:** *Promise‹TransactionResult›* - -___ - -### setFeeCurrency - -▸ **setFeeCurrency**(`token`: [CeloToken](../modules/_base_.md#celotoken)): *Promise‹void›* - -*Defined in [contractkit/src/kit.ts:223](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/kit.ts#L223)* - -Set CeloToken to use to pay for gas fees - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`token` | [CeloToken](../modules/_base_.md#celotoken) | cUSD (StableToken) or CELO (GoldToken) | - -**Returns:** *Promise‹void›* - -___ - -### signTypedData - -▸ **signTypedData**(`signer`: string, `typedData`: EIP712TypedData): *Promise‹Signature›* - -*Defined in [contractkit/src/kit.ts:344](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/kit.ts#L344)* - -**Parameters:** - -Name | Type | ------- | ------ | -`signer` | string | -`typedData` | EIP712TypedData | - -**Returns:** *Promise‹Signature›* - -___ - -### stop - -▸ **stop**(): *void* - -*Defined in [contractkit/src/kit.ts:348](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/kit.ts#L348)* - -**Returns:** *void* - -___ - -### updateGasPriceInConnectionLayer - -▸ **updateGasPriceInConnectionLayer**(`currency`: Address): *Promise‹void›* - -*Defined in [contractkit/src/kit.ts:233](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/kit.ts#L233)* - -**Parameters:** - -Name | Type | ------- | ------ | -`currency` | Address | - -**Returns:** *Promise‹void›* diff --git a/packages/docs/developer-resources/contractkit/reference/classes/_web3_contract_cache_.web3contractcache.md b/packages/docs/developer-resources/contractkit/reference/classes/_web3_contract_cache_.web3contractcache.md deleted file mode 100644 index fbdcee878a4..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/classes/_web3_contract_cache_.web3contractcache.md +++ /dev/null @@ -1,366 +0,0 @@ -# Class: Web3ContractCache - -Native Web3 contracts factory and cache. - -Exposes accessors to all `CeloContract` web3 contracts. - -Mostly a private cache, kit users would normally use -a contract wrapper - -## Hierarchy - -* **Web3ContractCache** - -## Index - -### Constructors - -* [constructor](_web3_contract_cache_.web3contractcache.md#constructor) - -### Properties - -* [kit](_web3_contract_cache_.web3contractcache.md#readonly-kit) - -### Methods - -* [getAccounts](_web3_contract_cache_.web3contractcache.md#getaccounts) -* [getAttestations](_web3_contract_cache_.web3contractcache.md#getattestations) -* [getBlockchainParameters](_web3_contract_cache_.web3contractcache.md#getblockchainparameters) -* [getContract](_web3_contract_cache_.web3contractcache.md#getcontract) -* [getDoubleSigningSlasher](_web3_contract_cache_.web3contractcache.md#getdoublesigningslasher) -* [getDowntimeSlasher](_web3_contract_cache_.web3contractcache.md#getdowntimeslasher) -* [getElection](_web3_contract_cache_.web3contractcache.md#getelection) -* [getEpochRewards](_web3_contract_cache_.web3contractcache.md#getepochrewards) -* [getEscrow](_web3_contract_cache_.web3contractcache.md#getescrow) -* [getExchange](_web3_contract_cache_.web3contractcache.md#getexchange) -* [getFeeCurrencyWhitelist](_web3_contract_cache_.web3contractcache.md#getfeecurrencywhitelist) -* [getFreezer](_web3_contract_cache_.web3contractcache.md#getfreezer) -* [getGasPriceMinimum](_web3_contract_cache_.web3contractcache.md#getgaspriceminimum) -* [getGoldToken](_web3_contract_cache_.web3contractcache.md#getgoldtoken) -* [getGovernance](_web3_contract_cache_.web3contractcache.md#getgovernance) -* [getLockedGold](_web3_contract_cache_.web3contractcache.md#getlockedgold) -* [getMetaTransactionWallet](_web3_contract_cache_.web3contractcache.md#getmetatransactionwallet) -* [getMetaTransactionWalletDeployer](_web3_contract_cache_.web3contractcache.md#getmetatransactionwalletdeployer) -* [getMultiSig](_web3_contract_cache_.web3contractcache.md#getmultisig) -* [getRandom](_web3_contract_cache_.web3contractcache.md#getrandom) -* [getRegistry](_web3_contract_cache_.web3contractcache.md#getregistry) -* [getReserve](_web3_contract_cache_.web3contractcache.md#getreserve) -* [getSortedOracles](_web3_contract_cache_.web3contractcache.md#getsortedoracles) -* [getStableToken](_web3_contract_cache_.web3contractcache.md#getstabletoken) -* [getTransferWhitelist](_web3_contract_cache_.web3contractcache.md#gettransferwhitelist) -* [getValidators](_web3_contract_cache_.web3contractcache.md#getvalidators) - -## Constructors - -### constructor - -\+ **new Web3ContractCache**(`kit`: [ContractKit](_kit_.contractkit.md)): *[Web3ContractCache](_web3_contract_cache_.web3contractcache.md)* - -*Defined in [contractkit/src/web3-contract-cache.ts:73](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/web3-contract-cache.ts#L73)* - -**Parameters:** - -Name | Type | ------- | ------ | -`kit` | [ContractKit](_kit_.contractkit.md) | - -**Returns:** *[Web3ContractCache](_web3_contract_cache_.web3contractcache.md)* - -## Properties - -### `Readonly` kit - -• **kit**: *[ContractKit](_kit_.contractkit.md)* - -*Defined in [contractkit/src/web3-contract-cache.ts:75](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/web3-contract-cache.ts#L75)* - -## Methods - -### getAccounts - -▸ **getAccounts**(): *Promise‹Accounts‹››* - -*Defined in [contractkit/src/web3-contract-cache.ts:76](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/web3-contract-cache.ts#L76)* - -**Returns:** *Promise‹Accounts‹››* - -___ - -### getAttestations - -▸ **getAttestations**(): *Promise‹Attestations‹››* - -*Defined in [contractkit/src/web3-contract-cache.ts:79](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/web3-contract-cache.ts#L79)* - -**Returns:** *Promise‹Attestations‹››* - -___ - -### getBlockchainParameters - -▸ **getBlockchainParameters**(): *Promise‹BlockchainParameters‹››* - -*Defined in [contractkit/src/web3-contract-cache.ts:82](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/web3-contract-cache.ts#L82)* - -**Returns:** *Promise‹BlockchainParameters‹››* - -___ - -### getContract - -▸ **getContract**<**C**>(`contract`: C, `address?`: undefined | string): *Promise‹NonNullable‹ContractCacheMap[C]››* - -*Defined in [contractkit/src/web3-contract-cache.ts:155](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/web3-contract-cache.ts#L155)* - -Get native web3 contract wrapper - -**Type parameters:** - -▪ **C**: *keyof typeof ContractFactories* - -**Parameters:** - -Name | Type | ------- | ------ | -`contract` | C | -`address?` | undefined | string | - -**Returns:** *Promise‹NonNullable‹ContractCacheMap[C]››* - -___ - -### getDoubleSigningSlasher - -▸ **getDoubleSigningSlasher**(): *Promise‹DoubleSigningSlasher‹››* - -*Defined in [contractkit/src/web3-contract-cache.ts:85](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/web3-contract-cache.ts#L85)* - -**Returns:** *Promise‹DoubleSigningSlasher‹››* - -___ - -### getDowntimeSlasher - -▸ **getDowntimeSlasher**(): *Promise‹DowntimeSlasher‹››* - -*Defined in [contractkit/src/web3-contract-cache.ts:88](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/web3-contract-cache.ts#L88)* - -**Returns:** *Promise‹DowntimeSlasher‹››* - -___ - -### getElection - -▸ **getElection**(): *Promise‹Election‹››* - -*Defined in [contractkit/src/web3-contract-cache.ts:91](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/web3-contract-cache.ts#L91)* - -**Returns:** *Promise‹Election‹››* - -___ - -### getEpochRewards - -▸ **getEpochRewards**(): *Promise‹EpochRewards‹››* - -*Defined in [contractkit/src/web3-contract-cache.ts:94](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/web3-contract-cache.ts#L94)* - -**Returns:** *Promise‹EpochRewards‹››* - -___ - -### getEscrow - -▸ **getEscrow**(): *Promise‹Escrow‹››* - -*Defined in [contractkit/src/web3-contract-cache.ts:97](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/web3-contract-cache.ts#L97)* - -**Returns:** *Promise‹Escrow‹››* - -___ - -### getExchange - -▸ **getExchange**(): *Promise‹Exchange‹››* - -*Defined in [contractkit/src/web3-contract-cache.ts:100](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/web3-contract-cache.ts#L100)* - -**Returns:** *Promise‹Exchange‹››* - -___ - -### getFeeCurrencyWhitelist - -▸ **getFeeCurrencyWhitelist**(): *Promise‹FeeCurrencyWhitelist‹››* - -*Defined in [contractkit/src/web3-contract-cache.ts:103](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/web3-contract-cache.ts#L103)* - -**Returns:** *Promise‹FeeCurrencyWhitelist‹››* - -___ - -### getFreezer - -▸ **getFreezer**(): *Promise‹Freezer‹››* - -*Defined in [contractkit/src/web3-contract-cache.ts:106](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/web3-contract-cache.ts#L106)* - -**Returns:** *Promise‹Freezer‹››* - -___ - -### getGasPriceMinimum - -▸ **getGasPriceMinimum**(): *Promise‹GasPriceMinimum‹››* - -*Defined in [contractkit/src/web3-contract-cache.ts:109](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/web3-contract-cache.ts#L109)* - -**Returns:** *Promise‹GasPriceMinimum‹››* - -___ - -### getGoldToken - -▸ **getGoldToken**(): *Promise‹GoldToken‹››* - -*Defined in [contractkit/src/web3-contract-cache.ts:112](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/web3-contract-cache.ts#L112)* - -**Returns:** *Promise‹GoldToken‹››* - -___ - -### getGovernance - -▸ **getGovernance**(): *Promise‹Governance‹››* - -*Defined in [contractkit/src/web3-contract-cache.ts:115](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/web3-contract-cache.ts#L115)* - -**Returns:** *Promise‹Governance‹››* - -___ - -### getLockedGold - -▸ **getLockedGold**(): *Promise‹LockedGold‹››* - -*Defined in [contractkit/src/web3-contract-cache.ts:118](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/web3-contract-cache.ts#L118)* - -**Returns:** *Promise‹LockedGold‹››* - -___ - -### getMetaTransactionWallet - -▸ **getMetaTransactionWallet**(`address`: string): *Promise‹MetaTransactionWallet‹››* - -*Defined in [contractkit/src/web3-contract-cache.ts:121](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/web3-contract-cache.ts#L121)* - -**Parameters:** - -Name | Type | ------- | ------ | -`address` | string | - -**Returns:** *Promise‹MetaTransactionWallet‹››* - -___ - -### getMetaTransactionWalletDeployer - -▸ **getMetaTransactionWalletDeployer**(`address`: string): *Promise‹MetaTransactionWalletDeployer‹››* - -*Defined in [contractkit/src/web3-contract-cache.ts:124](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/web3-contract-cache.ts#L124)* - -**Parameters:** - -Name | Type | ------- | ------ | -`address` | string | - -**Returns:** *Promise‹MetaTransactionWalletDeployer‹››* - -___ - -### getMultiSig - -▸ **getMultiSig**(`address`: string): *Promise‹MultiSig‹››* - -*Defined in [contractkit/src/web3-contract-cache.ts:127](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/web3-contract-cache.ts#L127)* - -**Parameters:** - -Name | Type | ------- | ------ | -`address` | string | - -**Returns:** *Promise‹MultiSig‹››* - -___ - -### getRandom - -▸ **getRandom**(): *Promise‹Random‹››* - -*Defined in [contractkit/src/web3-contract-cache.ts:130](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/web3-contract-cache.ts#L130)* - -**Returns:** *Promise‹Random‹››* - -___ - -### getRegistry - -▸ **getRegistry**(): *Promise‹Registry‹››* - -*Defined in [contractkit/src/web3-contract-cache.ts:133](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/web3-contract-cache.ts#L133)* - -**Returns:** *Promise‹Registry‹››* - -___ - -### getReserve - -▸ **getReserve**(): *Promise‹Reserve‹››* - -*Defined in [contractkit/src/web3-contract-cache.ts:136](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/web3-contract-cache.ts#L136)* - -**Returns:** *Promise‹Reserve‹››* - -___ - -### getSortedOracles - -▸ **getSortedOracles**(): *Promise‹SortedOracles‹››* - -*Defined in [contractkit/src/web3-contract-cache.ts:139](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/web3-contract-cache.ts#L139)* - -**Returns:** *Promise‹SortedOracles‹››* - -___ - -### getStableToken - -▸ **getStableToken**(): *Promise‹StableToken‹››* - -*Defined in [contractkit/src/web3-contract-cache.ts:142](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/web3-contract-cache.ts#L142)* - -**Returns:** *Promise‹StableToken‹››* - -___ - -### getTransferWhitelist - -▸ **getTransferWhitelist**(): *Promise‹TransferWhitelist‹››* - -*Defined in [contractkit/src/web3-contract-cache.ts:145](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/web3-contract-cache.ts#L145)* - -**Returns:** *Promise‹TransferWhitelist‹››* - -___ - -### getValidators - -▸ **getValidators**(): *Promise‹Validators‹››* - -*Defined in [contractkit/src/web3-contract-cache.ts:148](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/web3-contract-cache.ts#L148)* - -**Returns:** *Promise‹Validators‹››* diff --git a/packages/docs/developer-resources/contractkit/reference/classes/_wrappers_accounts_.accountswrapper.md b/packages/docs/developer-resources/contractkit/reference/classes/_wrappers_accounts_.accountswrapper.md deleted file mode 100644 index aa4ac2c53e5..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/classes/_wrappers_accounts_.accountswrapper.md +++ /dev/null @@ -1,783 +0,0 @@ -# Class: AccountsWrapper - -Contract for handling deposits needed for voting. - -## Hierarchy - -* [BaseWrapper](_wrappers_basewrapper_.basewrapper.md)‹Accounts› - - ↳ **AccountsWrapper** - -## Index - -### Constructors - -* [constructor](_wrappers_accounts_.accountswrapper.md#constructor) - -### Properties - -* [createAccount](_wrappers_accounts_.accountswrapper.md#createaccount) -* [eventTypes](_wrappers_accounts_.accountswrapper.md#eventtypes) -* [events](_wrappers_accounts_.accountswrapper.md#events) -* [getAttestationSigner](_wrappers_accounts_.accountswrapper.md#getattestationsigner) -* [getDataEncryptionKey](_wrappers_accounts_.accountswrapper.md#getdataencryptionkey) -* [getMetadataURL](_wrappers_accounts_.accountswrapper.md#getmetadataurl) -* [getValidatorSigner](_wrappers_accounts_.accountswrapper.md#getvalidatorsigner) -* [getVoteSigner](_wrappers_accounts_.accountswrapper.md#getvotesigner) -* [getWalletAddress](_wrappers_accounts_.accountswrapper.md#getwalletaddress) -* [hasAuthorizedAttestationSigner](_wrappers_accounts_.accountswrapper.md#hasauthorizedattestationsigner) -* [isAccount](_wrappers_accounts_.accountswrapper.md#isaccount) -* [isSigner](_wrappers_accounts_.accountswrapper.md#issigner) -* [methodIds](_wrappers_accounts_.accountswrapper.md#methodids) -* [setAccountDataEncryptionKey](_wrappers_accounts_.accountswrapper.md#setaccountdataencryptionkey) -* [setMetadataURL](_wrappers_accounts_.accountswrapper.md#setmetadataurl) -* [setName](_wrappers_accounts_.accountswrapper.md#setname) -* [signerToAccount](_wrappers_accounts_.accountswrapper.md#signertoaccount) -* [validatorSignerToAccount](_wrappers_accounts_.accountswrapper.md#validatorsignertoaccount) -* [voteSignerToAccount](_wrappers_accounts_.accountswrapper.md#votesignertoaccount) - -### Accessors - -* [address](_wrappers_accounts_.accountswrapper.md#address) - -### Methods - -* [authorizeAttestationSigner](_wrappers_accounts_.accountswrapper.md#authorizeattestationsigner) -* [authorizeValidatorSigner](_wrappers_accounts_.accountswrapper.md#authorizevalidatorsigner) -* [authorizeValidatorSignerAndBls](_wrappers_accounts_.accountswrapper.md#authorizevalidatorsignerandbls) -* [authorizeVoteSigner](_wrappers_accounts_.accountswrapper.md#authorizevotesigner) -* [generateProofOfKeyPossession](_wrappers_accounts_.accountswrapper.md#generateproofofkeypossession) -* [generateProofOfKeyPossessionLocally](_wrappers_accounts_.accountswrapper.md#generateproofofkeypossessionlocally) -* [getAccountSummary](_wrappers_accounts_.accountswrapper.md#getaccountsummary) -* [getCurrentSigners](_wrappers_accounts_.accountswrapper.md#getcurrentsigners) -* [getName](_wrappers_accounts_.accountswrapper.md#getname) -* [getPastEvents](_wrappers_accounts_.accountswrapper.md#getpastevents) -* [parseSignatureOfAddress](_wrappers_accounts_.accountswrapper.md#parsesignatureofaddress) -* [setAccount](_wrappers_accounts_.accountswrapper.md#setaccount) -* [setWalletAddress](_wrappers_accounts_.accountswrapper.md#setwalletaddress) - -## Constructors - -### constructor - -\+ **new AccountsWrapper**(`kit`: [ContractKit](_kit_.contractkit.md), `contract`: Accounts): *[AccountsWrapper](_wrappers_accounts_.accountswrapper.md)* - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[constructor](_wrappers_basewrapper_.basewrapper.md#constructor)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:26](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L26)* - -**Parameters:** - -Name | Type | ------- | ------ | -`kit` | [ContractKit](_kit_.contractkit.md) | -`contract` | Accounts | - -**Returns:** *[AccountsWrapper](_wrappers_accounts_.accountswrapper.md)* - -## Properties - -### createAccount - -• **createAccount**: *function* = proxySend(this.kit, this.contract.methods.createAccount) - -*Defined in [contractkit/src/wrappers/Accounts.ts:39](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Accounts.ts#L39)* - -Creates an account. - -#### Type declaration: - -▸ (...`args`: InputArgs): *CeloTransactionObject‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### eventTypes - -• **eventTypes**: *EventsEnum‹T›* = Object.keys(this.events).reduce>( - (acc, key) => ({ ...acc, [key]: key }), - {} as any - ) - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[eventTypes](_wrappers_basewrapper_.basewrapper.md#eventtypes)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:41](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L41)* - -___ - -### events - -• **events**: *Accounts["events"]* = this.contract.events - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[events](_wrappers_basewrapper_.basewrapper.md#events)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:39](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L39)* - -___ - -### getAttestationSigner - -• **getAttestationSigner**: *function* = proxyCall( - this.contract.methods.getAttestationSigner - ) - -*Defined in [contractkit/src/wrappers/Accounts.ts:46](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Accounts.ts#L46)* - -Returns the attestation signer for the specified account. - -**`param`** The address of the account. - -**`returns`** The address with which the account can vote. - -#### Type declaration: - -▸ (`account`: string): *Promise‹Address›* - -**Parameters:** - -Name | Type | ------- | ------ | -`account` | string | - -___ - -### getDataEncryptionKey - -• **getDataEncryptionKey**: *function* = proxyCall(this.contract.methods.getDataEncryptionKey, undefined, (res) => - solidityBytesToString(res) - ) - -*Defined in [contractkit/src/wrappers/Accounts.ts:310](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Accounts.ts#L310)* - -Returns the set data encryption key for the account - -**`param`** Account - -#### Type declaration: - -▸ (...`args`: InputArgs): *Promise‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### getMetadataURL - -• **getMetadataURL**: *function* = proxyCall(this.contract.methods.getMetadataURL) - -*Defined in [contractkit/src/wrappers/Accounts.ts:324](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Accounts.ts#L324)* - -Returns the metadataURL for the account - -**`param`** Account - -#### Type declaration: - -▸ (...`args`: InputArgs): *Promise‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### getValidatorSigner - -• **getValidatorSigner**: *function* = proxyCall( - this.contract.methods.getValidatorSigner - ) - -*Defined in [contractkit/src/wrappers/Accounts.ts:72](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Accounts.ts#L72)* - -Returns the validator signer for the specified account. - -**`param`** The address of the account. - -**`returns`** The address with which the account can register a validator or group. - -#### Type declaration: - -▸ (`account`: string): *Promise‹Address›* - -**Parameters:** - -Name | Type | ------- | ------ | -`account` | string | - -___ - -### getVoteSigner - -• **getVoteSigner**: *function* = proxyCall( - this.contract.methods.getVoteSigner - ) - -*Defined in [contractkit/src/wrappers/Accounts.ts:64](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Accounts.ts#L64)* - -Returns the vote signer for the specified account. - -**`param`** The address of the account. - -**`returns`** The address with which the account can vote. - -#### Type declaration: - -▸ (`account`: string): *Promise‹Address›* - -**Parameters:** - -Name | Type | ------- | ------ | -`account` | string | - -___ - -### getWalletAddress - -• **getWalletAddress**: *function* = proxyCall(this.contract.methods.getWalletAddress) - -*Defined in [contractkit/src/wrappers/Accounts.ts:318](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Accounts.ts#L318)* - -Returns the set wallet address for the account - -**`param`** Account - -#### Type declaration: - -▸ (...`args`: InputArgs): *Promise‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### hasAuthorizedAttestationSigner - -• **hasAuthorizedAttestationSigner**: *function* = proxyCall( - this.contract.methods.hasAuthorizedAttestationSigner - ) - -*Defined in [contractkit/src/wrappers/Accounts.ts:55](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Accounts.ts#L55)* - -Returns if the account has authorized an attestation signer - -**`param`** The address of the account. - -**`returns`** If the account has authorized an attestation signer - -#### Type declaration: - -▸ (`account`: string): *Promise‹boolean›* - -**Parameters:** - -Name | Type | ------- | ------ | -`account` | string | - -___ - -### isAccount - -• **isAccount**: *function* = proxyCall(this.contract.methods.isAccount) - -*Defined in [contractkit/src/wrappers/Accounts.ts:109](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Accounts.ts#L109)* - -Check if an account already exists. - -**`param`** The address of the account - -**`returns`** Returns `true` if account exists. Returns `false` otherwise. - -#### Type declaration: - -▸ (`account`: string): *Promise‹boolean›* - -**Parameters:** - -Name | Type | ------- | ------ | -`account` | string | - -___ - -### isSigner - -• **isSigner**: *function* = proxyCall( - this.contract.methods.isAuthorizedSigner - ) - -*Defined in [contractkit/src/wrappers/Accounts.ts:116](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Accounts.ts#L116)* - -Check if an address is a signer address - -**`param`** The address of the account - -**`returns`** Returns `true` if account exists. Returns `false` otherwise. - -#### Type declaration: - -▸ (`address`: string): *Promise‹boolean›* - -**Parameters:** - -Name | Type | ------- | ------ | -`address` | string | - -___ - -### methodIds - -• **methodIds**: *Record‹keyof T["methods"], string›* = Object.keys(this.contract.methods).reduce, string>>( - (acc, method: Methods) => { - const methodABI = this.contract.options.jsonInterface.find((item) => item.name === method) - - acc[method] = - methodABI === undefined - ? '0x' - : this.kit.connection.getAbiCoder().encodeFunctionSignature(methodABI) - - return acc - }, - {} as any - ) - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[methodIds](_wrappers_basewrapper_.basewrapper.md#methodids)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:46](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L46)* - -___ - -### setAccountDataEncryptionKey - -• **setAccountDataEncryptionKey**: *function* = proxySend( - this.kit, - this.contract.methods.setAccountDataEncryptionKey - ) - -*Defined in [contractkit/src/wrappers/Accounts.ts:330](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Accounts.ts#L330)* - -Sets the data encryption of the account - -**`param`** The key to set - -#### Type declaration: - -▸ (...`args`: InputArgs): *CeloTransactionObject‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### setMetadataURL - -• **setMetadataURL**: *function* = proxySend(this.kit, this.contract.methods.setMetadataURL) - -*Defined in [contractkit/src/wrappers/Accounts.ts:387](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Accounts.ts#L387)* - -Sets the metadataURL for the account - -**`param`** The url to set - -#### Type declaration: - -▸ (...`args`: InputArgs): *CeloTransactionObject‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### setName - -• **setName**: *function* = proxySend(this.kit, this.contract.methods.setName) - -*Defined in [contractkit/src/wrappers/Accounts.ts:381](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Accounts.ts#L381)* - -Sets the name for the account - -**`param`** The name to set - -#### Type declaration: - -▸ (...`args`: InputArgs): *CeloTransactionObject‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### signerToAccount - -• **signerToAccount**: *function* = proxyCall( - this.contract.methods.signerToAccount - ) - -*Defined in [contractkit/src/wrappers/Accounts.ts:100](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Accounts.ts#L100)* - -Returns the account associated with `signer`. - -**`param`** The address of the account or previously authorized signer. - -**`dev`** Fails if the `signer` is not an account or previously authorized signer. - -**`returns`** The associated account. - -#### Type declaration: - -▸ (`signer`: Address): *Promise‹Address›* - -**Parameters:** - -Name | Type | ------- | ------ | -`signer` | Address | - -___ - -### validatorSignerToAccount - -• **validatorSignerToAccount**: *function* = proxyCall( - this.contract.methods.validatorSignerToAccount - ) - -*Defined in [contractkit/src/wrappers/Accounts.ts:90](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Accounts.ts#L90)* - -Returns the account address given the signer for validating - -**`param`** Address that is authorized to sign the tx as validator - -**`returns`** The Account address - -#### Type declaration: - -▸ (`signer`: Address): *Promise‹Address›* - -**Parameters:** - -Name | Type | ------- | ------ | -`signer` | Address | - -___ - -### voteSignerToAccount - -• **voteSignerToAccount**: *function* = proxyCall( - this.contract.methods.voteSignerToAccount - ) - -*Defined in [contractkit/src/wrappers/Accounts.ts:81](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Accounts.ts#L81)* - -Returns the account address given the signer for voting - -**`param`** Address that is authorized to sign the tx as voter - -**`returns`** The Account address - -#### Type declaration: - -▸ (`signer`: Address): *Promise‹Address›* - -**Parameters:** - -Name | Type | ------- | ------ | -`signer` | Address | - -## Accessors - -### address - -• **get address**(): *string* - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[address](_wrappers_basewrapper_.basewrapper.md#address)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:30](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L30)* - -Contract address - -**Returns:** *string* - -## Methods - -### authorizeAttestationSigner - -▸ **authorizeAttestationSigner**(`signer`: Address, `proofOfSigningKeyPossession`: Signature): *Promise‹CeloTransactionObject‹void››* - -*Defined in [contractkit/src/wrappers/Accounts.ts:158](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Accounts.ts#L158)* - -Authorize an attestation signing key on behalf of this account to another address. - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`signer` | Address | The address of the signing key to authorize. | -`proofOfSigningKeyPossession` | Signature | The account address signed by the signer address. | - -**Returns:** *Promise‹CeloTransactionObject‹void››* - -A CeloTransactionObject - -___ - -### authorizeValidatorSigner - -▸ **authorizeValidatorSigner**(`signer`: Address, `proofOfSigningKeyPossession`: Signature): *Promise‹CeloTransactionObject‹void››* - -*Defined in [contractkit/src/wrappers/Accounts.ts:199](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Accounts.ts#L199)* - -Authorizes an address to sign consensus messages on behalf of the account. - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`signer` | Address | The address of the signing key to authorize. | -`proofOfSigningKeyPossession` | Signature | The account address signed by the signer address. | - -**Returns:** *Promise‹CeloTransactionObject‹void››* - -A CeloTransactionObject - -___ - -### authorizeValidatorSignerAndBls - -▸ **authorizeValidatorSignerAndBls**(`signer`: Address, `proofOfSigningKeyPossession`: Signature, `blsPublicKey`: string, `blsPop`: string): *Promise‹CeloTransactionObject‹void››* - -*Defined in [contractkit/src/wrappers/Accounts.ts:251](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Accounts.ts#L251)* - -Authorizes an address to sign consensus messages on behalf of the account. Also switch BLS key at the same time. - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`signer` | Address | The address of the signing key to authorize. | -`proofOfSigningKeyPossession` | Signature | The account address signed by the signer address. | -`blsPublicKey` | string | The BLS public key that the validator is using for consensus, should pass proof of possession. 48 bytes. | -`blsPop` | string | The BLS public key proof-of-possession, which consists of a signature on the account address. 96 bytes. | - -**Returns:** *Promise‹CeloTransactionObject‹void››* - -A CeloTransactionObject - -___ - -### authorizeVoteSigner - -▸ **authorizeVoteSigner**(`signer`: Address, `proofOfSigningKeyPossession`: Signature): *Promise‹CeloTransactionObject‹void››* - -*Defined in [contractkit/src/wrappers/Accounts.ts:178](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Accounts.ts#L178)* - -Authorizes an address to sign votes on behalf of the account. - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`signer` | Address | The address of the vote signing key to authorize. | -`proofOfSigningKeyPossession` | Signature | The account address signed by the signer address. | - -**Returns:** *Promise‹CeloTransactionObject‹void››* - -A CeloTransactionObject - -___ - -### generateProofOfKeyPossession - -▸ **generateProofOfKeyPossession**(`account`: Address, `signer`: Address): *Promise‹object›* - -*Defined in [contractkit/src/wrappers/Accounts.ts:284](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Accounts.ts#L284)* - -**Parameters:** - -Name | Type | ------- | ------ | -`account` | Address | -`signer` | Address | - -**Returns:** *Promise‹object›* - -___ - -### generateProofOfKeyPossessionLocally - -▸ **generateProofOfKeyPossessionLocally**(`account`: Address, `signer`: Address, `privateKey`: string): *Promise‹object›* - -*Defined in [contractkit/src/wrappers/Accounts.ts:292](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Accounts.ts#L292)* - -**Parameters:** - -Name | Type | ------- | ------ | -`account` | Address | -`signer` | Address | -`privateKey` | string | - -**Returns:** *Promise‹object›* - -___ - -### getAccountSummary - -▸ **getAccountSummary**(`account`: string): *Promise‹AccountSummary›* - -*Defined in [contractkit/src/wrappers/Accounts.ts:128](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Accounts.ts#L128)* - -**Parameters:** - -Name | Type | ------- | ------ | -`account` | string | - -**Returns:** *Promise‹AccountSummary›* - -___ - -### getCurrentSigners - -▸ **getCurrentSigners**(`address`: string): *Promise‹string[]›* - -*Defined in [contractkit/src/wrappers/Accounts.ts:120](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Accounts.ts#L120)* - -**Parameters:** - -Name | Type | ------- | ------ | -`address` | string | - -**Returns:** *Promise‹string[]›* - -___ - -### getName - -▸ **getName**(`account`: Address, `blockNumber?`: undefined | number): *Promise‹string›* - -*Defined in [contractkit/src/wrappers/Accounts.ts:301](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Accounts.ts#L301)* - -Returns the set name for the account - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`account` | Address | Account | -`blockNumber?` | undefined | number | Height of result, defaults to tip. | - -**Returns:** *Promise‹string›* - -___ - -### getPastEvents - -▸ **getPastEvents**(`event`: Events‹Accounts›, `options`: PastEventOptions): *Promise‹EventLog[]›* - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[getPastEvents](_wrappers_basewrapper_.basewrapper.md#getpastevents)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:35](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L35)* - -Contract getPastEvents - -**Parameters:** - -Name | Type | ------- | ------ | -`event` | Events‹Accounts› | -`options` | PastEventOptions | - -**Returns:** *Promise‹EventLog[]›* - -___ - -### parseSignatureOfAddress - -▸ **parseSignatureOfAddress**(`address`: Address, `signer`: string, `signature`: string): *object* - -*Defined in [contractkit/src/wrappers/Accounts.ts:415](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Accounts.ts#L415)* - -**Parameters:** - -Name | Type | ------- | ------ | -`address` | Address | -`signer` | string | -`signature` | string | - -**Returns:** *object* - -* **r**: *string* - -* **s**: *string* - -* **v**: *number* - -___ - -### setAccount - -▸ **setAccount**(`name`: string, `dataEncryptionKey`: string, `walletAddress`: Address, `proofOfPossession`: Signature | null): *CeloTransactionObject‹void›* - -*Defined in [contractkit/src/wrappers/Accounts.ts:342](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Accounts.ts#L342)* - -Convenience Setter for the dataEncryptionKey and wallet address for an account - -**Parameters:** - -Name | Type | Default | Description | ------- | ------ | ------ | ------ | -`name` | string | - | A string to set as the name of the account | -`dataEncryptionKey` | string | - | secp256k1 public key for data encryption. Preferably compressed. | -`walletAddress` | Address | - | The wallet address to set for the account | -`proofOfPossession` | Signature | null | null | Signature from the wallet address key over the sender's address | - -**Returns:** *CeloTransactionObject‹void›* - -___ - -### setWalletAddress - -▸ **setWalletAddress**(`walletAddress`: Address, `proofOfPossession`: Signature | null): *CeloTransactionObject‹void›* - -*Defined in [contractkit/src/wrappers/Accounts.ts:393](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Accounts.ts#L393)* - -Sets the wallet address for the account - -**Parameters:** - -Name | Type | Default | ------- | ------ | ------ | -`walletAddress` | Address | - | -`proofOfPossession` | Signature | null | null | - -**Returns:** *CeloTransactionObject‹void›* diff --git a/packages/docs/developer-resources/contractkit/reference/classes/_wrappers_attestations_.attestationswrapper.md b/packages/docs/developer-resources/contractkit/reference/classes/_wrappers_attestations_.attestationswrapper.md deleted file mode 100644 index 0bcb67798de..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/classes/_wrappers_attestations_.attestationswrapper.md +++ /dev/null @@ -1,866 +0,0 @@ -# Class: AttestationsWrapper - -## Hierarchy - -* [BaseWrapper](_wrappers_basewrapper_.basewrapper.md)‹Attestations› - - ↳ **AttestationsWrapper** - -## Index - -### Constructors - -* [constructor](_wrappers_attestations_.attestationswrapper.md#constructor) - -### Properties - -* [approveTransfer](_wrappers_attestations_.attestationswrapper.md#approvetransfer) -* [attestationExpiryBlocks](_wrappers_attestations_.attestationswrapper.md#attestationexpiryblocks) -* [attestationRequestFees](_wrappers_attestations_.attestationswrapper.md#attestationrequestfees) -* [eventTypes](_wrappers_attestations_.attestationswrapper.md#eventtypes) -* [events](_wrappers_attestations_.attestationswrapper.md#events) -* [getAttestationIssuers](_wrappers_attestations_.attestationswrapper.md#getattestationissuers) -* [getAttestationStat](_wrappers_attestations_.attestationswrapper.md#getattestationstat) -* [getAttestationState](_wrappers_attestations_.attestationswrapper.md#getattestationstate) -* [getPendingWithdrawals](_wrappers_attestations_.attestationswrapper.md#getpendingwithdrawals) -* [getUnselectedRequest](_wrappers_attestations_.attestationswrapper.md#getunselectedrequest) -* [lookupAccountsForIdentifier](_wrappers_attestations_.attestationswrapper.md#lookupaccountsforidentifier) -* [methodIds](_wrappers_attestations_.attestationswrapper.md#methodids) -* [selectIssuersWaitBlocks](_wrappers_attestations_.attestationswrapper.md#selectissuerswaitblocks) -* [withdraw](_wrappers_attestations_.attestationswrapper.md#withdraw) - -### Accessors - -* [address](_wrappers_attestations_.attestationswrapper.md#address) - -### Methods - -* [approveAttestationFee](_wrappers_attestations_.attestationswrapper.md#approveattestationfee) -* [complete](_wrappers_attestations_.attestationswrapper.md#complete) -* [findMatchingIssuer](_wrappers_attestations_.attestationswrapper.md#findmatchingissuer) -* [getActionableAttestations](_wrappers_attestations_.attestationswrapper.md#getactionableattestations) -* [getAttestationFeeRequired](_wrappers_attestations_.attestationswrapper.md#getattestationfeerequired) -* [getAttestationForSecurityCode](_wrappers_attestations_.attestationswrapper.md#getattestationforsecuritycode) -* [getAttestationServiceStatus](_wrappers_attestations_.attestationswrapper.md#getattestationservicestatus) -* [getConfig](_wrappers_attestations_.attestationswrapper.md#getconfig) -* [getHumanReadableConfig](_wrappers_attestations_.attestationswrapper.md#gethumanreadableconfig) -* [getNonCompliantIssuers](_wrappers_attestations_.attestationswrapper.md#getnoncompliantissuers) -* [getPastEvents](_wrappers_attestations_.attestationswrapper.md#getpastevents) -* [getRevealStatus](_wrappers_attestations_.attestationswrapper.md#getrevealstatus) -* [getVerifiedStatus](_wrappers_attestations_.attestationswrapper.md#getverifiedstatus) -* [isAttestationExpired](_wrappers_attestations_.attestationswrapper.md#isattestationexpired) -* [lookupIdentifiers](_wrappers_attestations_.attestationswrapper.md#lookupidentifiers) -* [request](_wrappers_attestations_.attestationswrapper.md#request) -* [revealPhoneNumberToIssuer](_wrappers_attestations_.attestationswrapper.md#revealphonenumbertoissuer) -* [revoke](_wrappers_attestations_.attestationswrapper.md#revoke) -* [selectIssuers](_wrappers_attestations_.attestationswrapper.md#selectissuers) -* [selectIssuersAfterWait](_wrappers_attestations_.attestationswrapper.md#selectissuersafterwait) -* [validateAttestationCode](_wrappers_attestations_.attestationswrapper.md#validateattestationcode) -* [waitForSelectingIssuers](_wrappers_attestations_.attestationswrapper.md#waitforselectingissuers) - -## Constructors - -### constructor - -\+ **new AttestationsWrapper**(`kit`: [ContractKit](_kit_.contractkit.md), `contract`: Attestations): *[AttestationsWrapper](_wrappers_attestations_.attestationswrapper.md)* - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[constructor](_wrappers_basewrapper_.basewrapper.md#constructor)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:26](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L26)* - -**Parameters:** - -Name | Type | ------- | ------ | -`kit` | [ContractKit](_kit_.contractkit.md) | -`contract` | Attestations | - -**Returns:** *[AttestationsWrapper](_wrappers_attestations_.attestationswrapper.md)* - -## Properties - -### approveTransfer - -• **approveTransfer**: *function* = proxySend(this.kit, this.contract.methods.approveTransfer) - -*Defined in [contractkit/src/wrappers/Attestations.ts:536](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Attestations.ts#L536)* - -Updates sender's approval status on whether to allow an attestation identifier -mapping to be transfered from one address to another. - -**`param`** The identifier for this attestation. - -**`param`** The index of the account in the accounts array. - -**`param`** The current attestation address to which the identifier is mapped. - -**`param`** The new address to map to identifier. - -**`param`** The approval status - -#### Type declaration: - -▸ (...`args`: InputArgs): *CeloTransactionObject‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### attestationExpiryBlocks - -• **attestationExpiryBlocks**: *function* = proxyCall( - this.contract.methods.attestationExpiryBlocks, - undefined, - valueToInt - ) - -*Defined in [contractkit/src/wrappers/Attestations.ts:108](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Attestations.ts#L108)* - - Returns the time an attestation can be completable before it is considered expired - -#### Type declaration: - -▸ (...`args`: InputArgs): *Promise‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### attestationRequestFees - -• **attestationRequestFees**: *function* = proxyCall( - this.contract.methods.attestationRequestFees, - undefined, - valueToBigNumber - ) - -*Defined in [contractkit/src/wrappers/Attestations.ts:119](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Attestations.ts#L119)* - -Returns the attestation request fee in a given currency. - -**`param`** Token address. - -**`returns`** The fee as big number. - -#### Type declaration: - -▸ (...`args`: InputArgs): *Promise‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### eventTypes - -• **eventTypes**: *EventsEnum‹T›* = Object.keys(this.events).reduce>( - (acc, key) => ({ ...acc, [key]: key }), - {} as any - ) - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[eventTypes](_wrappers_basewrapper_.basewrapper.md#eventtypes)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:41](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L41)* - -___ - -### events - -• **events**: *Attestations["events"]* = this.contract.events - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[events](_wrappers_basewrapper_.basewrapper.md#events)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:39](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L39)* - -___ - -### getAttestationIssuers - -• **getAttestationIssuers**: *function* = proxyCall(this.contract.methods.getAttestationIssuers) - -*Defined in [contractkit/src/wrappers/Attestations.ts:192](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Attestations.ts#L192)* - -Returns the issuers of attestations for a phoneNumber/account combo - -**`param`** Attestation identifier (e.g. phone hash) - -**`param`** Address of the account - -#### Type declaration: - -▸ (...`args`: InputArgs): *Promise‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### getAttestationStat - -• **getAttestationStat**: *function* = proxyCall( - this.contract.methods.getAttestationStats, - undefined, - (stat) => ({ completed: valueToInt(stat[0]), total: valueToInt(stat[1]) }) - ) - -*Defined in [contractkit/src/wrappers/Attestations.ts:214](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Attestations.ts#L214)* - -Returns the attestation stats of a identifer/account pair - -**`param`** Attestation identifier (e.g. phone hash) - -**`param`** Address of the account - -#### Type declaration: - -▸ (`identifier`: string, `account`: Address): *Promise‹[AttestationStat](../interfaces/_wrappers_attestations_.attestationstat.md)›* - -**Parameters:** - -Name | Type | ------- | ------ | -`identifier` | string | -`account` | Address | - -___ - -### getAttestationState - -• **getAttestationState**: *function* = proxyCall( - this.contract.methods.getAttestationState, - undefined, - (state) => ({ attestationState: valueToInt(state[0]) }) - ) - -*Defined in [contractkit/src/wrappers/Attestations.ts:199](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Attestations.ts#L199)* - -Returns the attestation state of a phone number/account/issuer tuple - -**`param`** Attestation identifier (e.g. phone hash) - -**`param`** Address of the account - -#### Type declaration: - -▸ (`identifier`: string, `account`: Address, `issuer`: Address): *Promise‹[AttestationStateForIssuer](../interfaces/_wrappers_attestations_.attestationstateforissuer.md)›* - -**Parameters:** - -Name | Type | ------- | ------ | -`identifier` | string | -`account` | Address | -`issuer` | Address | - -___ - -### getPendingWithdrawals - -• **getPendingWithdrawals**: *function* = proxyCall( - this.contract.methods.pendingWithdrawals, - undefined, - valueToBigNumber - ) - -*Defined in [contractkit/src/wrappers/Attestations.ts:395](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Attestations.ts#L395)* - -Returns the attestation signer for the specified account. - -**`param`** The address of token rewards are accumulated in. - -**`param`** The address of the account. - -**`returns`** The reward amount. - -#### Type declaration: - -▸ (`token`: string, `account`: string): *Promise‹BigNumber›* - -**Parameters:** - -Name | Type | ------- | ------ | -`token` | string | -`account` | string | - -___ - -### getUnselectedRequest - -• **getUnselectedRequest**: *function* = proxyCall( - this.contract.methods.getUnselectedRequest, - undefined, - (res) => ({ - blockNumber: valueToInt(res[0]), - attestationsRequested: valueToInt(res[1]), - attestationRequestFeeToken: res[2], - }) - ) - -*Defined in [contractkit/src/wrappers/Attestations.ts:136](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Attestations.ts#L136)* - -**`notice`** Returns the unselected attestation request for an identifier/account pair, if any. - -**`param`** Attestation identifier (e.g. phone hash) - -**`param`** Address of the account - -#### Type declaration: - -▸ (...`args`: InputArgs): *Promise‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### lookupAccountsForIdentifier - -• **lookupAccountsForIdentifier**: *function* = proxyCall(this.contract.methods.lookupAccountsForIdentifier) - -*Defined in [contractkit/src/wrappers/Attestations.ts:472](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Attestations.ts#L472)* - -Returns the list of accounts associated with an identifier. - -**`param`** Attestation identifier (e.g. phone hash) - -#### Type declaration: - -▸ (...`args`: InputArgs): *Promise‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### methodIds - -• **methodIds**: *Record‹keyof T["methods"], string›* = Object.keys(this.contract.methods).reduce, string>>( - (acc, method: Methods) => { - const methodABI = this.contract.options.jsonInterface.find((item) => item.name === method) - - acc[method] = - methodABI === undefined - ? '0x' - : this.kit.connection.getAbiCoder().encodeFunctionSignature(methodABI) - - return acc - }, - {} as any - ) - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[methodIds](_wrappers_basewrapper_.basewrapper.md#methodids)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:46](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L46)* - -___ - -### selectIssuersWaitBlocks - -• **selectIssuersWaitBlocks**: *function* = proxyCall( - this.contract.methods.selectIssuersWaitBlocks, - undefined, - valueToInt - ) - -*Defined in [contractkit/src/wrappers/Attestations.ts:125](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Attestations.ts#L125)* - -#### Type declaration: - -▸ (...`args`: InputArgs): *Promise‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### withdraw - -• **withdraw**: *function* = proxySend(this.kit, this.contract.methods.withdraw) - -*Defined in [contractkit/src/wrappers/Attestations.ts:405](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Attestations.ts#L405)* - -Allows issuers to withdraw accumulated attestation rewards - -**`param`** The address of the token that will be withdrawn - -#### Type declaration: - -▸ (...`args`: InputArgs): *CeloTransactionObject‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -## Accessors - -### address - -• **get address**(): *string* - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[address](_wrappers_basewrapper_.basewrapper.md#address)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:30](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L30)* - -Contract address - -**Returns:** *string* - -## Methods - -### approveAttestationFee - -▸ **approveAttestationFee**(`attestationsRequested`: number): *Promise‹CeloTransactionObject‹boolean››* - -*Defined in [contractkit/src/wrappers/Attestations.ts:261](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Attestations.ts#L261)* - -Approves the necessary amount of StableToken to request Attestations - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`attestationsRequested` | number | The number of attestations to request | - -**Returns:** *Promise‹CeloTransactionObject‹boolean››* - -___ - -### complete - -▸ **complete**(`identifier`: string, `account`: Address, `issuer`: Address, `code`: string): *Promise‹CeloTransactionObject‹void››* - -*Defined in [contractkit/src/wrappers/Attestations.ts:371](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Attestations.ts#L371)* - -Completes an attestation with the corresponding code - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`identifier` | string | Attestation identifier (e.g. phone hash) | -`account` | Address | Address of the account | -`issuer` | Address | The issuer of the attestation | -`code` | string | The code received by the validator | - -**Returns:** *Promise‹CeloTransactionObject‹void››* - -___ - -### findMatchingIssuer - -▸ **findMatchingIssuer**(`identifier`: string, `account`: Address, `code`: string, `issuers`: string[]): *Promise‹string | null›* - -*Defined in [contractkit/src/wrappers/Attestations.ts:414](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Attestations.ts#L414)* - -Given a list of issuers, finds the matching issuer for a given code - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`identifier` | string | Attestation identifier (e.g. phone hash) | -`account` | Address | Address of the account | -`code` | string | The code received by the validator | -`issuers` | string[] | The list of potential issuers | - -**Returns:** *Promise‹string | null›* - -___ - -### getActionableAttestations - -▸ **getActionableAttestations**(`identifier`: string, `account`: Address, `tries`: number): *Promise‹[ActionableAttestation](../interfaces/_wrappers_attestations_.actionableattestation.md)[]›* - -*Defined in [contractkit/src/wrappers/Attestations.ts:273](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Attestations.ts#L273)* - -Returns an array of attestations that can be completed, along with the issuers' attestation -service urls - -**Parameters:** - -Name | Type | Default | Description | ------- | ------ | ------ | ------ | -`identifier` | string | - | Attestation identifier (e.g. phone hash) | -`account` | Address | - | Address of the account | -`tries` | number | 3 | - | - -**Returns:** *Promise‹[ActionableAttestation](../interfaces/_wrappers_attestations_.actionableattestation.md)[]›* - -___ - -### getAttestationFeeRequired - -▸ **getAttestationFeeRequired**(`attestationsRequested`: number): *Promise‹BigNumber‹››* - -*Defined in [contractkit/src/wrappers/Attestations.ts:251](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Attestations.ts#L251)* - -Calculates the amount of StableToken required to request Attestations - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`attestationsRequested` | number | The number of attestations to request | - -**Returns:** *Promise‹BigNumber‹››* - -___ - -### getAttestationForSecurityCode - -▸ **getAttestationForSecurityCode**(`serviceURL`: string, `requestBody`: GetAttestationRequest, `signer`: Address): *Promise‹string›* - -*Defined in [contractkit/src/wrappers/Attestations.ts:608](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Attestations.ts#L608)* - -Returns attestation code for provided security code from validator's attestation service - -**Parameters:** - -Name | Type | ------- | ------ | -`serviceURL` | string | -`requestBody` | GetAttestationRequest | -`signer` | Address | - -**Returns:** *Promise‹string›* - -___ - -### getAttestationServiceStatus - -▸ **getAttestationServiceStatus**(`validator`: [Validator](../interfaces/_wrappers_validators_.validator.md)): *Promise‹[AttestationServiceStatusResponse](../interfaces/_wrappers_attestations_.attestationservicestatusresponse.md)›* - -*Defined in [contractkit/src/wrappers/Attestations.ts:685](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Attestations.ts#L685)* - -Gets the relevant attestation service status for a validator - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`validator` | [Validator](../interfaces/_wrappers_validators_.validator.md) | Validator to get the attestation service status for | - -**Returns:** *Promise‹[AttestationServiceStatusResponse](../interfaces/_wrappers_attestations_.attestationservicestatusresponse.md)›* - -___ - -### getConfig - -▸ **getConfig**(`tokens`: string[]): *Promise‹[AttestationsConfig](../interfaces/_wrappers_attestations_.attestationsconfig.md)›* - -*Defined in [contractkit/src/wrappers/Attestations.ts:443](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Attestations.ts#L443)* - -Returns the current configuration parameters for the contract. - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`tokens` | string[] | List of tokens used for attestation fees. | - -**Returns:** *Promise‹[AttestationsConfig](../interfaces/_wrappers_attestations_.attestationsconfig.md)›* - -AttestationsConfig object - -___ - -### getHumanReadableConfig - -▸ **getHumanReadableConfig**(`tokens`: string[]): *Promise‹object›* - -*Defined in [contractkit/src/wrappers/Attestations.ts:460](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Attestations.ts#L460)* - -**`dev`** Returns human readable configuration of the attestations contract - -**Parameters:** - -Name | Type | ------- | ------ | -`tokens` | string[] | - -**Returns:** *Promise‹object›* - -AttestationsConfig object - -___ - -### getNonCompliantIssuers - -▸ **getNonCompliantIssuers**(`identifier`: string, `account`: Address, `tries`: number): *Promise‹Address[]›* - -*Defined in [contractkit/src/wrappers/Attestations.ts:296](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Attestations.ts#L296)* - -Returns an array of issuer addresses that were found to not run the attestation service - -**Parameters:** - -Name | Type | Default | Description | ------- | ------ | ------ | ------ | -`identifier` | string | - | Attestation identifier (e.g. phone hash) | -`account` | Address | - | Address of the account | -`tries` | number | 3 | - | - -**Returns:** *Promise‹Address[]›* - -___ - -### getPastEvents - -▸ **getPastEvents**(`event`: Events‹Attestations›, `options`: PastEventOptions): *Promise‹EventLog[]›* - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[getPastEvents](_wrappers_basewrapper_.basewrapper.md#getpastevents)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:35](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L35)* - -Contract getPastEvents - -**Parameters:** - -Name | Type | ------- | ------ | -`event` | Events‹Attestations› | -`options` | PastEventOptions | - -**Returns:** *Promise‹EventLog[]›* - -___ - -### getRevealStatus - -▸ **getRevealStatus**(`phoneNumber`: string, `account`: Address, `issuer`: Address, `serviceURL`: string, `pepper?`: undefined | string): *Promise‹Response›* - -*Defined in [contractkit/src/wrappers/Attestations.ts:584](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Attestations.ts#L584)* - -Returns reveal status from validator's attestation service - -**Parameters:** - -Name | Type | ------- | ------ | -`phoneNumber` | string | -`account` | Address | -`issuer` | Address | -`serviceURL` | string | -`pepper?` | undefined | string | - -**Returns:** *Promise‹Response›* - -___ - -### getVerifiedStatus - -▸ **getVerifiedStatus**(`identifier`: string, `account`: Address, `numAttestationsRequired?`: undefined | number, `attestationThreshold?`: undefined | number): *Promise‹AttestationsStatus›* - -*Defined in [contractkit/src/wrappers/Attestations.ts:233](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Attestations.ts#L233)* - -Returns the verified status of an identifier/account pair indicating whether the attestation -stats for a given pair are completed beyond a certain threshold of confidence (aka "verified") - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`identifier` | string | Attestation identifier (e.g. phone hash) | -`account` | Address | Address of the account | -`numAttestationsRequired?` | undefined | number | Optional number of attestations required. Will default to hardcoded value if absent. | -`attestationThreshold?` | undefined | number | Optional threshold for fraction attestations completed. Will default to hardcoded value if absent. | - -**Returns:** *Promise‹AttestationsStatus›* - -___ - -### isAttestationExpired - -▸ **isAttestationExpired**(`attestationRequestBlockNumber`: number): *Promise‹boolean›* - -*Defined in [contractkit/src/wrappers/Attestations.ts:150](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Attestations.ts#L150)* - -**`notice`** Checks if attestation request is expired. - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`attestationRequestBlockNumber` | number | Attestation Request Block Number to be checked | - -**Returns:** *Promise‹boolean›* - -___ - -### lookupIdentifiers - -▸ **lookupIdentifiers**(`identifiers`: string[]): *Promise‹[IdentifierLookupResult](../modules/_wrappers_attestations_.md#identifierlookupresult)›* - -*Defined in [contractkit/src/wrappers/Attestations.ts:478](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Attestations.ts#L478)* - -Lookup mapped wallet addresses for a given list of identifiers - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`identifiers` | string[] | Attestation identifiers (e.g. phone hashes) | - -**Returns:** *Promise‹[IdentifierLookupResult](../modules/_wrappers_attestations_.md#identifierlookupresult)›* - -___ - -### request - -▸ **request**(`identifier`: string, `attestationsRequested`: number): *Promise‹CeloTransactionObject‹void››* - -*Defined in [contractkit/src/wrappers/Attestations.ts:519](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Attestations.ts#L519)* - -Requests a new attestation - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`identifier` | string | Attestation identifier (e.g. phone hash) | -`attestationsRequested` | number | The number of attestations to request | - -**Returns:** *Promise‹CeloTransactionObject‹void››* - -___ - -### revealPhoneNumberToIssuer - -▸ **revealPhoneNumberToIssuer**(`serviceURL`: string, `requestBody`: AttestationRequest): *Promise‹Response›* - -*Defined in [contractkit/src/wrappers/Attestations.ts:566](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Attestations.ts#L566)* - -Reveal phone number to issuer - -**Parameters:** - -Name | Type | ------- | ------ | -`serviceURL` | string | -`requestBody` | AttestationRequest | - -**Returns:** *Promise‹Response›* - -___ - -### revoke - -▸ **revoke**(`identifer`: string, `account`: Address): *Promise‹CeloTransactionObject‹void››* - -*Defined in [contractkit/src/wrappers/Attestations.ts:803](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Attestations.ts#L803)* - -**Parameters:** - -Name | Type | ------- | ------ | -`identifer` | string | -`account` | Address | - -**Returns:** *Promise‹CeloTransactionObject‹void››* - -___ - -### selectIssuers - -▸ **selectIssuers**(`identifier`: string): *CeloTransactionObject‹void›* - -*Defined in [contractkit/src/wrappers/Attestations.ts:542](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Attestations.ts#L542)* - -Selects the issuers for previously requested attestations for a phone number - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`identifier` | string | Attestation identifier (e.g. phone hash) | - -**Returns:** *CeloTransactionObject‹void›* - -___ - -### selectIssuersAfterWait - -▸ **selectIssuersAfterWait**(`identifier`: string, `account`: string, `timeoutSeconds?`: undefined | number, `pollDurationSeconds?`: undefined | number): *Promise‹CeloTransactionObject‹void››* - -*Defined in [contractkit/src/wrappers/Attestations.ts:551](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Attestations.ts#L551)* - -Waits appropriate number of blocks, then selects issuers for previously requested phone number attestations - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`identifier` | string | Attestation identifier (e.g. phone hash) | -`account` | string | Address of the account | -`timeoutSeconds?` | undefined | number | - | -`pollDurationSeconds?` | undefined | number | - | - -**Returns:** *Promise‹CeloTransactionObject‹void››* - -___ - -### validateAttestationCode - -▸ **validateAttestationCode**(`identifier`: string, `account`: Address, `issuer`: Address, `code`: string): *Promise‹boolean›* - -*Defined in [contractkit/src/wrappers/Attestations.ts:658](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Attestations.ts#L658)* - -Validates a given code by the issuer on-chain - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`identifier` | string | Attestation identifier (e.g. phone hash) | -`account` | Address | The address of the account which requested attestation | -`issuer` | Address | The address of the issuer of the attestation | -`code` | string | The code send by the issuer | - -**Returns:** *Promise‹boolean›* - -___ - -### waitForSelectingIssuers - -▸ **waitForSelectingIssuers**(`identifier`: string, `account`: Address, `timeoutSeconds`: number, `pollDurationSeconds`: number): *Promise‹void›* - -*Defined in [contractkit/src/wrappers/Attestations.ts:162](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Attestations.ts#L162)* - -**`notice`** Waits for appropriate block numbers for before issuer can be selected - -**Parameters:** - -Name | Type | Default | Description | ------- | ------ | ------ | ------ | -`identifier` | string | - | Attestation identifier (e.g. phone hash) | -`account` | Address | - | Address of the account | -`timeoutSeconds` | number | 120 | - | -`pollDurationSeconds` | number | 1 | - | - -**Returns:** *Promise‹void›* diff --git a/packages/docs/developer-resources/contractkit/reference/classes/_wrappers_baseslasher_.baseslasher.md b/packages/docs/developer-resources/contractkit/reference/classes/_wrappers_baseslasher_.baseslasher.md deleted file mode 100644 index ca0ace3f63a..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/classes/_wrappers_baseslasher_.baseslasher.md +++ /dev/null @@ -1,164 +0,0 @@ -# Class: BaseSlasher <**T**> - -## Type parameters - -▪ **T**: *SlasherContract* - -## Hierarchy - -* [BaseWrapper](_wrappers_basewrapper_.basewrapper.md)‹T› - - ↳ **BaseSlasher** - - ↳ [DoubleSigningSlasherWrapper](_wrappers_doublesigningslasher_.doublesigningslasherwrapper.md) - - ↳ [DowntimeSlasherWrapper](_wrappers_downtimeslasher_.downtimeslasherwrapper.md) - -## Index - -### Constructors - -* [constructor](_wrappers_baseslasher_.baseslasher.md#constructor) - -### Properties - -* [eventTypes](_wrappers_baseslasher_.baseslasher.md#eventtypes) -* [events](_wrappers_baseslasher_.baseslasher.md#events) -* [methodIds](_wrappers_baseslasher_.baseslasher.md#methodids) -* [slashingIncentives](_wrappers_baseslasher_.baseslasher.md#slashingincentives) - -### Accessors - -* [address](_wrappers_baseslasher_.baseslasher.md#address) - -### Methods - -* [getPastEvents](_wrappers_baseslasher_.baseslasher.md#getpastevents) - -## Constructors - -### constructor - -\+ **new BaseSlasher**(`kit`: [ContractKit](_kit_.contractkit.md), `contract`: T): *[BaseSlasher](_wrappers_baseslasher_.baseslasher.md)* - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[constructor](_wrappers_basewrapper_.basewrapper.md#constructor)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:26](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L26)* - -**Parameters:** - -Name | Type | ------- | ------ | -`kit` | [ContractKit](_kit_.contractkit.md) | -`contract` | T | - -**Returns:** *[BaseSlasher](_wrappers_baseslasher_.baseslasher.md)* - -## Properties - -### eventTypes - -• **eventTypes**: *EventsEnum‹T›* = Object.keys(this.events).reduce>( - (acc, key) => ({ ...acc, [key]: key }), - {} as any - ) - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[eventTypes](_wrappers_basewrapper_.basewrapper.md#eventtypes)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:41](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L41)* - -___ - -### events - -• **events**: *T["events"]* = this.contract.events - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[events](_wrappers_basewrapper_.basewrapper.md#events)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:39](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L39)* - -___ - -### methodIds - -• **methodIds**: *Record‹keyof T["methods"], string›* = Object.keys(this.contract.methods).reduce, string>>( - (acc, method: Methods) => { - const methodABI = this.contract.options.jsonInterface.find((item) => item.name === method) - - acc[method] = - methodABI === undefined - ? '0x' - : this.kit.connection.getAbiCoder().encodeFunctionSignature(methodABI) - - return acc - }, - {} as any - ) - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[methodIds](_wrappers_basewrapper_.basewrapper.md#methodids)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:46](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L46)* - -___ - -### slashingIncentives - -• **slashingIncentives**: *function* = proxyCall( - this.contract.methods.slashingIncentives, - undefined, - (res) => ({ - reward: valueToBigNumber(res.reward), - penalty: valueToBigNumber(res.penalty), - }) - ) - -*Defined in [contractkit/src/wrappers/BaseSlasher.ts:69](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseSlasher.ts#L69)* - -Returns slashing incentives. - -**`returns`** Rewards and penalties for slashing. - -#### Type declaration: - -▸ (...`args`: InputArgs): *Promise‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -## Accessors - -### address - -• **get address**(): *string* - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[address](_wrappers_basewrapper_.basewrapper.md#address)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:30](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L30)* - -Contract address - -**Returns:** *string* - -## Methods - -### getPastEvents - -▸ **getPastEvents**(`event`: Events‹T›, `options`: PastEventOptions): *Promise‹EventLog[]›* - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[getPastEvents](_wrappers_basewrapper_.basewrapper.md#getpastevents)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:35](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L35)* - -Contract getPastEvents - -**Parameters:** - -Name | Type | ------- | ------ | -`event` | Events‹T› | -`options` | PastEventOptions | - -**Returns:** *Promise‹EventLog[]›* diff --git a/packages/docs/developer-resources/contractkit/reference/classes/_wrappers_basewrapper_.basewrapper.md b/packages/docs/developer-resources/contractkit/reference/classes/_wrappers_basewrapper_.basewrapper.md deleted file mode 100644 index b00360b08af..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/classes/_wrappers_basewrapper_.basewrapper.md +++ /dev/null @@ -1,158 +0,0 @@ -# Class: BaseWrapper <**T**> - -Base ContractWrapper - -## Type parameters - -▪ **T**: *Contract* - -## Hierarchy - -* **BaseWrapper** - - ↳ [AccountsWrapper](_wrappers_accounts_.accountswrapper.md) - - ↳ [ValidatorsWrapper](_wrappers_validators_.validatorswrapper.md) - - ↳ [AttestationsWrapper](_wrappers_attestations_.attestationswrapper.md) - - ↳ [BlockchainParametersWrapper](_wrappers_blockchainparameters_.blockchainparameterswrapper.md) - - ↳ [BaseSlasher](_wrappers_baseslasher_.baseslasher.md) - - ↳ [ElectionWrapper](_wrappers_election_.electionwrapper.md) - - ↳ [EscrowWrapper](_wrappers_escrow_.escrowwrapper.md) - - ↳ [ExchangeWrapper](_wrappers_exchange_.exchangewrapper.md) - - ↳ [FreezerWrapper](_wrappers_freezer_.freezerwrapper.md) - - ↳ [GasPriceMinimumWrapper](_wrappers_gaspriceminimum_.gaspriceminimumwrapper.md) - - ↳ [GoldTokenWrapper](_wrappers_goldtokenwrapper_.goldtokenwrapper.md) - - ↳ [GovernanceWrapper](_wrappers_governance_.governancewrapper.md) - - ↳ [LockedGoldWrapper](_wrappers_lockedgold_.lockedgoldwrapper.md) - - ↳ [MetaTransactionWalletWrapper](_wrappers_metatransactionwallet_.metatransactionwalletwrapper.md) - - ↳ [MetaTransactionWalletDeployerWrapper](_wrappers_metatransactionwalletdeployer_.metatransactionwalletdeployerwrapper.md) - - ↳ [MultiSigWrapper](_wrappers_multisig_.multisigwrapper.md) - - ↳ [ReserveWrapper](_wrappers_reserve_.reservewrapper.md) - - ↳ [SortedOraclesWrapper](_wrappers_sortedoracles_.sortedoracleswrapper.md) - - ↳ [StableTokenWrapper](_wrappers_stabletokenwrapper_.stabletokenwrapper.md) - - ↳ [ReleaseGoldWrapper](_wrappers_releasegold_.releasegoldwrapper.md) - -## Index - -### Constructors - -* [constructor](_wrappers_basewrapper_.basewrapper.md#constructor) - -### Properties - -* [eventTypes](_wrappers_basewrapper_.basewrapper.md#eventtypes) -* [events](_wrappers_basewrapper_.basewrapper.md#events) -* [methodIds](_wrappers_basewrapper_.basewrapper.md#methodids) - -### Accessors - -* [address](_wrappers_basewrapper_.basewrapper.md#address) - -### Methods - -* [getPastEvents](_wrappers_basewrapper_.basewrapper.md#getpastevents) - -## Constructors - -### constructor - -\+ **new BaseWrapper**(`kit`: [ContractKit](_kit_.contractkit.md), `contract`: T): *[BaseWrapper](_wrappers_basewrapper_.basewrapper.md)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:26](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L26)* - -**Parameters:** - -Name | Type | ------- | ------ | -`kit` | [ContractKit](_kit_.contractkit.md) | -`contract` | T | - -**Returns:** *[BaseWrapper](_wrappers_basewrapper_.basewrapper.md)* - -## Properties - -### eventTypes - -• **eventTypes**: *EventsEnum‹T›* = Object.keys(this.events).reduce>( - (acc, key) => ({ ...acc, [key]: key }), - {} as any - ) - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:41](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L41)* - -___ - -### events - -• **events**: *T["events"]* = this.contract.events - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:39](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L39)* - -___ - -### methodIds - -• **methodIds**: *Record‹keyof T["methods"], string›* = Object.keys(this.contract.methods).reduce, string>>( - (acc, method: Methods) => { - const methodABI = this.contract.options.jsonInterface.find((item) => item.name === method) - - acc[method] = - methodABI === undefined - ? '0x' - : this.kit.connection.getAbiCoder().encodeFunctionSignature(methodABI) - - return acc - }, - {} as any - ) - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:46](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L46)* - -## Accessors - -### address - -• **get address**(): *string* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:30](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L30)* - -Contract address - -**Returns:** *string* - -## Methods - -### getPastEvents - -▸ **getPastEvents**(`event`: Events‹T›, `options`: PastEventOptions): *Promise‹EventLog[]›* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:35](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L35)* - -Contract getPastEvents - -**Parameters:** - -Name | Type | ------- | ------ | -`event` | Events‹T› | -`options` | PastEventOptions | - -**Returns:** *Promise‹EventLog[]›* diff --git a/packages/docs/developer-resources/contractkit/reference/classes/_wrappers_blockchainparameters_.blockchainparameterswrapper.md b/packages/docs/developer-resources/contractkit/reference/classes/_wrappers_blockchainparameters_.blockchainparameterswrapper.md deleted file mode 100644 index 2250b728d5e..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/classes/_wrappers_blockchainparameters_.blockchainparameterswrapper.md +++ /dev/null @@ -1,312 +0,0 @@ -# Class: BlockchainParametersWrapper - -Network parameters that are configurable by governance. - -## Hierarchy - -* [BaseWrapper](_wrappers_basewrapper_.basewrapper.md)‹BlockchainParameters› - - ↳ **BlockchainParametersWrapper** - -## Index - -### Constructors - -* [constructor](_wrappers_blockchainparameters_.blockchainparameterswrapper.md#constructor) - -### Properties - -* [eventTypes](_wrappers_blockchainparameters_.blockchainparameterswrapper.md#eventtypes) -* [events](_wrappers_blockchainparameters_.blockchainparameterswrapper.md#events) -* [getBlockGasLimit](_wrappers_blockchainparameters_.blockchainparameterswrapper.md#getblockgaslimit) -* [getIntrinsicGasForAlternativeFeeCurrency](_wrappers_blockchainparameters_.blockchainparameterswrapper.md#getintrinsicgasforalternativefeecurrency) -* [getUptimeLookbackWindow](_wrappers_blockchainparameters_.blockchainparameterswrapper.md#getuptimelookbackwindow) -* [methodIds](_wrappers_blockchainparameters_.blockchainparameterswrapper.md#methodids) -* [setBlockGasLimit](_wrappers_blockchainparameters_.blockchainparameterswrapper.md#setblockgaslimit) -* [setIntrinsicGasForAlternativeFeeCurrency](_wrappers_blockchainparameters_.blockchainparameterswrapper.md#setintrinsicgasforalternativefeecurrency) -* [setMinimumClientVersion](_wrappers_blockchainparameters_.blockchainparameterswrapper.md#setminimumclientversion) -* [setUptimeLookbackWindow](_wrappers_blockchainparameters_.blockchainparameterswrapper.md#setuptimelookbackwindow) - -### Accessors - -* [address](_wrappers_blockchainparameters_.blockchainparameterswrapper.md#address) - -### Methods - -* [getConfig](_wrappers_blockchainparameters_.blockchainparameterswrapper.md#getconfig) -* [getMinimumClientVersion](_wrappers_blockchainparameters_.blockchainparameterswrapper.md#getminimumclientversion) -* [getPastEvents](_wrappers_blockchainparameters_.blockchainparameterswrapper.md#getpastevents) - -## Constructors - -### constructor - -\+ **new BlockchainParametersWrapper**(`kit`: [ContractKit](_kit_.contractkit.md), `contract`: BlockchainParameters): *[BlockchainParametersWrapper](_wrappers_blockchainparameters_.blockchainparameterswrapper.md)* - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[constructor](_wrappers_basewrapper_.basewrapper.md#constructor)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:26](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L26)* - -**Parameters:** - -Name | Type | ------- | ------ | -`kit` | [ContractKit](_kit_.contractkit.md) | -`contract` | BlockchainParameters | - -**Returns:** *[BlockchainParametersWrapper](_wrappers_blockchainparameters_.blockchainparameterswrapper.md)* - -## Properties - -### eventTypes - -• **eventTypes**: *EventsEnum‹T›* = Object.keys(this.events).reduce>( - (acc, key) => ({ ...acc, [key]: key }), - {} as any - ) - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[eventTypes](_wrappers_basewrapper_.basewrapper.md#eventtypes)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:41](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L41)* - -___ - -### events - -• **events**: *BlockchainParameters["events"]* = this.contract.events - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[events](_wrappers_basewrapper_.basewrapper.md#events)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:39](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L39)* - -___ - -### getBlockGasLimit - -• **getBlockGasLimit**: *function* = proxyCall(this.contract.methods.blockGasLimit, undefined, valueToBigNumber) - -*Defined in [contractkit/src/wrappers/BlockchainParameters.ts:41](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BlockchainParameters.ts#L41)* - -Getting the block gas limit. - -#### Type declaration: - -▸ (...`args`: InputArgs): *Promise‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### getIntrinsicGasForAlternativeFeeCurrency - -• **getIntrinsicGasForAlternativeFeeCurrency**: *function* = proxyCall( - this.contract.methods.intrinsicGasForAlternativeFeeCurrency, - undefined, - valueToBigNumber - ) - -*Defined in [contractkit/src/wrappers/BlockchainParameters.ts:24](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BlockchainParameters.ts#L24)* - -Get the extra intrinsic gas for transactions, where gas is paid using non-gold currency. - -#### Type declaration: - -▸ (...`args`: InputArgs): *Promise‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### getUptimeLookbackWindow - -• **getUptimeLookbackWindow**: *function* = proxyCall( - this.contract.methods.getUptimeLookbackWindow, - undefined, - valueToInt - ) - -*Defined in [contractkit/src/wrappers/BlockchainParameters.ts:79](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BlockchainParameters.ts#L79)* - -Getting the uptime lookback window. - -#### Type declaration: - -▸ (...`args`: InputArgs): *Promise‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### methodIds - -• **methodIds**: *Record‹keyof T["methods"], string›* = Object.keys(this.contract.methods).reduce, string>>( - (acc, method: Methods) => { - const methodABI = this.contract.options.jsonInterface.find((item) => item.name === method) - - acc[method] = - methodABI === undefined - ? '0x' - : this.kit.connection.getAbiCoder().encodeFunctionSignature(methodABI) - - return acc - }, - {} as any - ) - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[methodIds](_wrappers_basewrapper_.basewrapper.md#methodids)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:46](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L46)* - -___ - -### setBlockGasLimit - -• **setBlockGasLimit**: *function* = proxySend(this.kit, this.contract.methods.setBlockGasLimit) - -*Defined in [contractkit/src/wrappers/BlockchainParameters.ts:46](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BlockchainParameters.ts#L46)* - -Setting the block gas limit. - -#### Type declaration: - -▸ (...`args`: InputArgs): *CeloTransactionObject‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### setIntrinsicGasForAlternativeFeeCurrency - -• **setIntrinsicGasForAlternativeFeeCurrency**: *function* = proxySend( - this.kit, - this.contract.methods.setIntrinsicGasForAlternativeFeeCurrency - ) - -*Defined in [contractkit/src/wrappers/BlockchainParameters.ts:33](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BlockchainParameters.ts#L33)* - -Setting the extra intrinsic gas for transactions, where gas is paid using non-gold currency. - -#### Type declaration: - -▸ (...`args`: InputArgs): *CeloTransactionObject‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### setMinimumClientVersion - -• **setMinimumClientVersion**: *function* = proxySend(this.kit, this.contract.methods.setMinimumClientVersion) - -*Defined in [contractkit/src/wrappers/BlockchainParameters.ts:63](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BlockchainParameters.ts#L63)* - -Set minimum client version. - -#### Type declaration: - -▸ (...`args`: InputArgs): *CeloTransactionObject‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### setUptimeLookbackWindow - -• **setUptimeLookbackWindow**: *function* = proxySend(this.kit, this.contract.methods.setUptimeLookbackWindow) - -*Defined in [contractkit/src/wrappers/BlockchainParameters.ts:87](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BlockchainParameters.ts#L87)* - -Setting the uptime lookback window. - -#### Type declaration: - -▸ (...`args`: InputArgs): *CeloTransactionObject‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -## Accessors - -### address - -• **get address**(): *string* - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[address](_wrappers_basewrapper_.basewrapper.md#address)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:30](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L30)* - -Contract address - -**Returns:** *string* - -## Methods - -### getConfig - -▸ **getConfig**(): *Promise‹[BlockchainParametersConfig](../interfaces/_wrappers_blockchainparameters_.blockchainparametersconfig.md)›* - -*Defined in [contractkit/src/wrappers/BlockchainParameters.ts:68](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BlockchainParameters.ts#L68)* - -Returns current configuration parameters. - -**Returns:** *Promise‹[BlockchainParametersConfig](../interfaces/_wrappers_blockchainparameters_.blockchainparametersconfig.md)›* - -___ - -### getMinimumClientVersion - -▸ **getMinimumClientVersion**(): *Promise‹[ClientVersion](../interfaces/_wrappers_blockchainparameters_.clientversion.md)›* - -*Defined in [contractkit/src/wrappers/BlockchainParameters.ts:51](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BlockchainParameters.ts#L51)* - -Get minimum client version. - -**Returns:** *Promise‹[ClientVersion](../interfaces/_wrappers_blockchainparameters_.clientversion.md)›* - -___ - -### getPastEvents - -▸ **getPastEvents**(`event`: Events‹BlockchainParameters›, `options`: PastEventOptions): *Promise‹EventLog[]›* - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[getPastEvents](_wrappers_basewrapper_.basewrapper.md#getpastevents)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:35](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L35)* - -Contract getPastEvents - -**Parameters:** - -Name | Type | ------- | ------ | -`event` | Events‹BlockchainParameters› | -`options` | PastEventOptions | - -**Returns:** *Promise‹EventLog[]›* diff --git a/packages/docs/developer-resources/contractkit/reference/classes/_wrappers_doublesigningslasher_.doublesigningslasherwrapper.md b/packages/docs/developer-resources/contractkit/reference/classes/_wrappers_doublesigningslasher_.doublesigningslasherwrapper.md deleted file mode 100644 index 92e8e6d6281..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/classes/_wrappers_doublesigningslasher_.doublesigningslasherwrapper.md +++ /dev/null @@ -1,223 +0,0 @@ -# Class: DoubleSigningSlasherWrapper - -Contract handling slashing for Validator double-signing - -## Hierarchy - - ↳ [BaseSlasher](_wrappers_baseslasher_.baseslasher.md)‹DoubleSigningSlasher› - - ↳ **DoubleSigningSlasherWrapper** - -## Index - -### Constructors - -* [constructor](_wrappers_doublesigningslasher_.doublesigningslasherwrapper.md#constructor) - -### Properties - -* [eventTypes](_wrappers_doublesigningslasher_.doublesigningslasherwrapper.md#eventtypes) -* [events](_wrappers_doublesigningslasher_.doublesigningslasherwrapper.md#events) -* [methodIds](_wrappers_doublesigningslasher_.doublesigningslasherwrapper.md#methodids) -* [slashingIncentives](_wrappers_doublesigningslasher_.doublesigningslasherwrapper.md#slashingincentives) - -### Accessors - -* [address](_wrappers_doublesigningslasher_.doublesigningslasherwrapper.md#address) - -### Methods - -* [getBlockNumberFromHeader](_wrappers_doublesigningslasher_.doublesigningslasherwrapper.md#getblocknumberfromheader) -* [getPastEvents](_wrappers_doublesigningslasher_.doublesigningslasherwrapper.md#getpastevents) -* [slashSigner](_wrappers_doublesigningslasher_.doublesigningslasherwrapper.md#slashsigner) -* [slashValidator](_wrappers_doublesigningslasher_.doublesigningslasherwrapper.md#slashvalidator) - -## Constructors - -### constructor - -\+ **new DoubleSigningSlasherWrapper**(`kit`: [ContractKit](_kit_.contractkit.md), `contract`: DoubleSigningSlasher): *[DoubleSigningSlasherWrapper](_wrappers_doublesigningslasher_.doublesigningslasherwrapper.md)* - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[constructor](_wrappers_basewrapper_.basewrapper.md#constructor)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:26](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L26)* - -**Parameters:** - -Name | Type | ------- | ------ | -`kit` | [ContractKit](_kit_.contractkit.md) | -`contract` | DoubleSigningSlasher | - -**Returns:** *[DoubleSigningSlasherWrapper](_wrappers_doublesigningslasher_.doublesigningslasherwrapper.md)* - -## Properties - -### eventTypes - -• **eventTypes**: *EventsEnum‹T›* = Object.keys(this.events).reduce>( - (acc, key) => ({ ...acc, [key]: key }), - {} as any - ) - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[eventTypes](_wrappers_basewrapper_.basewrapper.md#eventtypes)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:41](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L41)* - -___ - -### events - -• **events**: *DoubleSigningSlasher["events"]* = this.contract.events - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[events](_wrappers_basewrapper_.basewrapper.md#events)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:39](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L39)* - -___ - -### methodIds - -• **methodIds**: *Record‹keyof T["methods"], string›* = Object.keys(this.contract.methods).reduce, string>>( - (acc, method: Methods) => { - const methodABI = this.contract.options.jsonInterface.find((item) => item.name === method) - - acc[method] = - methodABI === undefined - ? '0x' - : this.kit.connection.getAbiCoder().encodeFunctionSignature(methodABI) - - return acc - }, - {} as any - ) - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[methodIds](_wrappers_basewrapper_.basewrapper.md#methodids)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:46](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L46)* - -___ - -### slashingIncentives - -• **slashingIncentives**: *function* = proxyCall( - this.contract.methods.slashingIncentives, - undefined, - (res) => ({ - reward: valueToBigNumber(res.reward), - penalty: valueToBigNumber(res.penalty), - }) - ) - -*Inherited from [BaseSlasher](_wrappers_baseslasher_.baseslasher.md).[slashingIncentives](_wrappers_baseslasher_.baseslasher.md#slashingincentives)* - -*Defined in [contractkit/src/wrappers/BaseSlasher.ts:69](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseSlasher.ts#L69)* - -Returns slashing incentives. - -**`returns`** Rewards and penalties for slashing. - -#### Type declaration: - -▸ (...`args`: InputArgs): *Promise‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -## Accessors - -### address - -• **get address**(): *string* - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[address](_wrappers_basewrapper_.basewrapper.md#address)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:30](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L30)* - -Contract address - -**Returns:** *string* - -## Methods - -### getBlockNumberFromHeader - -▸ **getBlockNumberFromHeader**(`header`: string): *Promise‹number›* - -*Defined in [contractkit/src/wrappers/DoubleSigningSlasher.ts:15](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/DoubleSigningSlasher.ts#L15)* - -Parses block number out of header. - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`header` | string | RLP encoded header | - -**Returns:** *Promise‹number›* - -Block number. - -___ - -### getPastEvents - -▸ **getPastEvents**(`event`: Events‹DoubleSigningSlasher›, `options`: PastEventOptions): *Promise‹EventLog[]›* - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[getPastEvents](_wrappers_basewrapper_.basewrapper.md#getpastevents)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:35](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L35)* - -Contract getPastEvents - -**Parameters:** - -Name | Type | ------- | ------ | -`event` | Events‹DoubleSigningSlasher› | -`options` | PastEventOptions | - -**Returns:** *Promise‹EventLog[]›* - -___ - -### slashSigner - -▸ **slashSigner**(`signerAddress`: Address, `headerA`: string, `headerB`: string): *Promise‹CeloTransactionObject‹void››* - -*Defined in [contractkit/src/wrappers/DoubleSigningSlasher.ts:38](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/DoubleSigningSlasher.ts#L38)* - -Slash a Validator signer for double-signing. - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`signerAddress` | Address | - | -`headerA` | string | First double signed block header. | -`headerB` | string | Second double signed block header. | - -**Returns:** *Promise‹CeloTransactionObject‹void››* - -___ - -### slashValidator - -▸ **slashValidator**(`validatorAddress`: Address, `headerA`: string, `headerB`: string): *Promise‹CeloTransactionObject‹void››* - -*Defined in [contractkit/src/wrappers/DoubleSigningSlasher.ts:26](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/DoubleSigningSlasher.ts#L26)* - -Slash a Validator for double-signing. - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`validatorAddress` | Address | Validator to slash. | -`headerA` | string | First double signed block header. | -`headerB` | string | Second double signed block header. | - -**Returns:** *Promise‹CeloTransactionObject‹void››* diff --git a/packages/docs/developer-resources/contractkit/reference/classes/_wrappers_downtimeslasher_.downtimeslasherwrapper.md b/packages/docs/developer-resources/contractkit/reference/classes/_wrappers_downtimeslasher_.downtimeslasherwrapper.md deleted file mode 100644 index ff1bb351bf2..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/classes/_wrappers_downtimeslasher_.downtimeslasherwrapper.md +++ /dev/null @@ -1,435 +0,0 @@ -# Class: DowntimeSlasherWrapper - -Contract handling slashing for Validator downtime using intervals. - -## Hierarchy - - ↳ [BaseSlasher](_wrappers_baseslasher_.baseslasher.md)‹DowntimeSlasher› - - ↳ **DowntimeSlasherWrapper** - -## Index - -### Constructors - -* [constructor](_wrappers_downtimeslasher_.downtimeslasherwrapper.md#constructor) - -### Properties - -* [eventTypes](_wrappers_downtimeslasher_.downtimeslasherwrapper.md#eventtypes) -* [events](_wrappers_downtimeslasher_.downtimeslasherwrapper.md#events) -* [getBitmapForInterval](_wrappers_downtimeslasher_.downtimeslasherwrapper.md#getbitmapforinterval) -* [isBitmapSetForInterval](_wrappers_downtimeslasher_.downtimeslasherwrapper.md#isbitmapsetforinterval) -* [lastSlashedBlock](_wrappers_downtimeslasher_.downtimeslasherwrapper.md#lastslashedblock) -* [methodIds](_wrappers_downtimeslasher_.downtimeslasherwrapper.md#methodids) -* [setBitmapForInterval](_wrappers_downtimeslasher_.downtimeslasherwrapper.md#setbitmapforinterval) -* [slashableDowntime](_wrappers_downtimeslasher_.downtimeslasherwrapper.md#slashabledowntime) -* [slashingIncentives](_wrappers_downtimeslasher_.downtimeslasherwrapper.md#slashingincentives) - -### Accessors - -* [address](_wrappers_downtimeslasher_.downtimeslasherwrapper.md#address) - -### Methods - -* [getConfig](_wrappers_downtimeslasher_.downtimeslasherwrapper.md#getconfig) -* [getHumanReadableConfig](_wrappers_downtimeslasher_.downtimeslasherwrapper.md#gethumanreadableconfig) -* [getPastEvents](_wrappers_downtimeslasher_.downtimeslasherwrapper.md#getpastevents) -* [isBitmapSetForIntervals](_wrappers_downtimeslasher_.downtimeslasherwrapper.md#isbitmapsetforintervals) -* [slashValidator](_wrappers_downtimeslasher_.downtimeslasherwrapper.md#slashvalidator) -* [slashableDowntimeIntervalsBefore](_wrappers_downtimeslasher_.downtimeslasherwrapper.md#slashabledowntimeintervalsbefore) -* [wasValidatorDownForInterval](_wrappers_downtimeslasher_.downtimeslasherwrapper.md#wasvalidatordownforinterval) -* [wasValidatorDownForIntervals](_wrappers_downtimeslasher_.downtimeslasherwrapper.md#wasvalidatordownforintervals) - -## Constructors - -### constructor - -\+ **new DowntimeSlasherWrapper**(`kit`: [ContractKit](_kit_.contractkit.md), `contract`: DowntimeSlasher): *[DowntimeSlasherWrapper](_wrappers_downtimeslasher_.downtimeslasherwrapper.md)* - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[constructor](_wrappers_basewrapper_.basewrapper.md#constructor)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:26](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L26)* - -**Parameters:** - -Name | Type | ------- | ------ | -`kit` | [ContractKit](_kit_.contractkit.md) | -`contract` | DowntimeSlasher | - -**Returns:** *[DowntimeSlasherWrapper](_wrappers_downtimeslasher_.downtimeslasherwrapper.md)* - -## Properties - -### eventTypes - -• **eventTypes**: *EventsEnum‹T›* = Object.keys(this.events).reduce>( - (acc, key) => ({ ...acc, [key]: key }), - {} as any - ) - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[eventTypes](_wrappers_basewrapper_.basewrapper.md#eventtypes)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:41](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L41)* - -___ - -### events - -• **events**: *DowntimeSlasher["events"]* = this.contract.events - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[events](_wrappers_basewrapper_.basewrapper.md#events)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:39](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L39)* - -___ - -### getBitmapForInterval - -• **getBitmapForInterval**: *function* = proxyCall( - this.contract.methods.getBitmapForInterval, - unpackInterval, - solidityBytesToString - ) - -*Defined in [contractkit/src/wrappers/DowntimeSlasher.ts:73](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/DowntimeSlasher.ts#L73)* - -Calculates and returns the signature bitmap for the specified interval. -Similar to the parentSealBitmap of every block (where you have which validators were -able to sign the previous block), this bitmap shows for that specific interval which -validators signed at least one block - -**`param`** First and last block of the interval. - -**`returns`** (string) The signature uptime bitmap for the specified interval. - -**`dev`** startBlock and endBlock must be in the same epoch. - -**`dev`** The getParentSealBitmap precompile requires that startBlock must be within 4 epochs of -the current block. - -#### Type declaration: - -▸ (...`args`: InputArgs): *Promise‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### isBitmapSetForInterval - -• **isBitmapSetForInterval**: *function* = proxyCall(this.contract.methods.isBitmapSetForInterval, unpackInterval) - -*Defined in [contractkit/src/wrappers/DowntimeSlasher.ts:122](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/DowntimeSlasher.ts#L122)* - -Shows if the user already called the `setBitmapForInterval` for -the specific interval. - -**`param`** First and last block of the interval. - -**`returns`** True if the user already called the `setBitmapForInterval` for -the specific interval. - -#### Type declaration: - -▸ (...`args`: InputArgs): *Promise‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### lastSlashedBlock - -• **lastSlashedBlock**: *function* = proxyCall(this.contract.methods.lastSlashedBlock, undefined, valueToInt) - -*Defined in [contractkit/src/wrappers/DowntimeSlasher.ts:136](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/DowntimeSlasher.ts#L136)* - -#### Type declaration: - -▸ (...`args`: InputArgs): *Promise‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### methodIds - -• **methodIds**: *Record‹keyof T["methods"], string›* = Object.keys(this.contract.methods).reduce, string>>( - (acc, method: Methods) => { - const methodABI = this.contract.options.jsonInterface.find((item) => item.name === method) - - acc[method] = - methodABI === undefined - ? '0x' - : this.kit.connection.getAbiCoder().encodeFunctionSignature(methodABI) - - return acc - }, - {} as any - ) - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[methodIds](_wrappers_basewrapper_.basewrapper.md#methodids)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:46](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L46)* - -___ - -### setBitmapForInterval - -• **setBitmapForInterval**: *function* = proxySend( - this.kit, - this.contract.methods.setBitmapForInterval, - unpackInterval - ) - -*Defined in [contractkit/src/wrappers/DowntimeSlasher.ts:85](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/DowntimeSlasher.ts#L85)* - -Calculates and sets the signature bitmap for the specified interval. - -**`param`** First and last block of the interval. - -**`dev`** interval.start and interval.end must be in the same epoch. - -**`returns`** The signature bitmap for the specified interval. - -#### Type declaration: - -▸ (...`args`: InputArgs): *CeloTransactionObject‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### slashableDowntime - -• **slashableDowntime**: *function* = proxyCall(this.contract.methods.slashableDowntime, undefined, valueToInt) - -*Defined in [contractkit/src/wrappers/DowntimeSlasher.ts:37](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/DowntimeSlasher.ts#L37)* - -Returns slashable downtime in blocks. - -**`returns`** The number of consecutive blocks before a Validator missing from IBFT consensus -can be slashed. - -#### Type declaration: - -▸ (...`args`: InputArgs): *Promise‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### slashingIncentives - -• **slashingIncentives**: *function* = proxyCall( - this.contract.methods.slashingIncentives, - undefined, - (res) => ({ - reward: valueToBigNumber(res.reward), - penalty: valueToBigNumber(res.penalty), - }) - ) - -*Inherited from [BaseSlasher](_wrappers_baseslasher_.baseslasher.md).[slashingIncentives](_wrappers_baseslasher_.baseslasher.md#slashingincentives)* - -*Defined in [contractkit/src/wrappers/BaseSlasher.ts:69](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseSlasher.ts#L69)* - -Returns slashing incentives. - -**`returns`** Rewards and penalties for slashing. - -#### Type declaration: - -▸ (...`args`: InputArgs): *Promise‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -## Accessors - -### address - -• **get address**(): *string* - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[address](_wrappers_basewrapper_.basewrapper.md#address)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:30](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L30)* - -Contract address - -**Returns:** *string* - -## Methods - -### getConfig - -▸ **getConfig**(): *Promise‹[DowntimeSlasherConfig](../interfaces/_wrappers_downtimeslasher_.downtimeslasherconfig.md)›* - -*Defined in [contractkit/src/wrappers/DowntimeSlasher.ts:42](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/DowntimeSlasher.ts#L42)* - -Returns current configuration parameters. - -**Returns:** *Promise‹[DowntimeSlasherConfig](../interfaces/_wrappers_downtimeslasher_.downtimeslasherconfig.md)›* - -___ - -### getHumanReadableConfig - -▸ **getHumanReadableConfig**(): *Promise‹object›* - -*Defined in [contractkit/src/wrappers/DowntimeSlasher.ts:54](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/DowntimeSlasher.ts#L54)* - -**`dev`** Returns human readable configuration of the downtime slasher contract - -**Returns:** *Promise‹object›* - -DowntimeSlasherConfig object - -___ - -### getPastEvents - -▸ **getPastEvents**(`event`: Events‹DowntimeSlasher›, `options`: PastEventOptions): *Promise‹EventLog[]›* - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[getPastEvents](_wrappers_basewrapper_.basewrapper.md#getpastevents)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:35](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L35)* - -Contract getPastEvents - -**Parameters:** - -Name | Type | ------- | ------ | -`event` | Events‹DowntimeSlasher› | -`options` | PastEventOptions | - -**Returns:** *Promise‹EventLog[]›* - -___ - -### isBitmapSetForIntervals - -▸ **isBitmapSetForIntervals**(`intervals`: [Interval](../interfaces/_wrappers_downtimeslasher_.interval.md)[]): *Promise‹boolean›* - -*Defined in [contractkit/src/wrappers/DowntimeSlasher.ts:129](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/DowntimeSlasher.ts#L129)* - -Shows if the user already called the `setBitmapForInterval` for intervals. - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`intervals` | [Interval](../interfaces/_wrappers_downtimeslasher_.interval.md)[] | First and last block of the interval. | - -**Returns:** *Promise‹boolean›* - -True if the user already called the `setBitmapForInterval` for intervals. - -___ - -### slashValidator - -▸ **slashValidator**(`address`: Address, `intervals`: [Interval](../interfaces/_wrappers_downtimeslasher_.interval.md)[]): *Promise‹CeloTransactionObject‹void››* - -*Defined in [contractkit/src/wrappers/DowntimeSlasher.ts:170](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/DowntimeSlasher.ts#L170)* - -Returns true if the validator did not sign any blocks for the specified overlapping or adjacent -intervals. - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`address` | Address | Address of the validator account or signer. | -`intervals` | [Interval](../interfaces/_wrappers_downtimeslasher_.interval.md)[] | A list of ordered intervals for which signature bitmaps have already been set. | - -**Returns:** *Promise‹CeloTransactionObject‹void››* - -___ - -### slashableDowntimeIntervalsBefore - -▸ **slashableDowntimeIntervalsBefore**(`block?`: undefined | number, `maximumLength`: number): *Promise‹[Interval](../interfaces/_wrappers_downtimeslasher_.interval.md)[]›* - -*Defined in [contractkit/src/wrappers/DowntimeSlasher.ts:98](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/DowntimeSlasher.ts#L98)* - -Calculates intervals which span `slashableDowntime` before provided block. - -**`dev`** if block is undefined, latest will be used - -**Parameters:** - -Name | Type | Default | Description | ------- | ------ | ------ | ------ | -`block?` | undefined | number | - | Block number to build intervals before. | -`maximumLength` | number | 4000 | Maximum length for any interval (limited by gas limit). | - -**Returns:** *Promise‹[Interval](../interfaces/_wrappers_downtimeslasher_.interval.md)[]›* - -The signature bitmap for the specified interval. - -___ - -### wasValidatorDownForInterval - -▸ **wasValidatorDownForInterval**(`address`: Address, `interval`: [Interval](../interfaces/_wrappers_downtimeslasher_.interval.md)): *Promise‹boolean›* - -*Defined in [contractkit/src/wrappers/DowntimeSlasher.ts:143](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/DowntimeSlasher.ts#L143)* - -Tests if the given validator or signer did not sign any blocks in the interval. - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`address` | Address | Address of the validator account or signer. | -`interval` | [Interval](../interfaces/_wrappers_downtimeslasher_.interval.md) | First and last block of the interval. | - -**Returns:** *Promise‹boolean›* - -___ - -### wasValidatorDownForIntervals - -▸ **wasValidatorDownForIntervals**(`address`: Address, `intervals`: [Interval](../interfaces/_wrappers_downtimeslasher_.interval.md)[]): *Promise‹boolean›* - -*Defined in [contractkit/src/wrappers/DowntimeSlasher.ts:157](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/DowntimeSlasher.ts#L157)* - -Returns true if the validator did not sign any blocks for the specified overlapping or adjacent -intervals. - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`address` | Address | Address of the validator account or signer. | -`intervals` | [Interval](../interfaces/_wrappers_downtimeslasher_.interval.md)[] | - | - -**Returns:** *Promise‹boolean›* - -True if the validator signature does not appear in any block within the window. diff --git a/packages/docs/developer-resources/contractkit/reference/classes/_wrappers_election_.electionwrapper.md b/packages/docs/developer-resources/contractkit/reference/classes/_wrappers_election_.electionwrapper.md deleted file mode 100644 index 14fd1353857..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/classes/_wrappers_election_.electionwrapper.md +++ /dev/null @@ -1,795 +0,0 @@ -# Class: ElectionWrapper - -Contract for voting for validators and managing validator groups. - -## Hierarchy - -* [BaseWrapper](_wrappers_basewrapper_.basewrapper.md)‹Election› - - ↳ **ElectionWrapper** - -## Index - -### Constructors - -* [constructor](_wrappers_election_.electionwrapper.md#constructor) - -### Properties - -* [electabilityThreshold](_wrappers_election_.electionwrapper.md#electabilitythreshold) -* [eventTypes](_wrappers_election_.electionwrapper.md#eventtypes) -* [events](_wrappers_election_.electionwrapper.md#events) -* [getCurrentValidatorSigners](_wrappers_election_.electionwrapper.md#getcurrentvalidatorsigners) -* [getGroupsVotedForByAccount](_wrappers_election_.electionwrapper.md#getgroupsvotedforbyaccount) -* [getTotalVotes](_wrappers_election_.electionwrapper.md#gettotalvotes) -* [getTotalVotesForGroupByAccount](_wrappers_election_.electionwrapper.md#gettotalvotesforgroupbyaccount) -* [methodIds](_wrappers_election_.electionwrapper.md#methodids) -* [numberValidatorsInCurrentSet](_wrappers_election_.electionwrapper.md#numbervalidatorsincurrentset) -* [numberValidatorsInSet](_wrappers_election_.electionwrapper.md#numbervalidatorsinset) -* [validatorSignerAddressFromCurrentSet](_wrappers_election_.electionwrapper.md#validatorsigneraddressfromcurrentset) -* [validatorSignerAddressFromSet](_wrappers_election_.electionwrapper.md#validatorsigneraddressfromset) - -### Accessors - -* [address](_wrappers_election_.electionwrapper.md#address) - -### Methods - -* [activate](_wrappers_election_.electionwrapper.md#activate) -* [electValidatorSigners](_wrappers_election_.electionwrapper.md#electvalidatorsigners) -* [electableValidators](_wrappers_election_.electionwrapper.md#electablevalidators) -* [findLesserAndGreaterAfterVote](_wrappers_election_.electionwrapper.md#findlesserandgreateraftervote) -* [getActiveVotesForGroup](_wrappers_election_.electionwrapper.md#getactivevotesforgroup) -* [getConfig](_wrappers_election_.electionwrapper.md#getconfig) -* [getElectedValidators](_wrappers_election_.electionwrapper.md#getelectedvalidators) -* [getEligibleValidatorGroupsVotes](_wrappers_election_.electionwrapper.md#geteligiblevalidatorgroupsvotes) -* [getGroupVoterRewards](_wrappers_election_.electionwrapper.md#getgroupvoterrewards) -* [getPastEvents](_wrappers_election_.electionwrapper.md#getpastevents) -* [getTotalVotesForGroup](_wrappers_election_.electionwrapper.md#gettotalvotesforgroup) -* [getValidatorGroupVotes](_wrappers_election_.electionwrapper.md#getvalidatorgroupvotes) -* [getValidatorGroupsVotes](_wrappers_election_.electionwrapper.md#getvalidatorgroupsvotes) -* [getValidatorSigners](_wrappers_election_.electionwrapper.md#getvalidatorsigners) -* [getVoter](_wrappers_election_.electionwrapper.md#getvoter) -* [getVoterRewards](_wrappers_election_.electionwrapper.md#getvoterrewards) -* [getVoterShare](_wrappers_election_.electionwrapper.md#getvotershare) -* [getVotesForGroupByAccount](_wrappers_election_.electionwrapper.md#getvotesforgroupbyaccount) -* [hasActivatablePendingVotes](_wrappers_election_.electionwrapper.md#hasactivatablependingvotes) -* [hasPendingVotes](_wrappers_election_.electionwrapper.md#haspendingvotes) -* [revoke](_wrappers_election_.electionwrapper.md#revoke) -* [revokeActive](_wrappers_election_.electionwrapper.md#revokeactive) -* [revokePending](_wrappers_election_.electionwrapper.md#revokepending) -* [vote](_wrappers_election_.electionwrapper.md#vote) - -## Constructors - -### constructor - -\+ **new ElectionWrapper**(`kit`: [ContractKit](_kit_.contractkit.md), `contract`: Election): *[ElectionWrapper](_wrappers_election_.electionwrapper.md)* - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[constructor](_wrappers_basewrapper_.basewrapper.md#constructor)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:26](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L26)* - -**Parameters:** - -Name | Type | ------- | ------ | -`kit` | [ContractKit](_kit_.contractkit.md) | -`contract` | Election | - -**Returns:** *[ElectionWrapper](_wrappers_election_.electionwrapper.md)* - -## Properties - -### electabilityThreshold - -• **electabilityThreshold**: *function* = proxyCall( - this.contract.methods.getElectabilityThreshold, - undefined, - fixidityValueToBigNumber - ) - -*Defined in [contractkit/src/wrappers/Election.ts:81](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Election.ts#L81)* - -Returns the current election threshold. - -**`returns`** Election threshold. - -#### Type declaration: - -▸ (...`args`: InputArgs): *Promise‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### eventTypes - -• **eventTypes**: *EventsEnum‹T›* = Object.keys(this.events).reduce>( - (acc, key) => ({ ...acc, [key]: key }), - {} as any - ) - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[eventTypes](_wrappers_basewrapper_.basewrapper.md#eventtypes)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:41](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L41)* - -___ - -### events - -• **events**: *Election["events"]* = this.contract.events - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[events](_wrappers_basewrapper_.basewrapper.md#events)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:39](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L39)* - -___ - -### getCurrentValidatorSigners - -• **getCurrentValidatorSigners**: *function* = proxyCall( - this.contract.methods.getCurrentValidatorSigners - ) - -*Defined in [contractkit/src/wrappers/Election.ts:139](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Election.ts#L139)* - -Returns the current validator signers using the precompiles. - -**`returns`** List of current validator signers. - -#### Type declaration: - -▸ (): *Promise‹Address[]›* - -___ - -### getGroupsVotedForByAccount - -• **getGroupsVotedForByAccount**: *function* = proxyCall( - this.contract.methods.getGroupsVotedForByAccount - ) - -*Defined in [contractkit/src/wrappers/Election.ts:212](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Election.ts#L212)* - -Returns the groups that `account` has voted for. - -**`param`** The address of the account casting votes. - -**`returns`** The groups that `account` has voted for. - -#### Type declaration: - -▸ (`account`: Address): *Promise‹Address[]›* - -**Parameters:** - -Name | Type | ------- | ------ | -`account` | Address | - -___ - -### getTotalVotes - -• **getTotalVotes**: *function* = proxyCall(this.contract.methods.getTotalVotes, undefined, valueToBigNumber) - -*Defined in [contractkit/src/wrappers/Election.ts:133](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Election.ts#L133)* - -Returns the total votes received across all groups. - -**`returns`** The total votes received across all groups. - -#### Type declaration: - -▸ (...`args`: InputArgs): *Promise‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### getTotalVotesForGroupByAccount - -• **getTotalVotesForGroupByAccount**: *function* = proxyCall( - this.contract.methods.getTotalVotesForGroupByAccount, - undefined, - valueToBigNumber - ) - -*Defined in [contractkit/src/wrappers/Election.ts:190](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Election.ts#L190)* - -Returns the total votes for `group` made by `account`. - -**`param`** The address of the validator group. - -**`param`** The address of the voting account. - -**`returns`** The total votes for `group` made by `account`. - -#### Type declaration: - -▸ (...`args`: InputArgs): *Promise‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### methodIds - -• **methodIds**: *Record‹keyof T["methods"], string›* = Object.keys(this.contract.methods).reduce, string>>( - (acc, method: Methods) => { - const methodABI = this.contract.options.jsonInterface.find((item) => item.name === method) - - acc[method] = - methodABI === undefined - ? '0x' - : this.kit.connection.getAbiCoder().encodeFunctionSignature(methodABI) - - return acc - }, - {} as any - ) - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[methodIds](_wrappers_basewrapper_.basewrapper.md#methodids)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:46](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L46)* - -___ - -### numberValidatorsInCurrentSet - -• **numberValidatorsInCurrentSet**: *function* = proxyCall( - this.contract.methods.numberValidatorsInCurrentSet, - undefined, - valueToInt - ) - -*Defined in [contractkit/src/wrappers/Election.ts:123](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Election.ts#L123)* - -Gets the size of the current elected validator set. - -**`returns`** Size of the current elected validator set. - -#### Type declaration: - -▸ (...`args`: InputArgs): *Promise‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### numberValidatorsInSet - -• **numberValidatorsInSet**: *function* = proxyCall( - this.contract.methods.numberValidatorsInSet, - undefined, - valueToInt - ) - -*Defined in [contractkit/src/wrappers/Election.ts:113](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Election.ts#L113)* - -Gets the size of the validator set that must sign the given block number. - -**`param`** Block number to retrieve the validator set from. - -**`returns`** Size of the validator set. - -#### Type declaration: - -▸ (`blockNumber`: number): *Promise‹number›* - -**Parameters:** - -Name | Type | ------- | ------ | -`blockNumber` | number | - -___ - -### validatorSignerAddressFromCurrentSet - -• **validatorSignerAddressFromCurrentSet**: *function* = proxyCall( - this.contract.methods.validatorSignerAddressFromCurrentSet, - tupleParser(identity) - ) - -*Defined in [contractkit/src/wrappers/Election.ts:103](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Election.ts#L103)* - -Gets a validator address from the current validator set. - -**`param`** Index of requested validator in the validator set. - -**`returns`** Address of validator at the requested index. - -#### Type declaration: - -▸ (`index`: number): *Promise‹Address›* - -**Parameters:** - -Name | Type | ------- | ------ | -`index` | number | - -___ - -### validatorSignerAddressFromSet - -• **validatorSignerAddressFromSet**: *function* = proxyCall(this.contract.methods.validatorSignerAddressFromSet) - -*Defined in [contractkit/src/wrappers/Election.ts:93](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Election.ts#L93)* - -Gets a validator address from the validator set at the given block number. - -**`param`** Index of requested validator in the validator set. - -**`param`** Block number to retrieve the validator set from. - -**`returns`** Address of validator at the requested index. - -#### Type declaration: - -▸ (`signerIndex`: number, `blockNumber`: number): *Promise‹Address›* - -**Parameters:** - -Name | Type | ------- | ------ | -`signerIndex` | number | -`blockNumber` | number | - -## Accessors - -### address - -• **get address**(): *string* - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[address](_wrappers_basewrapper_.basewrapper.md#address)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:30](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L30)* - -Contract address - -**Returns:** *string* - -## Methods - -### activate - -▸ **activate**(`account`: Address): *Promise‹Array‹CeloTransactionObject‹boolean›››* - -*Defined in [contractkit/src/wrappers/Election.ts:323](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Election.ts#L323)* - -Activates any activatable pending votes. - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`account` | Address | The account with pending votes to activate. | - -**Returns:** *Promise‹Array‹CeloTransactionObject‹boolean›››* - -___ - -### electValidatorSigners - -▸ **electValidatorSigners**(`min?`: undefined | number, `max?`: undefined | number): *Promise‹Address[]›* - -*Defined in [contractkit/src/wrappers/Election.ts:160](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Election.ts#L160)* - -Returns a list of elected validators with seats allocated to groups via the D'Hondt method. - -**`dev`** See https://en.wikipedia.org/wiki/D%27Hondt_method#Allocation for more information. - -**Parameters:** - -Name | Type | ------- | ------ | -`min?` | undefined | number | -`max?` | undefined | number | - -**Returns:** *Promise‹Address[]›* - -The list of elected validators. - -___ - -### electableValidators - -▸ **electableValidators**(): *Promise‹[ElectableValidators](../interfaces/_wrappers_election_.electablevalidators.md)›* - -*Defined in [contractkit/src/wrappers/Election.ts:72](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Election.ts#L72)* - -Returns the minimum and maximum number of validators that can be elected. - -**Returns:** *Promise‹[ElectableValidators](../interfaces/_wrappers_election_.electablevalidators.md)›* - -The minimum and maximum number of validators that can be elected. - -___ - -### findLesserAndGreaterAfterVote - -▸ **findLesserAndGreaterAfterVote**(`votedGroup`: Address, `voteWeight`: BigNumber): *Promise‹object›* - -*Defined in [contractkit/src/wrappers/Election.ts:415](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Election.ts#L415)* - -**Parameters:** - -Name | Type | ------- | ------ | -`votedGroup` | Address | -`voteWeight` | BigNumber | - -**Returns:** *Promise‹object›* - -___ - -### getActiveVotesForGroup - -▸ **getActiveVotesForGroup**(`group`: Address, `blockNumber?`: undefined | number): *Promise‹BigNumber›* - -*Defined in [contractkit/src/wrappers/Election.ts:201](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Election.ts#L201)* - -Returns the active votes for `group`. - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`group` | Address | The address of the validator group. | -`blockNumber?` | undefined | number | - | - -**Returns:** *Promise‹BigNumber›* - -The active votes for `group`. - -___ - -### getConfig - -▸ **getConfig**(): *Promise‹[ElectionConfig](../interfaces/_wrappers_election_.electionconfig.md)›* - -*Defined in [contractkit/src/wrappers/Election.ts:278](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Election.ts#L278)* - -Returns current configuration parameters. - -**Returns:** *Promise‹[ElectionConfig](../interfaces/_wrappers_election_.electionconfig.md)›* - -___ - -### getElectedValidators - -▸ **getElectedValidators**(`epochNumber`: number): *Promise‹[Validator](../interfaces/_wrappers_validators_.validator.md)[]›* - -*Defined in [contractkit/src/wrappers/Election.ts:444](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Election.ts#L444)* - -Retrieves the set of validatorsparticipating in BFT at epochNumber. - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`epochNumber` | number | The epoch to retrieve the elected validator set at. | - -**Returns:** *Promise‹[Validator](../interfaces/_wrappers_validators_.validator.md)[]›* - -___ - -### getEligibleValidatorGroupsVotes - -▸ **getEligibleValidatorGroupsVotes**(): *Promise‹[ValidatorGroupVote](../interfaces/_wrappers_election_.validatorgroupvote.md)[]›* - -*Defined in [contractkit/src/wrappers/Election.ts:400](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Election.ts#L400)* - -Returns the current eligible validator groups and their total votes. - -**Returns:** *Promise‹[ValidatorGroupVote](../interfaces/_wrappers_election_.validatorgroupvote.md)[]›* - -___ - -### getGroupVoterRewards - -▸ **getGroupVoterRewards**(`epochNumber`: number): *Promise‹[GroupVoterReward](../interfaces/_wrappers_election_.groupvoterreward.md)[]›* - -*Defined in [contractkit/src/wrappers/Election.ts:455](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Election.ts#L455)* - -Retrieves GroupVoterRewards at epochNumber. - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`epochNumber` | number | The epoch to retrieve GroupVoterRewards at. | - -**Returns:** *Promise‹[GroupVoterReward](../interfaces/_wrappers_election_.groupvoterreward.md)[]›* - -___ - -### getPastEvents - -▸ **getPastEvents**(`event`: Events‹Election›, `options`: PastEventOptions): *Promise‹EventLog[]›* - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[getPastEvents](_wrappers_basewrapper_.basewrapper.md#getpastevents)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:35](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L35)* - -Contract getPastEvents - -**Parameters:** - -Name | Type | ------- | ------ | -`event` | Events‹Election› | -`options` | PastEventOptions | - -**Returns:** *Promise‹EventLog[]›* - -___ - -### getTotalVotesForGroup - -▸ **getTotalVotesForGroup**(`group`: Address, `blockNumber?`: undefined | number): *Promise‹BigNumber›* - -*Defined in [contractkit/src/wrappers/Election.ts:178](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Election.ts#L178)* - -Returns the total votes for `group`. - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`group` | Address | The address of the validator group. | -`blockNumber?` | undefined | number | - | - -**Returns:** *Promise‹BigNumber›* - -The total votes for `group`. - -___ - -### getValidatorGroupVotes - -▸ **getValidatorGroupVotes**(`address`: Address): *Promise‹[ValidatorGroupVote](../interfaces/_wrappers_election_.validatorgroupvote.md)›* - -*Defined in [contractkit/src/wrappers/Election.ts:294](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Election.ts#L294)* - -**Parameters:** - -Name | Type | ------- | ------ | -`address` | Address | - -**Returns:** *Promise‹[ValidatorGroupVote](../interfaces/_wrappers_election_.validatorgroupvote.md)›* - -___ - -### getValidatorGroupsVotes - -▸ **getValidatorGroupsVotes**(): *Promise‹[ValidatorGroupVote](../interfaces/_wrappers_election_.validatorgroupvote.md)[]›* - -*Defined in [contractkit/src/wrappers/Election.ts:311](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Election.ts#L311)* - -Returns the current registered validator groups and their total votes and eligibility. - -**Returns:** *Promise‹[ValidatorGroupVote](../interfaces/_wrappers_election_.validatorgroupvote.md)[]›* - -___ - -### getValidatorSigners - -▸ **getValidatorSigners**(`blockNumber`: number): *Promise‹Address[]›* - -*Defined in [contractkit/src/wrappers/Election.ts:148](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Election.ts#L148)* - -Returns the validator signers for block `blockNumber`. - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`blockNumber` | number | Block number to retrieve signers for. | - -**Returns:** *Promise‹Address[]›* - -Address of each signer in the validator set. - -___ - -### getVoter - -▸ **getVoter**(`account`: Address, `blockNumber?`: undefined | number): *Promise‹[Voter](../interfaces/_wrappers_election_.voter.md)›* - -*Defined in [contractkit/src/wrappers/Election.ts:238](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Election.ts#L238)* - -**Parameters:** - -Name | Type | ------- | ------ | -`account` | Address | -`blockNumber?` | undefined | number | - -**Returns:** *Promise‹[Voter](../interfaces/_wrappers_election_.voter.md)›* - -___ - -### getVoterRewards - -▸ **getVoterRewards**(`address`: Address, `epochNumber`: number, `voterShare?`: Record‹Address, BigNumber›): *Promise‹[VoterReward](../interfaces/_wrappers_election_.voterreward.md)[]›* - -*Defined in [contractkit/src/wrappers/Election.ts:480](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Election.ts#L480)* - -Retrieves VoterRewards for address at epochNumber. - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`address` | Address | The address to retrieve VoterRewards for. | -`epochNumber` | number | The epoch to retrieve VoterRewards at. | -`voterShare?` | Record‹Address, BigNumber› | Optionally address' share of group rewards. | - -**Returns:** *Promise‹[VoterReward](../interfaces/_wrappers_election_.voterreward.md)[]›* - -___ - -### getVoterShare - -▸ **getVoterShare**(`address`: Address, `blockNumber?`: undefined | number): *Promise‹Record‹Address, BigNumber››* - -*Defined in [contractkit/src/wrappers/Election.ts:510](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Election.ts#L510)* - -Retrieves a voter's share of active votes. - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`address` | Address | The voter to retrieve share for. | -`blockNumber?` | undefined | number | The block to retrieve the voter's share at. | - -**Returns:** *Promise‹Record‹Address, BigNumber››* - -___ - -### getVotesForGroupByAccount - -▸ **getVotesForGroupByAccount**(`account`: Address, `group`: Address, `blockNumber?`: undefined | number): *Promise‹[GroupVote](../interfaces/_wrappers_election_.groupvote.md)›* - -*Defined in [contractkit/src/wrappers/Election.ts:216](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Election.ts#L216)* - -**Parameters:** - -Name | Type | ------- | ------ | -`account` | Address | -`group` | Address | -`blockNumber?` | undefined | number | - -**Returns:** *Promise‹[GroupVote](../interfaces/_wrappers_election_.groupvote.md)›* - -___ - -### hasActivatablePendingVotes - -▸ **hasActivatablePendingVotes**(`account`: Address): *Promise‹boolean›* - -*Defined in [contractkit/src/wrappers/Election.ts:267](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Election.ts#L267)* - -**Parameters:** - -Name | Type | ------- | ------ | -`account` | Address | - -**Returns:** *Promise‹boolean›* - -___ - -### hasPendingVotes - -▸ **hasPendingVotes**(`account`: Address): *Promise‹boolean›* - -*Defined in [contractkit/src/wrappers/Election.ts:255](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Election.ts#L255)* - -Returns whether or not the account has any pending votes. - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`account` | Address | The address of the account casting votes. | - -**Returns:** *Promise‹boolean›* - -The groups that `account` has voted for. - -___ - -### revoke - -▸ **revoke**(`account`: Address, `group`: Address, `value`: BigNumber): *Promise‹Array‹CeloTransactionObject‹boolean›››* - -*Defined in [contractkit/src/wrappers/Election.ts:362](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Election.ts#L362)* - -**Parameters:** - -Name | Type | ------- | ------ | -`account` | Address | -`group` | Address | -`value` | BigNumber | - -**Returns:** *Promise‹Array‹CeloTransactionObject‹boolean›››* - -___ - -### revokeActive - -▸ **revokeActive**(`account`: Address, `group`: Address, `value`: BigNumber): *Promise‹CeloTransactionObject‹boolean››* - -*Defined in [contractkit/src/wrappers/Election.ts:347](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Election.ts#L347)* - -**Parameters:** - -Name | Type | ------- | ------ | -`account` | Address | -`group` | Address | -`value` | BigNumber | - -**Returns:** *Promise‹CeloTransactionObject‹boolean››* - -___ - -### revokePending - -▸ **revokePending**(`account`: Address, `group`: Address, `value`: BigNumber): *Promise‹CeloTransactionObject‹boolean››* - -*Defined in [contractkit/src/wrappers/Election.ts:332](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Election.ts#L332)* - -**Parameters:** - -Name | Type | ------- | ------ | -`account` | Address | -`group` | Address | -`value` | BigNumber | - -**Returns:** *Promise‹CeloTransactionObject‹boolean››* - -___ - -### vote - -▸ **vote**(`validatorGroup`: Address, `value`: BigNumber): *Promise‹CeloTransactionObject‹boolean››* - -*Defined in [contractkit/src/wrappers/Election.ts:388](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Election.ts#L388)* - -Increments the number of total and pending votes for `group`. - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`validatorGroup` | Address | The validator group to vote for. | -`value` | BigNumber | The amount of gold to use to vote. | - -**Returns:** *Promise‹CeloTransactionObject‹boolean››* diff --git a/packages/docs/developer-resources/contractkit/reference/classes/_wrappers_escrow_.escrowwrapper.md b/packages/docs/developer-resources/contractkit/reference/classes/_wrappers_escrow_.escrowwrapper.md deleted file mode 100644 index dec9326cf53..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/classes/_wrappers_escrow_.escrowwrapper.md +++ /dev/null @@ -1,280 +0,0 @@ -# Class: EscrowWrapper - -Contract for handling reserve for stable currencies - -## Hierarchy - -* [BaseWrapper](_wrappers_basewrapper_.basewrapper.md)‹Escrow› - - ↳ **EscrowWrapper** - -## Index - -### Constructors - -* [constructor](_wrappers_escrow_.escrowwrapper.md#constructor) - -### Properties - -* [escrowedPayments](_wrappers_escrow_.escrowwrapper.md#escrowedpayments) -* [eventTypes](_wrappers_escrow_.escrowwrapper.md#eventtypes) -* [events](_wrappers_escrow_.escrowwrapper.md#events) -* [getReceivedPaymentIds](_wrappers_escrow_.escrowwrapper.md#getreceivedpaymentids) -* [getSentPaymentIds](_wrappers_escrow_.escrowwrapper.md#getsentpaymentids) -* [methodIds](_wrappers_escrow_.escrowwrapper.md#methodids) -* [receivedPaymentIds](_wrappers_escrow_.escrowwrapper.md#receivedpaymentids) -* [revoke](_wrappers_escrow_.escrowwrapper.md#revoke) -* [sentPaymentIds](_wrappers_escrow_.escrowwrapper.md#sentpaymentids) -* [transfer](_wrappers_escrow_.escrowwrapper.md#transfer) -* [withdraw](_wrappers_escrow_.escrowwrapper.md#withdraw) - -### Accessors - -* [address](_wrappers_escrow_.escrowwrapper.md#address) - -### Methods - -* [getPastEvents](_wrappers_escrow_.escrowwrapper.md#getpastevents) - -## Constructors - -### constructor - -\+ **new EscrowWrapper**(`kit`: [ContractKit](_kit_.contractkit.md), `contract`: Escrow): *[EscrowWrapper](_wrappers_escrow_.escrowwrapper.md)* - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[constructor](_wrappers_basewrapper_.basewrapper.md#constructor)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:26](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L26)* - -**Parameters:** - -Name | Type | ------- | ------ | -`kit` | [ContractKit](_kit_.contractkit.md) | -`contract` | Escrow | - -**Returns:** *[EscrowWrapper](_wrappers_escrow_.escrowwrapper.md)* - -## Properties - -### escrowedPayments - -• **escrowedPayments**: *function* = proxyCall(this.contract.methods.escrowedPayments) - -*Defined in [contractkit/src/wrappers/Escrow.ts:8](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Escrow.ts#L8)* - -#### Type declaration: - -▸ (...`args`: InputArgs): *Promise‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### eventTypes - -• **eventTypes**: *EventsEnum‹T›* = Object.keys(this.events).reduce>( - (acc, key) => ({ ...acc, [key]: key }), - {} as any - ) - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[eventTypes](_wrappers_basewrapper_.basewrapper.md#eventtypes)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:41](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L41)* - -___ - -### events - -• **events**: *Escrow["events"]* = this.contract.events - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[events](_wrappers_basewrapper_.basewrapper.md#events)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:39](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L39)* - -___ - -### getReceivedPaymentIds - -• **getReceivedPaymentIds**: *function* = proxyCall(this.contract.methods.getReceivedPaymentIds) - -*Defined in [contractkit/src/wrappers/Escrow.ts:14](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Escrow.ts#L14)* - -#### Type declaration: - -▸ (...`args`: InputArgs): *Promise‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### getSentPaymentIds - -• **getSentPaymentIds**: *function* = proxyCall(this.contract.methods.getSentPaymentIds) - -*Defined in [contractkit/src/wrappers/Escrow.ts:16](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Escrow.ts#L16)* - -#### Type declaration: - -▸ (...`args`: InputArgs): *Promise‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### methodIds - -• **methodIds**: *Record‹keyof T["methods"], string›* = Object.keys(this.contract.methods).reduce, string>>( - (acc, method: Methods) => { - const methodABI = this.contract.options.jsonInterface.find((item) => item.name === method) - - acc[method] = - methodABI === undefined - ? '0x' - : this.kit.connection.getAbiCoder().encodeFunctionSignature(methodABI) - - return acc - }, - {} as any - ) - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[methodIds](_wrappers_basewrapper_.basewrapper.md#methodids)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:46](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L46)* - -___ - -### receivedPaymentIds - -• **receivedPaymentIds**: *function* = proxyCall(this.contract.methods.receivedPaymentIds) - -*Defined in [contractkit/src/wrappers/Escrow.ts:10](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Escrow.ts#L10)* - -#### Type declaration: - -▸ (...`args`: InputArgs): *Promise‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### revoke - -• **revoke**: *function* = proxySend(this.kit, this.contract.methods.revoke) - -*Defined in [contractkit/src/wrappers/Escrow.ts:22](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Escrow.ts#L22)* - -#### Type declaration: - -▸ (...`args`: InputArgs): *CeloTransactionObject‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### sentPaymentIds - -• **sentPaymentIds**: *function* = proxyCall(this.contract.methods.sentPaymentIds) - -*Defined in [contractkit/src/wrappers/Escrow.ts:12](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Escrow.ts#L12)* - -#### Type declaration: - -▸ (...`args`: InputArgs): *Promise‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### transfer - -• **transfer**: *function* = proxySend(this.kit, this.contract.methods.transfer) - -*Defined in [contractkit/src/wrappers/Escrow.ts:18](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Escrow.ts#L18)* - -#### Type declaration: - -▸ (...`args`: InputArgs): *CeloTransactionObject‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### withdraw - -• **withdraw**: *function* = proxySend(this.kit, this.contract.methods.withdraw) - -*Defined in [contractkit/src/wrappers/Escrow.ts:20](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Escrow.ts#L20)* - -#### Type declaration: - -▸ (...`args`: InputArgs): *CeloTransactionObject‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -## Accessors - -### address - -• **get address**(): *string* - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[address](_wrappers_basewrapper_.basewrapper.md#address)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:30](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L30)* - -Contract address - -**Returns:** *string* - -## Methods - -### getPastEvents - -▸ **getPastEvents**(`event`: Events‹Escrow›, `options`: PastEventOptions): *Promise‹EventLog[]›* - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[getPastEvents](_wrappers_basewrapper_.basewrapper.md#getpastevents)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:35](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L35)* - -Contract getPastEvents - -**Parameters:** - -Name | Type | ------- | ------ | -`event` | Events‹Escrow› | -`options` | PastEventOptions | - -**Returns:** *Promise‹EventLog[]›* diff --git a/packages/docs/developer-resources/contractkit/reference/classes/_wrappers_exchange_.exchangewrapper.md b/packages/docs/developer-resources/contractkit/reference/classes/_wrappers_exchange_.exchangewrapper.md deleted file mode 100644 index 10cba222313..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/classes/_wrappers_exchange_.exchangewrapper.md +++ /dev/null @@ -1,703 +0,0 @@ -# Class: ExchangeWrapper - -Contract that allows to exchange StableToken for GoldToken and vice versa -using a Constant Product Market Maker Model - -## Hierarchy - -* [BaseWrapper](_wrappers_basewrapper_.basewrapper.md)‹Exchange› - - ↳ **ExchangeWrapper** - -## Index - -### Constructors - -* [constructor](_wrappers_exchange_.exchangewrapper.md#constructor) - -### Properties - -* [buy](_wrappers_exchange_.exchangewrapper.md#buy) -* [eventTypes](_wrappers_exchange_.exchangewrapper.md#eventtypes) -* [events](_wrappers_exchange_.exchangewrapper.md#events) -* [exchange](_wrappers_exchange_.exchangewrapper.md#exchange) -* [getBuyAndSellBuckets](_wrappers_exchange_.exchangewrapper.md#getbuyandsellbuckets) -* [lastBucketUpdate](_wrappers_exchange_.exchangewrapper.md#lastbucketupdate) -* [methodIds](_wrappers_exchange_.exchangewrapper.md#methodids) -* [minimumReports](_wrappers_exchange_.exchangewrapper.md#minimumreports) -* [reserveFraction](_wrappers_exchange_.exchangewrapper.md#reservefraction) -* [sell](_wrappers_exchange_.exchangewrapper.md#sell) -* [spread](_wrappers_exchange_.exchangewrapper.md#spread) -* [updateFrequency](_wrappers_exchange_.exchangewrapper.md#updatefrequency) - -### Accessors - -* [address](_wrappers_exchange_.exchangewrapper.md#address) - -### Methods - -* [buyDollar](_wrappers_exchange_.exchangewrapper.md#buydollar) -* [buyGold](_wrappers_exchange_.exchangewrapper.md#buygold) -* [getBuyTokenAmount](_wrappers_exchange_.exchangewrapper.md#getbuytokenamount) -* [getConfig](_wrappers_exchange_.exchangewrapper.md#getconfig) -* [getExchangeRate](_wrappers_exchange_.exchangewrapper.md#getexchangerate) -* [getGoldExchangeRate](_wrappers_exchange_.exchangewrapper.md#getgoldexchangerate) -* [getHumanReadableConfig](_wrappers_exchange_.exchangewrapper.md#gethumanreadableconfig) -* [getPastEvents](_wrappers_exchange_.exchangewrapper.md#getpastevents) -* [getSellTokenAmount](_wrappers_exchange_.exchangewrapper.md#getselltokenamount) -* [getUsdExchangeRate](_wrappers_exchange_.exchangewrapper.md#getusdexchangerate) -* [quoteGoldBuy](_wrappers_exchange_.exchangewrapper.md#quotegoldbuy) -* [quoteGoldSell](_wrappers_exchange_.exchangewrapper.md#quotegoldsell) -* [quoteUsdBuy](_wrappers_exchange_.exchangewrapper.md#quoteusdbuy) -* [quoteUsdSell](_wrappers_exchange_.exchangewrapper.md#quoteusdsell) -* [sellDollar](_wrappers_exchange_.exchangewrapper.md#selldollar) -* [sellGold](_wrappers_exchange_.exchangewrapper.md#sellgold) - -## Constructors - -### constructor - -\+ **new ExchangeWrapper**(`kit`: [ContractKit](_kit_.contractkit.md), `contract`: Exchange): *[ExchangeWrapper](_wrappers_exchange_.exchangewrapper.md)* - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[constructor](_wrappers_basewrapper_.basewrapper.md#constructor)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:26](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L26)* - -**Parameters:** - -Name | Type | ------- | ------ | -`kit` | [ContractKit](_kit_.contractkit.md) | -`contract` | Exchange | - -**Returns:** *[ExchangeWrapper](_wrappers_exchange_.exchangewrapper.md)* - -## Properties - -### buy - -• **buy**: *function* = proxySend( - this.kit, - this.contract.methods.buy, - tupleParser(valueToString, valueToString, identity) - ) - -*Defined in [contractkit/src/wrappers/Exchange.ts:112](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Exchange.ts#L112)* - -Sells sellAmount of sellToken in exchange for at least minBuyAmount of buyToken -Requires the sellAmount to have been approved to the exchange - -**`param`** The amount of sellToken the user is selling to the exchange - -**`param`** The maximum amount of sellToken the user will sell for this -transaction to succeed - -**`param`** `true` if gold is the buy token - -**`returns`** The amount of buyToken that was transfered - -#### Type declaration: - -▸ (`buyAmount`: BigNumber.Value, `maxSellAmount`: BigNumber.Value, `buyGold`: boolean): *CeloTransactionObject‹string›* - -**Parameters:** - -Name | Type | ------- | ------ | -`buyAmount` | BigNumber.Value | -`maxSellAmount` | BigNumber.Value | -`buyGold` | boolean | - -___ - -### eventTypes - -• **eventTypes**: *EventsEnum‹T›* = Object.keys(this.events).reduce>( - (acc, key) => ({ ...acc, [key]: key }), - {} as any - ) - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[eventTypes](_wrappers_basewrapper_.basewrapper.md#eventtypes)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:41](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L41)* - -___ - -### events - -• **events**: *Exchange["events"]* = this.contract.events - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[events](_wrappers_basewrapper_.basewrapper.md#events)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:39](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L39)* - -___ - -### exchange - -• **exchange**: *function* = proxySend( - this.kit, - this.contract.methods.exchange, - tupleParser(valueToString, valueToString, identity) - ) - -*Defined in [contractkit/src/wrappers/Exchange.ts:74](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Exchange.ts#L74)* - -DEPRECATED: use function sell -Exchanges sellAmount of sellToken in exchange for at least minBuyAmount of buyToken -Requires the sellAmount to have been approved to the exchange - -**`param`** The amount of sellToken the user is selling to the exchange - -**`param`** The minimum amount of buyToken the user has to receive for this -transaction to succeed - -**`param`** `true` if gold is the sell token - -**`returns`** The amount of buyToken that was transfered - -#### Type declaration: - -▸ (`sellAmount`: BigNumber.Value, `minBuyAmount`: BigNumber.Value, `sellGold`: boolean): *CeloTransactionObject‹string›* - -**Parameters:** - -Name | Type | ------- | ------ | -`sellAmount` | BigNumber.Value | -`minBuyAmount` | BigNumber.Value | -`sellGold` | boolean | - -___ - -### getBuyAndSellBuckets - -• **getBuyAndSellBuckets**: *function* = proxyCall( - this.contract.methods.getBuyAndSellBuckets, - undefined, - (callRes: { 0: string; 1: string }) => - [valueToBigNumber(callRes[0]), valueToBigNumber(callRes[1])] as [BigNumber, BigNumber] - ) - -*Defined in [contractkit/src/wrappers/Exchange.ts:159](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Exchange.ts#L159)* - -Returns the buy token and sell token bucket sizes, in order. The ratio of -the two also represents the exchange rate between the two. - -**`param`** `true` if gold is the sell token - -**`returns`** - -#### Type declaration: - -▸ (`sellGold`: boolean): *Promise‹[BigNumber, BigNumber]›* - -**Parameters:** - -Name | Type | ------- | ------ | -`sellGold` | boolean | - -___ - -### lastBucketUpdate - -• **lastBucketUpdate**: *function* = proxyCall(this.contract.methods.lastBucketUpdate, undefined, valueToBigNumber) - -*Defined in [contractkit/src/wrappers/Exchange.ts:62](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Exchange.ts#L62)* - -Query last bucket update - -**`returns`** The timestamp of the last time exchange buckets were updated. - -#### Type declaration: - -▸ (...`args`: InputArgs): *Promise‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### methodIds - -• **methodIds**: *Record‹keyof T["methods"], string›* = Object.keys(this.contract.methods).reduce, string>>( - (acc, method: Methods) => { - const methodABI = this.contract.options.jsonInterface.find((item) => item.name === method) - - acc[method] = - methodABI === undefined - ? '0x' - : this.kit.connection.getAbiCoder().encodeFunctionSignature(methodABI) - - return acc - }, - {} as any - ) - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[methodIds](_wrappers_basewrapper_.basewrapper.md#methodids)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:46](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L46)* - -___ - -### minimumReports - -• **minimumReports**: *function* = proxyCall(this.contract.methods.minimumReports, undefined, valueToBigNumber) - -*Defined in [contractkit/src/wrappers/Exchange.ts:57](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Exchange.ts#L57)* - -Query minimum reports parameter - -**`returns`** The minimum number of fresh reports that need to be -present in the oracle to update buckets -commit to the gold bucket - -#### Type declaration: - -▸ (...`args`: InputArgs): *Promise‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### reserveFraction - -• **reserveFraction**: *function* = proxyCall( - this.contract.methods.reserveFraction, - undefined, - fixidityValueToBigNumber - ) - -*Defined in [contractkit/src/wrappers/Exchange.ts:40](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Exchange.ts#L40)* - -Query reserve fraction parameter - -**`returns`** Current fraction to commit to the gold bucket - -#### Type declaration: - -▸ (...`args`: InputArgs): *Promise‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### sell - -• **sell**: *function* = proxySend( - this.kit, - this.contract.methods.sell, - tupleParser(valueToString, valueToString, identity) - ) - -*Defined in [contractkit/src/wrappers/Exchange.ts:93](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Exchange.ts#L93)* - -Sells sellAmount of sellToken in exchange for at least minBuyAmount of buyToken -Requires the sellAmount to have been approved to the exchange - -**`param`** The amount of sellToken the user is selling to the exchange - -**`param`** The minimum amount of buyToken the user has to receive for this -transaction to succeed - -**`param`** `true` if gold is the sell token - -**`returns`** The amount of buyToken that was transfered - -#### Type declaration: - -▸ (`sellAmount`: BigNumber.Value, `minBuyAmount`: BigNumber.Value, `sellGold`: boolean): *CeloTransactionObject‹string›* - -**Parameters:** - -Name | Type | ------- | ------ | -`sellAmount` | BigNumber.Value | -`minBuyAmount` | BigNumber.Value | -`sellGold` | boolean | - -___ - -### spread - -• **spread**: *function* = proxyCall(this.contract.methods.spread, undefined, fixidityValueToBigNumber) - -*Defined in [contractkit/src/wrappers/Exchange.ts:35](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Exchange.ts#L35)* - -Query spread parameter - -**`returns`** Current spread charged on exchanges - -#### Type declaration: - -▸ (...`args`: InputArgs): *Promise‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### updateFrequency - -• **updateFrequency**: *function* = proxyCall(this.contract.methods.updateFrequency, undefined, valueToBigNumber) - -*Defined in [contractkit/src/wrappers/Exchange.ts:50](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Exchange.ts#L50)* - -Query update frequency parameter - -**`returns`** The time period that needs to elapse between bucket -updates - -#### Type declaration: - -▸ (...`args`: InputArgs): *Promise‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -## Accessors - -### address - -• **get address**(): *string* - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[address](_wrappers_basewrapper_.basewrapper.md#address)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:30](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L30)* - -Contract address - -**Returns:** *string* - -## Methods - -### buyDollar - -▸ **buyDollar**(`amount`: BigNumber.Value, `maxGoldAmount`: BigNumber.Value): *CeloTransactionObject‹string›* - -*Defined in [contractkit/src/wrappers/Exchange.ts:203](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Exchange.ts#L203)* - -Buy amount of cUsd in exchange for at least minGoldAmount of CELO -Requires the amount to have been approved to the exchange - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`amount` | BigNumber.Value | The amount of cUsd the user is selling to the exchange | -`maxGoldAmount` | BigNumber.Value | The maximum amount of CELO the user will pay for this transaction to succeed | - -**Returns:** *CeloTransactionObject‹string›* - -___ - -### buyGold - -▸ **buyGold**(`amount`: BigNumber.Value, `maxUSDAmount`: BigNumber.Value): *CeloTransactionObject‹string›* - -*Defined in [contractkit/src/wrappers/Exchange.ts:193](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Exchange.ts#L193)* - -Buy amount of CELO in exchange for at most maxUsdAmount of cUsd -Requires the amount to have been approved to the exchange - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`amount` | BigNumber.Value | The amount of CELO the user is buying from the exchange | -`maxUSDAmount` | BigNumber.Value | - | - -**Returns:** *CeloTransactionObject‹string›* - -___ - -### getBuyTokenAmount - -▸ **getBuyTokenAmount**(`sellAmount`: BigNumber.Value, `sellGold`: boolean): *Promise‹BigNumber›* - -*Defined in [contractkit/src/wrappers/Exchange.ts:128](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Exchange.ts#L128)* - -**`dev`** Returns the amount of buyToken a user would get for sellAmount of sellToken - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`sellAmount` | BigNumber.Value | The amount of sellToken the user is selling to the exchange | -`sellGold` | boolean | `true` if gold is the sell token | - -**Returns:** *Promise‹BigNumber›* - -The corresponding buyToken amount. - -___ - -### getConfig - -▸ **getConfig**(): *Promise‹[ExchangeConfig](../interfaces/_wrappers_exchange_.exchangeconfig.md)›* - -*Defined in [contractkit/src/wrappers/Exchange.ts:240](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Exchange.ts#L240)* - -**`dev`** Returns the current configuration of the exchange contract - -**Returns:** *Promise‹[ExchangeConfig](../interfaces/_wrappers_exchange_.exchangeconfig.md)›* - -ExchangeConfig object - -___ - -### getExchangeRate - -▸ **getExchangeRate**(`buyAmount`: BigNumber.Value, `sellGold`: boolean): *Promise‹BigNumber›* - -*Defined in [contractkit/src/wrappers/Exchange.ts:276](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Exchange.ts#L276)* - -Returns the exchange rate estimated at buyAmount. - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`buyAmount` | BigNumber.Value | The amount of buyToken in wei to estimate the exchange rate at | -`sellGold` | boolean | `true` if gold is the sell token | - -**Returns:** *Promise‹BigNumber›* - -The exchange rate (number of sellTokens received for one buyToken). - -___ - -### getGoldExchangeRate - -▸ **getGoldExchangeRate**(`buyAmount`: BigNumber.Value): *Promise‹BigNumber‹››* - -*Defined in [contractkit/src/wrappers/Exchange.ts:293](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Exchange.ts#L293)* - -Returns the exchange rate for CELO estimated at the buyAmount - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`buyAmount` | BigNumber.Value | The amount of CELO in wei to estimate the exchange rate at | - -**Returns:** *Promise‹BigNumber‹››* - -The exchange rate (number of cUsd received for one CELO) - -___ - -### getHumanReadableConfig - -▸ **getHumanReadableConfig**(): *Promise‹object›* - -*Defined in [contractkit/src/wrappers/Exchange.ts:261](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Exchange.ts#L261)* - -**`dev`** Returns human readable configuration of the exchange contract - -**Returns:** *Promise‹object›* - -ExchangeConfig object - -___ - -### getPastEvents - -▸ **getPastEvents**(`event`: Events‹Exchange›, `options`: PastEventOptions): *Promise‹EventLog[]›* - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[getPastEvents](_wrappers_basewrapper_.basewrapper.md#getpastevents)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:35](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L35)* - -Contract getPastEvents - -**Parameters:** - -Name | Type | ------- | ------ | -`event` | Events‹Exchange› | -`options` | PastEventOptions | - -**Returns:** *Promise‹EventLog[]›* - -___ - -### getSellTokenAmount - -▸ **getSellTokenAmount**(`buyAmount`: BigNumber.Value, `sellGold`: boolean): *Promise‹BigNumber›* - -*Defined in [contractkit/src/wrappers/Exchange.ts:144](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Exchange.ts#L144)* - -Returns the amount of sellToken a user would need to exchange to receive buyAmount of -buyToken. - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`buyAmount` | BigNumber.Value | The amount of buyToken the user would like to purchase. | -`sellGold` | boolean | `true` if gold is the sell token | - -**Returns:** *Promise‹BigNumber›* - -The corresponding sellToken amount. - -___ - -### getUsdExchangeRate - -▸ **getUsdExchangeRate**(`buyAmount`: BigNumber.Value): *Promise‹BigNumber‹››* - -*Defined in [contractkit/src/wrappers/Exchange.ts:286](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Exchange.ts#L286)* - -Returns the exchange rate for cUsd estimated at the buyAmount - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`buyAmount` | BigNumber.Value | The amount of cUsd in wei to estimate the exchange rate at | - -**Returns:** *Promise‹BigNumber‹››* - -The exchange rate (number of CELO received for one cUsd) - -___ - -### quoteGoldBuy - -▸ **quoteGoldBuy**(`buyAmount`: BigNumber.Value): *Promise‹BigNumber‹››* - -*Defined in [contractkit/src/wrappers/Exchange.ts:234](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Exchange.ts#L234)* - -Returns the amount of cUsd a user would need to exchange to receive buyAmount of -CELO. - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`buyAmount` | BigNumber.Value | The amount of CELO the user would like to purchase. | - -**Returns:** *Promise‹BigNumber‹››* - -The corresponding cUsd amount. - -___ - -### quoteGoldSell - -▸ **quoteGoldSell**(`sellAmount`: BigNumber.Value): *Promise‹BigNumber‹››* - -*Defined in [contractkit/src/wrappers/Exchange.ts:218](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Exchange.ts#L218)* - -Returns the amount of cUsd a user would get for sellAmount of CELO - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`sellAmount` | BigNumber.Value | The amount of CELO the user is selling to the exchange | - -**Returns:** *Promise‹BigNumber‹››* - -The corresponding cUsd amount. - -___ - -### quoteUsdBuy - -▸ **quoteUsdBuy**(`buyAmount`: BigNumber.Value): *Promise‹BigNumber‹››* - -*Defined in [contractkit/src/wrappers/Exchange.ts:226](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Exchange.ts#L226)* - -Returns the amount of CELO a user would need to exchange to receive buyAmount of -cUsd. - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`buyAmount` | BigNumber.Value | The amount of cUsd the user would like to purchase. | - -**Returns:** *Promise‹BigNumber‹››* - -The corresponding CELO amount. - -___ - -### quoteUsdSell - -▸ **quoteUsdSell**(`sellAmount`: BigNumber.Value): *Promise‹BigNumber‹››* - -*Defined in [contractkit/src/wrappers/Exchange.ts:211](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Exchange.ts#L211)* - -Returns the amount of CELO a user would get for sellAmount of cUsd - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`sellAmount` | BigNumber.Value | The amount of cUsd the user is selling to the exchange | - -**Returns:** *Promise‹BigNumber‹››* - -The corresponding CELO amount. - -___ - -### sellDollar - -▸ **sellDollar**(`amount`: BigNumber.Value, `minGoldAmount`: BigNumber.Value): *CeloTransactionObject‹string›* - -*Defined in [contractkit/src/wrappers/Exchange.ts:183](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Exchange.ts#L183)* - -Sell amount of cUsd in exchange for at least minGoldAmount of CELO -Requires the amount to have been approved to the exchange - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`amount` | BigNumber.Value | The amount of cUsd the user is selling to the exchange | -`minGoldAmount` | BigNumber.Value | The minimum amount of CELO the user has to receive for this transaction to succeed | - -**Returns:** *CeloTransactionObject‹string›* - -___ - -### sellGold - -▸ **sellGold**(`amount`: BigNumber.Value, `minUSDAmount`: BigNumber.Value): *CeloTransactionObject‹string›* - -*Defined in [contractkit/src/wrappers/Exchange.ts:173](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Exchange.ts#L173)* - -Sell amount of CELO in exchange for at least minUsdAmount of cUsd -Requires the amount to have been approved to the exchange - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`amount` | BigNumber.Value | The amount of CELO the user is selling to the exchange | -`minUSDAmount` | BigNumber.Value | - | - -**Returns:** *CeloTransactionObject‹string›* diff --git a/packages/docs/developer-resources/contractkit/reference/classes/_wrappers_freezer_.freezerwrapper.md b/packages/docs/developer-resources/contractkit/reference/classes/_wrappers_freezer_.freezerwrapper.md deleted file mode 100644 index e304f417fd8..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/classes/_wrappers_freezer_.freezerwrapper.md +++ /dev/null @@ -1,183 +0,0 @@ -# Class: FreezerWrapper - -## Hierarchy - -* [BaseWrapper](_wrappers_basewrapper_.basewrapper.md)‹Freezer› - - ↳ **FreezerWrapper** - -## Index - -### Constructors - -* [constructor](_wrappers_freezer_.freezerwrapper.md#constructor) - -### Properties - -* [eventTypes](_wrappers_freezer_.freezerwrapper.md#eventtypes) -* [events](_wrappers_freezer_.freezerwrapper.md#events) -* [freeze](_wrappers_freezer_.freezerwrapper.md#freeze) -* [isFrozen](_wrappers_freezer_.freezerwrapper.md#isfrozen) -* [methodIds](_wrappers_freezer_.freezerwrapper.md#methodids) -* [unfreeze](_wrappers_freezer_.freezerwrapper.md#unfreeze) - -### Accessors - -* [address](_wrappers_freezer_.freezerwrapper.md#address) - -### Methods - -* [getPastEvents](_wrappers_freezer_.freezerwrapper.md#getpastevents) - -## Constructors - -### constructor - -\+ **new FreezerWrapper**(`kit`: [ContractKit](_kit_.contractkit.md), `contract`: Freezer): *[FreezerWrapper](_wrappers_freezer_.freezerwrapper.md)* - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[constructor](_wrappers_basewrapper_.basewrapper.md#constructor)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:26](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L26)* - -**Parameters:** - -Name | Type | ------- | ------ | -`kit` | [ContractKit](_kit_.contractkit.md) | -`contract` | Freezer | - -**Returns:** *[FreezerWrapper](_wrappers_freezer_.freezerwrapper.md)* - -## Properties - -### eventTypes - -• **eventTypes**: *EventsEnum‹T›* = Object.keys(this.events).reduce>( - (acc, key) => ({ ...acc, [key]: key }), - {} as any - ) - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[eventTypes](_wrappers_basewrapper_.basewrapper.md#eventtypes)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:41](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L41)* - -___ - -### events - -• **events**: *Freezer["events"]* = this.contract.events - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[events](_wrappers_basewrapper_.basewrapper.md#events)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:39](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L39)* - -___ - -### freeze - -• **freeze**: *function* = proxySend(this.kit, this.contract.methods.freeze) - -*Defined in [contractkit/src/wrappers/Freezer.ts:5](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Freezer.ts#L5)* - -#### Type declaration: - -▸ (...`args`: InputArgs): *CeloTransactionObject‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### isFrozen - -• **isFrozen**: *function* = proxyCall(this.contract.methods.isFrozen) - -*Defined in [contractkit/src/wrappers/Freezer.ts:7](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Freezer.ts#L7)* - -#### Type declaration: - -▸ (...`args`: InputArgs): *Promise‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### methodIds - -• **methodIds**: *Record‹keyof T["methods"], string›* = Object.keys(this.contract.methods).reduce, string>>( - (acc, method: Methods) => { - const methodABI = this.contract.options.jsonInterface.find((item) => item.name === method) - - acc[method] = - methodABI === undefined - ? '0x' - : this.kit.connection.getAbiCoder().encodeFunctionSignature(methodABI) - - return acc - }, - {} as any - ) - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[methodIds](_wrappers_basewrapper_.basewrapper.md#methodids)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:46](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L46)* - -___ - -### unfreeze - -• **unfreeze**: *function* = proxySend(this.kit, this.contract.methods.unfreeze) - -*Defined in [contractkit/src/wrappers/Freezer.ts:6](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Freezer.ts#L6)* - -#### Type declaration: - -▸ (...`args`: InputArgs): *CeloTransactionObject‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -## Accessors - -### address - -• **get address**(): *string* - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[address](_wrappers_basewrapper_.basewrapper.md#address)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:30](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L30)* - -Contract address - -**Returns:** *string* - -## Methods - -### getPastEvents - -▸ **getPastEvents**(`event`: Events‹Freezer›, `options`: PastEventOptions): *Promise‹EventLog[]›* - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[getPastEvents](_wrappers_basewrapper_.basewrapper.md#getpastevents)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:35](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L35)* - -Contract getPastEvents - -**Parameters:** - -Name | Type | ------- | ------ | -`event` | Events‹Freezer› | -`options` | PastEventOptions | - -**Returns:** *Promise‹EventLog[]›* diff --git a/packages/docs/developer-resources/contractkit/reference/classes/_wrappers_gaspriceminimum_.gaspriceminimumwrapper.md b/packages/docs/developer-resources/contractkit/reference/classes/_wrappers_gaspriceminimum_.gaspriceminimumwrapper.md deleted file mode 100644 index 5c6975469db..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/classes/_wrappers_gaspriceminimum_.gaspriceminimumwrapper.md +++ /dev/null @@ -1,245 +0,0 @@ -# Class: GasPriceMinimumWrapper - -Stores the gas price minimum - -## Hierarchy - -* [BaseWrapper](_wrappers_basewrapper_.basewrapper.md)‹GasPriceMinimum› - - ↳ **GasPriceMinimumWrapper** - -## Index - -### Constructors - -* [constructor](_wrappers_gaspriceminimum_.gaspriceminimumwrapper.md#constructor) - -### Properties - -* [adjustmentSpeed](_wrappers_gaspriceminimum_.gaspriceminimumwrapper.md#adjustmentspeed) -* [eventTypes](_wrappers_gaspriceminimum_.gaspriceminimumwrapper.md#eventtypes) -* [events](_wrappers_gaspriceminimum_.gaspriceminimumwrapper.md#events) -* [gasPriceMinimum](_wrappers_gaspriceminimum_.gaspriceminimumwrapper.md#gaspriceminimum) -* [getGasPriceMinimum](_wrappers_gaspriceminimum_.gaspriceminimumwrapper.md#getgaspriceminimum) -* [methodIds](_wrappers_gaspriceminimum_.gaspriceminimumwrapper.md#methodids) -* [targetDensity](_wrappers_gaspriceminimum_.gaspriceminimumwrapper.md#targetdensity) - -### Accessors - -* [address](_wrappers_gaspriceminimum_.gaspriceminimumwrapper.md#address) - -### Methods - -* [getConfig](_wrappers_gaspriceminimum_.gaspriceminimumwrapper.md#getconfig) -* [getPastEvents](_wrappers_gaspriceminimum_.gaspriceminimumwrapper.md#getpastevents) - -## Constructors - -### constructor - -\+ **new GasPriceMinimumWrapper**(`kit`: [ContractKit](_kit_.contractkit.md), `contract`: GasPriceMinimum): *[GasPriceMinimumWrapper](_wrappers_gaspriceminimum_.gaspriceminimumwrapper.md)* - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[constructor](_wrappers_basewrapper_.basewrapper.md#constructor)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:26](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L26)* - -**Parameters:** - -Name | Type | ------- | ------ | -`kit` | [ContractKit](_kit_.contractkit.md) | -`contract` | GasPriceMinimum | - -**Returns:** *[GasPriceMinimumWrapper](_wrappers_gaspriceminimum_.gaspriceminimumwrapper.md)* - -## Properties - -### adjustmentSpeed - -• **adjustmentSpeed**: *function* = proxyCall( - this.contract.methods.adjustmentSpeed, - undefined, - fixidityValueToBigNumber - ) - -*Defined in [contractkit/src/wrappers/GasPriceMinimum.ts:44](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/GasPriceMinimum.ts#L44)* - -Query adjustment speed parameter - -**`returns`** multiplier that impacts how quickly gas price minimum is adjusted. - -#### Type declaration: - -▸ (...`args`: InputArgs): *Promise‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### eventTypes - -• **eventTypes**: *EventsEnum‹T›* = Object.keys(this.events).reduce>( - (acc, key) => ({ ...acc, [key]: key }), - {} as any - ) - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[eventTypes](_wrappers_basewrapper_.basewrapper.md#eventtypes)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:41](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L41)* - -___ - -### events - -• **events**: *GasPriceMinimum["events"]* = this.contract.events - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[events](_wrappers_basewrapper_.basewrapper.md#events)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:39](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L39)* - -___ - -### gasPriceMinimum - -• **gasPriceMinimum**: *function* = proxyCall(this.contract.methods.gasPriceMinimum, undefined, valueToBigNumber) - -*Defined in [contractkit/src/wrappers/GasPriceMinimum.ts:19](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/GasPriceMinimum.ts#L19)* - -Query current gas price minimum in CELO. - -**`returns`** current gas price minimum in CELO - -#### Type declaration: - -▸ (...`args`: InputArgs): *Promise‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### getGasPriceMinimum - -• **getGasPriceMinimum**: *function* = proxyCall( - this.contract.methods.getGasPriceMinimum, - undefined, - valueToBigNumber - ) - -*Defined in [contractkit/src/wrappers/GasPriceMinimum.ts:25](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/GasPriceMinimum.ts#L25)* - -Query current gas price minimum. - -**`returns`** current gas price minimum in the requested currency - -#### Type declaration: - -▸ (...`args`: InputArgs): *Promise‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### methodIds - -• **methodIds**: *Record‹keyof T["methods"], string›* = Object.keys(this.contract.methods).reduce, string>>( - (acc, method: Methods) => { - const methodABI = this.contract.options.jsonInterface.find((item) => item.name === method) - - acc[method] = - methodABI === undefined - ? '0x' - : this.kit.connection.getAbiCoder().encodeFunctionSignature(methodABI) - - return acc - }, - {} as any - ) - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[methodIds](_wrappers_basewrapper_.basewrapper.md#methodids)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:46](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L46)* - -___ - -### targetDensity - -• **targetDensity**: *function* = proxyCall( - this.contract.methods.targetDensity, - undefined, - fixidityValueToBigNumber - ) - -*Defined in [contractkit/src/wrappers/GasPriceMinimum.ts:35](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/GasPriceMinimum.ts#L35)* - -Query target density parameter. - -**`returns`** the current block density targeted by the gas price minimum algorithm. - -#### Type declaration: - -▸ (...`args`: InputArgs): *Promise‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -## Accessors - -### address - -• **get address**(): *string* - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[address](_wrappers_basewrapper_.basewrapper.md#address)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:30](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L30)* - -Contract address - -**Returns:** *string* - -## Methods - -### getConfig - -▸ **getConfig**(): *Promise‹[GasPriceMinimumConfig](../interfaces/_wrappers_gaspriceminimum_.gaspriceminimumconfig.md)›* - -*Defined in [contractkit/src/wrappers/GasPriceMinimum.ts:52](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/GasPriceMinimum.ts#L52)* - -Returns current configuration parameters. - -**Returns:** *Promise‹[GasPriceMinimumConfig](../interfaces/_wrappers_gaspriceminimum_.gaspriceminimumconfig.md)›* - -___ - -### getPastEvents - -▸ **getPastEvents**(`event`: Events‹GasPriceMinimum›, `options`: PastEventOptions): *Promise‹EventLog[]›* - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[getPastEvents](_wrappers_basewrapper_.basewrapper.md#getpastevents)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:35](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L35)* - -Contract getPastEvents - -**Parameters:** - -Name | Type | ------- | ------ | -`event` | Events‹GasPriceMinimum› | -`options` | PastEventOptions | - -**Returns:** *Promise‹EventLog[]›* diff --git a/packages/docs/developer-resources/contractkit/reference/classes/_wrappers_goldtokenwrapper_.goldtokenwrapper.md b/packages/docs/developer-resources/contractkit/reference/classes/_wrappers_goldtokenwrapper_.goldtokenwrapper.md deleted file mode 100644 index 81278d80ee6..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/classes/_wrappers_goldtokenwrapper_.goldtokenwrapper.md +++ /dev/null @@ -1,438 +0,0 @@ -# Class: GoldTokenWrapper - -ERC-20 contract for Celo native currency. - -## Hierarchy - -* [BaseWrapper](_wrappers_basewrapper_.basewrapper.md)‹GoldToken› - - ↳ **GoldTokenWrapper** - -## Index - -### Constructors - -* [constructor](_wrappers_goldtokenwrapper_.goldtokenwrapper.md#constructor) - -### Properties - -* [allowance](_wrappers_goldtokenwrapper_.goldtokenwrapper.md#allowance) -* [approve](_wrappers_goldtokenwrapper_.goldtokenwrapper.md#approve) -* [decimals](_wrappers_goldtokenwrapper_.goldtokenwrapper.md#decimals) -* [decreaseAllowance](_wrappers_goldtokenwrapper_.goldtokenwrapper.md#decreaseallowance) -* [eventTypes](_wrappers_goldtokenwrapper_.goldtokenwrapper.md#eventtypes) -* [events](_wrappers_goldtokenwrapper_.goldtokenwrapper.md#events) -* [increaseAllowance](_wrappers_goldtokenwrapper_.goldtokenwrapper.md#increaseallowance) -* [methodIds](_wrappers_goldtokenwrapper_.goldtokenwrapper.md#methodids) -* [name](_wrappers_goldtokenwrapper_.goldtokenwrapper.md#name) -* [symbol](_wrappers_goldtokenwrapper_.goldtokenwrapper.md#symbol) -* [totalSupply](_wrappers_goldtokenwrapper_.goldtokenwrapper.md#totalsupply) -* [transfer](_wrappers_goldtokenwrapper_.goldtokenwrapper.md#transfer) -* [transferFrom](_wrappers_goldtokenwrapper_.goldtokenwrapper.md#transferfrom) -* [transferWithComment](_wrappers_goldtokenwrapper_.goldtokenwrapper.md#transferwithcomment) - -### Accessors - -* [address](_wrappers_goldtokenwrapper_.goldtokenwrapper.md#address) - -### Methods - -* [balanceOf](_wrappers_goldtokenwrapper_.goldtokenwrapper.md#balanceof) -* [getPastEvents](_wrappers_goldtokenwrapper_.goldtokenwrapper.md#getpastevents) - -## Constructors - -### constructor - -\+ **new GoldTokenWrapper**(`kit`: [ContractKit](_kit_.contractkit.md), `contract`: GoldToken): *[GoldTokenWrapper](_wrappers_goldtokenwrapper_.goldtokenwrapper.md)* - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[constructor](_wrappers_basewrapper_.basewrapper.md#constructor)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:26](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L26)* - -**Parameters:** - -Name | Type | ------- | ------ | -`kit` | [ContractKit](_kit_.contractkit.md) | -`contract` | GoldToken | - -**Returns:** *[GoldTokenWrapper](_wrappers_goldtokenwrapper_.goldtokenwrapper.md)* - -## Properties - -### allowance - -• **allowance**: *function* = proxyCall(this.contract.methods.allowance, undefined, valueToBigNumber) - -*Defined in [contractkit/src/wrappers/GoldTokenWrapper.ts:28](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/GoldTokenWrapper.ts#L28)* - -Querying allowance. - -**`param`** Account who has given the allowance. - -**`param`** Address of account to whom the allowance was given. - -**`returns`** Amount of allowance. - -#### Type declaration: - -▸ (...`args`: InputArgs): *Promise‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### approve - -• **approve**: *function* = proxySend(this.kit, this.contract.methods.approve) - -*Defined in [contractkit/src/wrappers/GoldTokenWrapper.ts:59](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/GoldTokenWrapper.ts#L59)* - -Approve a user to transfer CELO on behalf of another user. - -**`param`** The address which is being approved to spend CELO. - -**`param`** The amount of CELO approved to the spender. - -**`returns`** True if the transaction succeeds. - -#### Type declaration: - -▸ (...`args`: InputArgs): *CeloTransactionObject‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### decimals - -• **decimals**: *function* = proxyCall(this.contract.methods.decimals, undefined, valueToInt) - -*Defined in [contractkit/src/wrappers/GoldTokenWrapper.ts:45](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/GoldTokenWrapper.ts#L45)* - -Returns the number of decimals used in the token. - -**`returns`** Number of decimals. - -#### Type declaration: - -▸ (...`args`: InputArgs): *Promise‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### decreaseAllowance - -• **decreaseAllowance**: *function* = proxySend(this.kit, this.contract.methods.decreaseAllowance) - -*Defined in [contractkit/src/wrappers/GoldTokenWrapper.ts:77](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/GoldTokenWrapper.ts#L77)* - -Decreases the allowance of another user. - -**`param`** The address which is being approved to spend CELO. - -**`param`** The decrement of the amount of CELO approved to the spender. - -**`returns`** true if success. - -#### Type declaration: - -▸ (...`args`: InputArgs): *CeloTransactionObject‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### eventTypes - -• **eventTypes**: *EventsEnum‹T›* = Object.keys(this.events).reduce>( - (acc, key) => ({ ...acc, [key]: key }), - {} as any - ) - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[eventTypes](_wrappers_basewrapper_.basewrapper.md#eventtypes)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:41](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L41)* - -___ - -### events - -• **events**: *GoldToken["events"]* = this.contract.events - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[events](_wrappers_basewrapper_.basewrapper.md#events)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:39](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L39)* - -___ - -### increaseAllowance - -• **increaseAllowance**: *function* = proxySend( - this.kit, - this.contract.methods.increaseAllowance, - tupleParser(stringIdentity, valueToString) - ) - -*Defined in [contractkit/src/wrappers/GoldTokenWrapper.ts:66](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/GoldTokenWrapper.ts#L66)* - -Increases the allowance of another user. - -**`param`** The address which is being approved to spend CELO. - -**`param`** The increment of the amount of CELO approved to the spender. - -**`returns`** true if success. - -#### Type declaration: - -▸ (...`args`: InputArgs): *CeloTransactionObject‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### methodIds - -• **methodIds**: *Record‹keyof T["methods"], string›* = Object.keys(this.contract.methods).reduce, string>>( - (acc, method: Methods) => { - const methodABI = this.contract.options.jsonInterface.find((item) => item.name === method) - - acc[method] = - methodABI === undefined - ? '0x' - : this.kit.connection.getAbiCoder().encodeFunctionSignature(methodABI) - - return acc - }, - {} as any - ) - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[methodIds](_wrappers_basewrapper_.basewrapper.md#methodids)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:46](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L46)* - -___ - -### name - -• **name**: *function* = proxyCall(this.contract.methods.name, undefined, (a: any) => a.toString()) - -*Defined in [contractkit/src/wrappers/GoldTokenWrapper.ts:34](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/GoldTokenWrapper.ts#L34)* - -Returns the name of the token. - -**`returns`** Name of the token. - -#### Type declaration: - -▸ (...`args`: InputArgs): *Promise‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### symbol - -• **symbol**: *function* = proxyCall(this.contract.methods.symbol, undefined, (a: any) => a.toString()) - -*Defined in [contractkit/src/wrappers/GoldTokenWrapper.ts:40](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/GoldTokenWrapper.ts#L40)* - -Returns the three letter symbol of the token. - -**`returns`** Symbol of the token. - -#### Type declaration: - -▸ (...`args`: InputArgs): *Promise‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### totalSupply - -• **totalSupply**: *function* = proxyCall(this.contract.methods.totalSupply, undefined, valueToBigNumber) - -*Defined in [contractkit/src/wrappers/GoldTokenWrapper.ts:51](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/GoldTokenWrapper.ts#L51)* - -Returns the total supply of the token, that is, the amount of tokens currently minted. - -**`returns`** Total supply. - -#### Type declaration: - -▸ (...`args`: InputArgs): *Promise‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### transfer - -• **transfer**: *function* = proxySend(this.kit, this.contract.methods.transfer) - -*Defined in [contractkit/src/wrappers/GoldTokenWrapper.ts:94](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/GoldTokenWrapper.ts#L94)* - -Transfers CELO from one address to another. - -**`param`** The address to transfer CELO to. - -**`param`** The amount of CELO to transfer. - -**`returns`** True if the transaction succeeds. - -#### Type declaration: - -▸ (...`args`: InputArgs): *CeloTransactionObject‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### transferFrom - -• **transferFrom**: *function* = proxySend(this.kit, this.contract.methods.transferFrom) - -*Defined in [contractkit/src/wrappers/GoldTokenWrapper.ts:103](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/GoldTokenWrapper.ts#L103)* - -Transfers CELO from one address to another on behalf of a user. - -**`param`** The address to transfer CELO from. - -**`param`** The address to transfer CELO to. - -**`param`** The amount of CELO to transfer. - -**`returns`** True if the transaction succeeds. - -#### Type declaration: - -▸ (...`args`: InputArgs): *CeloTransactionObject‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### transferWithComment - -• **transferWithComment**: *function* = proxySend(this.kit, this.contract.methods.transferWithComment) - -*Defined in [contractkit/src/wrappers/GoldTokenWrapper.ts:86](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/GoldTokenWrapper.ts#L86)* - -Transfers CELO from one address to another with a comment. - -**`param`** The address to transfer CELO to. - -**`param`** The amount of CELO to transfer. - -**`param`** The transfer comment - -**`returns`** True if the transaction succeeds. - -#### Type declaration: - -▸ (...`args`: InputArgs): *CeloTransactionObject‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -## Accessors - -### address - -• **get address**(): *string* - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[address](_wrappers_basewrapper_.basewrapper.md#address)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:30](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L30)* - -Contract address - -**Returns:** *string* - -## Methods - -### balanceOf - -▸ **balanceOf**(`account`: Address): *Promise‹BigNumber‹››* - -*Defined in [contractkit/src/wrappers/GoldTokenWrapper.ts:110](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/GoldTokenWrapper.ts#L110)* - -Gets the balance of the specified address. - -**Parameters:** - -Name | Type | ------- | ------ | -`account` | Address | - -**Returns:** *Promise‹BigNumber‹››* - -The balance of the specified address. - -___ - -### getPastEvents - -▸ **getPastEvents**(`event`: Events‹GoldToken›, `options`: PastEventOptions): *Promise‹EventLog[]›* - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[getPastEvents](_wrappers_basewrapper_.basewrapper.md#getpastevents)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:35](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L35)* - -Contract getPastEvents - -**Parameters:** - -Name | Type | ------- | ------ | -`event` | Events‹GoldToken› | -`options` | PastEventOptions | - -**Returns:** *Promise‹EventLog[]›* diff --git a/packages/docs/developer-resources/contractkit/reference/classes/_wrappers_governance_.governancewrapper.md b/packages/docs/developer-resources/contractkit/reference/classes/_wrappers_governance_.governancewrapper.md deleted file mode 100644 index 6e5121e2264..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/classes/_wrappers_governance_.governancewrapper.md +++ /dev/null @@ -1,1379 +0,0 @@ -# Class: GovernanceWrapper - -Contract managing voting for governance proposals. - -## Hierarchy - -* [BaseWrapper](_wrappers_basewrapper_.basewrapper.md)‹Governance› - - ↳ **GovernanceWrapper** - -## Index - -### Constructors - -* [constructor](_wrappers_governance_.governancewrapper.md#constructor) - -### Properties - -* [approveHotfix](_wrappers_governance_.governancewrapper.md#approvehotfix) -* [concurrentProposals](_wrappers_governance_.governancewrapper.md#concurrentproposals) -* [dequeueFrequency](_wrappers_governance_.governancewrapper.md#dequeuefrequency) -* [dequeueProposalsIfReady](_wrappers_governance_.governancewrapper.md#dequeueproposalsifready) -* [eventTypes](_wrappers_governance_.governancewrapper.md#eventtypes) -* [events](_wrappers_governance_.governancewrapper.md#events) -* [executeHotfix](_wrappers_governance_.governancewrapper.md#executehotfix) -* [getApprover](_wrappers_governance_.governancewrapper.md#getapprover) -* [getProposalMetadata](_wrappers_governance_.governancewrapper.md#getproposalmetadata) -* [getProposalStage](_wrappers_governance_.governancewrapper.md#getproposalstage) -* [getProposalTransaction](_wrappers_governance_.governancewrapper.md#getproposaltransaction) -* [getQueue](_wrappers_governance_.governancewrapper.md#getqueue) -* [getRefundedDeposits](_wrappers_governance_.governancewrapper.md#getrefundeddeposits) -* [getUpvoteRecord](_wrappers_governance_.governancewrapper.md#getupvoterecord) -* [getUpvotes](_wrappers_governance_.governancewrapper.md#getupvotes) -* [getVotes](_wrappers_governance_.governancewrapper.md#getvotes) -* [hotfixWhitelistValidatorTally](_wrappers_governance_.governancewrapper.md#hotfixwhitelistvalidatortally) -* [isApproved](_wrappers_governance_.governancewrapper.md#isapproved) -* [isDequeuedProposalExpired](_wrappers_governance_.governancewrapper.md#isdequeuedproposalexpired) -* [isHotfixPassing](_wrappers_governance_.governancewrapper.md#ishotfixpassing) -* [isHotfixWhitelistedBy](_wrappers_governance_.governancewrapper.md#ishotfixwhitelistedby) -* [isProposalPassing](_wrappers_governance_.governancewrapper.md#isproposalpassing) -* [isQueued](_wrappers_governance_.governancewrapper.md#isqueued) -* [isQueuedProposalExpired](_wrappers_governance_.governancewrapper.md#isqueuedproposalexpired) -* [isVoting](_wrappers_governance_.governancewrapper.md#isvoting) -* [lastDequeue](_wrappers_governance_.governancewrapper.md#lastdequeue) -* [methodIds](_wrappers_governance_.governancewrapper.md#methodids) -* [minDeposit](_wrappers_governance_.governancewrapper.md#mindeposit) -* [minQuorumSize](_wrappers_governance_.governancewrapper.md#minquorumsize) -* [prepareHotfix](_wrappers_governance_.governancewrapper.md#preparehotfix) -* [proposalExists](_wrappers_governance_.governancewrapper.md#proposalexists) -* [propose](_wrappers_governance_.governancewrapper.md#propose) -* [queueExpiry](_wrappers_governance_.governancewrapper.md#queueexpiry) -* [whitelistHotfix](_wrappers_governance_.governancewrapper.md#whitelisthotfix) -* [withdraw](_wrappers_governance_.governancewrapper.md#withdraw) - -### Accessors - -* [address](_wrappers_governance_.governancewrapper.md#address) - -### Methods - -* [approve](_wrappers_governance_.governancewrapper.md#approve) -* [execute](_wrappers_governance_.governancewrapper.md#execute) -* [getConfig](_wrappers_governance_.governancewrapper.md#getconfig) -* [getConstitution](_wrappers_governance_.governancewrapper.md#getconstitution) -* [getDequeue](_wrappers_governance_.governancewrapper.md#getdequeue) -* [getHotfixRecord](_wrappers_governance_.governancewrapper.md#gethotfixrecord) -* [getHumanReadableConfig](_wrappers_governance_.governancewrapper.md#gethumanreadableconfig) -* [getHumanReadableProposalMetadata](_wrappers_governance_.governancewrapper.md#gethumanreadableproposalmetadata) -* [getParticipationParameters](_wrappers_governance_.governancewrapper.md#getparticipationparameters) -* [getPastEvents](_wrappers_governance_.governancewrapper.md#getpastevents) -* [getProposal](_wrappers_governance_.governancewrapper.md#getproposal) -* [getProposalRecord](_wrappers_governance_.governancewrapper.md#getproposalrecord) -* [getTransactionConstitution](_wrappers_governance_.governancewrapper.md#gettransactionconstitution) -* [getVoteRecord](_wrappers_governance_.governancewrapper.md#getvoterecord) -* [getVoteRecords](_wrappers_governance_.governancewrapper.md#getvoterecords) -* [getVoteValue](_wrappers_governance_.governancewrapper.md#getvotevalue) -* [getVoteWeight](_wrappers_governance_.governancewrapper.md#getvoteweight) -* [getVoter](_wrappers_governance_.governancewrapper.md#getvoter) -* [humanReadableTimeUntilStages](_wrappers_governance_.governancewrapper.md#humanreadabletimeuntilstages) -* [revokeUpvote](_wrappers_governance_.governancewrapper.md#revokeupvote) -* [sortedQueue](_wrappers_governance_.governancewrapper.md#sortedqueue) -* [stageDurations](_wrappers_governance_.governancewrapper.md#stagedurations) -* [timeUntilStages](_wrappers_governance_.governancewrapper.md#timeuntilstages) -* [upvote](_wrappers_governance_.governancewrapper.md#upvote) -* [vote](_wrappers_governance_.governancewrapper.md#vote) - -## Constructors - -### constructor - -\+ **new GovernanceWrapper**(`kit`: [ContractKit](_kit_.contractkit.md), `contract`: Governance): *[GovernanceWrapper](_wrappers_governance_.governancewrapper.md)* - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[constructor](_wrappers_basewrapper_.basewrapper.md#constructor)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:26](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L26)* - -**Parameters:** - -Name | Type | ------- | ------ | -`kit` | [ContractKit](_kit_.contractkit.md) | -`contract` | Governance | - -**Returns:** *[GovernanceWrapper](_wrappers_governance_.governancewrapper.md)* - -## Properties - -### approveHotfix - -• **approveHotfix**: *function* = proxySend(this.kit, this.contract.methods.approveHotfix, tupleParser(bufferToHex)) - -*Defined in [contractkit/src/wrappers/Governance.ts:799](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Governance.ts#L799)* - -Marks the given hotfix approved by `sender`. - -**`param`** keccak256 hash of hotfix's associated abi encoded transactions - -**`notice`** Only the `approver` address will succeed in sending this transaction - -#### Type declaration: - -▸ (...`args`: InputArgs): *CeloTransactionObject‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### concurrentProposals - -• **concurrentProposals**: *function* = proxyCall( - this.contract.methods.concurrentProposals, - undefined, - valueToBigNumber - ) - -*Defined in [contractkit/src/wrappers/Governance.ts:145](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Governance.ts#L145)* - -Querying number of possible concurrent proposals. - -**`returns`** Current number of possible concurrent proposals. - -#### Type declaration: - -▸ (...`args`: InputArgs): *Promise‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### dequeueFrequency - -• **dequeueFrequency**: *function* = proxyCall(this.contract.methods.dequeueFrequency, undefined, valueToBigNumber) - -*Defined in [contractkit/src/wrappers/Governance.ts:159](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Governance.ts#L159)* - -Query proposal dequeue frequency. - -**`returns`** Current proposal dequeue frequency in seconds. - -#### Type declaration: - -▸ (...`args`: InputArgs): *Promise‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### dequeueProposalsIfReady - -• **dequeueProposalsIfReady**: *function* = proxySend(this.kit, this.contract.methods.dequeueProposalsIfReady) - -*Defined in [contractkit/src/wrappers/Governance.ts:570](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Governance.ts#L570)* - -Dequeues any queued proposals if `dequeueFrequency` seconds have elapsed since the last dequeue - -#### Type declaration: - -▸ (...`args`: InputArgs): *CeloTransactionObject‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### eventTypes - -• **eventTypes**: *EventsEnum‹T›* = Object.keys(this.events).reduce>( - (acc, key) => ({ ...acc, [key]: key }), - {} as any - ) - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[eventTypes](_wrappers_basewrapper_.basewrapper.md#eventtypes)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:41](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L41)* - -___ - -### events - -• **events**: *Governance["events"]* = this.contract.events - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[events](_wrappers_basewrapper_.basewrapper.md#events)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:39](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L39)* - -___ - -### executeHotfix - -• **executeHotfix**: *function* = proxySend(this.kit, this.contract.methods.executeHotfix, hotfixToParams) - -*Defined in [contractkit/src/wrappers/Governance.ts:813](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Governance.ts#L813)* - -Executes a given sequence of transactions if the corresponding hash is prepared and approved. - -**`param`** Governance hotfix proposal - -**`param`** Secret which guarantees uniqueness of hash - -**`notice`** keccak256 hash of abi encoded transactions computed on-chain - -#### Type declaration: - -▸ (...`args`: InputArgs): *CeloTransactionObject‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### getApprover - -• **getApprover**: *function* = proxyCall(this.contract.methods.approver) - -*Defined in [contractkit/src/wrappers/Governance.ts:352](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Governance.ts#L352)* - -Returns the approver address for proposals and hotfixes. - -#### Type declaration: - -▸ (...`args`: InputArgs): *Promise‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### getProposalMetadata - -• **getProposalMetadata**: *function* = proxyCall( - this.contract.methods.getProposal, - tupleParser(valueToString), - (res) => ({ - proposer: res[0], - deposit: valueToBigNumber(res[1]), - timestamp: valueToBigNumber(res[2]), - transactionCount: valueToInt(res[3]), - descriptionURL: res[4], - }) - ) - -*Defined in [contractkit/src/wrappers/Governance.ts:280](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Governance.ts#L280)* - -Returns the metadata associated with a given proposal. - -**`param`** Governance proposal UUID - -#### Type declaration: - -▸ (`proposalID`: BigNumber.Value): *Promise‹[ProposalMetadata](../interfaces/_wrappers_governance_.proposalmetadata.md)›* - -**Parameters:** - -Name | Type | ------- | ------ | -`proposalID` | BigNumber.Value | - -___ - -### getProposalStage - -• **getProposalStage**: *function* = proxyCall( - this.contract.methods.getProposalStage, - tupleParser(valueToString), - (res) => Object.keys(ProposalStage)[valueToInt(res)] as ProposalStage - ) - -*Defined in [contractkit/src/wrappers/Governance.ts:354](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Governance.ts#L354)* - -#### Type declaration: - -▸ (...`args`: InputArgs): *Promise‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### getProposalTransaction - -• **getProposalTransaction**: *function* = proxyCall( - this.contract.methods.getProposalTransaction, - tupleParser(valueToString, valueToString), - (res) => ({ - value: res[0], - to: res[1], - input: solidityBytesToString(res[2]), - }) - ) - -*Defined in [contractkit/src/wrappers/Governance.ts:309](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Governance.ts#L309)* - -Returns the transaction at the given index associated with a given proposal. - -**`param`** Governance proposal UUID - -**`param`** Transaction index - -#### Type declaration: - -▸ (`proposalID`: BigNumber.Value, `txIndex`: number): *Promise‹[ProposalTransaction](../modules/_wrappers_governance_.md#proposaltransaction)›* - -**Parameters:** - -Name | Type | ------- | ------ | -`proposalID` | BigNumber.Value | -`txIndex` | number | - -___ - -### getQueue - -• **getQueue**: *function* = proxyCall(this.contract.methods.getQueue, undefined, (arraysObject) => - zip( - (_id, _upvotes) => ({ - proposalID: valueToBigNumber(_id), - upvotes: valueToBigNumber(_upvotes), - }), - arraysObject[0], - arraysObject[1] - ) - ) - -*Defined in [contractkit/src/wrappers/Governance.ts:521](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Governance.ts#L521)* - -Returns the proposal queue as list of upvote records. - -#### Type declaration: - -▸ (...`args`: InputArgs): *Promise‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### getRefundedDeposits - -• **getRefundedDeposits**: *function* = proxyCall( - this.contract.methods.refundedDeposits, - tupleParser(stringIdentity), - valueToBigNumber - ) - -*Defined in [contractkit/src/wrappers/Governance.ts:488](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Governance.ts#L488)* - -Returns the value of proposal deposits that have been refunded. - -**`param`** Governance proposer address. - -#### Type declaration: - -▸ (...`args`: InputArgs): *Promise‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### getUpvoteRecord - -• **getUpvoteRecord**: *function* = proxyCall( - this.contract.methods.getUpvoteRecord, - tupleParser(identity), - (o) => ({ - proposalID: valueToBigNumber(o[0]), - upvotes: valueToBigNumber(o[1]), - }) - ) - -*Defined in [contractkit/src/wrappers/Governance.ts:448](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Governance.ts#L448)* - -Returns the current upvoted governance proposal ID and applied vote weight (zeroes if none). - -**`param`** Address of upvoter - -#### Type declaration: - -▸ (`upvoter`: Address): *Promise‹[UpvoteRecord](../interfaces/_wrappers_governance_.upvoterecord.md)›* - -**Parameters:** - -Name | Type | ------- | ------ | -`upvoter` | Address | - -___ - -### getUpvotes - -• **getUpvotes**: *function* = proxyCall( - this.contract.methods.getUpvotes, - tupleParser(valueToString), - valueToBigNumber - ) - -*Defined in [contractkit/src/wrappers/Governance.ts:498](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Governance.ts#L498)* - -#### Type declaration: - -▸ (...`args`: InputArgs): *Promise‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### getVotes - -• **getVotes**: *function* = proxyCall( - this.contract.methods.getVoteTotals, - tupleParser(valueToString), - (res): Votes => ({ - [VoteValue.Yes]: valueToBigNumber(res[0]), - [VoteValue.No]: valueToBigNumber(res[1]), - [VoteValue.Abstain]: valueToBigNumber(res[2]), - }) - ) - -*Defined in [contractkit/src/wrappers/Governance.ts:508](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Governance.ts#L508)* - -Returns the yes, no, and abstain votes applied to a given proposal. - -**`param`** Governance proposal UUID - -#### Type declaration: - -▸ (...`args`: InputArgs): *Promise‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### hotfixWhitelistValidatorTally - -• **hotfixWhitelistValidatorTally**: *function* = proxyCall( - this.contract.methods.hotfixWhitelistValidatorTally, - tupleParser(bufferToHex) - ) - -*Defined in [contractkit/src/wrappers/Governance.ts:779](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Governance.ts#L779)* - -Returns the number of validators that whitelisted the hotfix - -**`param`** keccak256 hash of hotfix's associated abi encoded transactions - -#### Type declaration: - -▸ (...`args`: InputArgs): *Promise‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### isApproved - -• **isApproved**: *function* = proxyCall( - this.contract.methods.isApproved, - tupleParser(valueToString) - ) - -*Defined in [contractkit/src/wrappers/Governance.ts:326](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Governance.ts#L326)* - -Returns whether a given proposal is approved. - -**`param`** Governance proposal UUID - -#### Type declaration: - -▸ (`proposalID`: BigNumber.Value): *Promise‹boolean›* - -**Parameters:** - -Name | Type | ------- | ------ | -`proposalID` | BigNumber.Value | - -___ - -### isDequeuedProposalExpired - -• **isDequeuedProposalExpired**: *function* = proxyCall( - this.contract.methods.isDequeuedProposalExpired, - tupleParser(valueToString) - ) - -*Defined in [contractkit/src/wrappers/Governance.ts:335](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Governance.ts#L335)* - -Returns whether a dequeued proposal is expired. - -**`param`** Governance proposal UUID - -#### Type declaration: - -▸ (`proposalID`: BigNumber.Value): *Promise‹boolean›* - -**Parameters:** - -Name | Type | ------- | ------ | -`proposalID` | BigNumber.Value | - -___ - -### isHotfixPassing - -• **isHotfixPassing**: *function* = proxyCall(this.contract.methods.isHotfixPassing, tupleParser(bufferToHex)) - -*Defined in [contractkit/src/wrappers/Governance.ts:764](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Governance.ts#L764)* - -Returns whether a given hotfix can be passed. - -**`param`** keccak256 hash of hotfix's associated abi encoded transactions - -#### Type declaration: - -▸ (...`args`: InputArgs): *Promise‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### isHotfixWhitelistedBy - -• **isHotfixWhitelistedBy**: *function* = proxyCall( - this.contract.methods.isHotfixWhitelistedBy, - tupleParser(bufferToHex, (s: Address) => identity
(s)) - ) - -*Defined in [contractkit/src/wrappers/Governance.ts:755](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Governance.ts#L755)* - -Returns whether a given hotfix has been whitelisted by a given address. - -**`param`** keccak256 hash of hotfix's associated abi encoded transactions - -**`param`** address of whitelister - -#### Type declaration: - -▸ (...`args`: InputArgs): *Promise‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### isProposalPassing - -• **isProposalPassing**: *function* = proxyCall(this.contract.methods.isProposalPassing, tupleParser(valueToString)) - -*Defined in [contractkit/src/wrappers/Governance.ts:421](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Governance.ts#L421)* - -Returns whether a given proposal is passing relative to the constitution's threshold. - -**`param`** Governance proposal UUID - -#### Type declaration: - -▸ (...`args`: InputArgs): *Promise‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### isQueued - -• **isQueued**: *function* = proxyCall(this.contract.methods.isQueued, tupleParser(valueToString)) - -*Defined in [contractkit/src/wrappers/Governance.ts:482](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Governance.ts#L482)* - -Returns whether a given proposal is queued. - -**`param`** Governance proposal UUID - -#### Type declaration: - -▸ (...`args`: InputArgs): *Promise‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### isQueuedProposalExpired - -• **isQueuedProposalExpired**: *function* = proxyCall( - this.contract.methods.isQueuedProposalExpired, - tupleParser(valueToString) - ) - -*Defined in [contractkit/src/wrappers/Governance.ts:344](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Governance.ts#L344)* - -Returns whether a dequeued proposal is expired. - -**`param`** Governance proposal UUID - -#### Type declaration: - -▸ (...`args`: InputArgs): *Promise‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### isVoting - -• **isVoting**: *function* = proxyCall(this.contract.methods.isVoting) - -*Defined in [contractkit/src/wrappers/Governance.ts:227](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Governance.ts#L227)* - -Returns whether or not a particular account is voting on proposals. - -**`param`** The address of the account. - -**`returns`** Whether or not the account is voting on proposals. - -#### Type declaration: - -▸ (`account`: string): *Promise‹boolean›* - -**Parameters:** - -Name | Type | ------- | ------ | -`account` | string | - -___ - -### lastDequeue - -• **lastDequeue**: *function* = proxyCall(this.contract.methods.lastDequeue, undefined, valueToBigNumber) - -*Defined in [contractkit/src/wrappers/Governance.ts:154](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Governance.ts#L154)* - -Query proposal dequeue frequency. - -**`returns`** Current proposal dequeue frequency in seconds. - -#### Type declaration: - -▸ (...`args`: InputArgs): *Promise‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### methodIds - -• **methodIds**: *Record‹keyof T["methods"], string›* = Object.keys(this.contract.methods).reduce, string>>( - (acc, method: Methods) => { - const methodABI = this.contract.options.jsonInterface.find((item) => item.name === method) - - acc[method] = - methodABI === undefined - ? '0x' - : this.kit.connection.getAbiCoder().encodeFunctionSignature(methodABI) - - return acc - }, - {} as any - ) - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[methodIds](_wrappers_basewrapper_.basewrapper.md#methodids)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:46](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L46)* - -___ - -### minDeposit - -• **minDeposit**: *function* = proxyCall(this.contract.methods.minDeposit, undefined, valueToBigNumber) - -*Defined in [contractkit/src/wrappers/Governance.ts:164](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Governance.ts#L164)* - -Query minimum deposit required to make a proposal. - -**`returns`** Current minimum deposit. - -#### Type declaration: - -▸ (...`args`: InputArgs): *Promise‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### minQuorumSize - -• **minQuorumSize**: *function* = proxyCall( - this.contract.methods.minQuorumSizeInCurrentSet, - undefined, - valueToBigNumber - ) - -*Defined in [contractkit/src/wrappers/Governance.ts:769](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Governance.ts#L769)* - -Returns the number of validators required to reach a Byzantine quorum - -#### Type declaration: - -▸ (...`args`: InputArgs): *Promise‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### prepareHotfix - -• **prepareHotfix**: *function* = proxySend(this.kit, this.contract.methods.prepareHotfix, tupleParser(bufferToHex)) - -*Defined in [contractkit/src/wrappers/Governance.ts:805](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Governance.ts#L805)* - -Marks the given hotfix prepared for current epoch if quorum of validators have whitelisted it. - -**`param`** keccak256 hash of hotfix's associated abi encoded transactions - -#### Type declaration: - -▸ (...`args`: InputArgs): *CeloTransactionObject‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### proposalExists - -• **proposalExists**: *function* = proxyCall( - this.contract.methods.proposalExists, - tupleParser(valueToString) - ) - -*Defined in [contractkit/src/wrappers/Governance.ts:439](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Governance.ts#L439)* - -Returns whether a governance proposal exists with the given ID. - -**`param`** Governance proposal UUID - -#### Type declaration: - -▸ (`proposalID`: BigNumber.Value): *Promise‹boolean›* - -**Parameters:** - -Name | Type | ------- | ------ | -`proposalID` | BigNumber.Value | - -___ - -### propose - -• **propose**: *function* = proxySend(this.kit, this.contract.methods.propose, proposalToParams) - -*Defined in [contractkit/src/wrappers/Governance.ts:433](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Governance.ts#L433)* - -Submits a new governance proposal. - -**`param`** Governance proposal - -**`param`** A URL where further information about the proposal can be viewed - -#### Type declaration: - -▸ (...`args`: InputArgs): *CeloTransactionObject‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### queueExpiry - -• **queueExpiry**: *function* = proxyCall(this.contract.methods.queueExpiry, undefined, valueToBigNumber) - -*Defined in [contractkit/src/wrappers/Governance.ts:169](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Governance.ts#L169)* - -Query queue expiry parameter. - -**`returns`** The number of seconds a proposal can stay in the queue before expiring. - -#### Type declaration: - -▸ (...`args`: InputArgs): *Promise‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### whitelistHotfix - -• **whitelistHotfix**: *function* = proxySend( - this.kit, - this.contract.methods.whitelistHotfix, - tupleParser(bufferToHex) - ) - -*Defined in [contractkit/src/wrappers/Governance.ts:788](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Governance.ts#L788)* - -Marks the given hotfix whitelisted by `sender`. - -**`param`** keccak256 hash of hotfix's associated abi encoded transactions - -#### Type declaration: - -▸ (...`args`: InputArgs): *CeloTransactionObject‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### withdraw - -• **withdraw**: *function* = proxySend(this.kit, this.contract.methods.withdraw) - -*Defined in [contractkit/src/wrappers/Governance.ts:426](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Governance.ts#L426)* - -Withdraws refunded proposal deposits. - -#### Type declaration: - -▸ (...`args`: InputArgs): *CeloTransactionObject‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -## Accessors - -### address - -• **get address**(): *string* - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[address](_wrappers_basewrapper_.basewrapper.md#address)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:30](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L30)* - -Contract address - -**Returns:** *string* - -## Methods - -### approve - -▸ **approve**(`proposalID`: BigNumber.Value): *Promise‹CeloTransactionObject‹boolean››* - -*Defined in [contractkit/src/wrappers/Governance.ts:692](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Governance.ts#L692)* - -Approves given proposal, allowing it to later move to `referendum`. - -**`notice`** Only the `approver` address will succeed in sending this transaction - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`proposalID` | BigNumber.Value | Governance proposal UUID | - -**Returns:** *Promise‹CeloTransactionObject‹boolean››* - -___ - -### execute - -▸ **execute**(`proposalID`: BigNumber.Value): *Promise‹CeloTransactionObject‹boolean››* - -*Defined in [contractkit/src/wrappers/Governance.ts:729](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Governance.ts#L729)* - -Executes a given proposal's associated transactions. - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`proposalID` | BigNumber.Value | Governance proposal UUID | - -**Returns:** *Promise‹CeloTransactionObject‹boolean››* - -___ - -### getConfig - -▸ **getConfig**(): *Promise‹[GovernanceConfig](../interfaces/_wrappers_governance_.governanceconfig.md)›* - -*Defined in [contractkit/src/wrappers/Governance.ts:232](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Governance.ts#L232)* - -Returns current configuration parameters. - -**Returns:** *Promise‹[GovernanceConfig](../interfaces/_wrappers_governance_.governanceconfig.md)›* - -___ - -### getConstitution - -▸ **getConstitution**(`proposal`: [Proposal](../modules/_wrappers_governance_.md#proposal)): *Promise‹BigNumber›* - -*Defined in [contractkit/src/wrappers/Governance.ts:200](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Governance.ts#L200)* - -Returns the required ratio of yes:no votes needed to exceed in order to pass the proposal. - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`proposal` | [Proposal](../modules/_wrappers_governance_.md#proposal) | Proposal to determine the constitution for running. | - -**Returns:** *Promise‹BigNumber›* - -___ - -### getDequeue - -▸ **getDequeue**(`filterZeroes`: boolean): *Promise‹BigNumber‹›[]›* - -*Defined in [contractkit/src/wrappers/Governance.ts:535](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Governance.ts#L535)* - -Returns the (existing) proposal dequeue as list of proposal IDs. - -**Parameters:** - -Name | Type | Default | ------- | ------ | ------ | -`filterZeroes` | boolean | false | - -**Returns:** *Promise‹BigNumber‹›[]›* - -___ - -### getHotfixRecord - -▸ **getHotfixRecord**(`hash`: Buffer): *Promise‹[HotfixRecord](../interfaces/_wrappers_governance_.hotfixrecord.md)›* - -*Defined in [contractkit/src/wrappers/Governance.ts:741](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Governance.ts#L741)* - -Returns approved, executed, and prepared status associated with a given hotfix. - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`hash` | Buffer | keccak256 hash of hotfix's associated abi encoded transactions | - -**Returns:** *Promise‹[HotfixRecord](../interfaces/_wrappers_governance_.hotfixrecord.md)›* - -___ - -### getHumanReadableConfig - -▸ **getHumanReadableConfig**(): *Promise‹object›* - -*Defined in [contractkit/src/wrappers/Governance.ts:255](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Governance.ts#L255)* - -**`dev`** Returns human readable configuration of the governance contract - -**Returns:** *Promise‹object›* - -GovernanceConfig object - -___ - -### getHumanReadableProposalMetadata - -▸ **getHumanReadableProposalMetadata**(`proposalID`: BigNumber.Value): *Promise‹object›* - -*Defined in [contractkit/src/wrappers/Governance.ts:296](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Governance.ts#L296)* - -Returns the human readable metadata associated with a given proposal. - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`proposalID` | BigNumber.Value | Governance proposal UUID | - -**Returns:** *Promise‹object›* - -___ - -### getParticipationParameters - -▸ **getParticipationParameters**(): *Promise‹[ParticipationParameters](../interfaces/_wrappers_governance_.participationparameters.md)›* - -*Defined in [contractkit/src/wrappers/Governance.ts:212](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Governance.ts#L212)* - -Returns the participation parameters. - -**Returns:** *Promise‹[ParticipationParameters](../interfaces/_wrappers_governance_.participationparameters.md)›* - -The participation parameters. - -___ - -### getPastEvents - -▸ **getPastEvents**(`event`: Events‹Governance›, `options`: PastEventOptions): *Promise‹EventLog[]›* - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[getPastEvents](_wrappers_basewrapper_.basewrapper.md#getpastevents)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:35](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L35)* - -Contract getPastEvents - -**Parameters:** - -Name | Type | ------- | ------ | -`event` | Events‹Governance› | -`options` | PastEventOptions | - -**Returns:** *Promise‹EventLog[]›* - -___ - -### getProposal - -▸ **getProposal**(`proposalID`: BigNumber.Value): *Promise‹[Proposal](../modules/_wrappers_governance_.md#proposal)›* - -*Defined in [contractkit/src/wrappers/Governance.ts:383](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Governance.ts#L383)* - -Returns the proposal associated with a given id. - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`proposalID` | BigNumber.Value | Governance proposal UUID | - -**Returns:** *Promise‹[Proposal](../modules/_wrappers_governance_.md#proposal)›* - -___ - -### getProposalRecord - -▸ **getProposalRecord**(`proposalID`: BigNumber.Value): *Promise‹[ProposalRecord](../interfaces/_wrappers_governance_.proposalrecord.md)›* - -*Defined in [contractkit/src/wrappers/Governance.ts:393](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Governance.ts#L393)* - -Returns the stage, metadata, upvotes, votes, and transactions associated with a given proposal. - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`proposalID` | BigNumber.Value | Governance proposal UUID | - -**Returns:** *Promise‹[ProposalRecord](../interfaces/_wrappers_governance_.proposalrecord.md)›* - -___ - -### getTransactionConstitution - -▸ **getTransactionConstitution**(`tx`: [ProposalTransaction](../modules/_wrappers_governance_.md#proposaltransaction)): *Promise‹BigNumber›* - -*Defined in [contractkit/src/wrappers/Governance.ts:187](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Governance.ts#L187)* - -Returns the required ratio of yes:no votes needed to exceed in order to pass the proposal transaction. - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`tx` | [ProposalTransaction](../modules/_wrappers_governance_.md#proposaltransaction) | Transaction to determine the constitution for running. | - -**Returns:** *Promise‹BigNumber›* - -___ - -### getVoteRecord - -▸ **getVoteRecord**(`voter`: Address, `proposalID`: BigNumber.Value): *Promise‹[VoteRecord](../interfaces/_wrappers_governance_.voterecord.md) | null›* - -*Defined in [contractkit/src/wrappers/Governance.ts:462](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Governance.ts#L462)* - -Returns the corresponding vote record - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`voter` | Address | Address of voter | -`proposalID` | BigNumber.Value | Governance proposal UUID | - -**Returns:** *Promise‹[VoteRecord](../interfaces/_wrappers_governance_.voterecord.md) | null›* - -___ - -### getVoteRecords - -▸ **getVoteRecords**(`voter`: Address): *Promise‹[VoteRecord](../interfaces/_wrappers_governance_.voterecord.md)[]›* - -*Defined in [contractkit/src/wrappers/Governance.ts:545](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Governance.ts#L545)* - -**Parameters:** - -Name | Type | ------- | ------ | -`voter` | Address | - -**Returns:** *Promise‹[VoteRecord](../interfaces/_wrappers_governance_.voterecord.md)[]›* - -___ - -### getVoteValue - -▸ **getVoteValue**(`proposalID`: BigNumber.Value, `voter`: Address): *Promise‹[VoteValue](../enums/_wrappers_governance_.votevalue.md)›* - -*Defined in [contractkit/src/wrappers/Governance.ts:719](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Governance.ts#L719)* - -Returns `voter`'s vote choice on a given proposal. - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`proposalID` | BigNumber.Value | Governance proposal UUID | -`voter` | Address | Address of voter | - -**Returns:** *Promise‹[VoteValue](../enums/_wrappers_governance_.votevalue.md)›* - -___ - -### getVoteWeight - -▸ **getVoteWeight**(`voter`: Address): *Promise‹BigNumber‹››* - -*Defined in [contractkit/src/wrappers/Governance.ts:576](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Governance.ts#L576)* - -Returns the number of votes that will be applied to a proposal for a given voter. - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`voter` | Address | Address of voter | - -**Returns:** *Promise‹BigNumber‹››* - -___ - -### getVoter - -▸ **getVoter**(`account`: Address): *Promise‹[Voter](../interfaces/_wrappers_governance_.voter.md)›* - -*Defined in [contractkit/src/wrappers/Governance.ts:554](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Governance.ts#L554)* - -**Parameters:** - -Name | Type | ------- | ------ | -`account` | Address | - -**Returns:** *Promise‹[Voter](../interfaces/_wrappers_governance_.voter.md)›* - -___ - -### humanReadableTimeUntilStages - -▸ **humanReadableTimeUntilStages**(`propoaslID`: BigNumber.Value): *Promise‹object›* - -*Defined in [contractkit/src/wrappers/Governance.ts:370](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Governance.ts#L370)* - -**Parameters:** - -Name | Type | ------- | ------ | -`propoaslID` | BigNumber.Value | - -**Returns:** *Promise‹object›* - -___ - -### revokeUpvote - -▸ **revokeUpvote**(`upvoter`: Address): *Promise‹CeloTransactionObject‹boolean››* - -*Defined in [contractkit/src/wrappers/Governance.ts:679](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Governance.ts#L679)* - -Revokes provided upvoter's upvote. - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`upvoter` | Address | Address of upvoter | - -**Returns:** *Promise‹CeloTransactionObject‹boolean››* - -___ - -### sortedQueue - -▸ **sortedQueue**(`queue`: [UpvoteRecord](../interfaces/_wrappers_governance_.upvoterecord.md)[]): *[UpvoteRecord](../interfaces/_wrappers_governance_.upvoterecord.md)[]* - -*Defined in [contractkit/src/wrappers/Governance.ts:617](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Governance.ts#L617)* - -**Parameters:** - -Name | Type | ------- | ------ | -`queue` | [UpvoteRecord](../interfaces/_wrappers_governance_.upvoterecord.md)[] | - -**Returns:** *[UpvoteRecord](../interfaces/_wrappers_governance_.upvoterecord.md)[]* - -___ - -### stageDurations - -▸ **stageDurations**(): *Promise‹[ProposalStageDurations](../interfaces/_wrappers_governance_.proposalstagedurations.md)›* - -*Defined in [contractkit/src/wrappers/Governance.ts:174](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Governance.ts#L174)* - -Query durations of different stages in proposal lifecycle. - -**Returns:** *Promise‹[ProposalStageDurations](../interfaces/_wrappers_governance_.proposalstagedurations.md)›* - -Durations for approval, referendum and execution stages in seconds. - -___ - -### timeUntilStages - -▸ **timeUntilStages**(`proposalID`: BigNumber.Value): *Promise‹object›* - -*Defined in [contractkit/src/wrappers/Governance.ts:360](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Governance.ts#L360)* - -**Parameters:** - -Name | Type | ------- | ------ | -`proposalID` | BigNumber.Value | - -**Returns:** *Promise‹object›* - -___ - -### upvote - -▸ **upvote**(`proposalID`: BigNumber.Value, `upvoter`: Address): *Promise‹CeloTransactionObject‹boolean››* - -*Defined in [contractkit/src/wrappers/Governance.ts:663](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Governance.ts#L663)* - -Applies provided upvoter's upvote to given proposal. - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`proposalID` | BigNumber.Value | Governance proposal UUID | -`upvoter` | Address | Address of upvoter | - -**Returns:** *Promise‹CeloTransactionObject‹boolean››* - -___ - -### vote - -▸ **vote**(`proposalID`: BigNumber.Value, `vote`: keyof typeof VoteValue): *Promise‹CeloTransactionObject‹boolean››* - -*Defined in [contractkit/src/wrappers/Governance.ts:705](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Governance.ts#L705)* - -Applies `sender`'s vote choice to a given proposal. - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`proposalID` | BigNumber.Value | Governance proposal UUID | -`vote` | keyof typeof VoteValue | Choice to apply (yes, no, abstain) | - -**Returns:** *Promise‹CeloTransactionObject‹boolean››* diff --git a/packages/docs/developer-resources/contractkit/reference/classes/_wrappers_lockedgold_.lockedgoldwrapper.md b/packages/docs/developer-resources/contractkit/reference/classes/_wrappers_lockedgold_.lockedgoldwrapper.md deleted file mode 100644 index 5f25d297221..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/classes/_wrappers_lockedgold_.lockedgoldwrapper.md +++ /dev/null @@ -1,482 +0,0 @@ -# Class: LockedGoldWrapper - -Contract for handling deposits needed for voting. - -## Hierarchy - -* [BaseWrapper](_wrappers_basewrapper_.basewrapper.md)‹LockedGold› - - ↳ **LockedGoldWrapper** - -## Index - -### Constructors - -* [constructor](_wrappers_lockedgold_.lockedgoldwrapper.md#constructor) - -### Properties - -* [_relock](_wrappers_lockedgold_.lockedgoldwrapper.md#_relock) -* [eventTypes](_wrappers_lockedgold_.lockedgoldwrapper.md#eventtypes) -* [events](_wrappers_lockedgold_.lockedgoldwrapper.md#events) -* [getAccountNonvotingLockedGold](_wrappers_lockedgold_.lockedgoldwrapper.md#getaccountnonvotinglockedgold) -* [getAccountTotalLockedGold](_wrappers_lockedgold_.lockedgoldwrapper.md#getaccounttotallockedgold) -* [getTotalLockedGold](_wrappers_lockedgold_.lockedgoldwrapper.md#gettotallockedgold) -* [lock](_wrappers_lockedgold_.lockedgoldwrapper.md#lock) -* [methodIds](_wrappers_lockedgold_.lockedgoldwrapper.md#methodids) -* [unlock](_wrappers_lockedgold_.lockedgoldwrapper.md#unlock) -* [withdraw](_wrappers_lockedgold_.lockedgoldwrapper.md#withdraw) - -### Accessors - -* [address](_wrappers_lockedgold_.lockedgoldwrapper.md#address) - -### Methods - -* [computeInitialParametersForSlashing](_wrappers_lockedgold_.lockedgoldwrapper.md#computeinitialparametersforslashing) -* [computeParametersForSlashing](_wrappers_lockedgold_.lockedgoldwrapper.md#computeparametersforslashing) -* [getAccountSummary](_wrappers_lockedgold_.lockedgoldwrapper.md#getaccountsummary) -* [getAccountsSlashed](_wrappers_lockedgold_.lockedgoldwrapper.md#getaccountsslashed) -* [getConfig](_wrappers_lockedgold_.lockedgoldwrapper.md#getconfig) -* [getHumanReadableConfig](_wrappers_lockedgold_.lockedgoldwrapper.md#gethumanreadableconfig) -* [getPastEvents](_wrappers_lockedgold_.lockedgoldwrapper.md#getpastevents) -* [getPendingWithdrawals](_wrappers_lockedgold_.lockedgoldwrapper.md#getpendingwithdrawals) -* [getPendingWithdrawalsTotalValue](_wrappers_lockedgold_.lockedgoldwrapper.md#getpendingwithdrawalstotalvalue) -* [relock](_wrappers_lockedgold_.lockedgoldwrapper.md#relock) - -## Constructors - -### constructor - -\+ **new LockedGoldWrapper**(`kit`: [ContractKit](_kit_.contractkit.md), `contract`: LockedGold): *[LockedGoldWrapper](_wrappers_lockedgold_.lockedgoldwrapper.md)* - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[constructor](_wrappers_basewrapper_.basewrapper.md#constructor)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:26](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L26)* - -**Parameters:** - -Name | Type | ------- | ------ | -`kit` | [ContractKit](_kit_.contractkit.md) | -`contract` | LockedGold | - -**Returns:** *[LockedGoldWrapper](_wrappers_lockedgold_.lockedgoldwrapper.md)* - -## Properties - -### _relock - -• **_relock**: *function* = proxySend( - this.kit, - this.contract.methods.relock, - tupleParser(valueToString, valueToString) - ) - -*Defined in [contractkit/src/wrappers/LockedGold.ts:144](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/LockedGold.ts#L144)* - -Relocks gold that has been unlocked but not withdrawn. - -**`param`** The index of the pending withdrawal to relock from. - -**`param`** The value to relock from the specified pending withdrawal. - -#### Type declaration: - -▸ (`index`: number, `value`: BigNumber.Value): *CeloTransactionObject‹void›* - -**Parameters:** - -Name | Type | ------- | ------ | -`index` | number | -`value` | BigNumber.Value | - -___ - -### eventTypes - -• **eventTypes**: *EventsEnum‹T›* = Object.keys(this.events).reduce>( - (acc, key) => ({ ...acc, [key]: key }), - {} as any - ) - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[eventTypes](_wrappers_basewrapper_.basewrapper.md#eventtypes)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:41](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L41)* - -___ - -### events - -• **events**: *LockedGold["events"]* = this.contract.events - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[events](_wrappers_basewrapper_.basewrapper.md#events)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:39](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L39)* - -___ - -### getAccountNonvotingLockedGold - -• **getAccountNonvotingLockedGold**: *function* = proxyCall( - this.contract.methods.getAccountNonvotingLockedGold, - undefined, - valueToBigNumber - ) - -*Defined in [contractkit/src/wrappers/LockedGold.ts:177](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/LockedGold.ts#L177)* - -Returns the total amount of non-voting locked gold for an account. - -**`param`** The account. - -**`returns`** The total amount of non-voting locked gold for an account. - -#### Type declaration: - -▸ (...`args`: InputArgs): *Promise‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### getAccountTotalLockedGold - -• **getAccountTotalLockedGold**: *function* = proxyCall( - this.contract.methods.getAccountTotalLockedGold, - undefined, - valueToBigNumber - ) - -*Defined in [contractkit/src/wrappers/LockedGold.ts:155](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/LockedGold.ts#L155)* - -Returns the total amount of locked gold for an account. - -**`param`** The account. - -**`returns`** The total amount of locked gold for an account. - -#### Type declaration: - -▸ (...`args`: InputArgs): *Promise‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### getTotalLockedGold - -• **getTotalLockedGold**: *function* = proxyCall( - this.contract.methods.getTotalLockedGold, - undefined, - valueToBigNumber - ) - -*Defined in [contractkit/src/wrappers/LockedGold.ts:166](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/LockedGold.ts#L166)* - -Returns the total amount of locked gold in the system. Note that this does not include - gold that has been unlocked but not yet withdrawn. - -**`returns`** The total amount of locked gold in the system. - -#### Type declaration: - -▸ (...`args`: InputArgs): *Promise‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### lock - -• **lock**: *function* = proxySend(this.kit, this.contract.methods.lock) - -*Defined in [contractkit/src/wrappers/LockedGold.ts:80](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/LockedGold.ts#L80)* - -Locks gold to be used for voting. -The gold to be locked, must be specified as the `tx.value` - -#### Type declaration: - -▸ (...`args`: InputArgs): *CeloTransactionObject‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### methodIds - -• **methodIds**: *Record‹keyof T["methods"], string›* = Object.keys(this.contract.methods).reduce, string>>( - (acc, method: Methods) => { - const methodABI = this.contract.options.jsonInterface.find((item) => item.name === method) - - acc[method] = - methodABI === undefined - ? '0x' - : this.kit.connection.getAbiCoder().encodeFunctionSignature(methodABI) - - return acc - }, - {} as any - ) - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[methodIds](_wrappers_basewrapper_.basewrapper.md#methodids)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:46](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L46)* - -___ - -### unlock - -• **unlock**: *function* = proxySend( - this.kit, - this.contract.methods.unlock, - tupleParser(valueToString) - ) - -*Defined in [contractkit/src/wrappers/LockedGold.ts:86](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/LockedGold.ts#L86)* - -Unlocks gold that becomes withdrawable after the unlocking period. - -**`param`** The amount of gold to unlock. - -#### Type declaration: - -▸ (`value`: BigNumber.Value): *CeloTransactionObject‹void›* - -**Parameters:** - -Name | Type | ------- | ------ | -`value` | BigNumber.Value | - -___ - -### withdraw - -• **withdraw**: *function* = proxySend( - this.kit, - this.contract.methods.withdraw - ) - -*Defined in [contractkit/src/wrappers/LockedGold.ts:71](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/LockedGold.ts#L71)* - -Withdraws a gold that has been unlocked after the unlocking period has passed. - -**`param`** The index of the pending withdrawal to withdraw. - -#### Type declaration: - -▸ (`index`: number): *CeloTransactionObject‹void›* - -**Parameters:** - -Name | Type | ------- | ------ | -`index` | number | - -## Accessors - -### address - -• **get address**(): *string* - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[address](_wrappers_basewrapper_.basewrapper.md#address)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:30](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L30)* - -Contract address - -**Returns:** *string* - -## Methods - -### computeInitialParametersForSlashing - -▸ **computeInitialParametersForSlashing**(`account`: string, `penalty`: BigNumber): *Promise‹object›* - -*Defined in [contractkit/src/wrappers/LockedGold.ts:264](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/LockedGold.ts#L264)* - -Computes parameters for slashing `penalty` from `account`. - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`account` | string | The account to slash. | -`penalty` | BigNumber | The amount to slash as penalty. | - -**Returns:** *Promise‹object›* - -List of (group, voting gold) to decrement from `account`. - -___ - -### computeParametersForSlashing - -▸ **computeParametersForSlashing**(`account`: string, `penalty`: BigNumber, `groups`: AddressListItem[]): *Promise‹object›* - -*Defined in [contractkit/src/wrappers/LockedGold.ts:271](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/LockedGold.ts#L271)* - -**Parameters:** - -Name | Type | ------- | ------ | -`account` | string | -`penalty` | BigNumber | -`groups` | AddressListItem[] | - -**Returns:** *Promise‹object›* - -___ - -### getAccountSummary - -▸ **getAccountSummary**(`account`: string): *Promise‹AccountSummary›* - -*Defined in [contractkit/src/wrappers/LockedGold.ts:205](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/LockedGold.ts#L205)* - -**Parameters:** - -Name | Type | ------- | ------ | -`account` | string | - -**Returns:** *Promise‹AccountSummary›* - -___ - -### getAccountsSlashed - -▸ **getAccountsSlashed**(`epochNumber`: number): *Promise‹[AccountSlashed](../interfaces/_wrappers_lockedgold_.accountslashed.md)[]›* - -*Defined in [contractkit/src/wrappers/LockedGold.ts:242](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/LockedGold.ts#L242)* - -Retrieves AccountSlashed for epochNumber. - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`epochNumber` | number | The epoch to retrieve AccountSlashed at. | - -**Returns:** *Promise‹[AccountSlashed](../interfaces/_wrappers_lockedgold_.accountslashed.md)[]›* - -___ - -### getConfig - -▸ **getConfig**(): *Promise‹[LockedGoldConfig](../interfaces/_wrappers_lockedgold_.lockedgoldconfig.md)›* - -*Defined in [contractkit/src/wrappers/LockedGold.ts:186](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/LockedGold.ts#L186)* - -Returns current configuration parameters. - -**Returns:** *Promise‹[LockedGoldConfig](../interfaces/_wrappers_lockedgold_.lockedgoldconfig.md)›* - -___ - -### getHumanReadableConfig - -▸ **getHumanReadableConfig**(): *Promise‹object›* - -*Defined in [contractkit/src/wrappers/LockedGold.ts:197](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/LockedGold.ts#L197)* - -**`dev`** Returns human readable configuration of the lockedgold contract - -**Returns:** *Promise‹object›* - -LockedGoldConfig object - -___ - -### getPastEvents - -▸ **getPastEvents**(`event`: Events‹LockedGold›, `options`: PastEventOptions): *Promise‹EventLog[]›* - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[getPastEvents](_wrappers_basewrapper_.basewrapper.md#getpastevents)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:35](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L35)* - -Contract getPastEvents - -**Parameters:** - -Name | Type | ------- | ------ | -`event` | Events‹LockedGold› | -`options` | PastEventOptions | - -**Returns:** *Promise‹EventLog[]›* - -___ - -### getPendingWithdrawals - -▸ **getPendingWithdrawals**(`account`: string): *Promise‹[PendingWithdrawal](../interfaces/_wrappers_lockedgold_.pendingwithdrawal.md)[]›* - -*Defined in [contractkit/src/wrappers/LockedGold.ts:226](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/LockedGold.ts#L226)* - -Returns the pending withdrawals from unlocked gold for an account. - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`account` | string | The address of the account. | - -**Returns:** *Promise‹[PendingWithdrawal](../interfaces/_wrappers_lockedgold_.pendingwithdrawal.md)[]›* - -The value and timestamp for each pending withdrawal. - -___ - -### getPendingWithdrawalsTotalValue - -▸ **getPendingWithdrawalsTotalValue**(`account`: Address): *Promise‹BigNumber‹››* - -*Defined in [contractkit/src/wrappers/LockedGold.ts:92](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/LockedGold.ts#L92)* - -**Parameters:** - -Name | Type | ------- | ------ | -`account` | Address | - -**Returns:** *Promise‹BigNumber‹››* - -___ - -### relock - -▸ **relock**(`account`: Address, `value`: BigNumber.Value): *Promise‹Array‹CeloTransactionObject‹void›››* - -*Defined in [contractkit/src/wrappers/LockedGold.ts:104](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/LockedGold.ts#L104)* - -Relocks gold that has been unlocked but not withdrawn. - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`account` | Address | - | -`value` | BigNumber.Value | The value to relock from pending withdrawals. | - -**Returns:** *Promise‹Array‹CeloTransactionObject‹void›››* diff --git a/packages/docs/developer-resources/contractkit/reference/classes/_wrappers_metatransactionwallet_.metatransactionwalletwrapper.md b/packages/docs/developer-resources/contractkit/reference/classes/_wrappers_metatransactionwallet_.metatransactionwalletwrapper.md deleted file mode 100644 index df0753292a4..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/classes/_wrappers_metatransactionwallet_.metatransactionwalletwrapper.md +++ /dev/null @@ -1,431 +0,0 @@ -# Class: MetaTransactionWalletWrapper - -Class that wraps the MetaTransactionWallet - -## Hierarchy - -* [BaseWrapper](_wrappers_basewrapper_.basewrapper.md)‹MetaTransactionWallet› - - ↳ **MetaTransactionWalletWrapper** - -## Index - -### Constructors - -* [constructor](_wrappers_metatransactionwallet_.metatransactionwalletwrapper.md#constructor) - -### Properties - -* [_chainId](_wrappers_metatransactionwallet_.metatransactionwalletwrapper.md#optional-_chainid) -* [_signer](_wrappers_metatransactionwallet_.metatransactionwalletwrapper.md#optional-_signer) -* [eip712DomainSeparator](_wrappers_metatransactionwallet_.metatransactionwalletwrapper.md#eip712domainseparator) -* [eventTypes](_wrappers_metatransactionwallet_.metatransactionwalletwrapper.md#eventtypes) -* [events](_wrappers_metatransactionwallet_.metatransactionwalletwrapper.md#events) -* [getMetaTransactionDigest](_wrappers_metatransactionwallet_.metatransactionwalletwrapper.md#getmetatransactiondigest) -* [getMetaTransactionSigner](_wrappers_metatransactionwallet_.metatransactionwalletwrapper.md#getmetatransactionsigner) -* [isOwner](_wrappers_metatransactionwallet_.metatransactionwalletwrapper.md#isowner) -* [methodIds](_wrappers_metatransactionwallet_.metatransactionwalletwrapper.md#methodids) -* [nonce](_wrappers_metatransactionwallet_.metatransactionwalletwrapper.md#nonce) -* [setEip712DomainSeparator](_wrappers_metatransactionwallet_.metatransactionwalletwrapper.md#seteip712domainseparator) -* [setSigner](_wrappers_metatransactionwallet_.metatransactionwalletwrapper.md#setsigner) -* [transferOwnership](_wrappers_metatransactionwallet_.metatransactionwalletwrapper.md#transferownership) - -### Accessors - -* [address](_wrappers_metatransactionwallet_.metatransactionwalletwrapper.md#address) - -### Methods - -* [executeMetaTransaction](_wrappers_metatransactionwallet_.metatransactionwalletwrapper.md#executemetatransaction) -* [executeTransaction](_wrappers_metatransactionwallet_.metatransactionwalletwrapper.md#executetransaction) -* [executeTransactions](_wrappers_metatransactionwallet_.metatransactionwalletwrapper.md#executetransactions) -* [getPastEvents](_wrappers_metatransactionwallet_.metatransactionwalletwrapper.md#getpastevents) -* [signAndExecuteMetaTransaction](_wrappers_metatransactionwallet_.metatransactionwalletwrapper.md#signandexecutemetatransaction) -* [signMetaTransaction](_wrappers_metatransactionwallet_.metatransactionwalletwrapper.md#signmetatransaction) -* [signer](_wrappers_metatransactionwallet_.metatransactionwalletwrapper.md#signer) - -## Constructors - -### constructor - -\+ **new MetaTransactionWalletWrapper**(`kit`: [ContractKit](_kit_.contractkit.md), `contract`: MetaTransactionWallet): *[MetaTransactionWalletWrapper](_wrappers_metatransactionwallet_.metatransactionwalletwrapper.md)* - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[constructor](_wrappers_basewrapper_.basewrapper.md#constructor)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:26](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L26)* - -**Parameters:** - -Name | Type | ------- | ------ | -`kit` | [ContractKit](_kit_.contractkit.md) | -`contract` | MetaTransactionWallet | - -**Returns:** *[MetaTransactionWalletWrapper](_wrappers_metatransactionwallet_.metatransactionwalletwrapper.md)* - -## Properties - -### `Optional` _chainId - -• **_chainId**? : *undefined | number* - -*Defined in [contractkit/src/wrappers/MetaTransactionWallet.ts:179](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/MetaTransactionWallet.ts#L179)* - -Get and cache the chain ID -- assume it's static for a kit instance - -**`returns`** chainId - -___ - -### `Optional` _signer - -• **_signer**? : *Address* - -*Defined in [contractkit/src/wrappers/MetaTransactionWallet.ts:192](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/MetaTransactionWallet.ts#L192)* - -Get an cache the signer - it should be static for a Wallet instance - -**`returns`** signer - -___ - -### eip712DomainSeparator - -• **eip712DomainSeparator**: *function* = proxyCall(this.contract.methods.eip712DomainSeparator) - -*Defined in [contractkit/src/wrappers/MetaTransactionWallet.ts:155](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/MetaTransactionWallet.ts#L155)* - -#### Type declaration: - -▸ (...`args`: InputArgs): *Promise‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### eventTypes - -• **eventTypes**: *EventsEnum‹T›* = Object.keys(this.events).reduce>( - (acc, key) => ({ ...acc, [key]: key }), - {} as any - ) - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[eventTypes](_wrappers_basewrapper_.basewrapper.md#eventtypes)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:41](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L41)* - -___ - -### events - -• **events**: *MetaTransactionWallet["events"]* = this.contract.events - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[events](_wrappers_basewrapper_.basewrapper.md#events)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:39](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L39)* - -___ - -### getMetaTransactionDigest - -• **getMetaTransactionDigest**: *function* = proxyCall( - this.contract.methods.getMetaTransactionDigest, - this.getMetaTransactionDigestParams, - stringIdentity - ) - -*Defined in [contractkit/src/wrappers/MetaTransactionWallet.ts:127](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/MetaTransactionWallet.ts#L127)* - -#### Type declaration: - -▸ (...`args`: InputArgs): *Promise‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### getMetaTransactionSigner - -• **getMetaTransactionSigner**: *function* = proxyCall( - this.contract.methods.getMetaTransactionSigner, - this.getMetaTransactionSignerParams, - stringIdentity - ) - -*Defined in [contractkit/src/wrappers/MetaTransactionWallet.ts:149](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/MetaTransactionWallet.ts#L149)* - -#### Type declaration: - -▸ (...`args`: InputArgs): *Promise‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### isOwner - -• **isOwner**: *function* = proxyCall(this.contract.methods.isOwner) - -*Defined in [contractkit/src/wrappers/MetaTransactionWallet.ts:156](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/MetaTransactionWallet.ts#L156)* - -#### Type declaration: - -▸ (...`args`: InputArgs): *Promise‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### methodIds - -• **methodIds**: *Record‹keyof T["methods"], string›* = Object.keys(this.contract.methods).reduce, string>>( - (acc, method: Methods) => { - const methodABI = this.contract.options.jsonInterface.find((item) => item.name === method) - - acc[method] = - methodABI === undefined - ? '0x' - : this.kit.connection.getAbiCoder().encodeFunctionSignature(methodABI) - - return acc - }, - {} as any - ) - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[methodIds](_wrappers_basewrapper_.basewrapper.md#methodids)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:46](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L46)* - -___ - -### nonce - -• **nonce**: *function* = proxyCall(this.contract.methods.nonce, undefined, valueToInt) - -*Defined in [contractkit/src/wrappers/MetaTransactionWallet.ts:157](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/MetaTransactionWallet.ts#L157)* - -#### Type declaration: - -▸ (...`args`: InputArgs): *Promise‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### setEip712DomainSeparator - -• **setEip712DomainSeparator**: *function* = proxySend( - this.kit, - this.contract.methods.setEip712DomainSeparator - ) - -*Defined in [contractkit/src/wrappers/MetaTransactionWallet.ts:170](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/MetaTransactionWallet.ts#L170)* - -#### Type declaration: - -▸ (): *CeloTransactionObject‹void›* - -___ - -### setSigner - -• **setSigner**: *function* = proxySend( - this.kit, - this.contract.methods.setSigner - ) - -*Defined in [contractkit/src/wrappers/MetaTransactionWallet.ts:165](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/MetaTransactionWallet.ts#L165)* - -#### Type declaration: - -▸ (`newSigner`: Address): *CeloTransactionObject‹void›* - -**Parameters:** - -Name | Type | ------- | ------ | -`newSigner` | Address | - -___ - -### transferOwnership - -• **transferOwnership**: *function* = proxySend( - this.kit, - this.contract.methods.transferOwnership - ) - -*Defined in [contractkit/src/wrappers/MetaTransactionWallet.ts:160](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/MetaTransactionWallet.ts#L160)* - -#### Type declaration: - -▸ (`newOwner`: Address): *CeloTransactionObject‹void›* - -**Parameters:** - -Name | Type | ------- | ------ | -`newOwner` | Address | - -## Accessors - -### address - -• **get address**(): *string* - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[address](_wrappers_basewrapper_.basewrapper.md#address)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:30](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L30)* - -Contract address - -**Returns:** *string* - -## Methods - -### executeMetaTransaction - -▸ **executeMetaTransaction**(`tx`: [TransactionInput](../modules/_wrappers_metatransactionwallet_.md#transactioninput)‹any›, `signature`: Signature): *CeloTransactionObject‹string›* - -*Defined in [contractkit/src/wrappers/MetaTransactionWallet.ts:68](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/MetaTransactionWallet.ts#L68)* - -Execute a signed meta transaction -Reverts if meta-tx signer is not a signer for the wallet - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`tx` | [TransactionInput](../modules/_wrappers_metatransactionwallet_.md#transactioninput)‹any› | a TransactionInput | -`signature` | Signature | a Signature | - -**Returns:** *CeloTransactionObject‹string›* - -___ - -### executeTransaction - -▸ **executeTransaction**(`tx`: [TransactionInput](../modules/_wrappers_metatransactionwallet_.md#transactioninput)‹any›): *CeloTransactionObject‹string›* - -*Defined in [contractkit/src/wrappers/MetaTransactionWallet.ts:38](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/MetaTransactionWallet.ts#L38)* - -Execute a transaction originating from the MTW -Reverts if the caller is not a signer - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`tx` | [TransactionInput](../modules/_wrappers_metatransactionwallet_.md#transactioninput)‹any› | a TransactionInput | - -**Returns:** *CeloTransactionObject‹string›* - -___ - -### executeTransactions - -▸ **executeTransactions**(`txs`: Array‹[TransactionInput](../modules/_wrappers_metatransactionwallet_.md#transactioninput)‹any››): *CeloTransactionObject‹object›* - -*Defined in [contractkit/src/wrappers/MetaTransactionWallet.ts:51](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/MetaTransactionWallet.ts#L51)* - -Execute a batch of transactions originating from the MTW -Reverts if the caller is not a signer - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`txs` | Array‹[TransactionInput](../modules/_wrappers_metatransactionwallet_.md#transactioninput)‹any›› | An array of TransactionInput | - -**Returns:** *CeloTransactionObject‹object›* - -___ - -### getPastEvents - -▸ **getPastEvents**(`event`: Events‹MetaTransactionWallet›, `options`: PastEventOptions): *Promise‹EventLog[]›* - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[getPastEvents](_wrappers_basewrapper_.basewrapper.md#getpastevents)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:35](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L35)* - -Contract getPastEvents - -**Parameters:** - -Name | Type | ------- | ------ | -`event` | Events‹MetaTransactionWallet› | -`options` | PastEventOptions | - -**Returns:** *Promise‹EventLog[]›* - -___ - -### signAndExecuteMetaTransaction - -▸ **signAndExecuteMetaTransaction**(`tx`: [TransactionInput](../modules/_wrappers_metatransactionwallet_.md#transactioninput)‹any›): *Promise‹CeloTransactionObject‹string››* - -*Defined in [contractkit/src/wrappers/MetaTransactionWallet.ts:112](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/MetaTransactionWallet.ts#L112)* - -Execute a signed meta transaction -Reverts if meta-tx signer is not a signer for the wallet - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`tx` | [TransactionInput](../modules/_wrappers_metatransactionwallet_.md#transactioninput)‹any› | a TransactionInput | - -**Returns:** *Promise‹CeloTransactionObject‹string››* - -___ - -### signMetaTransaction - -▸ **signMetaTransaction**(`tx`: [TransactionInput](../modules/_wrappers_metatransactionwallet_.md#transactioninput)‹any›, `nonce?`: undefined | number): *Promise‹Signature›* - -*Defined in [contractkit/src/wrappers/MetaTransactionWallet.ts:93](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/MetaTransactionWallet.ts#L93)* - -Signs a meta transaction as EIP712 typed data - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`tx` | [TransactionInput](../modules/_wrappers_metatransactionwallet_.md#transactioninput)‹any› | a TransactionWrapper | -`nonce?` | undefined | number | Optional -- will query contract state if not passed | - -**Returns:** *Promise‹Signature›* - -signature a Signature - -___ - -### signer - -▸ **signer**(): *Promise‹string›* - -*Defined in [contractkit/src/wrappers/MetaTransactionWallet.ts:193](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/MetaTransactionWallet.ts#L193)* - -**Returns:** *Promise‹string›* diff --git a/packages/docs/developer-resources/contractkit/reference/classes/_wrappers_metatransactionwalletdeployer_.metatransactionwalletdeployerwrapper.md b/packages/docs/developer-resources/contractkit/reference/classes/_wrappers_metatransactionwalletdeployer_.metatransactionwalletdeployerwrapper.md deleted file mode 100644 index 5455c53d7a0..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/classes/_wrappers_metatransactionwalletdeployer_.metatransactionwalletdeployerwrapper.md +++ /dev/null @@ -1,145 +0,0 @@ -# Class: MetaTransactionWalletDeployerWrapper - -## Hierarchy - -* [BaseWrapper](_wrappers_basewrapper_.basewrapper.md)‹MetaTransactionWalletDeployer› - - ↳ **MetaTransactionWalletDeployerWrapper** - -## Index - -### Constructors - -* [constructor](_wrappers_metatransactionwalletdeployer_.metatransactionwalletdeployerwrapper.md#constructor) - -### Properties - -* [deploy](_wrappers_metatransactionwalletdeployer_.metatransactionwalletdeployerwrapper.md#deploy) -* [eventTypes](_wrappers_metatransactionwalletdeployer_.metatransactionwalletdeployerwrapper.md#eventtypes) -* [events](_wrappers_metatransactionwalletdeployer_.metatransactionwalletdeployerwrapper.md#events) -* [methodIds](_wrappers_metatransactionwalletdeployer_.metatransactionwalletdeployerwrapper.md#methodids) - -### Accessors - -* [address](_wrappers_metatransactionwalletdeployer_.metatransactionwalletdeployerwrapper.md#address) - -### Methods - -* [getPastEvents](_wrappers_metatransactionwalletdeployer_.metatransactionwalletdeployerwrapper.md#getpastevents) - -## Constructors - -### constructor - -\+ **new MetaTransactionWalletDeployerWrapper**(`kit`: [ContractKit](_kit_.contractkit.md), `contract`: MetaTransactionWalletDeployer): *[MetaTransactionWalletDeployerWrapper](_wrappers_metatransactionwalletdeployer_.metatransactionwalletdeployerwrapper.md)* - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[constructor](_wrappers_basewrapper_.basewrapper.md#constructor)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:26](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L26)* - -**Parameters:** - -Name | Type | ------- | ------ | -`kit` | [ContractKit](_kit_.contractkit.md) | -`contract` | MetaTransactionWalletDeployer | - -**Returns:** *[MetaTransactionWalletDeployerWrapper](_wrappers_metatransactionwalletdeployer_.metatransactionwalletdeployerwrapper.md)* - -## Properties - -### deploy - -• **deploy**: *function* = proxySend(this.kit, this.contract.methods.deploy) - -*Defined in [contractkit/src/wrappers/MetaTransactionWalletDeployer.ts:7](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/MetaTransactionWalletDeployer.ts#L7)* - -#### Type declaration: - -▸ (...`args`: InputArgs): *CeloTransactionObject‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### eventTypes - -• **eventTypes**: *EventsEnum‹T›* = Object.keys(this.events).reduce>( - (acc, key) => ({ ...acc, [key]: key }), - {} as any - ) - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[eventTypes](_wrappers_basewrapper_.basewrapper.md#eventtypes)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:41](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L41)* - -___ - -### events - -• **events**: *MetaTransactionWalletDeployer["events"]* = this.contract.events - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[events](_wrappers_basewrapper_.basewrapper.md#events)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:39](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L39)* - -___ - -### methodIds - -• **methodIds**: *Record‹keyof T["methods"], string›* = Object.keys(this.contract.methods).reduce, string>>( - (acc, method: Methods) => { - const methodABI = this.contract.options.jsonInterface.find((item) => item.name === method) - - acc[method] = - methodABI === undefined - ? '0x' - : this.kit.connection.getAbiCoder().encodeFunctionSignature(methodABI) - - return acc - }, - {} as any - ) - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[methodIds](_wrappers_basewrapper_.basewrapper.md#methodids)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:46](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L46)* - -## Accessors - -### address - -• **get address**(): *string* - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[address](_wrappers_basewrapper_.basewrapper.md#address)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:30](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L30)* - -Contract address - -**Returns:** *string* - -## Methods - -### getPastEvents - -▸ **getPastEvents**(`event`: Events‹MetaTransactionWalletDeployer›, `options`: PastEventOptions): *Promise‹EventLog[]›* - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[getPastEvents](_wrappers_basewrapper_.basewrapper.md#getpastevents)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:35](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L35)* - -Contract getPastEvents - -**Parameters:** - -Name | Type | ------- | ------ | -`event` | Events‹MetaTransactionWalletDeployer› | -`options` | PastEventOptions | - -**Returns:** *Promise‹EventLog[]›* diff --git a/packages/docs/developer-resources/contractkit/reference/classes/_wrappers_multisig_.multisigwrapper.md b/packages/docs/developer-resources/contractkit/reference/classes/_wrappers_multisig_.multisigwrapper.md deleted file mode 100644 index 6f9a22d66ef..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/classes/_wrappers_multisig_.multisigwrapper.md +++ /dev/null @@ -1,302 +0,0 @@ -# Class: MultiSigWrapper - -Contract for handling multisig actions - -## Hierarchy - -* [BaseWrapper](_wrappers_basewrapper_.basewrapper.md)‹MultiSig› - - ↳ **MultiSigWrapper** - -## Index - -### Constructors - -* [constructor](_wrappers_multisig_.multisigwrapper.md#constructor) - -### Properties - -* [eventTypes](_wrappers_multisig_.multisigwrapper.md#eventtypes) -* [events](_wrappers_multisig_.multisigwrapper.md#events) -* [getInternalRequired](_wrappers_multisig_.multisigwrapper.md#getinternalrequired) -* [getOwners](_wrappers_multisig_.multisigwrapper.md#getowners) -* [getRequired](_wrappers_multisig_.multisigwrapper.md#getrequired) -* [getTransactionCount](_wrappers_multisig_.multisigwrapper.md#gettransactioncount) -* [isowner](_wrappers_multisig_.multisigwrapper.md#isowner) -* [methodIds](_wrappers_multisig_.multisigwrapper.md#methodids) -* [replaceOwner](_wrappers_multisig_.multisigwrapper.md#replaceowner) - -### Accessors - -* [address](_wrappers_multisig_.multisigwrapper.md#address) - -### Methods - -* [getPastEvents](_wrappers_multisig_.multisigwrapper.md#getpastevents) -* [getTransaction](_wrappers_multisig_.multisigwrapper.md#gettransaction) -* [getTransactions](_wrappers_multisig_.multisigwrapper.md#gettransactions) -* [submitOrConfirmTransaction](_wrappers_multisig_.multisigwrapper.md#submitorconfirmtransaction) - -## Constructors - -### constructor - -\+ **new MultiSigWrapper**(`kit`: [ContractKit](_kit_.contractkit.md), `contract`: MultiSig): *[MultiSigWrapper](_wrappers_multisig_.multisigwrapper.md)* - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[constructor](_wrappers_basewrapper_.basewrapper.md#constructor)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:26](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L26)* - -**Parameters:** - -Name | Type | ------- | ------ | -`kit` | [ContractKit](_kit_.contractkit.md) | -`contract` | MultiSig | - -**Returns:** *[MultiSigWrapper](_wrappers_multisig_.multisigwrapper.md)* - -## Properties - -### eventTypes - -• **eventTypes**: *EventsEnum‹T›* = Object.keys(this.events).reduce>( - (acc, key) => ({ ...acc, [key]: key }), - {} as any - ) - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[eventTypes](_wrappers_basewrapper_.basewrapper.md#eventtypes)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:41](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L41)* - -___ - -### events - -• **events**: *MultiSig["events"]* = this.contract.events - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[events](_wrappers_basewrapper_.basewrapper.md#events)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:39](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L39)* - -___ - -### getInternalRequired - -• **getInternalRequired**: *function* = proxyCall( - this.contract.methods.internalRequired, - undefined, - valueToBigNumber - ) - -*Defined in [contractkit/src/wrappers/MultiSig.ts:64](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/MultiSig.ts#L64)* - -#### Type declaration: - -▸ (...`args`: InputArgs): *Promise‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### getOwners - -• **getOwners**: *function* = proxyCall(this.contract.methods.getOwners) - -*Defined in [contractkit/src/wrappers/MultiSig.ts:62](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/MultiSig.ts#L62)* - -#### Type declaration: - -▸ (...`args`: InputArgs): *Promise‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### getRequired - -• **getRequired**: *function* = proxyCall(this.contract.methods.required, undefined, valueToBigNumber) - -*Defined in [contractkit/src/wrappers/MultiSig.ts:63](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/MultiSig.ts#L63)* - -#### Type declaration: - -▸ (...`args`: InputArgs): *Promise‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### getTransactionCount - -• **getTransactionCount**: *function* = proxyCall(this.contract.methods.transactionCount, undefined, valueToInt) - -*Defined in [contractkit/src/wrappers/MultiSig.ts:69](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/MultiSig.ts#L69)* - -#### Type declaration: - -▸ (...`args`: InputArgs): *Promise‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### isowner - -• **isowner**: *function* = proxyCall(this.contract.methods.isOwner) - -*Defined in [contractkit/src/wrappers/MultiSig.ts:61](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/MultiSig.ts#L61)* - -#### Type declaration: - -▸ (`owner`: Address): *Promise‹boolean›* - -**Parameters:** - -Name | Type | ------- | ------ | -`owner` | Address | - -___ - -### methodIds - -• **methodIds**: *Record‹keyof T["methods"], string›* = Object.keys(this.contract.methods).reduce, string>>( - (acc, method: Methods) => { - const methodABI = this.contract.options.jsonInterface.find((item) => item.name === method) - - acc[method] = - methodABI === undefined - ? '0x' - : this.kit.connection.getAbiCoder().encodeFunctionSignature(methodABI) - - return acc - }, - {} as any - ) - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[methodIds](_wrappers_basewrapper_.basewrapper.md#methodids)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:46](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L46)* - -___ - -### replaceOwner - -• **replaceOwner**: *function* = proxySend( - this.kit, - this.contract.methods.replaceOwner, - tupleParser(stringIdentity, stringIdentity) - ) - -*Defined in [contractkit/src/wrappers/MultiSig.ts:70](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/MultiSig.ts#L70)* - -#### Type declaration: - -▸ (`owner`: Address, `newOwner`: Address): *CeloTransactionObject‹void›* - -**Parameters:** - -Name | Type | ------- | ------ | -`owner` | Address | -`newOwner` | Address | - -## Accessors - -### address - -• **get address**(): *string* - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[address](_wrappers_basewrapper_.basewrapper.md#address)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:30](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L30)* - -Contract address - -**Returns:** *string* - -## Methods - -### getPastEvents - -▸ **getPastEvents**(`event`: Events‹MultiSig›, `options`: PastEventOptions): *Promise‹EventLog[]›* - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[getPastEvents](_wrappers_basewrapper_.basewrapper.md#getpastevents)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:35](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L35)* - -Contract getPastEvents - -**Parameters:** - -Name | Type | ------- | ------ | -`event` | Events‹MultiSig› | -`options` | PastEventOptions | - -**Returns:** *Promise‹EventLog[]›* - -___ - -### getTransaction - -▸ **getTransaction**(`i`: number): *Promise‹[TransactionData](../interfaces/_wrappers_multisig_.transactiondata.md)›* - -*Defined in [contractkit/src/wrappers/MultiSig.ts:76](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/MultiSig.ts#L76)* - -**Parameters:** - -Name | Type | ------- | ------ | -`i` | number | - -**Returns:** *Promise‹[TransactionData](../interfaces/_wrappers_multisig_.transactiondata.md)›* - -___ - -### getTransactions - -▸ **getTransactions**(): *Promise‹[TransactionData](../interfaces/_wrappers_multisig_.transactiondata.md)[]›* - -*Defined in [contractkit/src/wrappers/MultiSig.ts:95](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/MultiSig.ts#L95)* - -**Returns:** *Promise‹[TransactionData](../interfaces/_wrappers_multisig_.transactiondata.md)[]›* - -___ - -### submitOrConfirmTransaction - -▸ **submitOrConfirmTransaction**(`destination`: string, `txObject`: CeloTxObject‹any›, `value`: string): *Promise‹CeloTransactionObject‹void› | CeloTransactionObject‹string››* - -*Defined in [contractkit/src/wrappers/MultiSig.ts:33](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/MultiSig.ts#L33)* - -Allows an owner to submit and confirm a transaction. -If an unexecuted transaction matching `txObject` exists on the multisig, adds a confirmation to that tx ID. -Otherwise, submits the `txObject` to the multisig and add confirmation. - -**Parameters:** - -Name | Type | Default | ------- | ------ | ------ | -`destination` | string | - | -`txObject` | CeloTxObject‹any› | - | -`value` | string | "0" | - -**Returns:** *Promise‹CeloTransactionObject‹void› | CeloTransactionObject‹string››* diff --git a/packages/docs/developer-resources/contractkit/reference/classes/_wrappers_releasegold_.releasegoldwrapper.md b/packages/docs/developer-resources/contractkit/reference/classes/_wrappers_releasegold_.releasegoldwrapper.md deleted file mode 100644 index a2f70484057..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/classes/_wrappers_releasegold_.releasegoldwrapper.md +++ /dev/null @@ -1,1105 +0,0 @@ -# Class: ReleaseGoldWrapper - -Contract for handling an instance of a ReleaseGold contract. - -## Hierarchy - -* [BaseWrapper](_wrappers_basewrapper_.basewrapper.md)‹ReleaseGold› - - ↳ **ReleaseGoldWrapper** - -## Index - -### Constructors - -* [constructor](_wrappers_releasegold_.releasegoldwrapper.md#constructor) - -### Properties - -* [_relockGold](_wrappers_releasegold_.releasegoldwrapper.md#_relockgold) -* [createAccount](_wrappers_releasegold_.releasegoldwrapper.md#createaccount) -* [eventTypes](_wrappers_releasegold_.releasegoldwrapper.md#eventtypes) -* [events](_wrappers_releasegold_.releasegoldwrapper.md#events) -* [getBeneficiary](_wrappers_releasegold_.releasegoldwrapper.md#getbeneficiary) -* [getCanValidate](_wrappers_releasegold_.releasegoldwrapper.md#getcanvalidate) -* [getCanVote](_wrappers_releasegold_.releasegoldwrapper.md#getcanvote) -* [getCurrentReleasedTotalAmount](_wrappers_releasegold_.releasegoldwrapper.md#getcurrentreleasedtotalamount) -* [getLiquidityProvisionMet](_wrappers_releasegold_.releasegoldwrapper.md#getliquidityprovisionmet) -* [getMaxDistribution](_wrappers_releasegold_.releasegoldwrapper.md#getmaxdistribution) -* [getOwner](_wrappers_releasegold_.releasegoldwrapper.md#getowner) -* [getRefundAddress](_wrappers_releasegold_.releasegoldwrapper.md#getrefundaddress) -* [getReleaseOwner](_wrappers_releasegold_.releasegoldwrapper.md#getreleaseowner) -* [getRemainingLockedBalance](_wrappers_releasegold_.releasegoldwrapper.md#getremaininglockedbalance) -* [getRemainingTotalBalance](_wrappers_releasegold_.releasegoldwrapper.md#getremainingtotalbalance) -* [getRemainingUnlockedBalance](_wrappers_releasegold_.releasegoldwrapper.md#getremainingunlockedbalance) -* [getTotalBalance](_wrappers_releasegold_.releasegoldwrapper.md#gettotalbalance) -* [getTotalWithdrawn](_wrappers_releasegold_.releasegoldwrapper.md#gettotalwithdrawn) -* [isRevoked](_wrappers_releasegold_.releasegoldwrapper.md#isrevoked) -* [lockGold](_wrappers_releasegold_.releasegoldwrapper.md#lockgold) -* [methodIds](_wrappers_releasegold_.releasegoldwrapper.md#methodids) -* [refundAndFinalize](_wrappers_releasegold_.releasegoldwrapper.md#refundandfinalize) -* [revokeReleasing](_wrappers_releasegold_.releasegoldwrapper.md#revokereleasing) -* [setAccount](_wrappers_releasegold_.releasegoldwrapper.md#setaccount) -* [setAccountDataEncryptionKey](_wrappers_releasegold_.releasegoldwrapper.md#setaccountdataencryptionkey) -* [setAccountMetadataURL](_wrappers_releasegold_.releasegoldwrapper.md#setaccountmetadataurl) -* [setAccountName](_wrappers_releasegold_.releasegoldwrapper.md#setaccountname) -* [setAccountWalletAddress](_wrappers_releasegold_.releasegoldwrapper.md#setaccountwalletaddress) -* [setBeneficiary](_wrappers_releasegold_.releasegoldwrapper.md#setbeneficiary) -* [setCanExpire](_wrappers_releasegold_.releasegoldwrapper.md#setcanexpire) -* [setLiquidityProvision](_wrappers_releasegold_.releasegoldwrapper.md#setliquidityprovision) -* [setMaxDistribution](_wrappers_releasegold_.releasegoldwrapper.md#setmaxdistribution) -* [transfer](_wrappers_releasegold_.releasegoldwrapper.md#transfer) -* [unlockGold](_wrappers_releasegold_.releasegoldwrapper.md#unlockgold) -* [withdraw](_wrappers_releasegold_.releasegoldwrapper.md#withdraw) -* [withdrawLockedGold](_wrappers_releasegold_.releasegoldwrapper.md#withdrawlockedgold) - -### Accessors - -* [address](_wrappers_releasegold_.releasegoldwrapper.md#address) - -### Methods - -* [authorizeAttestationSigner](_wrappers_releasegold_.releasegoldwrapper.md#authorizeattestationsigner) -* [authorizeValidatorSigner](_wrappers_releasegold_.releasegoldwrapper.md#authorizevalidatorsigner) -* [authorizeValidatorSignerAndBls](_wrappers_releasegold_.releasegoldwrapper.md#authorizevalidatorsignerandbls) -* [authorizeVoteSigner](_wrappers_releasegold_.releasegoldwrapper.md#authorizevotesigner) -* [getHumanReadableReleaseSchedule](_wrappers_releasegold_.releasegoldwrapper.md#gethumanreadablereleaseschedule) -* [getPastEvents](_wrappers_releasegold_.releasegoldwrapper.md#getpastevents) -* [getReleaseSchedule](_wrappers_releasegold_.releasegoldwrapper.md#getreleaseschedule) -* [getReleasedBalanceAtRevoke](_wrappers_releasegold_.releasegoldwrapper.md#getreleasedbalanceatrevoke) -* [getRevocationInfo](_wrappers_releasegold_.releasegoldwrapper.md#getrevocationinfo) -* [getRevokeTime](_wrappers_releasegold_.releasegoldwrapper.md#getrevoketime) -* [isRevocable](_wrappers_releasegold_.releasegoldwrapper.md#isrevocable) -* [relockGold](_wrappers_releasegold_.releasegoldwrapper.md#relockgold) -* [revoke](_wrappers_releasegold_.releasegoldwrapper.md#revoke) -* [revokeActive](_wrappers_releasegold_.releasegoldwrapper.md#revokeactive) -* [revokePending](_wrappers_releasegold_.releasegoldwrapper.md#revokepending) - -## Constructors - -### constructor - -\+ **new ReleaseGoldWrapper**(`kit`: [ContractKit](_kit_.contractkit.md), `contract`: ReleaseGold): *[ReleaseGoldWrapper](_wrappers_releasegold_.releasegoldwrapper.md)* - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[constructor](_wrappers_basewrapper_.basewrapper.md#constructor)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:26](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L26)* - -**Parameters:** - -Name | Type | ------- | ------ | -`kit` | [ContractKit](_kit_.contractkit.md) | -`contract` | ReleaseGold | - -**Returns:** *[ReleaseGoldWrapper](_wrappers_releasegold_.releasegoldwrapper.md)* - -## Properties - -### _relockGold - -• **_relockGold**: *function* = proxySend( - this.kit, - this.contract.methods.relockGold, - tupleParser(valueToString, valueToString) - ) - -*Defined in [contractkit/src/wrappers/ReleaseGold.ts:358](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/ReleaseGold.ts#L358)* - -Relocks gold that has been unlocked but not withdrawn. - -**`param`** The index of the pending withdrawal to relock from. - -**`param`** The value to relock from the specified pending withdrawal. - -#### Type declaration: - -▸ (`index`: number, `value`: BigNumber.Value): *CeloTransactionObject‹void›* - -**Parameters:** - -Name | Type | ------- | ------ | -`index` | number | -`value` | BigNumber.Value | - -___ - -### createAccount - -• **createAccount**: *function* = proxySend(this.kit, this.contract.methods.createAccount) - -*Defined in [contractkit/src/wrappers/ReleaseGold.ts:387](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/ReleaseGold.ts#L387)* - -Beneficiary creates an account on behalf of the ReleaseGold contract. - -#### Type declaration: - -▸ (...`args`: InputArgs): *CeloTransactionObject‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### eventTypes - -• **eventTypes**: *EventsEnum‹T›* = Object.keys(this.events).reduce>( - (acc, key) => ({ ...acc, [key]: key }), - {} as any - ) - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[eventTypes](_wrappers_basewrapper_.basewrapper.md#eventtypes)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:41](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L41)* - -___ - -### events - -• **events**: *ReleaseGold["events"]* = this.contract.events - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[events](_wrappers_basewrapper_.basewrapper.md#events)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:39](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L39)* - -___ - -### getBeneficiary - -• **getBeneficiary**: *function* = proxyCall(this.contract.methods.beneficiary) - -*Defined in [contractkit/src/wrappers/ReleaseGold.ts:101](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/ReleaseGold.ts#L101)* - -Returns the beneficiary of the ReleaseGold contract - -**`returns`** The address of the beneficiary. - -#### Type declaration: - -▸ (): *Promise‹Address›* - -___ - -### getCanValidate - -• **getCanValidate**: *function* = proxyCall(this.contract.methods.canValidate) - -*Defined in [contractkit/src/wrappers/ReleaseGold.ts:133](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/ReleaseGold.ts#L133)* - -Returns true if the contract can validate - -**`returns`** If the contract can validate - -#### Type declaration: - -▸ (): *Promise‹boolean›* - -___ - -### getCanVote - -• **getCanVote**: *function* = proxyCall(this.contract.methods.canVote) - -*Defined in [contractkit/src/wrappers/ReleaseGold.ts:139](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/ReleaseGold.ts#L139)* - -Returns true if the contract can vote - -**`returns`** If the contract can vote - -#### Type declaration: - -▸ (): *Promise‹boolean›* - -___ - -### getCurrentReleasedTotalAmount - -• **getCurrentReleasedTotalAmount**: *function* = proxyCall( - this.contract.methods.getCurrentReleasedTotalAmount, - undefined, - valueToBigNumber - ) - -*Defined in [contractkit/src/wrappers/ReleaseGold.ts:265](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/ReleaseGold.ts#L265)* - -Returns the total amount that has already released up to now - -**`returns`** The already released gold amount up to the point of call - -#### Type declaration: - -▸ (): *Promise‹BigNumber›* - -___ - -### getLiquidityProvisionMet - -• **getLiquidityProvisionMet**: *function* = proxyCall( - this.contract.methods.liquidityProvisionMet - ) - -*Defined in [contractkit/src/wrappers/ReleaseGold.ts:125](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/ReleaseGold.ts#L125)* - -Returns true if the liquidity provision has been met for this contract - -**`returns`** If the liquidity provision is met. - -#### Type declaration: - -▸ (): *Promise‹boolean›* - -___ - -### getMaxDistribution - -• **getMaxDistribution**: *function* = proxyCall( - this.contract.methods.maxDistribution, - undefined, - valueToBigNumber - ) - -*Defined in [contractkit/src/wrappers/ReleaseGold.ts:156](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/ReleaseGold.ts#L156)* - -Returns the maximum amount of gold (regardless of release schedule) -currently allowed for release. - -**`returns`** The max amount of gold currently withdrawable. - -#### Type declaration: - -▸ (): *Promise‹BigNumber›* - -___ - -### getOwner - -• **getOwner**: *function* = proxyCall(this.contract.methods.owner) - -*Defined in [contractkit/src/wrappers/ReleaseGold.ts:119](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/ReleaseGold.ts#L119)* - -Returns the owner's address of the ReleaseGold contract - -**`returns`** The owner's address. - -#### Type declaration: - -▸ (): *Promise‹Address›* - -___ - -### getRefundAddress - -• **getRefundAddress**: *function* = proxyCall(this.contract.methods.refundAddress) - -*Defined in [contractkit/src/wrappers/ReleaseGold.ts:113](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/ReleaseGold.ts#L113)* - -Returns the refund address of the ReleaseGold contract - -**`returns`** The refundAddress. - -#### Type declaration: - -▸ (): *Promise‹Address›* - -___ - -### getReleaseOwner - -• **getReleaseOwner**: *function* = proxyCall(this.contract.methods.releaseOwner) - -*Defined in [contractkit/src/wrappers/ReleaseGold.ts:107](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/ReleaseGold.ts#L107)* - -Returns the releaseOwner address of the ReleaseGold contract - -**`returns`** The address of the releaseOwner. - -#### Type declaration: - -▸ (): *Promise‹Address›* - -___ - -### getRemainingLockedBalance - -• **getRemainingLockedBalance**: *function* = proxyCall( - this.contract.methods.getRemainingLockedBalance, - undefined, - valueToBigNumber - ) - -*Defined in [contractkit/src/wrappers/ReleaseGold.ts:255](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/ReleaseGold.ts#L255)* - -Returns the remaining locked gold balance in the ReleaseGold instance - -**`returns`** The remaining locked ReleaseGold instance gold balance - -#### Type declaration: - -▸ (): *Promise‹BigNumber›* - -___ - -### getRemainingTotalBalance - -• **getRemainingTotalBalance**: *function* = proxyCall( - this.contract.methods.getRemainingTotalBalance, - undefined, - valueToBigNumber - ) - -*Defined in [contractkit/src/wrappers/ReleaseGold.ts:235](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/ReleaseGold.ts#L235)* - -Returns the the sum of locked and unlocked gold in the ReleaseGold instance - -**`returns`** The remaining total ReleaseGold instance balance - -#### Type declaration: - -▸ (): *Promise‹BigNumber›* - -___ - -### getRemainingUnlockedBalance - -• **getRemainingUnlockedBalance**: *function* = proxyCall( - this.contract.methods.getRemainingUnlockedBalance, - undefined, - valueToBigNumber - ) - -*Defined in [contractkit/src/wrappers/ReleaseGold.ts:245](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/ReleaseGold.ts#L245)* - -Returns the remaining unlocked gold balance in the ReleaseGold instance - -**`returns`** The available unlocked ReleaseGold instance gold balance - -#### Type declaration: - -▸ (): *Promise‹BigNumber›* - -___ - -### getTotalBalance - -• **getTotalBalance**: *function* = proxyCall( - this.contract.methods.getTotalBalance, - undefined, - valueToBigNumber - ) - -*Defined in [contractkit/src/wrappers/ReleaseGold.ts:225](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/ReleaseGold.ts#L225)* - -Returns the total balance of the ReleaseGold instance - -**`returns`** The total ReleaseGold instance balance - -#### Type declaration: - -▸ (): *Promise‹BigNumber›* - -___ - -### getTotalWithdrawn - -• **getTotalWithdrawn**: *function* = proxyCall( - this.contract.methods.totalWithdrawn, - undefined, - valueToBigNumber - ) - -*Defined in [contractkit/src/wrappers/ReleaseGold.ts:145](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/ReleaseGold.ts#L145)* - -Returns the total withdrawn amount from the ReleaseGold contract - -**`returns`** The total withdrawn amount from the ReleaseGold contract - -#### Type declaration: - -▸ (): *Promise‹BigNumber›* - -___ - -### isRevoked - -• **isRevoked**: *function* = proxyCall(this.contract.methods.isRevoked) - -*Defined in [contractkit/src/wrappers/ReleaseGold.ts:201](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/ReleaseGold.ts#L201)* - -Indicates if the release grant is revoked or not - -**`returns`** A boolean indicating revoked releasing (true) or non-revoked(false). - -#### Type declaration: - -▸ (): *Promise‹boolean›* - -___ - -### lockGold - -• **lockGold**: *function* = proxySend( - this.kit, - this.contract.methods.lockGold, - tupleParser(valueToString) - ) - -*Defined in [contractkit/src/wrappers/ReleaseGold.ts:293](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/ReleaseGold.ts#L293)* - -Locks gold to be used for voting. - -**`param`** The amount of gold to lock - -#### Type declaration: - -▸ (`value`: BigNumber.Value): *CeloTransactionObject‹void›* - -**Parameters:** - -Name | Type | ------- | ------ | -`value` | BigNumber.Value | - -___ - -### methodIds - -• **methodIds**: *Record‹keyof T["methods"], string›* = Object.keys(this.contract.methods).reduce, string>>( - (acc, method: Methods) => { - const methodABI = this.contract.options.jsonInterface.find((item) => item.name === method) - - acc[method] = - methodABI === undefined - ? '0x' - : this.kit.connection.getAbiCoder().encodeFunctionSignature(methodABI) - - return acc - }, - {} as any - ) - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[methodIds](_wrappers_basewrapper_.basewrapper.md#methodids)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:46](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L46)* - -___ - -### refundAndFinalize - -• **refundAndFinalize**: *function* = proxySend( - this.kit, - this.contract.methods.refundAndFinalize - ) - -*Defined in [contractkit/src/wrappers/ReleaseGold.ts:284](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/ReleaseGold.ts#L284)* - -Refund `refundAddress` and `beneficiary` after the ReleaseGold schedule has been revoked. - -**`returns`** A CeloTransactionObject - -#### Type declaration: - -▸ (): *CeloTransactionObject‹void›* - -___ - -### revokeReleasing - -• **revokeReleasing**: *function* = proxySend( - this.kit, - this.contract.methods.revoke - ) - -*Defined in [contractkit/src/wrappers/ReleaseGold.ts:275](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/ReleaseGold.ts#L275)* - -Revoke a Release schedule - -**`returns`** A CeloTransactionObject - -#### Type declaration: - -▸ (): *CeloTransactionObject‹void›* - -___ - -### setAccount - -• **setAccount**: *function* = proxySend(this.kit, this.contract.methods.setAccount) - -*Defined in [contractkit/src/wrappers/ReleaseGold.ts:395](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/ReleaseGold.ts#L395)* - -Beneficiary creates an account on behalf of the ReleaseGold contract. - -**`param`** The name to set - -**`param`** The key to set - -**`param`** The address to set - -#### Type declaration: - -▸ (...`args`: InputArgs): *CeloTransactionObject‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### setAccountDataEncryptionKey - -• **setAccountDataEncryptionKey**: *function* = proxySend( - this.kit, - this.contract.methods.setAccountDataEncryptionKey - ) - -*Defined in [contractkit/src/wrappers/ReleaseGold.ts:419](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/ReleaseGold.ts#L419)* - -Sets the data encryption of the account - -**`param`** The key to set - -#### Type declaration: - -▸ (...`args`: InputArgs): *CeloTransactionObject‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### setAccountMetadataURL - -• **setAccountMetadataURL**: *function* = proxySend(this.kit, this.contract.methods.setAccountMetadataURL) - -*Defined in [contractkit/src/wrappers/ReleaseGold.ts:407](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/ReleaseGold.ts#L407)* - -Sets the metadataURL for the account - -**`param`** The url to set - -#### Type declaration: - -▸ (...`args`: InputArgs): *CeloTransactionObject‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### setAccountName - -• **setAccountName**: *function* = proxySend(this.kit, this.contract.methods.setAccountName) - -*Defined in [contractkit/src/wrappers/ReleaseGold.ts:401](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/ReleaseGold.ts#L401)* - -Sets the name for the account - -**`param`** The name to set - -#### Type declaration: - -▸ (...`args`: InputArgs): *CeloTransactionObject‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### setAccountWalletAddress - -• **setAccountWalletAddress**: *function* = proxySend(this.kit, this.contract.methods.setAccountWalletAddress) - -*Defined in [contractkit/src/wrappers/ReleaseGold.ts:413](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/ReleaseGold.ts#L413)* - -Sets the wallet address for the account - -**`param`** The address to set - -#### Type declaration: - -▸ (...`args`: InputArgs): *CeloTransactionObject‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### setBeneficiary - -• **setBeneficiary**: *function* = proxySend(this.kit, this.contract.methods.setBeneficiary) - -*Defined in [contractkit/src/wrappers/ReleaseGold.ts:443](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/ReleaseGold.ts#L443)* - -Sets the contract's beneficiary - -#### Type declaration: - -▸ (...`args`: InputArgs): *CeloTransactionObject‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### setCanExpire - -• **setCanExpire**: *function* = proxySend(this.kit, this.contract.methods.setCanExpire) - -*Defined in [contractkit/src/wrappers/ReleaseGold.ts:433](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/ReleaseGold.ts#L433)* - -Sets the contract's `canExpire` field to `_canExpire` - -**`param`** If the contract can expire `EXPIRATION_TIME` after the release schedule finishes. - -#### Type declaration: - -▸ (...`args`: InputArgs): *CeloTransactionObject‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### setLiquidityProvision - -• **setLiquidityProvision**: *function* = proxySend(this.kit, this.contract.methods.setLiquidityProvision) - -*Defined in [contractkit/src/wrappers/ReleaseGold.ts:427](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/ReleaseGold.ts#L427)* - -Sets the contract's liquidity provision to true - -#### Type declaration: - -▸ (...`args`: InputArgs): *CeloTransactionObject‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### setMaxDistribution - -• **setMaxDistribution**: *function* = proxySend(this.kit, this.contract.methods.setMaxDistribution) - -*Defined in [contractkit/src/wrappers/ReleaseGold.ts:438](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/ReleaseGold.ts#L438)* - -Sets the contract's max distribution - -#### Type declaration: - -▸ (...`args`: InputArgs): *CeloTransactionObject‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### transfer - -• **transfer**: *function* = proxySend( - this.kit, - this.contract.methods.transfer, - tupleParser(stringIdentity, valueToString) - ) - -*Defined in [contractkit/src/wrappers/ReleaseGold.ts:299](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/ReleaseGold.ts#L299)* - -#### Type declaration: - -▸ (`to`: Address, `value`: BigNumber.Value): *CeloTransactionObject‹void›* - -**Parameters:** - -Name | Type | ------- | ------ | -`to` | Address | -`value` | BigNumber.Value | - -___ - -### unlockGold - -• **unlockGold**: *function* = proxySend( - this.kit, - this.contract.methods.unlockGold, - tupleParser(valueToString) - ) - -*Defined in [contractkit/src/wrappers/ReleaseGold.ts:309](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/ReleaseGold.ts#L309)* - -Unlocks gold that becomes withdrawable after the unlocking period. - -**`param`** The amount of gold to unlock - -#### Type declaration: - -▸ (`value`: BigNumber.Value): *CeloTransactionObject‹void›* - -**Parameters:** - -Name | Type | ------- | ------ | -`value` | BigNumber.Value | - -___ - -### withdraw - -• **withdraw**: *function* = proxySend( - this.kit, - this.contract.methods.withdraw, - tupleParser(valueToString) - ) - -*Defined in [contractkit/src/wrappers/ReleaseGold.ts:378](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/ReleaseGold.ts#L378)* - -Transfer released gold from the ReleaseGold instance back to beneficiary. - -**`param`** The requested gold amount - -#### Type declaration: - -▸ (`value`: BigNumber.Value): *CeloTransactionObject‹void›* - -**Parameters:** - -Name | Type | ------- | ------ | -`value` | BigNumber.Value | - -___ - -### withdrawLockedGold - -• **withdrawLockedGold**: *function* = proxySend( - this.kit, - this.contract.methods.withdrawLockedGold, - tupleParser(valueToString) - ) - -*Defined in [contractkit/src/wrappers/ReleaseGold.ts:368](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/ReleaseGold.ts#L368)* - -Withdraw gold in the ReleaseGold instance that has been unlocked but not withdrawn. - -**`param`** The index of the pending locked gold withdrawal - -#### Type declaration: - -▸ (`index`: BigNumber.Value): *CeloTransactionObject‹void›* - -**Parameters:** - -Name | Type | ------- | ------ | -`index` | BigNumber.Value | - -## Accessors - -### address - -• **get address**(): *string* - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[address](_wrappers_basewrapper_.basewrapper.md#address)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:30](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L30)* - -Contract address - -**Returns:** *string* - -## Methods - -### authorizeAttestationSigner - -▸ **authorizeAttestationSigner**(`signer`: Address, `proofOfSigningKeyPossession`: Signature): *Promise‹CeloTransactionObject‹void››* - -*Defined in [contractkit/src/wrappers/ReleaseGold.ts:561](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/ReleaseGold.ts#L561)* - -Authorizes an address to sign attestation messages on behalf of the account. - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`signer` | Address | The address of the attestation signing key to authorize. | -`proofOfSigningKeyPossession` | Signature | The account address signed by the signer address. | - -**Returns:** *Promise‹CeloTransactionObject‹void››* - -A CeloTransactionObject - -___ - -### authorizeValidatorSigner - -▸ **authorizeValidatorSigner**(`signer`: Address, `proofOfSigningKeyPossession`: Signature): *Promise‹CeloTransactionObject‹void››* - -*Defined in [contractkit/src/wrappers/ReleaseGold.ts:472](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/ReleaseGold.ts#L472)* - -Authorizes an address to sign validation messages on behalf of the account. - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`signer` | Address | The address of the validator signing key to authorize. | -`proofOfSigningKeyPossession` | Signature | The account address signed by the signer address. | - -**Returns:** *Promise‹CeloTransactionObject‹void››* - -A CeloTransactionObject - -___ - -### authorizeValidatorSignerAndBls - -▸ **authorizeValidatorSignerAndBls**(`signer`: Address, `proofOfSigningKeyPossession`: Signature, `blsPublicKey`: string, `blsPop`: string): *Promise‹CeloTransactionObject‹void››* - -*Defined in [contractkit/src/wrappers/ReleaseGold.ts:523](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/ReleaseGold.ts#L523)* - -Authorizes an address to sign consensus messages on behalf of the contract's account. Also switch BLS key at the same time. - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`signer` | Address | The address of the signing key to authorize. | -`proofOfSigningKeyPossession` | Signature | The contract's account address signed by the signer address. | -`blsPublicKey` | string | The BLS public key that the validator is using for consensus, should pass proof of possession. 48 bytes. | -`blsPop` | string | The BLS public key proof-of-possession, which consists of a signature on the account address. 96 bytes. | - -**Returns:** *Promise‹CeloTransactionObject‹void››* - -A CeloTransactionObject - -___ - -### authorizeVoteSigner - -▸ **authorizeVoteSigner**(`signer`: Address, `proofOfSigningKeyPossession`: Signature): *Promise‹CeloTransactionObject‹void››* - -*Defined in [contractkit/src/wrappers/ReleaseGold.ts:451](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/ReleaseGold.ts#L451)* - -Authorizes an address to sign votes on behalf of the account. - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`signer` | Address | The address of the vote signing key to authorize. | -`proofOfSigningKeyPossession` | Signature | The account address signed by the signer address. | - -**Returns:** *Promise‹CeloTransactionObject‹void››* - -A CeloTransactionObject - -___ - -### getHumanReadableReleaseSchedule - -▸ **getHumanReadableReleaseSchedule**(): *Promise‹object›* - -*Defined in [contractkit/src/wrappers/ReleaseGold.ts:86](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/ReleaseGold.ts#L86)* - -Returns the underlying Release schedule of the ReleaseGold contract - -**Returns:** *Promise‹object›* - -A ReleaseSchedule. - -___ - -### getPastEvents - -▸ **getPastEvents**(`event`: Events‹ReleaseGold›, `options`: PastEventOptions): *Promise‹EventLog[]›* - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[getPastEvents](_wrappers_basewrapper_.basewrapper.md#getpastevents)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:35](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L35)* - -Contract getPastEvents - -**Parameters:** - -Name | Type | ------- | ------ | -`event` | Events‹ReleaseGold› | -`options` | PastEventOptions | - -**Returns:** *Promise‹EventLog[]›* - -___ - -### getReleaseSchedule - -▸ **getReleaseSchedule**(): *Promise‹ReleaseSchedule›* - -*Defined in [contractkit/src/wrappers/ReleaseGold.ts:70](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/ReleaseGold.ts#L70)* - -Returns the underlying Release schedule of the ReleaseGold contract - -**Returns:** *Promise‹ReleaseSchedule›* - -A ReleaseSchedule. - -___ - -### getReleasedBalanceAtRevoke - -▸ **getReleasedBalanceAtRevoke**(): *Promise‹string›* - -*Defined in [contractkit/src/wrappers/ReleaseGold.ts:216](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/ReleaseGold.ts#L216)* - -Returns the balance of released gold when the grant was revoked - -**Returns:** *Promise‹string›* - -The balance at revocation time. 0 can also indicate not revoked. - -___ - -### getRevocationInfo - -▸ **getRevocationInfo**(): *Promise‹RevocationInfo›* - -*Defined in [contractkit/src/wrappers/ReleaseGold.ts:166](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/ReleaseGold.ts#L166)* - -Returns the underlying Revocation Info of the ReleaseGold contract - -**Returns:** *Promise‹RevocationInfo›* - -A RevocationInfo struct. - -___ - -### getRevokeTime - -▸ **getRevokeTime**(): *Promise‹number›* - -*Defined in [contractkit/src/wrappers/ReleaseGold.ts:207](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/ReleaseGold.ts#L207)* - -Returns the time at which the release schedule was revoked - -**Returns:** *Promise‹number›* - -The timestamp of the release schedule revocation - -___ - -### isRevocable - -▸ **isRevocable**(): *Promise‹boolean›* - -*Defined in [contractkit/src/wrappers/ReleaseGold.ts:192](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/ReleaseGold.ts#L192)* - -Indicates if the release grant is revocable or not - -**Returns:** *Promise‹boolean›* - -A boolean indicating revocable releasing (true) or non-revocable(false). - -___ - -### relockGold - -▸ **relockGold**(`value`: BigNumber.Value): *Promise‹Array‹CeloTransactionObject‹void›››* - -*Defined in [contractkit/src/wrappers/ReleaseGold.ts:320](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/ReleaseGold.ts#L320)* - -Relocks gold in the ReleaseGold instance that has been unlocked but not withdrawn. - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`value` | BigNumber.Value | The value to relock from the specified pending withdrawal. | - -**Returns:** *Promise‹Array‹CeloTransactionObject‹void›››* - -___ - -### revoke - -▸ **revoke**(`account`: Address, `group`: Address, `value`: BigNumber): *Promise‹Array‹CeloTransactionObject‹void›››* - -*Defined in [contractkit/src/wrappers/ReleaseGold.ts:626](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/ReleaseGold.ts#L626)* - -**Parameters:** - -Name | Type | ------- | ------ | -`account` | Address | -`group` | Address | -`value` | BigNumber | - -**Returns:** *Promise‹Array‹CeloTransactionObject‹void›››* - -___ - -### revokeActive - -▸ **revokeActive**(`account`: Address, `group`: Address, `value`: BigNumber): *Promise‹CeloTransactionObject‹void››* - -*Defined in [contractkit/src/wrappers/ReleaseGold.ts:607](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/ReleaseGold.ts#L607)* - -Revokes active votes - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`account` | Address | The account to revoke from. | -`group` | Address | - | -`value` | BigNumber | The amount of gold to revoke. | - -**Returns:** *Promise‹CeloTransactionObject‹void››* - -___ - -### revokePending - -▸ **revokePending**(`account`: Address, `group`: Address, `value`: BigNumber): *Promise‹CeloTransactionObject‹void››* - -*Defined in [contractkit/src/wrappers/ReleaseGold.ts:582](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/ReleaseGold.ts#L582)* - -Revokes pending votes - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`account` | Address | The account to revoke from. | -`group` | Address | - | -`value` | BigNumber | The amount of gold to revoke. | - -**Returns:** *Promise‹CeloTransactionObject‹void››* diff --git a/packages/docs/developer-resources/contractkit/reference/classes/_wrappers_reserve_.reservewrapper.md b/packages/docs/developer-resources/contractkit/reference/classes/_wrappers_reserve_.reservewrapper.md deleted file mode 100644 index 8012693b9d3..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/classes/_wrappers_reserve_.reservewrapper.md +++ /dev/null @@ -1,389 +0,0 @@ -# Class: ReserveWrapper - -Contract for handling reserve for stable currencies - -## Hierarchy - -* [BaseWrapper](_wrappers_basewrapper_.basewrapper.md)‹Reserve› - - ↳ **ReserveWrapper** - -## Index - -### Constructors - -* [constructor](_wrappers_reserve_.reservewrapper.md#constructor) - -### Properties - -* [dailySpendingRatio](_wrappers_reserve_.reservewrapper.md#dailyspendingratio) -* [eventTypes](_wrappers_reserve_.reservewrapper.md#eventtypes) -* [events](_wrappers_reserve_.reservewrapper.md#events) -* [frozenReserveGoldDays](_wrappers_reserve_.reservewrapper.md#frozenreservegolddays) -* [frozenReserveGoldStartBalance](_wrappers_reserve_.reservewrapper.md#frozenreservegoldstartbalance) -* [frozenReserveGoldStartDay](_wrappers_reserve_.reservewrapper.md#frozenreservegoldstartday) -* [getOrComputeTobinTax](_wrappers_reserve_.reservewrapper.md#getorcomputetobintax) -* [getOtherReserveAddresses](_wrappers_reserve_.reservewrapper.md#getotherreserveaddresses) -* [getReserveGoldBalance](_wrappers_reserve_.reservewrapper.md#getreservegoldbalance) -* [isOtherReserveAddress](_wrappers_reserve_.reservewrapper.md#isotherreserveaddress) -* [isSpender](_wrappers_reserve_.reservewrapper.md#isspender) -* [methodIds](_wrappers_reserve_.reservewrapper.md#methodids) -* [tobinTaxStalenessThreshold](_wrappers_reserve_.reservewrapper.md#tobintaxstalenessthreshold) -* [transferGold](_wrappers_reserve_.reservewrapper.md#transfergold) - -### Accessors - -* [address](_wrappers_reserve_.reservewrapper.md#address) - -### Methods - -* [getConfig](_wrappers_reserve_.reservewrapper.md#getconfig) -* [getPastEvents](_wrappers_reserve_.reservewrapper.md#getpastevents) -* [getSpenders](_wrappers_reserve_.reservewrapper.md#getspenders) - -## Constructors - -### constructor - -\+ **new ReserveWrapper**(`kit`: [ContractKit](_kit_.contractkit.md), `contract`: Reserve): *[ReserveWrapper](_wrappers_reserve_.reservewrapper.md)* - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[constructor](_wrappers_basewrapper_.basewrapper.md#constructor)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:26](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L26)* - -**Parameters:** - -Name | Type | ------- | ------ | -`kit` | [ContractKit](_kit_.contractkit.md) | -`contract` | Reserve | - -**Returns:** *[ReserveWrapper](_wrappers_reserve_.reservewrapper.md)* - -## Properties - -### dailySpendingRatio - -• **dailySpendingRatio**: *function* = proxyCall( - this.contract.methods.getDailySpendingRatio, - undefined, - fixidityValueToBigNumber - ) - -*Defined in [contractkit/src/wrappers/Reserve.ts:33](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Reserve.ts#L33)* - -#### Type declaration: - -▸ (...`args`: InputArgs): *Promise‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### eventTypes - -• **eventTypes**: *EventsEnum‹T›* = Object.keys(this.events).reduce>( - (acc, key) => ({ ...acc, [key]: key }), - {} as any - ) - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[eventTypes](_wrappers_basewrapper_.basewrapper.md#eventtypes)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:41](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L41)* - -___ - -### events - -• **events**: *Reserve["events"]* = this.contract.events - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[events](_wrappers_basewrapper_.basewrapper.md#events)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:39](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L39)* - -___ - -### frozenReserveGoldDays - -• **frozenReserveGoldDays**: *function* = proxyCall( - this.contract.methods.frozenReserveGoldDays, - undefined, - valueToBigNumber - ) - -*Defined in [contractkit/src/wrappers/Reserve.ts:51](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Reserve.ts#L51)* - -#### Type declaration: - -▸ (...`args`: InputArgs): *Promise‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### frozenReserveGoldStartBalance - -• **frozenReserveGoldStartBalance**: *function* = proxyCall( - this.contract.methods.frozenReserveGoldStartBalance, - undefined, - valueToBigNumber - ) - -*Defined in [contractkit/src/wrappers/Reserve.ts:41](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Reserve.ts#L41)* - -#### Type declaration: - -▸ (...`args`: InputArgs): *Promise‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### frozenReserveGoldStartDay - -• **frozenReserveGoldStartDay**: *function* = proxyCall( - this.contract.methods.frozenReserveGoldStartDay, - undefined, - valueToBigNumber - ) - -*Defined in [contractkit/src/wrappers/Reserve.ts:46](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Reserve.ts#L46)* - -#### Type declaration: - -▸ (...`args`: InputArgs): *Promise‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### getOrComputeTobinTax - -• **getOrComputeTobinTax**: *function* = proxySend(this.kit, this.contract.methods.getOrComputeTobinTax) - -*Defined in [contractkit/src/wrappers/Reserve.ts:40](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Reserve.ts#L40)* - -#### Type declaration: - -▸ (...`args`: InputArgs): *CeloTransactionObject‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### getOtherReserveAddresses - -• **getOtherReserveAddresses**: *function* = proxyCall(this.contract.methods.getOtherReserveAddresses) - -*Defined in [contractkit/src/wrappers/Reserve.ts:61](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Reserve.ts#L61)* - -#### Type declaration: - -▸ (...`args`: InputArgs): *Promise‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### getReserveGoldBalance - -• **getReserveGoldBalance**: *function* = proxyCall( - this.contract.methods.getReserveGoldBalance, - undefined, - valueToBigNumber - ) - -*Defined in [contractkit/src/wrappers/Reserve.ts:56](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Reserve.ts#L56)* - -#### Type declaration: - -▸ (...`args`: InputArgs): *Promise‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### isOtherReserveAddress - -• **isOtherReserveAddress**: *function* = proxyCall(this.contract.methods.isOtherReserveAddress) - -*Defined in [contractkit/src/wrappers/Reserve.ts:76](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Reserve.ts#L76)* - -#### Type declaration: - -▸ (...`args`: InputArgs): *Promise‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### isSpender - -• **isSpender**: *function* = proxyCall(this.contract.methods.isSpender) - -*Defined in [contractkit/src/wrappers/Reserve.ts:38](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Reserve.ts#L38)* - -#### Type declaration: - -▸ (`account`: string): *Promise‹boolean›* - -**Parameters:** - -Name | Type | ------- | ------ | -`account` | string | - -___ - -### methodIds - -• **methodIds**: *Record‹keyof T["methods"], string›* = Object.keys(this.contract.methods).reduce, string>>( - (acc, method: Methods) => { - const methodABI = this.contract.options.jsonInterface.find((item) => item.name === method) - - acc[method] = - methodABI === undefined - ? '0x' - : this.kit.connection.getAbiCoder().encodeFunctionSignature(methodABI) - - return acc - }, - {} as any - ) - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[methodIds](_wrappers_basewrapper_.basewrapper.md#methodids)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:46](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L46)* - -___ - -### tobinTaxStalenessThreshold - -• **tobinTaxStalenessThreshold**: *function* = proxyCall( - this.contract.methods.tobinTaxStalenessThreshold, - undefined, - valueToBigNumber - ) - -*Defined in [contractkit/src/wrappers/Reserve.ts:28](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Reserve.ts#L28)* - -Query Tobin tax staleness threshold parameter. - -**`returns`** Current Tobin tax staleness threshold. - -#### Type declaration: - -▸ (...`args`: InputArgs): *Promise‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### transferGold - -• **transferGold**: *function* = proxySend(this.kit, this.contract.methods.transferGold) - -*Defined in [contractkit/src/wrappers/Reserve.ts:39](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Reserve.ts#L39)* - -#### Type declaration: - -▸ (...`args`: InputArgs): *CeloTransactionObject‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -## Accessors - -### address - -• **get address**(): *string* - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[address](_wrappers_basewrapper_.basewrapper.md#address)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:30](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L30)* - -Contract address - -**Returns:** *string* - -## Methods - -### getConfig - -▸ **getConfig**(): *Promise‹[ReserveConfig](../interfaces/_wrappers_reserve_.reserveconfig.md)›* - -*Defined in [contractkit/src/wrappers/Reserve.ts:66](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Reserve.ts#L66)* - -Returns current configuration parameters. - -**Returns:** *Promise‹[ReserveConfig](../interfaces/_wrappers_reserve_.reserveconfig.md)›* - -___ - -### getPastEvents - -▸ **getPastEvents**(`event`: Events‹Reserve›, `options`: PastEventOptions): *Promise‹EventLog[]›* - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[getPastEvents](_wrappers_basewrapper_.basewrapper.md#getpastevents)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:35](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L35)* - -Contract getPastEvents - -**Parameters:** - -Name | Type | ------- | ------ | -`event` | Events‹Reserve› | -`options` | PastEventOptions | - -**Returns:** *Promise‹EventLog[]›* - -___ - -### getSpenders - -▸ **getSpenders**(): *Promise‹Address[]›* - -*Defined in [contractkit/src/wrappers/Reserve.ts:78](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Reserve.ts#L78)* - -**Returns:** *Promise‹Address[]›* diff --git a/packages/docs/developer-resources/contractkit/reference/classes/_wrappers_sortedoracles_.sortedoracleswrapper.md b/packages/docs/developer-resources/contractkit/reference/classes/_wrappers_sortedoracles_.sortedoracleswrapper.md deleted file mode 100644 index ecc53181b4a..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/classes/_wrappers_sortedoracles_.sortedoracleswrapper.md +++ /dev/null @@ -1,443 +0,0 @@ -# Class: SortedOraclesWrapper - -Currency price oracle contract. - -## Hierarchy - -* [BaseWrapper](_wrappers_basewrapper_.basewrapper.md)‹SortedOracles› - - ↳ **SortedOraclesWrapper** - -## Index - -### Constructors - -* [constructor](_wrappers_sortedoracles_.sortedoracleswrapper.md#constructor) - -### Properties - -* [eventTypes](_wrappers_sortedoracles_.sortedoracleswrapper.md#eventtypes) -* [events](_wrappers_sortedoracles_.sortedoracleswrapper.md#events) -* [methodIds](_wrappers_sortedoracles_.sortedoracleswrapper.md#methodids) -* [reportExpirySeconds](_wrappers_sortedoracles_.sortedoracleswrapper.md#reportexpiryseconds) - -### Accessors - -* [address](_wrappers_sortedoracles_.sortedoracleswrapper.md#address) - -### Methods - -* [getConfig](_wrappers_sortedoracles_.sortedoracleswrapper.md#getconfig) -* [getHumanReadableConfig](_wrappers_sortedoracles_.sortedoracleswrapper.md#gethumanreadableconfig) -* [getOracles](_wrappers_sortedoracles_.sortedoracleswrapper.md#getoracles) -* [getPastEvents](_wrappers_sortedoracles_.sortedoracleswrapper.md#getpastevents) -* [getRates](_wrappers_sortedoracles_.sortedoracleswrapper.md#getrates) -* [getReports](_wrappers_sortedoracles_.sortedoracleswrapper.md#getreports) -* [getStableTokenRates](_wrappers_sortedoracles_.sortedoracleswrapper.md#getstabletokenrates) -* [getTimestamps](_wrappers_sortedoracles_.sortedoracleswrapper.md#gettimestamps) -* [getTokenReportExpirySeconds](_wrappers_sortedoracles_.sortedoracleswrapper.md#gettokenreportexpiryseconds) -* [isOldestReportExpired](_wrappers_sortedoracles_.sortedoracleswrapper.md#isoldestreportexpired) -* [isOracle](_wrappers_sortedoracles_.sortedoracleswrapper.md#isoracle) -* [medianRate](_wrappers_sortedoracles_.sortedoracleswrapper.md#medianrate) -* [numRates](_wrappers_sortedoracles_.sortedoracleswrapper.md#numrates) -* [removeExpiredReports](_wrappers_sortedoracles_.sortedoracleswrapper.md#removeexpiredreports) -* [report](_wrappers_sortedoracles_.sortedoracleswrapper.md#report) -* [reportStableToken](_wrappers_sortedoracles_.sortedoracleswrapper.md#reportstabletoken) - -## Constructors - -### constructor - -\+ **new SortedOraclesWrapper**(`kit`: [ContractKit](_kit_.contractkit.md), `contract`: SortedOracles): *[SortedOraclesWrapper](_wrappers_sortedoracles_.sortedoracleswrapper.md)* - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[constructor](_wrappers_basewrapper_.basewrapper.md#constructor)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:26](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L26)* - -**Parameters:** - -Name | Type | ------- | ------ | -`kit` | [ContractKit](_kit_.contractkit.md) | -`contract` | SortedOracles | - -**Returns:** *[SortedOraclesWrapper](_wrappers_sortedoracles_.sortedoracleswrapper.md)* - -## Properties - -### eventTypes - -• **eventTypes**: *EventsEnum‹T›* = Object.keys(this.events).reduce>( - (acc, key) => ({ ...acc, [key]: key }), - {} as any - ) - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[eventTypes](_wrappers_basewrapper_.basewrapper.md#eventtypes)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:41](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L41)* - -___ - -### events - -• **events**: *SortedOracles["events"]* = this.contract.events - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[events](_wrappers_basewrapper_.basewrapper.md#events)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:39](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L39)* - -___ - -### methodIds - -• **methodIds**: *Record‹keyof T["methods"], string›* = Object.keys(this.contract.methods).reduce, string>>( - (acc, method: Methods) => { - const methodABI = this.contract.options.jsonInterface.find((item) => item.name === method) - - acc[method] = - methodABI === undefined - ? '0x' - : this.kit.connection.getAbiCoder().encodeFunctionSignature(methodABI) - - return acc - }, - {} as any - ) - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[methodIds](_wrappers_basewrapper_.basewrapper.md#methodids)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:46](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L46)* - -___ - -### reportExpirySeconds - -• **reportExpirySeconds**: *function* = proxyCall( - this.contract.methods.reportExpirySeconds, - undefined, - valueToBigNumber - ) - -*Defined in [contractkit/src/wrappers/SortedOracles.ts:106](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/SortedOracles.ts#L106)* - -Returns the report expiry parameter. - -**`returns`** Current report expiry. - -#### Type declaration: - -▸ (...`args`: InputArgs): *Promise‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -## Accessors - -### address - -• **get address**(): *string* - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[address](_wrappers_basewrapper_.basewrapper.md#address)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:30](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L30)* - -Contract address - -**Returns:** *string* - -## Methods - -### getConfig - -▸ **getConfig**(): *Promise‹[SortedOraclesConfig](../interfaces/_wrappers_sortedoracles_.sortedoraclesconfig.md)›* - -*Defined in [contractkit/src/wrappers/SortedOracles.ts:194](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/SortedOracles.ts#L194)* - -Returns current configuration parameters. - -**Returns:** *Promise‹[SortedOraclesConfig](../interfaces/_wrappers_sortedoracles_.sortedoraclesconfig.md)›* - -___ - -### getHumanReadableConfig - -▸ **getHumanReadableConfig**(): *Promise‹object›* - -*Defined in [contractkit/src/wrappers/SortedOracles.ts:204](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/SortedOracles.ts#L204)* - -**`dev`** Returns human readable configuration of the sortedoracles contract - -**Returns:** *Promise‹object›* - -SortedOraclesConfig object - -___ - -### getOracles - -▸ **getOracles**(`target`: [ReportTarget](../modules/_wrappers_sortedoracles_.md#reporttarget)): *Promise‹Address[]›* - -*Defined in [contractkit/src/wrappers/SortedOracles.ts:97](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/SortedOracles.ts#L97)* - -Returns the list of whitelisted oracles for a given target - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`target` | [ReportTarget](../modules/_wrappers_sortedoracles_.md#reporttarget) | The ReportTarget, either CeloToken or currency pair | - -**Returns:** *Promise‹Address[]›* - -The list of whitelisted oracles for a given token. - -___ - -### getPastEvents - -▸ **getPastEvents**(`event`: Events‹SortedOracles›, `options`: PastEventOptions): *Promise‹EventLog[]›* - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[getPastEvents](_wrappers_basewrapper_.basewrapper.md#getpastevents)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:35](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L35)* - -Contract getPastEvents - -**Parameters:** - -Name | Type | ------- | ------ | -`event` | Events‹SortedOracles› | -`options` | PastEventOptions | - -**Returns:** *Promise‹EventLog[]›* - -___ - -### getRates - -▸ **getRates**(`target`: [ReportTarget](../modules/_wrappers_sortedoracles_.md#reporttarget)): *Promise‹[OracleRate](../interfaces/_wrappers_sortedoracles_.oraclerate.md)[]›* - -*Defined in [contractkit/src/wrappers/SortedOracles.ts:222](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/SortedOracles.ts#L222)* - -Gets all elements from the doubly linked list. - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`target` | [ReportTarget](../modules/_wrappers_sortedoracles_.md#reporttarget) | The ReportTarget, either CeloToken or currency pair in question | - -**Returns:** *Promise‹[OracleRate](../interfaces/_wrappers_sortedoracles_.oraclerate.md)[]›* - -An unpacked list of elements from largest to smallest. - -___ - -### getReports - -▸ **getReports**(`target`: [ReportTarget](../modules/_wrappers_sortedoracles_.md#reporttarget)): *Promise‹[OracleReport](../interfaces/_wrappers_sortedoracles_.oraclereport.md)[]›* - -*Defined in [contractkit/src/wrappers/SortedOracles.ts:257](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/SortedOracles.ts#L257)* - -**Parameters:** - -Name | Type | ------- | ------ | -`target` | [ReportTarget](../modules/_wrappers_sortedoracles_.md#reporttarget) | - -**Returns:** *Promise‹[OracleReport](../interfaces/_wrappers_sortedoracles_.oraclereport.md)[]›* - -___ - -### getStableTokenRates - -▸ **getStableTokenRates**(): *Promise‹[OracleRate](../interfaces/_wrappers_sortedoracles_.oraclerate.md)[]›* - -*Defined in [contractkit/src/wrappers/SortedOracles.ts:215](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/SortedOracles.ts#L215)* - -Helper function to get the rates for StableToken, by passing the address -of StableToken to `getRates`. - -**Returns:** *Promise‹[OracleRate](../interfaces/_wrappers_sortedoracles_.oraclerate.md)[]›* - -___ - -### getTimestamps - -▸ **getTimestamps**(`target`: [ReportTarget](../modules/_wrappers_sortedoracles_.md#reporttarget)): *Promise‹[OracleTimestamp](../interfaces/_wrappers_sortedoracles_.oracletimestamp.md)[]›* - -*Defined in [contractkit/src/wrappers/SortedOracles.ts:242](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/SortedOracles.ts#L242)* - -Gets all elements from the doubly linked list. - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`target` | [ReportTarget](../modules/_wrappers_sortedoracles_.md#reporttarget) | The ReportTarget, either CeloToken or currency pair in question | - -**Returns:** *Promise‹[OracleTimestamp](../interfaces/_wrappers_sortedoracles_.oracletimestamp.md)[]›* - -An unpacked list of elements from largest to smallest. - -___ - -### getTokenReportExpirySeconds - -▸ **getTokenReportExpirySeconds**(`target`: [ReportTarget](../modules/_wrappers_sortedoracles_.md#reporttarget)): *Promise‹BigNumber›* - -*Defined in [contractkit/src/wrappers/SortedOracles.ts:117](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/SortedOracles.ts#L117)* - -Returns the expiry for the target if exists, if not the default. - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`target` | [ReportTarget](../modules/_wrappers_sortedoracles_.md#reporttarget) | The ReportTarget, either CeloToken or currency pair | - -**Returns:** *Promise‹BigNumber›* - -The report expiry in seconds. - -___ - -### isOldestReportExpired - -▸ **isOldestReportExpired**(`target`: [ReportTarget](../modules/_wrappers_sortedoracles_.md#reporttarget)): *Promise‹[boolean, Address]›* - -*Defined in [contractkit/src/wrappers/SortedOracles.ts:127](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/SortedOracles.ts#L127)* - -Checks if the oldest report for a given target is expired - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`target` | [ReportTarget](../modules/_wrappers_sortedoracles_.md#reporttarget) | The ReportTarget, either CeloToken or currency pair | - -**Returns:** *Promise‹[boolean, Address]›* - -___ - -### isOracle - -▸ **isOracle**(`target`: [ReportTarget](../modules/_wrappers_sortedoracles_.md#reporttarget), `oracle`: Address): *Promise‹boolean›* - -*Defined in [contractkit/src/wrappers/SortedOracles.ts:87](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/SortedOracles.ts#L87)* - -Checks if the given address is whitelisted as an oracle for the target - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`target` | [ReportTarget](../modules/_wrappers_sortedoracles_.md#reporttarget) | The ReportTarget, either CeloToken or currency pair | -`oracle` | Address | The address that we're checking the oracle status of | - -**Returns:** *Promise‹boolean›* - -boolean describing whether this account is an oracle - -___ - -### medianRate - -▸ **medianRate**(`target`: [ReportTarget](../modules/_wrappers_sortedoracles_.md#reporttarget)): *Promise‹[MedianRate](../interfaces/_wrappers_sortedoracles_.medianrate.md)›* - -*Defined in [contractkit/src/wrappers/SortedOracles.ts:73](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/SortedOracles.ts#L73)* - -Returns the median rate for the given target - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`target` | [ReportTarget](../modules/_wrappers_sortedoracles_.md#reporttarget) | The ReportTarget, either CeloToken or currency pair | - -**Returns:** *Promise‹[MedianRate](../interfaces/_wrappers_sortedoracles_.medianrate.md)›* - -The median exchange rate for `token`, expressed as: - amount of that token / equivalent amount in CELO - -___ - -### numRates - -▸ **numRates**(`target`: [ReportTarget](../modules/_wrappers_sortedoracles_.md#reporttarget)): *Promise‹number›* - -*Defined in [contractkit/src/wrappers/SortedOracles.ts:61](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/SortedOracles.ts#L61)* - -Gets the number of rates that have been reported for the given target - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`target` | [ReportTarget](../modules/_wrappers_sortedoracles_.md#reporttarget) | The ReportTarget, either CeloToken or currency pair | - -**Returns:** *Promise‹number›* - -The number of reported oracle rates for `token`. - -___ - -### removeExpiredReports - -▸ **removeExpiredReports**(`target`: [ReportTarget](../modules/_wrappers_sortedoracles_.md#reporttarget), `numReports?`: undefined | number): *Promise‹CeloTransactionObject‹void››* - -*Defined in [contractkit/src/wrappers/SortedOracles.ts:140](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/SortedOracles.ts#L140)* - -Removes expired reports, if any exist - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`target` | [ReportTarget](../modules/_wrappers_sortedoracles_.md#reporttarget) | The ReportTarget, either CeloToken or currency pair | -`numReports?` | undefined | number | The upper-limit of reports to remove. For example, if there are 2 expired reports, and this param is 5, it will only remove the 2 that are expired. | - -**Returns:** *Promise‹CeloTransactionObject‹void››* - -___ - -### report - -▸ **report**(`target`: [ReportTarget](../modules/_wrappers_sortedoracles_.md#reporttarget), `value`: BigNumber.Value, `oracleAddress`: Address): *Promise‹CeloTransactionObject‹void››* - -*Defined in [contractkit/src/wrappers/SortedOracles.ts:159](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/SortedOracles.ts#L159)* - -Updates an oracle value and the median. - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`target` | [ReportTarget](../modules/_wrappers_sortedoracles_.md#reporttarget) | The ReportTarget, either CeloToken or currency pair | -`value` | BigNumber.Value | The amount of `token` equal to one CELO. | -`oracleAddress` | Address | - | - -**Returns:** *Promise‹CeloTransactionObject‹void››* - -___ - -### reportStableToken - -▸ **reportStableToken**(`value`: BigNumber.Value, `oracleAddress`: Address): *Promise‹CeloTransactionObject‹void››* - -*Defined in [contractkit/src/wrappers/SortedOracles.ts:184](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/SortedOracles.ts#L184)* - -Updates an oracle value and the median. - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`value` | BigNumber.Value | The amount of US Dollars equal to one CELO. | -`oracleAddress` | Address | - | - -**Returns:** *Promise‹CeloTransactionObject‹void››* diff --git a/packages/docs/developer-resources/contractkit/reference/classes/_wrappers_stabletokenwrapper_.stabletokenwrapper.md b/packages/docs/developer-resources/contractkit/reference/classes/_wrappers_stabletokenwrapper_.stabletokenwrapper.md deleted file mode 100644 index 23c30a5961d..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/classes/_wrappers_stabletokenwrapper_.stabletokenwrapper.md +++ /dev/null @@ -1,621 +0,0 @@ -# Class: StableTokenWrapper - -Stable token with variable supply (cUSD) - -## Hierarchy - -* [BaseWrapper](_wrappers_basewrapper_.basewrapper.md)‹StableToken› - - ↳ **StableTokenWrapper** - -## Index - -### Constructors - -* [constructor](_wrappers_stabletokenwrapper_.stabletokenwrapper.md#constructor) - -### Properties - -* [allowance](_wrappers_stabletokenwrapper_.stabletokenwrapper.md#allowance) -* [approve](_wrappers_stabletokenwrapper_.stabletokenwrapper.md#approve) -* [balanceOf](_wrappers_stabletokenwrapper_.stabletokenwrapper.md#balanceof) -* [burn](_wrappers_stabletokenwrapper_.stabletokenwrapper.md#burn) -* [decimals](_wrappers_stabletokenwrapper_.stabletokenwrapper.md#decimals) -* [decreaseAllowance](_wrappers_stabletokenwrapper_.stabletokenwrapper.md#decreaseallowance) -* [eventTypes](_wrappers_stabletokenwrapper_.stabletokenwrapper.md#eventtypes) -* [events](_wrappers_stabletokenwrapper_.stabletokenwrapper.md#events) -* [increaseAllowance](_wrappers_stabletokenwrapper_.stabletokenwrapper.md#increaseallowance) -* [methodIds](_wrappers_stabletokenwrapper_.stabletokenwrapper.md#methodids) -* [mint](_wrappers_stabletokenwrapper_.stabletokenwrapper.md#mint) -* [name](_wrappers_stabletokenwrapper_.stabletokenwrapper.md#name) -* [owner](_wrappers_stabletokenwrapper_.stabletokenwrapper.md#owner) -* [setInflationParameters](_wrappers_stabletokenwrapper_.stabletokenwrapper.md#setinflationparameters) -* [symbol](_wrappers_stabletokenwrapper_.stabletokenwrapper.md#symbol) -* [totalSupply](_wrappers_stabletokenwrapper_.stabletokenwrapper.md#totalsupply) -* [transfer](_wrappers_stabletokenwrapper_.stabletokenwrapper.md#transfer) -* [transferFrom](_wrappers_stabletokenwrapper_.stabletokenwrapper.md#transferfrom) -* [transferWithComment](_wrappers_stabletokenwrapper_.stabletokenwrapper.md#transferwithcomment) -* [unitsToValue](_wrappers_stabletokenwrapper_.stabletokenwrapper.md#unitstovalue) -* [valueToUnits](_wrappers_stabletokenwrapper_.stabletokenwrapper.md#valuetounits) - -### Accessors - -* [address](_wrappers_stabletokenwrapper_.stabletokenwrapper.md#address) - -### Methods - -* [getConfig](_wrappers_stabletokenwrapper_.stabletokenwrapper.md#getconfig) -* [getHumanReadableConfig](_wrappers_stabletokenwrapper_.stabletokenwrapper.md#gethumanreadableconfig) -* [getInflationParameters](_wrappers_stabletokenwrapper_.stabletokenwrapper.md#getinflationparameters) -* [getPastEvents](_wrappers_stabletokenwrapper_.stabletokenwrapper.md#getpastevents) - -## Constructors - -### constructor - -\+ **new StableTokenWrapper**(`kit`: [ContractKit](_kit_.contractkit.md), `contract`: StableToken): *[StableTokenWrapper](_wrappers_stabletokenwrapper_.stabletokenwrapper.md)* - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[constructor](_wrappers_basewrapper_.basewrapper.md#constructor)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:26](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L26)* - -**Parameters:** - -Name | Type | ------- | ------ | -`kit` | [ContractKit](_kit_.contractkit.md) | -`contract` | StableToken | - -**Returns:** *[StableTokenWrapper](_wrappers_stabletokenwrapper_.stabletokenwrapper.md)* - -## Properties - -### allowance - -• **allowance**: *function* = proxyCall(this.contract.methods.allowance, undefined, valueToBigNumber) - -*Defined in [contractkit/src/wrappers/StableTokenWrapper.ts:42](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/StableTokenWrapper.ts#L42)* - -Gets the amount of owner's StableToken allowed to be spent by spender. - -**`param`** The owner of the StableToken. - -**`param`** The spender of the StableToken. - -**`returns`** The amount of StableToken owner is allowing spender to spend. - -#### Type declaration: - -▸ (...`args`: InputArgs): *Promise‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### approve - -• **approve**: *function* = proxySend( - this.kit, - this.contract.methods.approve - ) - -*Defined in [contractkit/src/wrappers/StableTokenWrapper.ts:181](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/StableTokenWrapper.ts#L181)* - -Approve a user to transfer StableToken on behalf of another user. - -**`param`** The address which is being approved to spend StableToken. - -**`param`** The amount of StableToken approved to the spender. - -**`returns`** True if the transaction succeeds. - -#### Type declaration: - -▸ (`spender`: string, `value`: string | number): *CeloTransactionObject‹boolean›* - -**Parameters:** - -Name | Type | ------- | ------ | -`spender` | string | -`value` | string | number | - -___ - -### balanceOf - -• **balanceOf**: *function* = proxyCall( - this.contract.methods.balanceOf, - undefined, - valueToBigNumber - ) - -*Defined in [contractkit/src/wrappers/StableTokenWrapper.ts:70](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/StableTokenWrapper.ts#L70)* - -Gets the balance of the specified address using the presently stored inflation factor. - -**`param`** The address to query the balance of. - -**`returns`** The balance of the specified address. - -#### Type declaration: - -▸ (`owner`: string): *Promise‹BigNumber›* - -**Parameters:** - -Name | Type | ------- | ------ | -`owner` | string | - -___ - -### burn - -• **burn**: *function* = proxySend(this.kit, this.contract.methods.burn) - -*Defined in [contractkit/src/wrappers/StableTokenWrapper.ts:121](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/StableTokenWrapper.ts#L121)* - -#### Type declaration: - -▸ (...`args`: InputArgs): *CeloTransactionObject‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### decimals - -• **decimals**: *function* = proxyCall(this.contract.methods.decimals, undefined, valueToInt) - -*Defined in [contractkit/src/wrappers/StableTokenWrapper.ts:57](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/StableTokenWrapper.ts#L57)* - -**`returns`** The number of decimal places to which StableToken is divisible. - -#### Type declaration: - -▸ (...`args`: InputArgs): *Promise‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### decreaseAllowance - -• **decreaseAllowance**: *function* = proxySend(this.kit, this.contract.methods.decreaseAllowance) - -*Defined in [contractkit/src/wrappers/StableTokenWrapper.ts:119](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/StableTokenWrapper.ts#L119)* - -Decreases the allowance of another user. - -**`param`** The address which is being approved to spend StableToken. - -**`param`** The decrement of the amount of StableToken approved to the spender. - -**`returns`** true if success. - -#### Type declaration: - -▸ (...`args`: InputArgs): *CeloTransactionObject‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### eventTypes - -• **eventTypes**: *EventsEnum‹T›* = Object.keys(this.events).reduce>( - (acc, key) => ({ ...acc, [key]: key }), - {} as any - ) - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[eventTypes](_wrappers_basewrapper_.basewrapper.md#eventtypes)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:41](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L41)* - -___ - -### events - -• **events**: *StableToken["events"]* = this.contract.events - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[events](_wrappers_basewrapper_.basewrapper.md#events)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:39](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L39)* - -___ - -### increaseAllowance - -• **increaseAllowance**: *function* = proxySend( - this.kit, - this.contract.methods.increaseAllowance, - tupleParser(stringIdentity, valueToString) - ) - -*Defined in [contractkit/src/wrappers/StableTokenWrapper.ts:108](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/StableTokenWrapper.ts#L108)* - -Increases the allowance of another user. - -**`param`** The address which is being approved to spend StableToken. - -**`param`** The increment of the amount of StableToken approved to the spender. - -**`returns`** true if success. - -#### Type declaration: - -▸ (...`args`: InputArgs): *CeloTransactionObject‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### methodIds - -• **methodIds**: *Record‹keyof T["methods"], string›* = Object.keys(this.contract.methods).reduce, string>>( - (acc, method: Methods) => { - const methodABI = this.contract.options.jsonInterface.find((item) => item.name === method) - - acc[method] = - methodABI === undefined - ? '0x' - : this.kit.connection.getAbiCoder().encodeFunctionSignature(methodABI) - - return acc - }, - {} as any - ) - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[methodIds](_wrappers_basewrapper_.basewrapper.md#methodids)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:46](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L46)* - -___ - -### mint - -• **mint**: *function* = proxySend(this.kit, this.contract.methods.mint) - -*Defined in [contractkit/src/wrappers/StableTokenWrapper.ts:120](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/StableTokenWrapper.ts#L120)* - -#### Type declaration: - -▸ (...`args`: InputArgs): *CeloTransactionObject‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### name - -• **name**: *function* = proxyCall(this.contract.methods.name) - -*Defined in [contractkit/src/wrappers/StableTokenWrapper.ts:47](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/StableTokenWrapper.ts#L47)* - -**`returns`** The name of the stable token. - -#### Type declaration: - -▸ (): *Promise‹string›* - -___ - -### owner - -• **owner**: *function* = proxyCall(this.contract.methods.owner) - -*Defined in [contractkit/src/wrappers/StableTokenWrapper.ts:76](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/StableTokenWrapper.ts#L76)* - -#### Type declaration: - -▸ (...`args`: InputArgs): *Promise‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### setInflationParameters - -• **setInflationParameters**: *function* = proxySend(this.kit, this.contract.methods.setInflationParameters) - -*Defined in [contractkit/src/wrappers/StableTokenWrapper.ts:123](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/StableTokenWrapper.ts#L123)* - -#### Type declaration: - -▸ (...`args`: InputArgs): *CeloTransactionObject‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### symbol - -• **symbol**: *function* = proxyCall(this.contract.methods.symbol) - -*Defined in [contractkit/src/wrappers/StableTokenWrapper.ts:52](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/StableTokenWrapper.ts#L52)* - -**`returns`** The symbol of the stable token. - -#### Type declaration: - -▸ (): *Promise‹string›* - -___ - -### totalSupply - -• **totalSupply**: *function* = proxyCall(this.contract.methods.totalSupply, undefined, valueToBigNumber) - -*Defined in [contractkit/src/wrappers/StableTokenWrapper.ts:63](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/StableTokenWrapper.ts#L63)* - -Returns the total supply of the token, that is, the amount of tokens currently minted. - -**`returns`** Total supply. - -#### Type declaration: - -▸ (...`args`: InputArgs): *Promise‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### transfer - -• **transfer**: *function* = proxySend( - this.kit, - this.contract.methods.transfer - ) - -*Defined in [contractkit/src/wrappers/StableTokenWrapper.ts:208](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/StableTokenWrapper.ts#L208)* - -Transfers `value` from `msg.sender` to `to` - -**`param`** The address to transfer to. - -**`param`** The amount to be transferred. - -#### Type declaration: - -▸ (`to`: string, `value`: string | number): *CeloTransactionObject‹boolean›* - -**Parameters:** - -Name | Type | ------- | ------ | -`to` | string | -`value` | string | number | - -___ - -### transferFrom - -• **transferFrom**: *function* = proxySend(this.kit, this.contract.methods.transferFrom) - -*Defined in [contractkit/src/wrappers/StableTokenWrapper.ts:220](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/StableTokenWrapper.ts#L220)* - -Transfers StableToken from one address to another on behalf of a user. - -**`param`** The address to transfer StableToken from. - -**`param`** The address to transfer StableToken to. - -**`param`** The amount of StableToken to transfer. - -**`returns`** True if the transaction succeeds. - -#### Type declaration: - -▸ (`from`: string, `to`: string, `value`: string | number): *CeloTransactionObject‹boolean›* - -**Parameters:** - -Name | Type | ------- | ------ | -`from` | string | -`to` | string | -`value` | string | number | - -___ - -### transferWithComment - -• **transferWithComment**: *function* = proxySend( - this.kit, - this.contract.methods.transferWithComment - ) - -*Defined in [contractkit/src/wrappers/StableTokenWrapper.ts:193](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/StableTokenWrapper.ts#L193)* - -Transfer token for a specified address - -**`param`** The address to transfer to. - -**`param`** The amount to be transferred. - -**`param`** The transfer comment. - -**`returns`** True if the transaction succeeds. - -#### Type declaration: - -▸ (`to`: string, `value`: string | number, `comment`: string): *CeloTransactionObject‹boolean›* - -**Parameters:** - -Name | Type | ------- | ------ | -`to` | string | -`value` | string | number | -`comment` | string | - -___ - -### unitsToValue - -• **unitsToValue**: *function* = proxyCall( - this.contract.methods.unitsToValue, - tupleParser(valueToString), - valueToBigNumber - ) - -*Defined in [contractkit/src/wrappers/StableTokenWrapper.ts:96](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/StableTokenWrapper.ts#L96)* - -Returns the value of a given number of units given the current inflation factor. - -**`param`** The units to convert to value. - -**`returns`** The value corresponding to `units` given the current inflation factor. - -#### Type declaration: - -▸ (`units`: BigNumber.Value): *Promise‹BigNumber›* - -**Parameters:** - -Name | Type | ------- | ------ | -`units` | BigNumber.Value | - -___ - -### valueToUnits - -• **valueToUnits**: *function* = proxyCall( - this.contract.methods.valueToUnits, - tupleParser(valueToString), - valueToBigNumber - ) - -*Defined in [contractkit/src/wrappers/StableTokenWrapper.ts:85](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/StableTokenWrapper.ts#L85)* - -Returns the units for a given value given the current inflation factor. - -**`param`** The value to convert to units. - -**`returns`** The units corresponding to `value` given the current inflation factor. - -**`dev`** We don't compute the updated inflationFactor here because -we assume any function calling this will have updated the inflation factor. - -#### Type declaration: - -▸ (`value`: BigNumber.Value): *Promise‹BigNumber›* - -**Parameters:** - -Name | Type | ------- | ------ | -`value` | BigNumber.Value | - -## Accessors - -### address - -• **get address**(): *string* - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[address](_wrappers_basewrapper_.basewrapper.md#address)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:30](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L30)* - -Contract address - -**Returns:** *string* - -## Methods - -### getConfig - -▸ **getConfig**(): *Promise‹[StableTokenConfig](../interfaces/_wrappers_stabletokenwrapper_.stabletokenconfig.md)›* - -*Defined in [contractkit/src/wrappers/StableTokenWrapper.ts:142](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/StableTokenWrapper.ts#L142)* - -Returns current configuration parameters. - -**Returns:** *Promise‹[StableTokenConfig](../interfaces/_wrappers_stabletokenwrapper_.stabletokenconfig.md)›* - -___ - -### getHumanReadableConfig - -▸ **getHumanReadableConfig**(): *Promise‹object›* - -*Defined in [contractkit/src/wrappers/StableTokenWrapper.ts:161](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/StableTokenWrapper.ts#L161)* - -**`dev`** Returns human readable configuration of the stabletoken contract - -**Returns:** *Promise‹object›* - -StableTokenConfig object - -___ - -### getInflationParameters - -▸ **getInflationParameters**(): *Promise‹[InflationParameters](../interfaces/_wrappers_stabletokenwrapper_.inflationparameters.md)›* - -*Defined in [contractkit/src/wrappers/StableTokenWrapper.ts:129](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/StableTokenWrapper.ts#L129)* - -Querying the inflation parameters. - -**Returns:** *Promise‹[InflationParameters](../interfaces/_wrappers_stabletokenwrapper_.inflationparameters.md)›* - -Inflation rate, inflation factor, inflation update period and the last time factor was updated. - -___ - -### getPastEvents - -▸ **getPastEvents**(`event`: Events‹StableToken›, `options`: PastEventOptions): *Promise‹EventLog[]›* - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[getPastEvents](_wrappers_basewrapper_.basewrapper.md#getpastevents)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:35](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L35)* - -Contract getPastEvents - -**Parameters:** - -Name | Type | ------- | ------ | -`event` | Events‹StableToken› | -`options` | PastEventOptions | - -**Returns:** *Promise‹EventLog[]›* diff --git a/packages/docs/developer-resources/contractkit/reference/classes/_wrappers_validators_.validatorswrapper.md b/packages/docs/developer-resources/contractkit/reference/classes/_wrappers_validators_.validatorswrapper.md deleted file mode 100644 index 32413d1d5af..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/classes/_wrappers_validators_.validatorswrapper.md +++ /dev/null @@ -1,1082 +0,0 @@ -# Class: ValidatorsWrapper - -Contract for voting for validators and managing validator groups. - -## Hierarchy - -* [BaseWrapper](_wrappers_basewrapper_.basewrapper.md)‹Validators› - - ↳ **ValidatorsWrapper** - -## Index - -### Constructors - -* [constructor](_wrappers_validators_.validatorswrapper.md#constructor) - -### Properties - -* [affiliate](_wrappers_validators_.validatorswrapper.md#affiliate) -* [deaffiliate](_wrappers_validators_.validatorswrapper.md#deaffiliate) -* [eventTypes](_wrappers_validators_.validatorswrapper.md#eventtypes) -* [events](_wrappers_validators_.validatorswrapper.md#events) -* [forceDeaffiliateIfValidator](_wrappers_validators_.validatorswrapper.md#forcedeaffiliateifvalidator) -* [getAccountLockedGoldRequirement](_wrappers_validators_.validatorswrapper.md#getaccountlockedgoldrequirement) -* [getCommissionUpdateDelay](_wrappers_validators_.validatorswrapper.md#getcommissionupdatedelay) -* [getEpochNumber](_wrappers_validators_.validatorswrapper.md#getepochnumber) -* [getEpochSize](_wrappers_validators_.validatorswrapper.md#getepochsize) -* [getRegisteredValidatorGroupsAddresses](_wrappers_validators_.validatorswrapper.md#getregisteredvalidatorgroupsaddresses) -* [getSlashingMultiplierResetPeriod](_wrappers_validators_.validatorswrapper.md#getslashingmultiplierresetperiod) -* [getValidatorGroupSize](_wrappers_validators_.validatorswrapper.md#getvalidatorgroupsize) -* [getValidatorMembershipHistory](_wrappers_validators_.validatorswrapper.md#getvalidatormembershiphistory) -* [getValidatorMembershipHistoryExtraData](_wrappers_validators_.validatorswrapper.md#getvalidatormembershiphistoryextradata) -* [isValidator](_wrappers_validators_.validatorswrapper.md#isvalidator) -* [isValidatorGroup](_wrappers_validators_.validatorswrapper.md#isvalidatorgroup) -* [methodIds](_wrappers_validators_.validatorswrapper.md#methodids) -* [registerValidator](_wrappers_validators_.validatorswrapper.md#registervalidator) -* [removeMember](_wrappers_validators_.validatorswrapper.md#removemember) -* [resetSlashingMultiplier](_wrappers_validators_.validatorswrapper.md#resetslashingmultiplier) -* [setNextCommissionUpdate](_wrappers_validators_.validatorswrapper.md#setnextcommissionupdate) -* [updateBlsPublicKey](_wrappers_validators_.validatorswrapper.md#updateblspublickey) -* [updateCommission](_wrappers_validators_.validatorswrapper.md#updatecommission) - -### Accessors - -* [address](_wrappers_validators_.validatorswrapper.md#address) - -### Methods - -* [addMember](_wrappers_validators_.validatorswrapper.md#addmember) -* [currentSignerSet](_wrappers_validators_.validatorswrapper.md#currentsignerset) -* [currentValidatorAccountsSet](_wrappers_validators_.validatorswrapper.md#currentvalidatoraccountsset) -* [deregisterValidator](_wrappers_validators_.validatorswrapper.md#deregistervalidator) -* [deregisterValidatorGroup](_wrappers_validators_.validatorswrapper.md#deregistervalidatorgroup) -* [findValidatorMembershipHistoryIndex](_wrappers_validators_.validatorswrapper.md#findvalidatormembershiphistoryindex) -* [getConfig](_wrappers_validators_.validatorswrapper.md#getconfig) -* [getGroupLockedGoldRequirements](_wrappers_validators_.validatorswrapper.md#getgrouplockedgoldrequirements) -* [getHumanReadableConfig](_wrappers_validators_.validatorswrapper.md#gethumanreadableconfig) -* [getPastEvents](_wrappers_validators_.validatorswrapper.md#getpastevents) -* [getRegisteredValidatorGroups](_wrappers_validators_.validatorswrapper.md#getregisteredvalidatorgroups) -* [getRegisteredValidators](_wrappers_validators_.validatorswrapper.md#getregisteredvalidators) -* [getRegisteredValidatorsAddresses](_wrappers_validators_.validatorswrapper.md#getregisteredvalidatorsaddresses) -* [getValidator](_wrappers_validators_.validatorswrapper.md#getvalidator) -* [getValidatorFromSigner](_wrappers_validators_.validatorswrapper.md#getvalidatorfromsigner) -* [getValidatorGroup](_wrappers_validators_.validatorswrapper.md#getvalidatorgroup) -* [getValidatorLockedGoldRequirements](_wrappers_validators_.validatorswrapper.md#getvalidatorlockedgoldrequirements) -* [getValidatorMembershipHistoryIndex](_wrappers_validators_.validatorswrapper.md#getvalidatormembershiphistoryindex) -* [getValidatorRewards](_wrappers_validators_.validatorswrapper.md#getvalidatorrewards) -* [meetsValidatorBalanceRequirements](_wrappers_validators_.validatorswrapper.md#meetsvalidatorbalancerequirements) -* [meetsValidatorGroupBalanceRequirements](_wrappers_validators_.validatorswrapper.md#meetsvalidatorgroupbalancerequirements) -* [registerValidatorGroup](_wrappers_validators_.validatorswrapper.md#registervalidatorgroup) -* [reorderMember](_wrappers_validators_.validatorswrapper.md#reordermember) -* [signerToAccount](_wrappers_validators_.validatorswrapper.md#signertoaccount) -* [validatorSignerToAccount](_wrappers_validators_.validatorswrapper.md#validatorsignertoaccount) - -## Constructors - -### constructor - -\+ **new ValidatorsWrapper**(`kit`: [ContractKit](_kit_.contractkit.md), `contract`: Validators): *[ValidatorsWrapper](_wrappers_validators_.validatorswrapper.md)* - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[constructor](_wrappers_basewrapper_.basewrapper.md#constructor)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:26](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L26)* - -**Parameters:** - -Name | Type | ------- | ------ | -`kit` | [ContractKit](_kit_.contractkit.md) | -`contract` | Validators | - -**Returns:** *[ValidatorsWrapper](_wrappers_validators_.validatorswrapper.md)* - -## Properties - -### affiliate - -• **affiliate**: *function* = proxySend( - this.kit, - this.contract.methods.affiliate - ) - -*Defined in [contractkit/src/wrappers/Validators.ts:477](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L477)* - -Affiliates a validator with a group, allowing it to be added as a member. -De-affiliates with the previously affiliated group if present. - -**`param`** The validator group with which to affiliate. - -#### Type declaration: - -▸ (`group`: Address): *CeloTransactionObject‹boolean›* - -**Parameters:** - -Name | Type | ------- | ------ | -`group` | Address | - -___ - -### deaffiliate - -• **deaffiliate**: *function* = proxySend(this.kit, this.contract.methods.deaffiliate) - -*Defined in [contractkit/src/wrappers/Validators.ts:487](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L487)* - -De-affiliates a validator, removing it from the group for which it is a member. -Fails if the account is not a validator with non-zero affiliation. - -#### Type declaration: - -▸ (...`args`: InputArgs): *CeloTransactionObject‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### eventTypes - -• **eventTypes**: *EventsEnum‹T›* = Object.keys(this.events).reduce>( - (acc, key) => ({ ...acc, [key]: key }), - {} as any - ) - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[eventTypes](_wrappers_basewrapper_.basewrapper.md#eventtypes)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:41](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L41)* - -___ - -### events - -• **events**: *Validators["events"]* = this.contract.events - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[events](_wrappers_basewrapper_.basewrapper.md#events)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:39](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L39)* - -___ - -### forceDeaffiliateIfValidator - -• **forceDeaffiliateIfValidator**: *function* = proxySend( - this.kit, - this.contract.methods.forceDeaffiliateIfValidator - ) - -*Defined in [contractkit/src/wrappers/Validators.ts:493](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L493)* - -Removes a validator from the group for which it is a member. - -**`param`** The validator to deaffiliate from their affiliated validator group. - -#### Type declaration: - -▸ (...`args`: InputArgs): *CeloTransactionObject‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### getAccountLockedGoldRequirement - -• **getAccountLockedGoldRequirement**: *function* = proxyCall( - this.contract.methods.getAccountLockedGoldRequirement, - undefined, - valueToBigNumber - ) - -*Defined in [contractkit/src/wrappers/Validators.ts:128](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L128)* - -Returns the Locked Gold requirements for specific account. - -**`returns`** The Locked Gold requirements for a specific account. - -#### Type declaration: - -▸ (...`args`: InputArgs): *Promise‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### getCommissionUpdateDelay - -• **getCommissionUpdateDelay**: *function* = proxyCall( - this.contract.methods.commissionUpdateDelay, - undefined, - valueToBigNumber - ) - -*Defined in [contractkit/src/wrappers/Validators.ts:146](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L146)* - -Returns the update delay, in blocks, for the group commission. - -#### Type declaration: - -▸ (...`args`: InputArgs): *Promise‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### getEpochNumber - -• **getEpochNumber**: *function* = proxyCall(this.contract.methods.getEpochNumber, undefined, valueToBigNumber) - -*Defined in [contractkit/src/wrappers/Validators.ts:413](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L413)* - -Registers a validator unaffiliated with any validator group. - -Fails if the account is already a validator or validator group. - -**`param`** The address that the validator is using for consensus, should match - the validator signer. - -**`param`** The ECDSA public key that the validator is using for consensus. 64 bytes. - -**`param`** The BLS public key that the validator is using for consensus, should pass proof - of possession. 48 bytes. - -**`param`** The BLS public key proof-of-possession, which consists of a signature on the - account address. 96 bytes. - -#### Type declaration: - -▸ (...`args`: InputArgs): *Promise‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### getEpochSize - -• **getEpochSize**: *function* = proxyCall(this.contract.methods.getEpochSize, undefined, valueToBigNumber) - -*Defined in [contractkit/src/wrappers/Validators.ts:415](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L415)* - -#### Type declaration: - -▸ (...`args`: InputArgs): *Promise‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### getRegisteredValidatorGroupsAddresses - -• **getRegisteredValidatorGroupsAddresses**: *function* = proxyCall( - this.contract.methods.getRegisteredValidatorGroups - ) - -*Defined in [contractkit/src/wrappers/Validators.ts:383](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L383)* - -Get list of registered validator group addresses - -#### Type declaration: - -▸ (): *Promise‹Address[]›* - -___ - -### getSlashingMultiplierResetPeriod - -• **getSlashingMultiplierResetPeriod**: *function* = proxyCall( - this.contract.methods.slashingMultiplierResetPeriod, - undefined, - valueToBigNumber - ) - -*Defined in [contractkit/src/wrappers/Validators.ts:137](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L137)* - -Returns the reset period, in seconds, for slashing multiplier. - -#### Type declaration: - -▸ (...`args`: InputArgs): *Promise‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### getValidatorGroupSize - -• **getValidatorGroupSize**: *function* = proxyCall( - this.contract.methods.getGroupNumMembers, - undefined, - valueToInt - ) - -*Defined in [contractkit/src/wrappers/Validators.ts:370](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L370)* - -Get the size (amount of members) of a ValidatorGroup - -#### Type declaration: - -▸ (`group`: Address): *Promise‹number›* - -**Parameters:** - -Name | Type | ------- | ------ | -`group` | Address | - -___ - -### getValidatorMembershipHistory - -• **getValidatorMembershipHistory**: *function* = proxyCall( - this.contract.methods.getMembershipHistory, - undefined, - (res) => - zip((epoch, group): GroupMembership => ({ epoch: valueToInt(epoch), group }), res[0], res[1]) - ) - -*Defined in [contractkit/src/wrappers/Validators.ts:349](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L349)* - -Returns the Validator's group membership history - -**`param`** The validator whose membership history to return. - -**`returns`** The group membership history of a validator. - -#### Type declaration: - -▸ (`validator`: Address): *Promise‹[GroupMembership](../interfaces/_wrappers_validators_.groupmembership.md)[]›* - -**Parameters:** - -Name | Type | ------- | ------ | -`validator` | Address | - -___ - -### getValidatorMembershipHistoryExtraData - -• **getValidatorMembershipHistoryExtraData**: *function* = proxyCall( - this.contract.methods.getMembershipHistory, - undefined, - (res) => ({ lastRemovedFromGroupTimestamp: valueToInt(res[2]), tail: valueToInt(res[3]) }) - ) - -*Defined in [contractkit/src/wrappers/Validators.ts:361](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L361)* - -Returns extra data from the Validator's group membership history - -**`param`** The validator whose membership history to return. - -**`returns`** The group membership history of a validator. - -#### Type declaration: - -▸ (`validator`: Address): *Promise‹[MembershipHistoryExtraData](../interfaces/_wrappers_validators_.membershiphistoryextradata.md)›* - -**Parameters:** - -Name | Type | ------- | ------ | -`validator` | Address | - -___ - -### isValidator - -• **isValidator**: *function* = proxyCall(this.contract.methods.isValidator) - -*Defined in [contractkit/src/wrappers/Validators.ts:241](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L241)* - -Returns whether a particular account has a registered validator. - -**`param`** The account. - -**`returns`** Whether a particular address is a registered validator. - -#### Type declaration: - -▸ (...`args`: InputArgs): *Promise‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### isValidatorGroup - -• **isValidatorGroup**: *function* = proxyCall(this.contract.methods.isValidatorGroup) - -*Defined in [contractkit/src/wrappers/Validators.ts:248](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L248)* - -Returns whether a particular account has a registered validator group. - -**`param`** The account. - -**`returns`** Whether a particular address is a registered validator group. - -#### Type declaration: - -▸ (...`args`: InputArgs): *Promise‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### methodIds - -• **methodIds**: *Record‹keyof T["methods"], string›* = Object.keys(this.contract.methods).reduce, string>>( - (acc, method: Methods) => { - const methodABI = this.contract.options.jsonInterface.find((item) => item.name === method) - - acc[method] = - methodABI === undefined - ? '0x' - : this.kit.connection.getAbiCoder().encodeFunctionSignature(methodABI) - - return acc - }, - {} as any - ) - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[methodIds](_wrappers_basewrapper_.basewrapper.md#methodids)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:46](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L46)* - -___ - -### registerValidator - -• **registerValidator**: *function* = proxySend( - this.kit, - this.contract.methods.registerValidator, - tupleParser(stringToSolidityBytes, stringToSolidityBytes, stringToSolidityBytes) - ) - -*Defined in [contractkit/src/wrappers/Validators.ts:417](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L417)* - -#### Type declaration: - -▸ (`ecdsaPublicKey`: string, `blsPublicKey`: string, `blsPop`: string): *CeloTransactionObject‹boolean›* - -**Parameters:** - -Name | Type | ------- | ------ | -`ecdsaPublicKey` | string | -`blsPublicKey` | string | -`blsPop` | string | - -___ - -### removeMember - -• **removeMember**: *function* = proxySend(this.kit, this.contract.methods.removeMember) - -*Defined in [contractkit/src/wrappers/Validators.ts:531](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L531)* - -Removes a member from a ValidatorGroup -The ValidatorGroup is specified by the `from` of the tx. - -**`param`** The Validator to remove from the group - -#### Type declaration: - -▸ (...`args`: InputArgs): *CeloTransactionObject‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### resetSlashingMultiplier - -• **resetSlashingMultiplier**: *function* = proxySend(this.kit, this.contract.methods.resetSlashingMultiplier) - -*Defined in [contractkit/src/wrappers/Validators.ts:502](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L502)* - -Resets a group's slashing multiplier if it has been >= the reset period since -the last time the group was slashed. - -#### Type declaration: - -▸ (...`args`: InputArgs): *CeloTransactionObject‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### setNextCommissionUpdate - -• **setNextCommissionUpdate**: *function* = proxySend( - this.kit, - this.contract.methods.setNextCommissionUpdate, - tupleParser(valueToFixidityString) - ) - -*Defined in [contractkit/src/wrappers/Validators.ts:86](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L86)* - -Queues an update to a validator group's commission. - -**`param`** Fixidity representation of the commission this group receives on epoch - payments made to its members. Must be in the range [0, 1.0]. - -#### Type declaration: - -▸ (`commission`: BigNumber.Value): *CeloTransactionObject‹void›* - -**Parameters:** - -Name | Type | ------- | ------ | -`commission` | BigNumber.Value | - -___ - -### updateBlsPublicKey - -• **updateBlsPublicKey**: *function* = proxySend( - this.kit, - this.contract.methods.updateBlsPublicKey, - tupleParser(stringToSolidityBytes, stringToSolidityBytes) - ) - -*Defined in [contractkit/src/wrappers/Validators.ts:227](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L227)* - -Updates a validator's BLS key. - -**`param`** The BLS public key that the validator is using for consensus, should pass proof - of possession. 48 bytes. - -**`param`** The BLS public key proof-of-possession, which consists of a signature on the - account address. 96 bytes. - -**`returns`** True upon success. - -#### Type declaration: - -▸ (`blsPublicKey`: string, `blsPop`: string): *CeloTransactionObject‹boolean›* - -**Parameters:** - -Name | Type | ------- | ------ | -`blsPublicKey` | string | -`blsPop` | string | - -___ - -### updateCommission - -• **updateCommission**: *function* = proxySend( - this.kit, - this.contract.methods.updateCommission - ) - -*Defined in [contractkit/src/wrappers/Validators.ts:95](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L95)* - -Updates a validator group's commission based on the previously queued update - -#### Type declaration: - -▸ (): *CeloTransactionObject‹void›* - -## Accessors - -### address - -• **get address**(): *string* - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[address](_wrappers_basewrapper_.basewrapper.md#address)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:30](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L30)* - -Contract address - -**Returns:** *string* - -## Methods - -### addMember - -▸ **addMember**(`group`: Address, `validator`: Address): *Promise‹CeloTransactionObject‹boolean››* - -*Defined in [contractkit/src/wrappers/Validators.ts:509](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L509)* - -Adds a member to the end of a validator group's list of members. -Fails if `validator` has not set their affiliation to this account. - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`group` | Address | - | -`validator` | Address | The validator to add to the group | - -**Returns:** *Promise‹CeloTransactionObject‹boolean››* - -___ - -### currentSignerSet - -▸ **currentSignerSet**(): *Promise‹Address[]›* - -*Defined in [contractkit/src/wrappers/Validators.ts:599](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L599)* - -Returns the current set of validator signer addresses - -**Returns:** *Promise‹Address[]›* - -___ - -### currentValidatorAccountsSet - -▸ **currentValidatorAccountsSet**(): *Promise‹object[]›* - -*Defined in [contractkit/src/wrappers/Validators.ts:609](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L609)* - -Returns the current set of validator signer and account addresses - -**Returns:** *Promise‹object[]›* - -___ - -### deregisterValidator - -▸ **deregisterValidator**(`validatorAddress`: Address): *Promise‹CeloTransactionObject‹boolean››* - -*Defined in [contractkit/src/wrappers/Validators.ts:431](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L431)* - -De-registers a validator, removing it from the group for which it is a member. - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`validatorAddress` | Address | Address of the validator to deregister | - -**Returns:** *Promise‹CeloTransactionObject‹boolean››* - -___ - -### deregisterValidatorGroup - -▸ **deregisterValidatorGroup**(`validatorGroupAddress`: Address): *Promise‹CeloTransactionObject‹boolean››* - -*Defined in [contractkit/src/wrappers/Validators.ts:459](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L459)* - -De-registers a validator Group - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`validatorGroupAddress` | Address | Address of the validator group to deregister | - -**Returns:** *Promise‹CeloTransactionObject‹boolean››* - -___ - -### findValidatorMembershipHistoryIndex - -▸ **findValidatorMembershipHistoryIndex**(`epoch`: number, `history`: [GroupMembership](../interfaces/_wrappers_validators_.groupmembership.md)[]): *number* - -*Defined in [contractkit/src/wrappers/Validators.ts:642](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L642)* - -Returns the index into `history` for `epoch`. - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`epoch` | number | The needle. | -`history` | [GroupMembership](../interfaces/_wrappers_validators_.groupmembership.md)[] | The haystack. | - -**Returns:** *number* - -Index for epoch or -1. - -___ - -### getConfig - -▸ **getConfig**(): *Promise‹[ValidatorsConfig](../interfaces/_wrappers_validators_.validatorsconfig.md)›* - -*Defined in [contractkit/src/wrappers/Validators.ts:155](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L155)* - -Returns current configuration parameters. - -**Returns:** *Promise‹[ValidatorsConfig](../interfaces/_wrappers_validators_.validatorsconfig.md)›* - -___ - -### getGroupLockedGoldRequirements - -▸ **getGroupLockedGoldRequirements**(): *Promise‹[LockedGoldRequirements](../interfaces/_wrappers_validators_.lockedgoldrequirements.md)›* - -*Defined in [contractkit/src/wrappers/Validators.ts:116](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L116)* - -Returns the Locked Gold requirements for validator groups. - -**Returns:** *Promise‹[LockedGoldRequirements](../interfaces/_wrappers_validators_.lockedgoldrequirements.md)›* - -The Locked Gold requirements for validator groups. - -___ - -### getHumanReadableConfig - -▸ **getHumanReadableConfig**(): *Promise‹object›* - -*Defined in [contractkit/src/wrappers/Validators.ts:178](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L178)* - -**`dev`** Returns human readable configuration of the validators contract - -**Returns:** *Promise‹object›* - -ValidatorsConfig object - -___ - -### getPastEvents - -▸ **getPastEvents**(`event`: Events‹Validators›, `options`: PastEventOptions): *Promise‹EventLog[]›* - -*Inherited from [BaseWrapper](_wrappers_basewrapper_.basewrapper.md).[getPastEvents](_wrappers_basewrapper_.basewrapper.md#getpastevents)* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:35](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L35)* - -Contract getPastEvents - -**Parameters:** - -Name | Type | ------- | ------ | -`event` | Events‹Validators› | -`options` | PastEventOptions | - -**Returns:** *Promise‹EventLog[]›* - -___ - -### getRegisteredValidatorGroups - -▸ **getRegisteredValidatorGroups**(): *Promise‹[ValidatorGroup](../interfaces/_wrappers_validators_.validatorgroup.md)[]›* - -*Defined in [contractkit/src/wrappers/Validators.ts:394](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L394)* - -Get list of registered validator groups - -**Returns:** *Promise‹[ValidatorGroup](../interfaces/_wrappers_validators_.validatorgroup.md)[]›* - -___ - -### getRegisteredValidators - -▸ **getRegisteredValidators**(`blockNumber?`: undefined | number): *Promise‹[Validator](../interfaces/_wrappers_validators_.validator.md)[]›* - -*Defined in [contractkit/src/wrappers/Validators.ts:388](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L388)* - -Get list of registered validators - -**Parameters:** - -Name | Type | ------- | ------ | -`blockNumber?` | undefined | number | - -**Returns:** *Promise‹[Validator](../interfaces/_wrappers_validators_.validator.md)[]›* - -___ - -### getRegisteredValidatorsAddresses - -▸ **getRegisteredValidatorsAddresses**(`blockNumber?`: undefined | number): *Promise‹Address[]›* - -*Defined in [contractkit/src/wrappers/Validators.ts:377](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L377)* - -Get list of registered validator addresses - -**Parameters:** - -Name | Type | ------- | ------ | -`blockNumber?` | undefined | number | - -**Returns:** *Promise‹Address[]›* - -___ - -### getValidator - -▸ **getValidator**(`address`: Address, `blockNumber?`: undefined | number): *Promise‹[Validator](../interfaces/_wrappers_validators_.validator.md)›* - -*Defined in [contractkit/src/wrappers/Validators.ts:276](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L276)* - -Get Validator information - -**Parameters:** - -Name | Type | ------- | ------ | -`address` | Address | -`blockNumber?` | undefined | number | - -**Returns:** *Promise‹[Validator](../interfaces/_wrappers_validators_.validator.md)›* - -___ - -### getValidatorFromSigner - -▸ **getValidatorFromSigner**(`address`: Address, `blockNumber?`: undefined | number): *Promise‹[Validator](../interfaces/_wrappers_validators_.validator.md)›* - -*Defined in [contractkit/src/wrappers/Validators.ts:293](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L293)* - -**Parameters:** - -Name | Type | ------- | ------ | -`address` | Address | -`blockNumber?` | undefined | number | - -**Returns:** *Promise‹[Validator](../interfaces/_wrappers_validators_.validator.md)›* - -___ - -### getValidatorGroup - -▸ **getValidatorGroup**(`address`: Address, `getAffiliates`: boolean, `blockNumber?`: undefined | number): *Promise‹[ValidatorGroup](../interfaces/_wrappers_validators_.validatorgroup.md)›* - -*Defined in [contractkit/src/wrappers/Validators.ts:311](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L311)* - -Get ValidatorGroup information - -**Parameters:** - -Name | Type | Default | ------- | ------ | ------ | -`address` | Address | - | -`getAffiliates` | boolean | true | -`blockNumber?` | undefined | number | - | - -**Returns:** *Promise‹[ValidatorGroup](../interfaces/_wrappers_validators_.validatorgroup.md)›* - -___ - -### getValidatorLockedGoldRequirements - -▸ **getValidatorLockedGoldRequirements**(): *Promise‹[LockedGoldRequirements](../interfaces/_wrappers_validators_.lockedgoldrequirements.md)›* - -*Defined in [contractkit/src/wrappers/Validators.ts:104](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L104)* - -Returns the Locked Gold requirements for validators. - -**Returns:** *Promise‹[LockedGoldRequirements](../interfaces/_wrappers_validators_.lockedgoldrequirements.md)›* - -The Locked Gold requirements for validators. - -___ - -### getValidatorMembershipHistoryIndex - -▸ **getValidatorMembershipHistoryIndex**(`account`: Address, `blockNumber?`: undefined | number): *Promise‹object›* - -*Defined in [contractkit/src/wrappers/Validators.ts:623](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L623)* - -Returns the group membership for validator account. - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`account` | Address | Address of validator account to retrieve group membership for. | -`blockNumber?` | undefined | number | Block number to retrieve group membership at. | - -**Returns:** *Promise‹object›* - -Group and membership history index for `validator`. - -___ - -### getValidatorRewards - -▸ **getValidatorRewards**(`epochNumber`: number): *Promise‹[ValidatorReward](../interfaces/_wrappers_validators_.validatorreward.md)[]›* - -*Defined in [contractkit/src/wrappers/Validators.ts:573](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L573)* - -Retrieves ValidatorRewards for epochNumber. - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`epochNumber` | number | The epoch to retrieve ValidatorRewards at. | - -**Returns:** *Promise‹[ValidatorReward](../interfaces/_wrappers_validators_.validatorreward.md)[]›* - -___ - -### meetsValidatorBalanceRequirements - -▸ **meetsValidatorBalanceRequirements**(`address`: Address): *Promise‹boolean›* - -*Defined in [contractkit/src/wrappers/Validators.ts:255](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L255)* - -Returns whether an account meets the requirements to register a validator. - -**Parameters:** - -Name | Type | ------- | ------ | -`address` | Address | - -**Returns:** *Promise‹boolean›* - -Whether an account meets the requirements to register a validator. - -___ - -### meetsValidatorGroupBalanceRequirements - -▸ **meetsValidatorGroupBalanceRequirements**(`address`: Address): *Promise‹boolean›* - -*Defined in [contractkit/src/wrappers/Validators.ts:268](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L268)* - -Returns whether an account meets the requirements to register a group. - -**Parameters:** - -Name | Type | ------- | ------ | -`address` | Address | - -**Returns:** *Promise‹boolean›* - -Whether an account meets the requirements to register a group. - -___ - -### registerValidatorGroup - -▸ **registerValidatorGroup**(`commission`: BigNumber): *Promise‹CeloTransactionObject‹boolean››* - -*Defined in [contractkit/src/wrappers/Validators.ts:448](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L448)* - -Registers a validator group with no member validators. -Fails if the account is already a validator or validator group. -Fails if the account does not have sufficient weight. - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`commission` | BigNumber | the commission this group receives on epoch payments made to its members. | - -**Returns:** *Promise‹CeloTransactionObject‹boolean››* - -___ - -### reorderMember - -▸ **reorderMember**(`groupAddr`: Address, `validator`: Address, `newIndex`: number): *Promise‹CeloTransactionObject‹boolean››* - -*Defined in [contractkit/src/wrappers/Validators.ts:540](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L540)* - -Reorders a member within a validator group. -Fails if `validator` is not a member of the account's validator group. - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`groupAddr` | Address | The validator group | -`validator` | Address | The validator to reorder. | -`newIndex` | number | New position for the validator | - -**Returns:** *Promise‹CeloTransactionObject‹boolean››* - -___ - -### signerToAccount - -▸ **signerToAccount**(`signerAddress`: Address): *Promise‹string›* - -*Defined in [contractkit/src/wrappers/Validators.ts:214](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L214)* - -Returns the account associated with `signer`. - -**`dev`** Fails if the `signer` is not an account or previously authorized signer. - -**Parameters:** - -Name | Type | ------- | ------ | -`signerAddress` | Address | - -**Returns:** *Promise‹string›* - -The associated account. - -___ - -### validatorSignerToAccount - -▸ **validatorSignerToAccount**(`signerAddress`: Address): *Promise‹string›* - -*Defined in [contractkit/src/wrappers/Validators.ts:203](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L203)* - -Returns the account associated with `signer`. - -**`dev`** Fails if the `signer` is not an account or currently authorized validator. - -**Parameters:** - -Name | Type | ------- | ------ | -`signerAddress` | Address | - -**Returns:** *Promise‹string›* - -The associated account. diff --git a/packages/docs/developer-resources/contractkit/reference/enums/_base_.celocontract.md b/packages/docs/developer-resources/contractkit/reference/enums/_base_.celocontract.md deleted file mode 100644 index 9c847d6c4a4..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/enums/_base_.celocontract.md +++ /dev/null @@ -1,231 +0,0 @@ -# Enumeration: CeloContract - -## Index - -### Enumeration members - -* [Accounts](_base_.celocontract.md#accounts) -* [Attestations](_base_.celocontract.md#attestations) -* [BlockchainParameters](_base_.celocontract.md#blockchainparameters) -* [DoubleSigningSlasher](_base_.celocontract.md#doublesigningslasher) -* [DowntimeSlasher](_base_.celocontract.md#downtimeslasher) -* [Election](_base_.celocontract.md#election) -* [EpochRewards](_base_.celocontract.md#epochrewards) -* [Escrow](_base_.celocontract.md#escrow) -* [Exchange](_base_.celocontract.md#exchange) -* [FeeCurrencyWhitelist](_base_.celocontract.md#feecurrencywhitelist) -* [Freezer](_base_.celocontract.md#freezer) -* [GasPriceMinimum](_base_.celocontract.md#gaspriceminimum) -* [GoldToken](_base_.celocontract.md#goldtoken) -* [Governance](_base_.celocontract.md#governance) -* [LockedGold](_base_.celocontract.md#lockedgold) -* [MetaTransactionWallet](_base_.celocontract.md#metatransactionwallet) -* [MetaTransactionWalletDeployer](_base_.celocontract.md#metatransactionwalletdeployer) -* [MultiSig](_base_.celocontract.md#multisig) -* [Random](_base_.celocontract.md#random) -* [Registry](_base_.celocontract.md#registry) -* [Reserve](_base_.celocontract.md#reserve) -* [SortedOracles](_base_.celocontract.md#sortedoracles) -* [StableToken](_base_.celocontract.md#stabletoken) -* [TransferWhitelist](_base_.celocontract.md#transferwhitelist) -* [Validators](_base_.celocontract.md#validators) - -## Enumeration members - -### Accounts - -• **Accounts**: = "Accounts" - -*Defined in [contractkit/src/base.ts:2](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/base.ts#L2)* - -___ - -### Attestations - -• **Attestations**: = "Attestations" - -*Defined in [contractkit/src/base.ts:3](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/base.ts#L3)* - -___ - -### BlockchainParameters - -• **BlockchainParameters**: = "BlockchainParameters" - -*Defined in [contractkit/src/base.ts:4](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/base.ts#L4)* - -___ - -### DoubleSigningSlasher - -• **DoubleSigningSlasher**: = "DoubleSigningSlasher" - -*Defined in [contractkit/src/base.ts:5](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/base.ts#L5)* - -___ - -### DowntimeSlasher - -• **DowntimeSlasher**: = "DowntimeSlasher" - -*Defined in [contractkit/src/base.ts:6](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/base.ts#L6)* - -___ - -### Election - -• **Election**: = "Election" - -*Defined in [contractkit/src/base.ts:7](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/base.ts#L7)* - -___ - -### EpochRewards - -• **EpochRewards**: = "EpochRewards" - -*Defined in [contractkit/src/base.ts:8](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/base.ts#L8)* - -___ - -### Escrow - -• **Escrow**: = "Escrow" - -*Defined in [contractkit/src/base.ts:9](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/base.ts#L9)* - -___ - -### Exchange - -• **Exchange**: = "Exchange" - -*Defined in [contractkit/src/base.ts:10](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/base.ts#L10)* - -___ - -### FeeCurrencyWhitelist - -• **FeeCurrencyWhitelist**: = "FeeCurrencyWhitelist" - -*Defined in [contractkit/src/base.ts:11](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/base.ts#L11)* - -___ - -### Freezer - -• **Freezer**: = "Freezer" - -*Defined in [contractkit/src/base.ts:12](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/base.ts#L12)* - -___ - -### GasPriceMinimum - -• **GasPriceMinimum**: = "GasPriceMinimum" - -*Defined in [contractkit/src/base.ts:13](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/base.ts#L13)* - -___ - -### GoldToken - -• **GoldToken**: = "GoldToken" - -*Defined in [contractkit/src/base.ts:14](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/base.ts#L14)* - -___ - -### Governance - -• **Governance**: = "Governance" - -*Defined in [contractkit/src/base.ts:15](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/base.ts#L15)* - -___ - -### LockedGold - -• **LockedGold**: = "LockedGold" - -*Defined in [contractkit/src/base.ts:16](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/base.ts#L16)* - -___ - -### MetaTransactionWallet - -• **MetaTransactionWallet**: = "MetaTransactionWallet" - -*Defined in [contractkit/src/base.ts:17](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/base.ts#L17)* - -___ - -### MetaTransactionWalletDeployer - -• **MetaTransactionWalletDeployer**: = "MetaTransactionWalletDeployer" - -*Defined in [contractkit/src/base.ts:18](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/base.ts#L18)* - -___ - -### MultiSig - -• **MultiSig**: = "MultiSig" - -*Defined in [contractkit/src/base.ts:19](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/base.ts#L19)* - -___ - -### Random - -• **Random**: = "Random" - -*Defined in [contractkit/src/base.ts:20](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/base.ts#L20)* - -___ - -### Registry - -• **Registry**: = "Registry" - -*Defined in [contractkit/src/base.ts:21](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/base.ts#L21)* - -___ - -### Reserve - -• **Reserve**: = "Reserve" - -*Defined in [contractkit/src/base.ts:22](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/base.ts#L22)* - -___ - -### SortedOracles - -• **SortedOracles**: = "SortedOracles" - -*Defined in [contractkit/src/base.ts:23](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/base.ts#L23)* - -___ - -### StableToken - -• **StableToken**: = "StableToken" - -*Defined in [contractkit/src/base.ts:24](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/base.ts#L24)* - -___ - -### TransferWhitelist - -• **TransferWhitelist**: = "TransferWhitelist" - -*Defined in [contractkit/src/base.ts:25](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/base.ts#L25)* - -___ - -### Validators - -• **Validators**: = "Validators" - -*Defined in [contractkit/src/base.ts:26](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/base.ts#L26)* diff --git a/packages/docs/developer-resources/contractkit/reference/enums/_identity_claims_types_.claimtypes.md b/packages/docs/developer-resources/contractkit/reference/enums/_identity_claims_types_.claimtypes.md deleted file mode 100644 index cc298949b2b..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/enums/_identity_claims_types_.claimtypes.md +++ /dev/null @@ -1,78 +0,0 @@ -# Enumeration: ClaimTypes - -## Index - -### Enumeration members - -* [ACCOUNT](_identity_claims_types_.claimtypes.md#account) -* [ATTESTATION_SERVICE_URL](_identity_claims_types_.claimtypes.md#attestation_service_url) -* [DOMAIN](_identity_claims_types_.claimtypes.md#domain) -* [KEYBASE](_identity_claims_types_.claimtypes.md#keybase) -* [NAME](_identity_claims_types_.claimtypes.md#name) -* [PROFILE_PICTURE](_identity_claims_types_.claimtypes.md#profile_picture) -* [STORAGE](_identity_claims_types_.claimtypes.md#storage) -* [TWITTER](_identity_claims_types_.claimtypes.md#twitter) - -## Enumeration members - -### ACCOUNT - -• **ACCOUNT**: = "ACCOUNT" - -*Defined in [contractkit/src/identity/claims/types.ts:10](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/identity/claims/types.ts#L10)* - -___ - -### ATTESTATION_SERVICE_URL - -• **ATTESTATION_SERVICE_URL**: = "ATTESTATION_SERVICE_URL" - -*Defined in [contractkit/src/identity/claims/types.ts:9](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/identity/claims/types.ts#L9)* - -___ - -### DOMAIN - -• **DOMAIN**: = "DOMAIN" - -*Defined in [contractkit/src/identity/claims/types.ts:11](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/identity/claims/types.ts#L11)* - -___ - -### KEYBASE - -• **KEYBASE**: = "KEYBASE" - -*Defined in [contractkit/src/identity/claims/types.ts:12](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/identity/claims/types.ts#L12)* - -___ - -### NAME - -• **NAME**: = "NAME" - -*Defined in [contractkit/src/identity/claims/types.ts:13](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/identity/claims/types.ts#L13)* - -___ - -### PROFILE_PICTURE - -• **PROFILE_PICTURE**: = "PROFILE_PICTURE" - -*Defined in [contractkit/src/identity/claims/types.ts:14](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/identity/claims/types.ts#L14)* - -___ - -### STORAGE - -• **STORAGE**: = "STORAGE" - -*Defined in [contractkit/src/identity/claims/types.ts:15](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/identity/claims/types.ts#L15)* - -___ - -### TWITTER - -• **TWITTER**: = "TWITTER" - -*Defined in [contractkit/src/identity/claims/types.ts:16](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/identity/claims/types.ts#L16)* diff --git a/packages/docs/developer-resources/contractkit/reference/enums/_wrappers_attestations_.attestationservicestatusstate.md b/packages/docs/developer-resources/contractkit/reference/enums/_wrappers_attestations_.attestationservicestatusstate.md deleted file mode 100644 index 8e8f080ba60..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/enums/_wrappers_attestations_.attestationservicestatusstate.md +++ /dev/null @@ -1,105 +0,0 @@ -# Enumeration: AttestationServiceStatusState - -## Index - -### Enumeration members - -* [InvalidAttestationServiceURL](_wrappers_attestations_.attestationservicestatusstate.md#invalidattestationserviceurl) -* [InvalidMetadata](_wrappers_attestations_.attestationservicestatusstate.md#invalidmetadata) -* [MetadataTimeout](_wrappers_attestations_.attestationservicestatusstate.md#metadatatimeout) -* [NoAttestationServiceURL](_wrappers_attestations_.attestationservicestatusstate.md#noattestationserviceurl) -* [NoAttestationSigner](_wrappers_attestations_.attestationservicestatusstate.md#noattestationsigner) -* [NoMetadataURL](_wrappers_attestations_.attestationservicestatusstate.md#nometadataurl) -* [Unhealthy](_wrappers_attestations_.attestationservicestatusstate.md#unhealthy) -* [UnreachableAttestationService](_wrappers_attestations_.attestationservicestatusstate.md#unreachableattestationservice) -* [UnreachableHealthz](_wrappers_attestations_.attestationservicestatusstate.md#unreachablehealthz) -* [Valid](_wrappers_attestations_.attestationservicestatusstate.md#valid) -* [WrongAccount](_wrappers_attestations_.attestationservicestatusstate.md#wrongaccount) - -## Enumeration members - -### InvalidAttestationServiceURL - -• **InvalidAttestationServiceURL**: = "InvalidAttestationServiceURL" - -*Defined in [contractkit/src/wrappers/Attestations.ts:818](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Attestations.ts#L818)* - -___ - -### InvalidMetadata - -• **InvalidMetadata**: = "InvalidMetadata" - -*Defined in [contractkit/src/wrappers/Attestations.ts:816](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Attestations.ts#L816)* - -___ - -### MetadataTimeout - -• **MetadataTimeout**: = "MetadataTimeout" - -*Defined in [contractkit/src/wrappers/Attestations.ts:824](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Attestations.ts#L824)* - -___ - -### NoAttestationServiceURL - -• **NoAttestationServiceURL**: = "NoAttestationServiceURL" - -*Defined in [contractkit/src/wrappers/Attestations.ts:817](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Attestations.ts#L817)* - -___ - -### NoAttestationSigner - -• **NoAttestationSigner**: = "NoAttestationSigner" - -*Defined in [contractkit/src/wrappers/Attestations.ts:814](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Attestations.ts#L814)* - -___ - -### NoMetadataURL - -• **NoMetadataURL**: = "NoMetadataURL" - -*Defined in [contractkit/src/wrappers/Attestations.ts:815](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Attestations.ts#L815)* - -___ - -### Unhealthy - -• **Unhealthy**: = "Unhealthy" - -*Defined in [contractkit/src/wrappers/Attestations.ts:822](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Attestations.ts#L822)* - -___ - -### UnreachableAttestationService - -• **UnreachableAttestationService**: = "UnreachableAttestationService" - -*Defined in [contractkit/src/wrappers/Attestations.ts:819](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Attestations.ts#L819)* - -___ - -### UnreachableHealthz - -• **UnreachableHealthz**: = "UnreachableHealthz" - -*Defined in [contractkit/src/wrappers/Attestations.ts:821](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Attestations.ts#L821)* - -___ - -### Valid - -• **Valid**: = "Valid" - -*Defined in [contractkit/src/wrappers/Attestations.ts:820](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Attestations.ts#L820)* - -___ - -### WrongAccount - -• **WrongAccount**: = "WrongAccount" - -*Defined in [contractkit/src/wrappers/Attestations.ts:823](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Attestations.ts#L823)* diff --git a/packages/docs/developer-resources/contractkit/reference/enums/_wrappers_attestations_.attestationstate.md b/packages/docs/developer-resources/contractkit/reference/enums/_wrappers_attestations_.attestationstate.md deleted file mode 100644 index 897e2ae39d6..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/enums/_wrappers_attestations_.attestationstate.md +++ /dev/null @@ -1,35 +0,0 @@ -# Enumeration: AttestationState - -Contract for managing identities - -## Index - -### Enumeration members - -* [Complete](_wrappers_attestations_.attestationstate.md#complete) -* [Incomplete](_wrappers_attestations_.attestationstate.md#incomplete) -* [None](_wrappers_attestations_.attestationstate.md#none) - -## Enumeration members - -### Complete - -• **Complete**: - -*Defined in [contractkit/src/wrappers/Attestations.ts:58](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Attestations.ts#L58)* - -___ - -### Incomplete - -• **Incomplete**: - -*Defined in [contractkit/src/wrappers/Attestations.ts:57](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Attestations.ts#L57)* - -___ - -### None - -• **None**: - -*Defined in [contractkit/src/wrappers/Attestations.ts:56](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Attestations.ts#L56)* diff --git a/packages/docs/developer-resources/contractkit/reference/enums/_wrappers_governance_.proposalstage.md b/packages/docs/developer-resources/contractkit/reference/enums/_wrappers_governance_.proposalstage.md deleted file mode 100644 index 252d378ba05..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/enums/_wrappers_governance_.proposalstage.md +++ /dev/null @@ -1,60 +0,0 @@ -# Enumeration: ProposalStage - -## Index - -### Enumeration members - -* [Approval](_wrappers_governance_.proposalstage.md#approval) -* [Execution](_wrappers_governance_.proposalstage.md#execution) -* [Expiration](_wrappers_governance_.proposalstage.md#expiration) -* [None](_wrappers_governance_.proposalstage.md#none) -* [Queued](_wrappers_governance_.proposalstage.md#queued) -* [Referendum](_wrappers_governance_.proposalstage.md#referendum) - -## Enumeration members - -### Approval - -• **Approval**: = "Approval" - -*Defined in [contractkit/src/wrappers/Governance.ts:33](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Governance.ts#L33)* - -___ - -### Execution - -• **Execution**: = "Execution" - -*Defined in [contractkit/src/wrappers/Governance.ts:35](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Governance.ts#L35)* - -___ - -### Expiration - -• **Expiration**: = "Expiration" - -*Defined in [contractkit/src/wrappers/Governance.ts:36](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Governance.ts#L36)* - -___ - -### None - -• **None**: = "None" - -*Defined in [contractkit/src/wrappers/Governance.ts:31](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Governance.ts#L31)* - -___ - -### Queued - -• **Queued**: = "Queued" - -*Defined in [contractkit/src/wrappers/Governance.ts:32](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Governance.ts#L32)* - -___ - -### Referendum - -• **Referendum**: = "Referendum" - -*Defined in [contractkit/src/wrappers/Governance.ts:34](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Governance.ts#L34)* diff --git a/packages/docs/developer-resources/contractkit/reference/enums/_wrappers_governance_.votevalue.md b/packages/docs/developer-resources/contractkit/reference/enums/_wrappers_governance_.votevalue.md deleted file mode 100644 index ac63e4fe3f4..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/enums/_wrappers_governance_.votevalue.md +++ /dev/null @@ -1,42 +0,0 @@ -# Enumeration: VoteValue - -## Index - -### Enumeration members - -* [Abstain](_wrappers_governance_.votevalue.md#abstain) -* [No](_wrappers_governance_.votevalue.md#no) -* [None](_wrappers_governance_.votevalue.md#none) -* [Yes](_wrappers_governance_.votevalue.md#yes) - -## Enumeration members - -### Abstain - -• **Abstain**: = "Abstain" - -*Defined in [contractkit/src/wrappers/Governance.ts:100](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Governance.ts#L100)* - -___ - -### No - -• **No**: = "No" - -*Defined in [contractkit/src/wrappers/Governance.ts:101](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Governance.ts#L101)* - -___ - -### None - -• **None**: = "NONE" - -*Defined in [contractkit/src/wrappers/Governance.ts:99](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Governance.ts#L99)* - -___ - -### Yes - -• **Yes**: = "Yes" - -*Defined in [contractkit/src/wrappers/Governance.ts:102](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Governance.ts#L102)* diff --git a/packages/docs/developer-resources/contractkit/reference/enums/_wrappers_sortedoracles_.medianrelation.md b/packages/docs/developer-resources/contractkit/reference/enums/_wrappers_sortedoracles_.medianrelation.md deleted file mode 100644 index ba48130d1ef..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/enums/_wrappers_sortedoracles_.medianrelation.md +++ /dev/null @@ -1,42 +0,0 @@ -# Enumeration: MedianRelation - -## Index - -### Enumeration members - -* [Equal](_wrappers_sortedoracles_.medianrelation.md#equal) -* [Greater](_wrappers_sortedoracles_.medianrelation.md#greater) -* [Lesser](_wrappers_sortedoracles_.medianrelation.md#lesser) -* [Undefined](_wrappers_sortedoracles_.medianrelation.md#undefined) - -## Enumeration members - -### Equal - -• **Equal**: - -*Defined in [contractkit/src/wrappers/SortedOracles.ts:21](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/SortedOracles.ts#L21)* - -___ - -### Greater - -• **Greater**: - -*Defined in [contractkit/src/wrappers/SortedOracles.ts:20](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/SortedOracles.ts#L20)* - -___ - -### Lesser - -• **Lesser**: - -*Defined in [contractkit/src/wrappers/SortedOracles.ts:19](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/SortedOracles.ts#L19)* - -___ - -### Undefined - -• **Undefined**: - -*Defined in [contractkit/src/wrappers/SortedOracles.ts:18](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/SortedOracles.ts#L18)* diff --git a/packages/docs/developer-resources/contractkit/reference/globals.md b/packages/docs/developer-resources/contractkit/reference/globals.md deleted file mode 100644 index cc1387638fe..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/globals.md +++ /dev/null @@ -1,45 +0,0 @@ -# @celo/contractkit - -## Index - -### Modules - -* ["address-registry"](modules/_address_registry_.md) -* ["base"](modules/_base_.md) -* ["contract-cache"](modules/_contract_cache_.md) -* ["identity/claims/account"](modules/_identity_claims_account_.md) -* ["identity/claims/attestation-service-url"](modules/_identity_claims_attestation_service_url_.md) -* ["identity/claims/claim"](modules/_identity_claims_claim_.md) -* ["identity/claims/keybase"](modules/_identity_claims_keybase_.md) -* ["identity/claims/types"](modules/_identity_claims_types_.md) -* ["identity/claims/verify"](modules/_identity_claims_verify_.md) -* ["identity/metadata"](modules/_identity_metadata_.md) -* ["kit"](modules/_kit_.md) -* ["proxy"](modules/_proxy_.md) -* ["test-utils/PromiEventStub"](modules/_test_utils_promieventstub_.md) -* ["test-utils/setup.global"](modules/_test_utils_setup_global_.md) -* ["test-utils/teardown.global"](modules/_test_utils_teardown_global_.md) -* ["web3-contract-cache"](modules/_web3_contract_cache_.md) -* ["wrappers/Accounts"](modules/_wrappers_accounts_.md) -* ["wrappers/Attestations"](modules/_wrappers_attestations_.md) -* ["wrappers/BaseSlasher"](modules/_wrappers_baseslasher_.md) -* ["wrappers/BaseWrapper"](modules/_wrappers_basewrapper_.md) -* ["wrappers/BlockchainParameters"](modules/_wrappers_blockchainparameters_.md) -* ["wrappers/DoubleSigningSlasher"](modules/_wrappers_doublesigningslasher_.md) -* ["wrappers/DowntimeSlasher"](modules/_wrappers_downtimeslasher_.md) -* ["wrappers/Election"](modules/_wrappers_election_.md) -* ["wrappers/Escrow"](modules/_wrappers_escrow_.md) -* ["wrappers/Exchange"](modules/_wrappers_exchange_.md) -* ["wrappers/Freezer"](modules/_wrappers_freezer_.md) -* ["wrappers/GasPriceMinimum"](modules/_wrappers_gaspriceminimum_.md) -* ["wrappers/GoldTokenWrapper"](modules/_wrappers_goldtokenwrapper_.md) -* ["wrappers/Governance"](modules/_wrappers_governance_.md) -* ["wrappers/LockedGold"](modules/_wrappers_lockedgold_.md) -* ["wrappers/MetaTransactionWallet"](modules/_wrappers_metatransactionwallet_.md) -* ["wrappers/MetaTransactionWalletDeployer"](modules/_wrappers_metatransactionwalletdeployer_.md) -* ["wrappers/MultiSig"](modules/_wrappers_multisig_.md) -* ["wrappers/ReleaseGold"](modules/_wrappers_releasegold_.md) -* ["wrappers/Reserve"](modules/_wrappers_reserve_.md) -* ["wrappers/SortedOracles"](modules/_wrappers_sortedoracles_.md) -* ["wrappers/StableTokenWrapper"](modules/_wrappers_stabletokenwrapper_.md) -* ["wrappers/Validators"](modules/_wrappers_validators_.md) diff --git a/packages/docs/developer-resources/contractkit/reference/interfaces/_kit_.networkconfig.md b/packages/docs/developer-resources/contractkit/reference/interfaces/_kit_.networkconfig.md deleted file mode 100644 index 665dea9b0cf..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/interfaces/_kit_.networkconfig.md +++ /dev/null @@ -1,118 +0,0 @@ -# Interface: NetworkConfig - -## Hierarchy - -* **NetworkConfig** - -## Index - -### Properties - -* [attestations](_kit_.networkconfig.md#attestations) -* [blockchainParameters](_kit_.networkconfig.md#blockchainparameters) -* [downtimeSlasher](_kit_.networkconfig.md#downtimeslasher) -* [election](_kit_.networkconfig.md#election) -* [exchange](_kit_.networkconfig.md#exchange) -* [gasPriceMinimum](_kit_.networkconfig.md#gaspriceminimum) -* [governance](_kit_.networkconfig.md#governance) -* [lockedGold](_kit_.networkconfig.md#lockedgold) -* [reserve](_kit_.networkconfig.md#reserve) -* [sortedOracles](_kit_.networkconfig.md#sortedoracles) -* [stableToken](_kit_.networkconfig.md#stabletoken) -* [validators](_kit_.networkconfig.md#validators) - -## Properties - -### attestations - -• **attestations**: *[AttestationsConfig](_wrappers_attestations_.attestationsconfig.md)* - -*Defined in [contractkit/src/kit.ts:58](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/kit.ts#L58)* - -___ - -### blockchainParameters - -• **blockchainParameters**: *[BlockchainParametersConfig](_wrappers_blockchainparameters_.blockchainparametersconfig.md)* - -*Defined in [contractkit/src/kit.ts:67](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/kit.ts#L67)* - -___ - -### downtimeSlasher - -• **downtimeSlasher**: *[DowntimeSlasherConfig](_wrappers_downtimeslasher_.downtimeslasherconfig.md)* - -*Defined in [contractkit/src/kit.ts:66](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/kit.ts#L66)* - -___ - -### election - -• **election**: *[ElectionConfig](_wrappers_election_.electionconfig.md)* - -*Defined in [contractkit/src/kit.ts:56](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/kit.ts#L56)* - -___ - -### exchange - -• **exchange**: *[ExchangeConfig](_wrappers_exchange_.exchangeconfig.md)* - -*Defined in [contractkit/src/kit.ts:57](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/kit.ts#L57)* - -___ - -### gasPriceMinimum - -• **gasPriceMinimum**: *[GasPriceMinimumConfig](_wrappers_gaspriceminimum_.gaspriceminimumconfig.md)* - -*Defined in [contractkit/src/kit.ts:62](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/kit.ts#L62)* - -___ - -### governance - -• **governance**: *[GovernanceConfig](_wrappers_governance_.governanceconfig.md)* - -*Defined in [contractkit/src/kit.ts:59](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/kit.ts#L59)* - -___ - -### lockedGold - -• **lockedGold**: *[LockedGoldConfig](_wrappers_lockedgold_.lockedgoldconfig.md)* - -*Defined in [contractkit/src/kit.ts:60](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/kit.ts#L60)* - -___ - -### reserve - -• **reserve**: *[ReserveConfig](_wrappers_reserve_.reserveconfig.md)* - -*Defined in [contractkit/src/kit.ts:63](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/kit.ts#L63)* - -___ - -### sortedOracles - -• **sortedOracles**: *[SortedOraclesConfig](_wrappers_sortedoracles_.sortedoraclesconfig.md)* - -*Defined in [contractkit/src/kit.ts:61](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/kit.ts#L61)* - -___ - -### stableToken - -• **stableToken**: *[StableTokenConfig](_wrappers_stabletokenwrapper_.stabletokenconfig.md)* - -*Defined in [contractkit/src/kit.ts:64](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/kit.ts#L64)* - -___ - -### validators - -• **validators**: *[ValidatorsConfig](_wrappers_validators_.validatorsconfig.md)* - -*Defined in [contractkit/src/kit.ts:65](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/kit.ts#L65)* diff --git a/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_attestations_.actionableattestation.md b/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_attestations_.actionableattestation.md deleted file mode 100644 index 292ce1829a4..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_attestations_.actionableattestation.md +++ /dev/null @@ -1,55 +0,0 @@ -# Interface: ActionableAttestation - -## Hierarchy - -* **ActionableAttestation** - -## Index - -### Properties - -* [attestationServiceURL](_wrappers_attestations_.actionableattestation.md#attestationserviceurl) -* [blockNumber](_wrappers_attestations_.actionableattestation.md#blocknumber) -* [issuer](_wrappers_attestations_.actionableattestation.md#issuer) -* [name](_wrappers_attestations_.actionableattestation.md#name) -* [version](_wrappers_attestations_.actionableattestation.md#version) - -## Properties - -### attestationServiceURL - -• **attestationServiceURL**: *string* - -*Defined in [contractkit/src/wrappers/Attestations.ts:64](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Attestations.ts#L64)* - -___ - -### blockNumber - -• **blockNumber**: *number* - -*Defined in [contractkit/src/wrappers/Attestations.ts:63](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Attestations.ts#L63)* - -___ - -### issuer - -• **issuer**: *Address* - -*Defined in [contractkit/src/wrappers/Attestations.ts:62](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Attestations.ts#L62)* - -___ - -### name - -• **name**: *string | undefined* - -*Defined in [contractkit/src/wrappers/Attestations.ts:65](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Attestations.ts#L65)* - -___ - -### version - -• **version**: *string* - -*Defined in [contractkit/src/wrappers/Attestations.ts:66](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Attestations.ts#L66)* diff --git a/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_attestations_.attestationsconfig.md b/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_attestations_.attestationsconfig.md deleted file mode 100644 index 2972210edfe..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_attestations_.attestationsconfig.md +++ /dev/null @@ -1,28 +0,0 @@ -# Interface: AttestationsConfig - -## Hierarchy - -* **AttestationsConfig** - -## Index - -### Properties - -* [attestationExpiryBlocks](_wrappers_attestations_.attestationsconfig.md#attestationexpiryblocks) -* [attestationRequestFees](_wrappers_attestations_.attestationsconfig.md#attestationrequestfees) - -## Properties - -### attestationExpiryBlocks - -• **attestationExpiryBlocks**: *number* - -*Defined in [contractkit/src/wrappers/Attestations.ts:48](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Attestations.ts#L48)* - -___ - -### attestationRequestFees - -• **attestationRequestFees**: *[AttestationsToken](_wrappers_attestations_.attestationstoken.md)[]* - -*Defined in [contractkit/src/wrappers/Attestations.ts:49](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Attestations.ts#L49)* diff --git a/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_attestations_.attestationservicestatusresponse.md b/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_attestations_.attestationservicestatusresponse.md deleted file mode 100644 index 222f23d2821..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_attestations_.attestationservicestatusresponse.md +++ /dev/null @@ -1,181 +0,0 @@ -# Interface: AttestationServiceStatusResponse - -## Hierarchy - -* **AttestationServiceStatusResponse** - -## Index - -### Properties - -* [address](_wrappers_attestations_.attestationservicestatusresponse.md#address) -* [affiliation](_wrappers_attestations_.attestationservicestatusresponse.md#affiliation) -* [ageOfLatestBlock](_wrappers_attestations_.attestationservicestatusresponse.md#ageoflatestblock) -* [attestationServiceURL](_wrappers_attestations_.attestationservicestatusresponse.md#attestationserviceurl) -* [attestationSigner](_wrappers_attestations_.attestationservicestatusresponse.md#attestationsigner) -* [blacklistedRegionCodes](_wrappers_attestations_.attestationservicestatusresponse.md#blacklistedregioncodes) -* [blsPublicKey](_wrappers_attestations_.attestationservicestatusresponse.md#blspublickey) -* [ecdsaPublicKey](_wrappers_attestations_.attestationservicestatusresponse.md#ecdsapublickey) -* [error](_wrappers_attestations_.attestationservicestatusresponse.md#error) -* [hasAttestationSigner](_wrappers_attestations_.attestationservicestatusresponse.md#hasattestationsigner) -* [metadataURL](_wrappers_attestations_.attestationservicestatusresponse.md#metadataurl) -* [name](_wrappers_attestations_.attestationservicestatusresponse.md#name) -* [okStatus](_wrappers_attestations_.attestationservicestatusresponse.md#okstatus) -* [rightAccount](_wrappers_attestations_.attestationservicestatusresponse.md#rightaccount) -* [score](_wrappers_attestations_.attestationservicestatusresponse.md#score) -* [signer](_wrappers_attestations_.attestationservicestatusresponse.md#signer) -* [smsProviders](_wrappers_attestations_.attestationservicestatusresponse.md#smsproviders) -* [state](_wrappers_attestations_.attestationservicestatusresponse.md#state) -* [version](_wrappers_attestations_.attestationservicestatusresponse.md#version) - -## Properties - -### address - -• **address**: *Address* - -*Defined in [contractkit/src/wrappers/Attestations.ts:828](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Attestations.ts#L828)* - -___ - -### affiliation - -• **affiliation**: *string | null* - -*Defined in [contractkit/src/wrappers/Attestations.ts:831](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Attestations.ts#L831)* - -___ - -### ageOfLatestBlock - -• **ageOfLatestBlock**: *number | null* - -*Defined in [contractkit/src/wrappers/Attestations.ts:845](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Attestations.ts#L845)* - -___ - -### attestationServiceURL - -• **attestationServiceURL**: *string | null* - -*Defined in [contractkit/src/wrappers/Attestations.ts:835](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Attestations.ts#L835)* - -___ - -### attestationSigner - -• **attestationSigner**: *string* - -*Defined in [contractkit/src/wrappers/Attestations.ts:834](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Attestations.ts#L834)* - -___ - -### blacklistedRegionCodes - -• **blacklistedRegionCodes**: *string[] | null* - -*Defined in [contractkit/src/wrappers/Attestations.ts:840](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Attestations.ts#L840)* - -___ - -### blsPublicKey - -• **blsPublicKey**: *string* - -*Defined in [contractkit/src/wrappers/Attestations.ts:830](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Attestations.ts#L830)* - -___ - -### ecdsaPublicKey - -• **ecdsaPublicKey**: *string* - -*Defined in [contractkit/src/wrappers/Attestations.ts:829](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Attestations.ts#L829)* - -___ - -### error - -• **error**: *null | Error* - -*Defined in [contractkit/src/wrappers/Attestations.ts:838](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Attestations.ts#L838)* - -___ - -### hasAttestationSigner - -• **hasAttestationSigner**: *boolean* - -*Defined in [contractkit/src/wrappers/Attestations.ts:833](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Attestations.ts#L833)* - -___ - -### metadataURL - -• **metadataURL**: *string | null* - -*Defined in [contractkit/src/wrappers/Attestations.ts:836](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Attestations.ts#L836)* - -___ - -### name - -• **name**: *string* - -*Defined in [contractkit/src/wrappers/Attestations.ts:827](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Attestations.ts#L827)* - -___ - -### okStatus - -• **okStatus**: *boolean* - -*Defined in [contractkit/src/wrappers/Attestations.ts:837](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Attestations.ts#L837)* - -___ - -### rightAccount - -• **rightAccount**: *boolean* - -*Defined in [contractkit/src/wrappers/Attestations.ts:841](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Attestations.ts#L841)* - -___ - -### score - -• **score**: *BigNumber* - -*Defined in [contractkit/src/wrappers/Attestations.ts:832](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Attestations.ts#L832)* - -___ - -### signer - -• **signer**: *string* - -*Defined in [contractkit/src/wrappers/Attestations.ts:842](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Attestations.ts#L842)* - -___ - -### smsProviders - -• **smsProviders**: *string[]* - -*Defined in [contractkit/src/wrappers/Attestations.ts:839](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Attestations.ts#L839)* - -___ - -### state - -• **state**: *[AttestationServiceStatusState](../enums/_wrappers_attestations_.attestationservicestatusstate.md)* - -*Defined in [contractkit/src/wrappers/Attestations.ts:843](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Attestations.ts#L843)* - -___ - -### version - -• **version**: *string | null* - -*Defined in [contractkit/src/wrappers/Attestations.ts:844](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Attestations.ts#L844)* diff --git a/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_attestations_.attestationstat.md b/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_attestations_.attestationstat.md deleted file mode 100644 index 27537fc4cce..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_attestations_.attestationstat.md +++ /dev/null @@ -1,28 +0,0 @@ -# Interface: AttestationStat - -## Hierarchy - -* **AttestationStat** - -## Index - -### Properties - -* [completed](_wrappers_attestations_.attestationstat.md#completed) -* [total](_wrappers_attestations_.attestationstat.md#total) - -## Properties - -### completed - -• **completed**: *number* - -*Defined in [contractkit/src/wrappers/Attestations.ts:34](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Attestations.ts#L34)* - -___ - -### total - -• **total**: *number* - -*Defined in [contractkit/src/wrappers/Attestations.ts:35](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Attestations.ts#L35)* diff --git a/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_attestations_.attestationstateforissuer.md b/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_attestations_.attestationstateforissuer.md deleted file mode 100644 index 49db99eca79..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_attestations_.attestationstateforissuer.md +++ /dev/null @@ -1,19 +0,0 @@ -# Interface: AttestationStateForIssuer - -## Hierarchy - -* **AttestationStateForIssuer** - -## Index - -### Properties - -* [attestationState](_wrappers_attestations_.attestationstateforissuer.md#attestationstate) - -## Properties - -### attestationState - -• **attestationState**: *[AttestationState](../enums/_wrappers_attestations_.attestationstate.md)* - -*Defined in [contractkit/src/wrappers/Attestations.ts:39](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Attestations.ts#L39)* diff --git a/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_attestations_.attestationstoken.md b/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_attestations_.attestationstoken.md deleted file mode 100644 index 6f00c39805c..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_attestations_.attestationstoken.md +++ /dev/null @@ -1,28 +0,0 @@ -# Interface: AttestationsToken - -## Hierarchy - -* **AttestationsToken** - -## Index - -### Properties - -* [address](_wrappers_attestations_.attestationstoken.md#address) -* [fee](_wrappers_attestations_.attestationstoken.md#fee) - -## Properties - -### address - -• **address**: *Address* - -*Defined in [contractkit/src/wrappers/Attestations.ts:43](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Attestations.ts#L43)* - -___ - -### fee - -• **fee**: *BigNumber* - -*Defined in [contractkit/src/wrappers/Attestations.ts:44](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Attestations.ts#L44)* diff --git a/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_attestations_.unselectedrequest.md b/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_attestations_.unselectedrequest.md deleted file mode 100644 index 0a153826f81..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_attestations_.unselectedrequest.md +++ /dev/null @@ -1,37 +0,0 @@ -# Interface: UnselectedRequest - -## Hierarchy - -* **UnselectedRequest** - -## Index - -### Properties - -* [attestationRequestFeeToken](_wrappers_attestations_.unselectedrequest.md#attestationrequestfeetoken) -* [attestationsRequested](_wrappers_attestations_.unselectedrequest.md#attestationsrequested) -* [blockNumber](_wrappers_attestations_.unselectedrequest.md#blocknumber) - -## Properties - -### attestationRequestFeeToken - -• **attestationRequestFeeToken**: *string* - -*Defined in [contractkit/src/wrappers/Attestations.ts:76](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Attestations.ts#L76)* - -___ - -### attestationsRequested - -• **attestationsRequested**: *number* - -*Defined in [contractkit/src/wrappers/Attestations.ts:75](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Attestations.ts#L75)* - -___ - -### blockNumber - -• **blockNumber**: *number* - -*Defined in [contractkit/src/wrappers/Attestations.ts:74](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Attestations.ts#L74)* diff --git a/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_blockchainparameters_.blockchainparametersconfig.md b/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_blockchainparameters_.blockchainparametersconfig.md deleted file mode 100644 index 257af428307..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_blockchainparameters_.blockchainparametersconfig.md +++ /dev/null @@ -1,37 +0,0 @@ -# Interface: BlockchainParametersConfig - -## Hierarchy - -* **BlockchainParametersConfig** - -## Index - -### Properties - -* [blockGasLimit](_wrappers_blockchainparameters_.blockchainparametersconfig.md#blockgaslimit) -* [intrinsicGasForAlternativeFeeCurrency](_wrappers_blockchainparameters_.blockchainparametersconfig.md#intrinsicgasforalternativefeecurrency) -* [minimumClientVersion](_wrappers_blockchainparameters_.blockchainparametersconfig.md#minimumclientversion) - -## Properties - -### blockGasLimit - -• **blockGasLimit**: *BigNumber* - -*Defined in [contractkit/src/wrappers/BlockchainParameters.ts:12](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BlockchainParameters.ts#L12)* - -___ - -### intrinsicGasForAlternativeFeeCurrency - -• **intrinsicGasForAlternativeFeeCurrency**: *BigNumber* - -*Defined in [contractkit/src/wrappers/BlockchainParameters.ts:14](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BlockchainParameters.ts#L14)* - -___ - -### minimumClientVersion - -• **minimumClientVersion**: *[ClientVersion](_wrappers_blockchainparameters_.clientversion.md)* - -*Defined in [contractkit/src/wrappers/BlockchainParameters.ts:13](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BlockchainParameters.ts#L13)* diff --git a/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_blockchainparameters_.clientversion.md b/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_blockchainparameters_.clientversion.md deleted file mode 100644 index f65ffda1c9d..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_blockchainparameters_.clientversion.md +++ /dev/null @@ -1,37 +0,0 @@ -# Interface: ClientVersion - -## Hierarchy - -* **ClientVersion** - -## Index - -### Properties - -* [major](_wrappers_blockchainparameters_.clientversion.md#major) -* [minor](_wrappers_blockchainparameters_.clientversion.md#minor) -* [patch](_wrappers_blockchainparameters_.clientversion.md#patch) - -## Properties - -### major - -• **major**: *number* - -*Defined in [contractkit/src/wrappers/BlockchainParameters.ts:6](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BlockchainParameters.ts#L6)* - -___ - -### minor - -• **minor**: *number* - -*Defined in [contractkit/src/wrappers/BlockchainParameters.ts:7](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BlockchainParameters.ts#L7)* - -___ - -### patch - -• **patch**: *number* - -*Defined in [contractkit/src/wrappers/BlockchainParameters.ts:8](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BlockchainParameters.ts#L8)* diff --git a/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_downtimeslasher_.downtimeslasherconfig.md b/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_downtimeslasher_.downtimeslasherconfig.md deleted file mode 100644 index d6d4ac999d4..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_downtimeslasher_.downtimeslasherconfig.md +++ /dev/null @@ -1,34 +0,0 @@ -# Interface: DowntimeSlasherConfig - -## Hierarchy - -* **DowntimeSlasherConfig** - -## Index - -### Properties - -* [slashableDowntime](_wrappers_downtimeslasher_.downtimeslasherconfig.md#slashabledowntime) -* [slashingIncentives](_wrappers_downtimeslasher_.downtimeslasherconfig.md#slashingincentives) - -## Properties - -### slashableDowntime - -• **slashableDowntime**: *number* - -*Defined in [contractkit/src/wrappers/DowntimeSlasher.ts:14](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/DowntimeSlasher.ts#L14)* - -___ - -### slashingIncentives - -• **slashingIncentives**: *object* - -*Defined in [contractkit/src/wrappers/DowntimeSlasher.ts:15](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/DowntimeSlasher.ts#L15)* - -#### Type declaration: - -* **penalty**: *BigNumber* - -* **reward**: *BigNumber* diff --git a/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_downtimeslasher_.interval.md b/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_downtimeslasher_.interval.md deleted file mode 100644 index aafff466103..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_downtimeslasher_.interval.md +++ /dev/null @@ -1,28 +0,0 @@ -# Interface: Interval - -## Hierarchy - -* **Interval** - -## Index - -### Properties - -* [end](_wrappers_downtimeslasher_.interval.md#end) -* [start](_wrappers_downtimeslasher_.interval.md#start) - -## Properties - -### end - -• **end**: *number* - -*Defined in [contractkit/src/wrappers/DowntimeSlasher.ts:23](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/DowntimeSlasher.ts#L23)* - -___ - -### start - -• **start**: *number* - -*Defined in [contractkit/src/wrappers/DowntimeSlasher.ts:22](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/DowntimeSlasher.ts#L22)* diff --git a/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_election_.electablevalidators.md b/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_election_.electablevalidators.md deleted file mode 100644 index 4f7dc485a5c..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_election_.electablevalidators.md +++ /dev/null @@ -1,28 +0,0 @@ -# Interface: ElectableValidators - -## Hierarchy - -* **ElectableValidators** - -## Index - -### Properties - -* [max](_wrappers_election_.electablevalidators.md#max) -* [min](_wrappers_election_.electablevalidators.md#min) - -## Properties - -### max - -• **max**: *BigNumber* - -*Defined in [contractkit/src/wrappers/Election.ts:53](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Election.ts#L53)* - -___ - -### min - -• **min**: *BigNumber* - -*Defined in [contractkit/src/wrappers/Election.ts:52](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Election.ts#L52)* diff --git a/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_election_.electionconfig.md b/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_election_.electionconfig.md deleted file mode 100644 index 73613f0535e..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_election_.electionconfig.md +++ /dev/null @@ -1,55 +0,0 @@ -# Interface: ElectionConfig - -## Hierarchy - -* **ElectionConfig** - -## Index - -### Properties - -* [currentThreshold](_wrappers_election_.electionconfig.md#currentthreshold) -* [electabilityThreshold](_wrappers_election_.electionconfig.md#electabilitythreshold) -* [electableValidators](_wrappers_election_.electionconfig.md#electablevalidators) -* [maxNumGroupsVotedFor](_wrappers_election_.electionconfig.md#maxnumgroupsvotedfor) -* [totalVotes](_wrappers_election_.electionconfig.md#totalvotes) - -## Properties - -### currentThreshold - -• **currentThreshold**: *BigNumber* - -*Defined in [contractkit/src/wrappers/Election.ts:61](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Election.ts#L61)* - -___ - -### electabilityThreshold - -• **electabilityThreshold**: *BigNumber* - -*Defined in [contractkit/src/wrappers/Election.ts:58](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Election.ts#L58)* - -___ - -### electableValidators - -• **electableValidators**: *[ElectableValidators](_wrappers_election_.electablevalidators.md)* - -*Defined in [contractkit/src/wrappers/Election.ts:57](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Election.ts#L57)* - -___ - -### maxNumGroupsVotedFor - -• **maxNumGroupsVotedFor**: *BigNumber* - -*Defined in [contractkit/src/wrappers/Election.ts:59](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Election.ts#L59)* - -___ - -### totalVotes - -• **totalVotes**: *BigNumber* - -*Defined in [contractkit/src/wrappers/Election.ts:60](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Election.ts#L60)* diff --git a/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_election_.groupvote.md b/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_election_.groupvote.md deleted file mode 100644 index e89c09100dd..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_election_.groupvote.md +++ /dev/null @@ -1,37 +0,0 @@ -# Interface: GroupVote - -## Hierarchy - -* **GroupVote** - -## Index - -### Properties - -* [active](_wrappers_election_.groupvote.md#active) -* [group](_wrappers_election_.groupvote.md#group) -* [pending](_wrappers_election_.groupvote.md#pending) - -## Properties - -### active - -• **active**: *BigNumber* - -*Defined in [contractkit/src/wrappers/Election.ts:42](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Election.ts#L42)* - -___ - -### group - -• **group**: *Address* - -*Defined in [contractkit/src/wrappers/Election.ts:40](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Election.ts#L40)* - -___ - -### pending - -• **pending**: *BigNumber* - -*Defined in [contractkit/src/wrappers/Election.ts:41](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Election.ts#L41)* diff --git a/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_election_.groupvoterreward.md b/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_election_.groupvoterreward.md deleted file mode 100644 index 24e7545b894..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_election_.groupvoterreward.md +++ /dev/null @@ -1,37 +0,0 @@ -# Interface: GroupVoterReward - -## Hierarchy - -* **GroupVoterReward** - -## Index - -### Properties - -* [epochNumber](_wrappers_election_.groupvoterreward.md#epochnumber) -* [group](_wrappers_election_.groupvoterreward.md#group) -* [groupVoterPayment](_wrappers_election_.groupvoterreward.md#groupvoterpayment) - -## Properties - -### epochNumber - -• **epochNumber**: *number* - -*Defined in [contractkit/src/wrappers/Election.ts:48](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Election.ts#L48)* - -___ - -### group - -• **group**: *[ValidatorGroup](_wrappers_validators_.validatorgroup.md)* - -*Defined in [contractkit/src/wrappers/Election.ts:46](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Election.ts#L46)* - -___ - -### groupVoterPayment - -• **groupVoterPayment**: *BigNumber* - -*Defined in [contractkit/src/wrappers/Election.ts:47](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Election.ts#L47)* diff --git a/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_election_.validatorgroupvote.md b/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_election_.validatorgroupvote.md deleted file mode 100644 index 9cb2b75bd6d..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_election_.validatorgroupvote.md +++ /dev/null @@ -1,55 +0,0 @@ -# Interface: ValidatorGroupVote - -## Hierarchy - -* **ValidatorGroupVote** - -## Index - -### Properties - -* [address](_wrappers_election_.validatorgroupvote.md#address) -* [capacity](_wrappers_election_.validatorgroupvote.md#capacity) -* [eligible](_wrappers_election_.validatorgroupvote.md#eligible) -* [name](_wrappers_election_.validatorgroupvote.md#name) -* [votes](_wrappers_election_.validatorgroupvote.md#votes) - -## Properties - -### address - -• **address**: *Address* - -*Defined in [contractkit/src/wrappers/Election.ts:20](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Election.ts#L20)* - -___ - -### capacity - -• **capacity**: *BigNumber* - -*Defined in [contractkit/src/wrappers/Election.ts:23](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Election.ts#L23)* - -___ - -### eligible - -• **eligible**: *boolean* - -*Defined in [contractkit/src/wrappers/Election.ts:24](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Election.ts#L24)* - -___ - -### name - -• **name**: *string* - -*Defined in [contractkit/src/wrappers/Election.ts:21](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Election.ts#L21)* - -___ - -### votes - -• **votes**: *BigNumber* - -*Defined in [contractkit/src/wrappers/Election.ts:22](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Election.ts#L22)* diff --git a/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_election_.voter.md b/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_election_.voter.md deleted file mode 100644 index 525010c37ba..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_election_.voter.md +++ /dev/null @@ -1,28 +0,0 @@ -# Interface: Voter - -## Hierarchy - -* **Voter** - -## Index - -### Properties - -* [address](_wrappers_election_.voter.md#address) -* [votes](_wrappers_election_.voter.md#votes) - -## Properties - -### address - -• **address**: *Address* - -*Defined in [contractkit/src/wrappers/Election.ts:28](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Election.ts#L28)* - -___ - -### votes - -• **votes**: *[GroupVote](_wrappers_election_.groupvote.md)[]* - -*Defined in [contractkit/src/wrappers/Election.ts:29](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Election.ts#L29)* diff --git a/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_election_.voterreward.md b/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_election_.voterreward.md deleted file mode 100644 index 324ea7fee0a..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_election_.voterreward.md +++ /dev/null @@ -1,46 +0,0 @@ -# Interface: VoterReward - -## Hierarchy - -* **VoterReward** - -## Index - -### Properties - -* [address](_wrappers_election_.voterreward.md#address) -* [addressPayment](_wrappers_election_.voterreward.md#addresspayment) -* [epochNumber](_wrappers_election_.voterreward.md#epochnumber) -* [group](_wrappers_election_.voterreward.md#group) - -## Properties - -### address - -• **address**: *Address* - -*Defined in [contractkit/src/wrappers/Election.ts:33](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Election.ts#L33)* - -___ - -### addressPayment - -• **addressPayment**: *BigNumber* - -*Defined in [contractkit/src/wrappers/Election.ts:34](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Election.ts#L34)* - -___ - -### epochNumber - -• **epochNumber**: *number* - -*Defined in [contractkit/src/wrappers/Election.ts:36](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Election.ts#L36)* - -___ - -### group - -• **group**: *[ValidatorGroup](_wrappers_validators_.validatorgroup.md)* - -*Defined in [contractkit/src/wrappers/Election.ts:35](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Election.ts#L35)* diff --git a/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_exchange_.exchangeconfig.md b/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_exchange_.exchangeconfig.md deleted file mode 100644 index cf1701c1238..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_exchange_.exchangeconfig.md +++ /dev/null @@ -1,55 +0,0 @@ -# Interface: ExchangeConfig - -## Hierarchy - -* **ExchangeConfig** - -## Index - -### Properties - -* [lastBucketUpdate](_wrappers_exchange_.exchangeconfig.md#lastbucketupdate) -* [minimumReports](_wrappers_exchange_.exchangeconfig.md#minimumreports) -* [reserveFraction](_wrappers_exchange_.exchangeconfig.md#reservefraction) -* [spread](_wrappers_exchange_.exchangeconfig.md#spread) -* [updateFrequency](_wrappers_exchange_.exchangeconfig.md#updatefrequency) - -## Properties - -### lastBucketUpdate - -• **lastBucketUpdate**: *BigNumber* - -*Defined in [contractkit/src/wrappers/Exchange.ts:23](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Exchange.ts#L23)* - -___ - -### minimumReports - -• **minimumReports**: *BigNumber* - -*Defined in [contractkit/src/wrappers/Exchange.ts:22](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Exchange.ts#L22)* - -___ - -### reserveFraction - -• **reserveFraction**: *BigNumber* - -*Defined in [contractkit/src/wrappers/Exchange.ts:20](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Exchange.ts#L20)* - -___ - -### spread - -• **spread**: *BigNumber* - -*Defined in [contractkit/src/wrappers/Exchange.ts:19](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Exchange.ts#L19)* - -___ - -### updateFrequency - -• **updateFrequency**: *BigNumber* - -*Defined in [contractkit/src/wrappers/Exchange.ts:21](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Exchange.ts#L21)* diff --git a/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_gaspriceminimum_.gaspriceminimumconfig.md b/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_gaspriceminimum_.gaspriceminimumconfig.md deleted file mode 100644 index d869361cecb..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_gaspriceminimum_.gaspriceminimumconfig.md +++ /dev/null @@ -1,37 +0,0 @@ -# Interface: GasPriceMinimumConfig - -## Hierarchy - -* **GasPriceMinimumConfig** - -## Index - -### Properties - -* [adjustmentSpeed](_wrappers_gaspriceminimum_.gaspriceminimumconfig.md#adjustmentspeed) -* [gasPriceMinimum](_wrappers_gaspriceminimum_.gaspriceminimumconfig.md#gaspriceminimum) -* [targetDensity](_wrappers_gaspriceminimum_.gaspriceminimumconfig.md#targetdensity) - -## Properties - -### adjustmentSpeed - -• **adjustmentSpeed**: *BigNumber* - -*Defined in [contractkit/src/wrappers/GasPriceMinimum.ts:8](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/GasPriceMinimum.ts#L8)* - -___ - -### gasPriceMinimum - -• **gasPriceMinimum**: *BigNumber* - -*Defined in [contractkit/src/wrappers/GasPriceMinimum.ts:6](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/GasPriceMinimum.ts#L6)* - -___ - -### targetDensity - -• **targetDensity**: *BigNumber* - -*Defined in [contractkit/src/wrappers/GasPriceMinimum.ts:7](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/GasPriceMinimum.ts#L7)* diff --git a/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_governance_.governanceconfig.md b/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_governance_.governanceconfig.md deleted file mode 100644 index e358816f8ec..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_governance_.governanceconfig.md +++ /dev/null @@ -1,64 +0,0 @@ -# Interface: GovernanceConfig - -## Hierarchy - -* **GovernanceConfig** - -## Index - -### Properties - -* [concurrentProposals](_wrappers_governance_.governanceconfig.md#concurrentproposals) -* [dequeueFrequency](_wrappers_governance_.governanceconfig.md#dequeuefrequency) -* [minDeposit](_wrappers_governance_.governanceconfig.md#mindeposit) -* [participationParameters](_wrappers_governance_.governanceconfig.md#participationparameters) -* [queueExpiry](_wrappers_governance_.governanceconfig.md#queueexpiry) -* [stageDurations](_wrappers_governance_.governanceconfig.md#stagedurations) - -## Properties - -### concurrentProposals - -• **concurrentProposals**: *BigNumber* - -*Defined in [contractkit/src/wrappers/Governance.ts:53](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Governance.ts#L53)* - -___ - -### dequeueFrequency - -• **dequeueFrequency**: *BigNumber* - -*Defined in [contractkit/src/wrappers/Governance.ts:54](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Governance.ts#L54)* - -___ - -### minDeposit - -• **minDeposit**: *BigNumber* - -*Defined in [contractkit/src/wrappers/Governance.ts:55](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Governance.ts#L55)* - -___ - -### participationParameters - -• **participationParameters**: *[ParticipationParameters](_wrappers_governance_.participationparameters.md)* - -*Defined in [contractkit/src/wrappers/Governance.ts:58](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Governance.ts#L58)* - -___ - -### queueExpiry - -• **queueExpiry**: *BigNumber* - -*Defined in [contractkit/src/wrappers/Governance.ts:56](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Governance.ts#L56)* - -___ - -### stageDurations - -• **stageDurations**: *[ProposalStageDurations](_wrappers_governance_.proposalstagedurations.md)* - -*Defined in [contractkit/src/wrappers/Governance.ts:57](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Governance.ts#L57)* diff --git a/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_governance_.hotfixrecord.md b/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_governance_.hotfixrecord.md deleted file mode 100644 index fbc03aa5098..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_governance_.hotfixrecord.md +++ /dev/null @@ -1,37 +0,0 @@ -# Interface: HotfixRecord - -## Hierarchy - -* **HotfixRecord** - -## Index - -### Properties - -* [approved](_wrappers_governance_.hotfixrecord.md#approved) -* [executed](_wrappers_governance_.hotfixrecord.md#executed) -* [preparedEpoch](_wrappers_governance_.hotfixrecord.md#preparedepoch) - -## Properties - -### approved - -• **approved**: *boolean* - -*Defined in [contractkit/src/wrappers/Governance.ts:118](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Governance.ts#L118)* - -___ - -### executed - -• **executed**: *boolean* - -*Defined in [contractkit/src/wrappers/Governance.ts:119](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Governance.ts#L119)* - -___ - -### preparedEpoch - -• **preparedEpoch**: *BigNumber* - -*Defined in [contractkit/src/wrappers/Governance.ts:120](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Governance.ts#L120)* diff --git a/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_governance_.participationparameters.md b/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_governance_.participationparameters.md deleted file mode 100644 index 4f7efa82ea9..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_governance_.participationparameters.md +++ /dev/null @@ -1,46 +0,0 @@ -# Interface: ParticipationParameters - -## Hierarchy - -* **ParticipationParameters** - -## Index - -### Properties - -* [baseline](_wrappers_governance_.participationparameters.md#baseline) -* [baselineFloor](_wrappers_governance_.participationparameters.md#baselinefloor) -* [baselineQuorumFactor](_wrappers_governance_.participationparameters.md#baselinequorumfactor) -* [baselineUpdateFactor](_wrappers_governance_.participationparameters.md#baselineupdatefactor) - -## Properties - -### baseline - -• **baseline**: *BigNumber* - -*Defined in [contractkit/src/wrappers/Governance.ts:46](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Governance.ts#L46)* - -___ - -### baselineFloor - -• **baselineFloor**: *BigNumber* - -*Defined in [contractkit/src/wrappers/Governance.ts:47](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Governance.ts#L47)* - -___ - -### baselineQuorumFactor - -• **baselineQuorumFactor**: *BigNumber* - -*Defined in [contractkit/src/wrappers/Governance.ts:49](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Governance.ts#L49)* - -___ - -### baselineUpdateFactor - -• **baselineUpdateFactor**: *BigNumber* - -*Defined in [contractkit/src/wrappers/Governance.ts:48](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Governance.ts#L48)* diff --git a/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_governance_.proposalmetadata.md b/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_governance_.proposalmetadata.md deleted file mode 100644 index 573f05c64ea..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_governance_.proposalmetadata.md +++ /dev/null @@ -1,55 +0,0 @@ -# Interface: ProposalMetadata - -## Hierarchy - -* **ProposalMetadata** - -## Index - -### Properties - -* [deposit](_wrappers_governance_.proposalmetadata.md#deposit) -* [descriptionURL](_wrappers_governance_.proposalmetadata.md#descriptionurl) -* [proposer](_wrappers_governance_.proposalmetadata.md#proposer) -* [timestamp](_wrappers_governance_.proposalmetadata.md#timestamp) -* [transactionCount](_wrappers_governance_.proposalmetadata.md#transactioncount) - -## Properties - -### deposit - -• **deposit**: *BigNumber* - -*Defined in [contractkit/src/wrappers/Governance.ts:63](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Governance.ts#L63)* - -___ - -### descriptionURL - -• **descriptionURL**: *string* - -*Defined in [contractkit/src/wrappers/Governance.ts:66](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Governance.ts#L66)* - -___ - -### proposer - -• **proposer**: *Address* - -*Defined in [contractkit/src/wrappers/Governance.ts:62](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Governance.ts#L62)* - -___ - -### timestamp - -• **timestamp**: *BigNumber* - -*Defined in [contractkit/src/wrappers/Governance.ts:64](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Governance.ts#L64)* - -___ - -### transactionCount - -• **transactionCount**: *number* - -*Defined in [contractkit/src/wrappers/Governance.ts:65](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Governance.ts#L65)* diff --git a/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_governance_.proposalrecord.md b/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_governance_.proposalrecord.md deleted file mode 100644 index 6511fe60542..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_governance_.proposalrecord.md +++ /dev/null @@ -1,64 +0,0 @@ -# Interface: ProposalRecord - -## Hierarchy - -* **ProposalRecord** - -## Index - -### Properties - -* [metadata](_wrappers_governance_.proposalrecord.md#metadata) -* [passing](_wrappers_governance_.proposalrecord.md#passing) -* [proposal](_wrappers_governance_.proposalrecord.md#proposal) -* [stage](_wrappers_governance_.proposalrecord.md#stage) -* [upvotes](_wrappers_governance_.proposalrecord.md#upvotes) -* [votes](_wrappers_governance_.proposalrecord.md#votes) - -## Properties - -### metadata - -• **metadata**: *[ProposalMetadata](_wrappers_governance_.proposalmetadata.md)* - -*Defined in [contractkit/src/wrappers/Governance.ts:86](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Governance.ts#L86)* - -___ - -### passing - -• **passing**: *boolean* - -*Defined in [contractkit/src/wrappers/Governance.ts:90](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Governance.ts#L90)* - -___ - -### proposal - -• **proposal**: *[Proposal](../modules/_wrappers_governance_.md#proposal)* - -*Defined in [contractkit/src/wrappers/Governance.ts:89](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Governance.ts#L89)* - -___ - -### stage - -• **stage**: *[ProposalStage](../enums/_wrappers_governance_.proposalstage.md)* - -*Defined in [contractkit/src/wrappers/Governance.ts:85](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Governance.ts#L85)* - -___ - -### upvotes - -• **upvotes**: *BigNumber* - -*Defined in [contractkit/src/wrappers/Governance.ts:87](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Governance.ts#L87)* - -___ - -### votes - -• **votes**: *[Votes](_wrappers_governance_.votes.md)* - -*Defined in [contractkit/src/wrappers/Governance.ts:88](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Governance.ts#L88)* diff --git a/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_governance_.proposalstagedurations.md b/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_governance_.proposalstagedurations.md deleted file mode 100644 index 23bd16882bd..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_governance_.proposalstagedurations.md +++ /dev/null @@ -1,37 +0,0 @@ -# Interface: ProposalStageDurations - -## Hierarchy - -* **ProposalStageDurations** - -## Index - -### Properties - -* [[ProposalStage.Approval]](_wrappers_governance_.proposalstagedurations.md#[proposalstage.approval]) -* [[ProposalStage.Execution]](_wrappers_governance_.proposalstagedurations.md#[proposalstage.execution]) -* [[ProposalStage.Referendum]](_wrappers_governance_.proposalstagedurations.md#[proposalstage.referendum]) - -## Properties - -### [ProposalStage.Approval] - -• **[ProposalStage.Approval]**: *BigNumber* - -*Defined in [contractkit/src/wrappers/Governance.ts:40](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Governance.ts#L40)* - -___ - -### [ProposalStage.Execution] - -• **[ProposalStage.Execution]**: *BigNumber* - -*Defined in [contractkit/src/wrappers/Governance.ts:42](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Governance.ts#L42)* - -___ - -### [ProposalStage.Referendum] - -• **[ProposalStage.Referendum]**: *BigNumber* - -*Defined in [contractkit/src/wrappers/Governance.ts:41](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Governance.ts#L41)* diff --git a/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_governance_.upvoterecord.md b/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_governance_.upvoterecord.md deleted file mode 100644 index 7f302b9a041..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_governance_.upvoterecord.md +++ /dev/null @@ -1,28 +0,0 @@ -# Interface: UpvoteRecord - -## Hierarchy - -* **UpvoteRecord** - -## Index - -### Properties - -* [proposalID](_wrappers_governance_.upvoterecord.md#proposalid) -* [upvotes](_wrappers_governance_.upvoterecord.md#upvotes) - -## Properties - -### proposalID - -• **proposalID**: *BigNumber* - -*Defined in [contractkit/src/wrappers/Governance.ts:94](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Governance.ts#L94)* - -___ - -### upvotes - -• **upvotes**: *BigNumber* - -*Defined in [contractkit/src/wrappers/Governance.ts:95](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Governance.ts#L95)* diff --git a/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_governance_.voter.md b/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_governance_.voter.md deleted file mode 100644 index 67207c78331..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_governance_.voter.md +++ /dev/null @@ -1,37 +0,0 @@ -# Interface: Voter - -## Hierarchy - -* **Voter** - -## Index - -### Properties - -* [refundedDeposits](_wrappers_governance_.voter.md#refundeddeposits) -* [upvote](_wrappers_governance_.voter.md#upvote) -* [votes](_wrappers_governance_.voter.md#votes) - -## Properties - -### refundedDeposits - -• **refundedDeposits**: *BigNumber* - -*Defined in [contractkit/src/wrappers/Governance.ts:132](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Governance.ts#L132)* - -___ - -### upvote - -• **upvote**: *[UpvoteRecord](_wrappers_governance_.upvoterecord.md)* - -*Defined in [contractkit/src/wrappers/Governance.ts:130](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Governance.ts#L130)* - -___ - -### votes - -• **votes**: *[VoteRecord](_wrappers_governance_.voterecord.md)[]* - -*Defined in [contractkit/src/wrappers/Governance.ts:131](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Governance.ts#L131)* diff --git a/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_governance_.voterecord.md b/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_governance_.voterecord.md deleted file mode 100644 index b9002766585..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_governance_.voterecord.md +++ /dev/null @@ -1,37 +0,0 @@ -# Interface: VoteRecord - -## Hierarchy - -* **VoteRecord** - -## Index - -### Properties - -* [proposalID](_wrappers_governance_.voterecord.md#proposalid) -* [value](_wrappers_governance_.voterecord.md#value) -* [votes](_wrappers_governance_.voterecord.md#votes) - -## Properties - -### proposalID - -• **proposalID**: *BigNumber* - -*Defined in [contractkit/src/wrappers/Governance.ts:124](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Governance.ts#L124)* - -___ - -### value - -• **value**: *[VoteValue](../enums/_wrappers_governance_.votevalue.md)* - -*Defined in [contractkit/src/wrappers/Governance.ts:126](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Governance.ts#L126)* - -___ - -### votes - -• **votes**: *BigNumber* - -*Defined in [contractkit/src/wrappers/Governance.ts:125](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Governance.ts#L125)* diff --git a/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_governance_.votes.md b/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_governance_.votes.md deleted file mode 100644 index 669c59b27a1..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_governance_.votes.md +++ /dev/null @@ -1,37 +0,0 @@ -# Interface: Votes - -## Hierarchy - -* **Votes** - -## Index - -### Properties - -* [[VoteValue.Abstain]](_wrappers_governance_.votes.md#[votevalue.abstain]) -* [[VoteValue.No]](_wrappers_governance_.votes.md#[votevalue.no]) -* [[VoteValue.Yes]](_wrappers_governance_.votes.md#[votevalue.yes]) - -## Properties - -### [VoteValue.Abstain] - -• **[VoteValue.Abstain]**: *BigNumber* - -*Defined in [contractkit/src/wrappers/Governance.ts:108](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Governance.ts#L108)* - -___ - -### [VoteValue.No] - -• **[VoteValue.No]**: *BigNumber* - -*Defined in [contractkit/src/wrappers/Governance.ts:107](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Governance.ts#L107)* - -___ - -### [VoteValue.Yes] - -• **[VoteValue.Yes]**: *BigNumber* - -*Defined in [contractkit/src/wrappers/Governance.ts:106](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Governance.ts#L106)* diff --git a/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_lockedgold_.accountslashed.md b/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_lockedgold_.accountslashed.md deleted file mode 100644 index 05b59f793bd..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_lockedgold_.accountslashed.md +++ /dev/null @@ -1,55 +0,0 @@ -# Interface: AccountSlashed - -## Hierarchy - -* **AccountSlashed** - -## Index - -### Properties - -* [epochNumber](_wrappers_lockedgold_.accountslashed.md#epochnumber) -* [penalty](_wrappers_lockedgold_.accountslashed.md#penalty) -* [reporter](_wrappers_lockedgold_.accountslashed.md#reporter) -* [reward](_wrappers_lockedgold_.accountslashed.md#reward) -* [slashed](_wrappers_lockedgold_.accountslashed.md#slashed) - -## Properties - -### epochNumber - -• **epochNumber**: *number* - -*Defined in [contractkit/src/wrappers/LockedGold.ts:50](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/LockedGold.ts#L50)* - -___ - -### penalty - -• **penalty**: *BigNumber* - -*Defined in [contractkit/src/wrappers/LockedGold.ts:47](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/LockedGold.ts#L47)* - -___ - -### reporter - -• **reporter**: *Address* - -*Defined in [contractkit/src/wrappers/LockedGold.ts:48](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/LockedGold.ts#L48)* - -___ - -### reward - -• **reward**: *BigNumber* - -*Defined in [contractkit/src/wrappers/LockedGold.ts:49](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/LockedGold.ts#L49)* - -___ - -### slashed - -• **slashed**: *Address* - -*Defined in [contractkit/src/wrappers/LockedGold.ts:46](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/LockedGold.ts#L46)* diff --git a/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_lockedgold_.lockedgoldconfig.md b/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_lockedgold_.lockedgoldconfig.md deleted file mode 100644 index e207b424dd3..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_lockedgold_.lockedgoldconfig.md +++ /dev/null @@ -1,28 +0,0 @@ -# Interface: LockedGoldConfig - -## Hierarchy - -* **LockedGoldConfig** - -## Index - -### Properties - -* [totalLockedGold](_wrappers_lockedgold_.lockedgoldconfig.md#totallockedgold) -* [unlockingPeriod](_wrappers_lockedgold_.lockedgoldconfig.md#unlockingperiod) - -## Properties - -### totalLockedGold - -• **totalLockedGold**: *BigNumber* - -*Defined in [contractkit/src/wrappers/LockedGold.ts:60](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/LockedGold.ts#L60)* - -___ - -### unlockingPeriod - -• **unlockingPeriod**: *BigNumber* - -*Defined in [contractkit/src/wrappers/LockedGold.ts:59](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/LockedGold.ts#L59)* diff --git a/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_lockedgold_.pendingwithdrawal.md b/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_lockedgold_.pendingwithdrawal.md deleted file mode 100644 index 7f94e787f22..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_lockedgold_.pendingwithdrawal.md +++ /dev/null @@ -1,28 +0,0 @@ -# Interface: PendingWithdrawal - -## Hierarchy - -* **PendingWithdrawal** - -## Index - -### Properties - -* [time](_wrappers_lockedgold_.pendingwithdrawal.md#time) -* [value](_wrappers_lockedgold_.pendingwithdrawal.md#value) - -## Properties - -### time - -• **time**: *BigNumber* - -*Defined in [contractkit/src/wrappers/LockedGold.ts:54](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/LockedGold.ts#L54)* - -___ - -### value - -• **value**: *BigNumber* - -*Defined in [contractkit/src/wrappers/LockedGold.ts:55](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/LockedGold.ts#L55)* diff --git a/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_lockedgold_.votingdetails.md b/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_lockedgold_.votingdetails.md deleted file mode 100644 index 7948ca07ede..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_lockedgold_.votingdetails.md +++ /dev/null @@ -1,39 +0,0 @@ -# Interface: VotingDetails - -## Hierarchy - -* **VotingDetails** - -## Index - -### Properties - -* [accountAddress](_wrappers_lockedgold_.votingdetails.md#accountaddress) -* [voterAddress](_wrappers_lockedgold_.votingdetails.md#voteraddress) -* [weight](_wrappers_lockedgold_.votingdetails.md#weight) - -## Properties - -### accountAddress - -• **accountAddress**: *Address* - -*Defined in [contractkit/src/wrappers/LockedGold.ts:30](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/LockedGold.ts#L30)* - -___ - -### voterAddress - -• **voterAddress**: *Address* - -*Defined in [contractkit/src/wrappers/LockedGold.ts:31](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/LockedGold.ts#L31)* - -___ - -### weight - -• **weight**: *BigNumber* - -*Defined in [contractkit/src/wrappers/LockedGold.ts:33](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/LockedGold.ts#L33)* - -vote's weight diff --git a/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_metatransactionwallet_.rawtransaction.md b/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_metatransactionwallet_.rawtransaction.md deleted file mode 100644 index 69c9b2318b2..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_metatransactionwallet_.rawtransaction.md +++ /dev/null @@ -1,37 +0,0 @@ -# Interface: RawTransaction - -## Hierarchy - -* **RawTransaction** - -## Index - -### Properties - -* [data](_wrappers_metatransactionwallet_.rawtransaction.md#data) -* [destination](_wrappers_metatransactionwallet_.rawtransaction.md#destination) -* [value](_wrappers_metatransactionwallet_.rawtransaction.md#value) - -## Properties - -### data - -• **data**: *string* - -*Defined in [contractkit/src/wrappers/MetaTransactionWallet.ts:24](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/MetaTransactionWallet.ts#L24)* - -___ - -### destination - -• **destination**: *string* - -*Defined in [contractkit/src/wrappers/MetaTransactionWallet.ts:22](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/MetaTransactionWallet.ts#L22)* - -___ - -### value - -• **value**: *string* - -*Defined in [contractkit/src/wrappers/MetaTransactionWallet.ts:23](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/MetaTransactionWallet.ts#L23)* diff --git a/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_metatransactionwallet_.transactionobjectwithvalue.md b/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_metatransactionwallet_.transactionobjectwithvalue.md deleted file mode 100644 index 0bc5db513ef..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_metatransactionwallet_.transactionobjectwithvalue.md +++ /dev/null @@ -1,32 +0,0 @@ -# Interface: TransactionObjectWithValue <**T**> - -## Type parameters - -▪ **T** - -## Hierarchy - -* **TransactionObjectWithValue** - -## Index - -### Properties - -* [txo](_wrappers_metatransactionwallet_.transactionobjectwithvalue.md#txo) -* [value](_wrappers_metatransactionwallet_.transactionobjectwithvalue.md#value) - -## Properties - -### txo - -• **txo**: *CeloTxObject‹T›* - -*Defined in [contractkit/src/wrappers/MetaTransactionWallet.ts:17](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/MetaTransactionWallet.ts#L17)* - -___ - -### value - -• **value**: *BigNumber.Value* - -*Defined in [contractkit/src/wrappers/MetaTransactionWallet.ts:18](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/MetaTransactionWallet.ts#L18)* diff --git a/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_multisig_.transactiondata.md b/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_multisig_.transactiondata.md deleted file mode 100644 index 8be44e41ec4..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_multisig_.transactiondata.md +++ /dev/null @@ -1,55 +0,0 @@ -# Interface: TransactionData - -## Hierarchy - -* **TransactionData** - -## Index - -### Properties - -* [confirmations](_wrappers_multisig_.transactiondata.md#confirmations) -* [data](_wrappers_multisig_.transactiondata.md#data) -* [destination](_wrappers_multisig_.transactiondata.md#destination) -* [executed](_wrappers_multisig_.transactiondata.md#executed) -* [value](_wrappers_multisig_.transactiondata.md#value) - -## Properties - -### confirmations - -• **confirmations**: *string[]* - -*Defined in [contractkit/src/wrappers/MultiSig.ts:20](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/MultiSig.ts#L20)* - -___ - -### data - -• **data**: *string* - -*Defined in [contractkit/src/wrappers/MultiSig.ts:18](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/MultiSig.ts#L18)* - -___ - -### destination - -• **destination**: *string* - -*Defined in [contractkit/src/wrappers/MultiSig.ts:16](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/MultiSig.ts#L16)* - -___ - -### executed - -• **executed**: *boolean* - -*Defined in [contractkit/src/wrappers/MultiSig.ts:19](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/MultiSig.ts#L19)* - -___ - -### value - -• **value**: *BigNumber* - -*Defined in [contractkit/src/wrappers/MultiSig.ts:17](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/MultiSig.ts#L17)* diff --git a/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_releasegold_.balancestate.md b/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_releasegold_.balancestate.md deleted file mode 100644 index c458eb219f9..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_releasegold_.balancestate.md +++ /dev/null @@ -1,73 +0,0 @@ -# Interface: BalanceState - -## Hierarchy - -* **BalanceState** - -## Index - -### Properties - -* [currentReleasedTotalAmount](_wrappers_releasegold_.balancestate.md#currentreleasedtotalamount) -* [maxDistribution](_wrappers_releasegold_.balancestate.md#maxdistribution) -* [remainingLockedBalance](_wrappers_releasegold_.balancestate.md#remaininglockedbalance) -* [remainingTotalBalance](_wrappers_releasegold_.balancestate.md#remainingtotalbalance) -* [remainingUnlockedBalance](_wrappers_releasegold_.balancestate.md#remainingunlockedbalance) -* [totalBalance](_wrappers_releasegold_.balancestate.md#totalbalance) -* [totalWithdrawn](_wrappers_releasegold_.balancestate.md#totalwithdrawn) - -## Properties - -### currentReleasedTotalAmount - -• **currentReleasedTotalAmount**: *string* - -*Defined in [contractkit/src/wrappers/ReleaseGold.ts:29](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/ReleaseGold.ts#L29)* - -___ - -### maxDistribution - -• **maxDistribution**: *string* - -*Defined in [contractkit/src/wrappers/ReleaseGold.ts:24](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/ReleaseGold.ts#L24)* - -___ - -### remainingLockedBalance - -• **remainingLockedBalance**: *string* - -*Defined in [contractkit/src/wrappers/ReleaseGold.ts:28](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/ReleaseGold.ts#L28)* - -___ - -### remainingTotalBalance - -• **remainingTotalBalance**: *string* - -*Defined in [contractkit/src/wrappers/ReleaseGold.ts:26](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/ReleaseGold.ts#L26)* - -___ - -### remainingUnlockedBalance - -• **remainingUnlockedBalance**: *string* - -*Defined in [contractkit/src/wrappers/ReleaseGold.ts:27](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/ReleaseGold.ts#L27)* - -___ - -### totalBalance - -• **totalBalance**: *string* - -*Defined in [contractkit/src/wrappers/ReleaseGold.ts:25](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/ReleaseGold.ts#L25)* - -___ - -### totalWithdrawn - -• **totalWithdrawn**: *string* - -*Defined in [contractkit/src/wrappers/ReleaseGold.ts:23](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/ReleaseGold.ts#L23)* diff --git a/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_releasegold_.releasegoldinfo.md b/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_releasegold_.releasegoldinfo.md deleted file mode 100644 index c38b3b30513..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_releasegold_.releasegoldinfo.md +++ /dev/null @@ -1,118 +0,0 @@ -# Interface: ReleaseGoldInfo - -## Hierarchy - -* **ReleaseGoldInfo** - -## Index - -### Properties - -* [balanceStateData](_wrappers_releasegold_.releasegoldinfo.md#balancestatedata) -* [beneficiary](_wrappers_releasegold_.releasegoldinfo.md#beneficiary) -* [canValidate](_wrappers_releasegold_.releasegoldinfo.md#canvalidate) -* [canVote](_wrappers_releasegold_.releasegoldinfo.md#canvote) -* [isRevoked](_wrappers_releasegold_.releasegoldinfo.md#isrevoked) -* [liquidityProvisionMet](_wrappers_releasegold_.releasegoldinfo.md#liquidityprovisionmet) -* [owner](_wrappers_releasegold_.releasegoldinfo.md#owner) -* [refundAddress](_wrappers_releasegold_.releasegoldinfo.md#refundaddress) -* [releaseGoldWrapperAddress](_wrappers_releasegold_.releasegoldinfo.md#releasegoldwrapperaddress) -* [releaseOwner](_wrappers_releasegold_.releasegoldinfo.md#releaseowner) -* [releaseSchedule](_wrappers_releasegold_.releasegoldinfo.md#releaseschedule) -* [revokedStateData](_wrappers_releasegold_.releasegoldinfo.md#revokedstatedata) - -## Properties - -### balanceStateData - -• **balanceStateData**: *[BalanceState](_wrappers_releasegold_.balancestate.md)* - -*Defined in [contractkit/src/wrappers/ReleaseGold.ts:44](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/ReleaseGold.ts#L44)* - -___ - -### beneficiary - -• **beneficiary**: *string* - -*Defined in [contractkit/src/wrappers/ReleaseGold.ts:34](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/ReleaseGold.ts#L34)* - -___ - -### canValidate - -• **canValidate**: *boolean* - -*Defined in [contractkit/src/wrappers/ReleaseGold.ts:39](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/ReleaseGold.ts#L39)* - -___ - -### canVote - -• **canVote**: *boolean* - -*Defined in [contractkit/src/wrappers/ReleaseGold.ts:40](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/ReleaseGold.ts#L40)* - -___ - -### isRevoked - -• **isRevoked**: *boolean* - -*Defined in [contractkit/src/wrappers/ReleaseGold.ts:42](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/ReleaseGold.ts#L42)* - -___ - -### liquidityProvisionMet - -• **liquidityProvisionMet**: *boolean* - -*Defined in [contractkit/src/wrappers/ReleaseGold.ts:38](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/ReleaseGold.ts#L38)* - -___ - -### owner - -• **owner**: *string* - -*Defined in [contractkit/src/wrappers/ReleaseGold.ts:36](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/ReleaseGold.ts#L36)* - -___ - -### refundAddress - -• **refundAddress**: *string* - -*Defined in [contractkit/src/wrappers/ReleaseGold.ts:37](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/ReleaseGold.ts#L37)* - -___ - -### releaseGoldWrapperAddress - -• **releaseGoldWrapperAddress**: *string* - -*Defined in [contractkit/src/wrappers/ReleaseGold.ts:33](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/ReleaseGold.ts#L33)* - -___ - -### releaseOwner - -• **releaseOwner**: *string* - -*Defined in [contractkit/src/wrappers/ReleaseGold.ts:35](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/ReleaseGold.ts#L35)* - -___ - -### releaseSchedule - -• **releaseSchedule**: *ReleaseSchedule* - -*Defined in [contractkit/src/wrappers/ReleaseGold.ts:41](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/ReleaseGold.ts#L41)* - -___ - -### revokedStateData - -• **revokedStateData**: *RevocationInfo* - -*Defined in [contractkit/src/wrappers/ReleaseGold.ts:43](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/ReleaseGold.ts#L43)* diff --git a/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_reserve_.reserveconfig.md b/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_reserve_.reserveconfig.md deleted file mode 100644 index 153daf53237..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_reserve_.reserveconfig.md +++ /dev/null @@ -1,55 +0,0 @@ -# Interface: ReserveConfig - -## Hierarchy - -* **ReserveConfig** - -## Index - -### Properties - -* [frozenReserveGoldDays](_wrappers_reserve_.reserveconfig.md#frozenreservegolddays) -* [frozenReserveGoldStartBalance](_wrappers_reserve_.reserveconfig.md#frozenreservegoldstartbalance) -* [frozenReserveGoldStartDay](_wrappers_reserve_.reserveconfig.md#frozenreservegoldstartday) -* [otherReserveAddresses](_wrappers_reserve_.reserveconfig.md#otherreserveaddresses) -* [tobinTaxStalenessThreshold](_wrappers_reserve_.reserveconfig.md#tobintaxstalenessthreshold) - -## Properties - -### frozenReserveGoldDays - -• **frozenReserveGoldDays**: *BigNumber* - -*Defined in [contractkit/src/wrappers/Reserve.ts:16](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Reserve.ts#L16)* - -___ - -### frozenReserveGoldStartBalance - -• **frozenReserveGoldStartBalance**: *BigNumber* - -*Defined in [contractkit/src/wrappers/Reserve.ts:14](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Reserve.ts#L14)* - -___ - -### frozenReserveGoldStartDay - -• **frozenReserveGoldStartDay**: *BigNumber* - -*Defined in [contractkit/src/wrappers/Reserve.ts:15](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Reserve.ts#L15)* - -___ - -### otherReserveAddresses - -• **otherReserveAddresses**: *string[]* - -*Defined in [contractkit/src/wrappers/Reserve.ts:17](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Reserve.ts#L17)* - -___ - -### tobinTaxStalenessThreshold - -• **tobinTaxStalenessThreshold**: *BigNumber* - -*Defined in [contractkit/src/wrappers/Reserve.ts:13](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Reserve.ts#L13)* diff --git a/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_sortedoracles_.medianrate.md b/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_sortedoracles_.medianrate.md deleted file mode 100644 index a103ea876ff..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_sortedoracles_.medianrate.md +++ /dev/null @@ -1,19 +0,0 @@ -# Interface: MedianRate - -## Hierarchy - -* **MedianRate** - -## Index - -### Properties - -* [rate](_wrappers_sortedoracles_.medianrate.md#rate) - -## Properties - -### rate - -• **rate**: *BigNumber* - -*Defined in [contractkit/src/wrappers/SortedOracles.ts:47](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/SortedOracles.ts#L47)* diff --git a/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_sortedoracles_.oraclerate.md b/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_sortedoracles_.oraclerate.md deleted file mode 100644 index f9979b8caaa..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_sortedoracles_.oraclerate.md +++ /dev/null @@ -1,37 +0,0 @@ -# Interface: OracleRate - -## Hierarchy - -* **OracleRate** - -## Index - -### Properties - -* [address](_wrappers_sortedoracles_.oraclerate.md#address) -* [medianRelation](_wrappers_sortedoracles_.oraclerate.md#medianrelation) -* [rate](_wrappers_sortedoracles_.oraclerate.md#rate) - -## Properties - -### address - -• **address**: *Address* - -*Defined in [contractkit/src/wrappers/SortedOracles.ts:29](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/SortedOracles.ts#L29)* - -___ - -### medianRelation - -• **medianRelation**: *[MedianRelation](../enums/_wrappers_sortedoracles_.medianrelation.md)* - -*Defined in [contractkit/src/wrappers/SortedOracles.ts:31](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/SortedOracles.ts#L31)* - -___ - -### rate - -• **rate**: *BigNumber* - -*Defined in [contractkit/src/wrappers/SortedOracles.ts:30](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/SortedOracles.ts#L30)* diff --git a/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_sortedoracles_.oraclereport.md b/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_sortedoracles_.oraclereport.md deleted file mode 100644 index 85697fed90a..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_sortedoracles_.oraclereport.md +++ /dev/null @@ -1,37 +0,0 @@ -# Interface: OracleReport - -## Hierarchy - -* **OracleReport** - -## Index - -### Properties - -* [address](_wrappers_sortedoracles_.oraclereport.md#address) -* [rate](_wrappers_sortedoracles_.oraclereport.md#rate) -* [timestamp](_wrappers_sortedoracles_.oraclereport.md#timestamp) - -## Properties - -### address - -• **address**: *Address* - -*Defined in [contractkit/src/wrappers/SortedOracles.ts:41](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/SortedOracles.ts#L41)* - -___ - -### rate - -• **rate**: *BigNumber* - -*Defined in [contractkit/src/wrappers/SortedOracles.ts:42](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/SortedOracles.ts#L42)* - -___ - -### timestamp - -• **timestamp**: *BigNumber* - -*Defined in [contractkit/src/wrappers/SortedOracles.ts:43](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/SortedOracles.ts#L43)* diff --git a/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_sortedoracles_.oracletimestamp.md b/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_sortedoracles_.oracletimestamp.md deleted file mode 100644 index 79f4142ca01..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_sortedoracles_.oracletimestamp.md +++ /dev/null @@ -1,37 +0,0 @@ -# Interface: OracleTimestamp - -## Hierarchy - -* **OracleTimestamp** - -## Index - -### Properties - -* [address](_wrappers_sortedoracles_.oracletimestamp.md#address) -* [medianRelation](_wrappers_sortedoracles_.oracletimestamp.md#medianrelation) -* [timestamp](_wrappers_sortedoracles_.oracletimestamp.md#timestamp) - -## Properties - -### address - -• **address**: *Address* - -*Defined in [contractkit/src/wrappers/SortedOracles.ts:35](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/SortedOracles.ts#L35)* - -___ - -### medianRelation - -• **medianRelation**: *[MedianRelation](../enums/_wrappers_sortedoracles_.medianrelation.md)* - -*Defined in [contractkit/src/wrappers/SortedOracles.ts:37](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/SortedOracles.ts#L37)* - -___ - -### timestamp - -• **timestamp**: *BigNumber* - -*Defined in [contractkit/src/wrappers/SortedOracles.ts:36](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/SortedOracles.ts#L36)* diff --git a/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_sortedoracles_.sortedoraclesconfig.md b/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_sortedoracles_.sortedoraclesconfig.md deleted file mode 100644 index c16d7311f89..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_sortedoracles_.sortedoraclesconfig.md +++ /dev/null @@ -1,19 +0,0 @@ -# Interface: SortedOraclesConfig - -## Hierarchy - -* **SortedOraclesConfig** - -## Index - -### Properties - -* [reportExpirySeconds](_wrappers_sortedoracles_.sortedoraclesconfig.md#reportexpiryseconds) - -## Properties - -### reportExpirySeconds - -• **reportExpirySeconds**: *BigNumber* - -*Defined in [contractkit/src/wrappers/SortedOracles.ts:25](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/SortedOracles.ts#L25)* diff --git a/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_stabletokenwrapper_.inflationparameters.md b/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_stabletokenwrapper_.inflationparameters.md deleted file mode 100644 index d16298c82cd..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_stabletokenwrapper_.inflationparameters.md +++ /dev/null @@ -1,46 +0,0 @@ -# Interface: InflationParameters - -## Hierarchy - -* **InflationParameters** - -## Index - -### Properties - -* [factor](_wrappers_stabletokenwrapper_.inflationparameters.md#factor) -* [factorLastUpdated](_wrappers_stabletokenwrapper_.inflationparameters.md#factorlastupdated) -* [rate](_wrappers_stabletokenwrapper_.inflationparameters.md#rate) -* [updatePeriod](_wrappers_stabletokenwrapper_.inflationparameters.md#updateperiod) - -## Properties - -### factor - -• **factor**: *BigNumber* - -*Defined in [contractkit/src/wrappers/StableTokenWrapper.ts:20](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/StableTokenWrapper.ts#L20)* - -___ - -### factorLastUpdated - -• **factorLastUpdated**: *BigNumber* - -*Defined in [contractkit/src/wrappers/StableTokenWrapper.ts:22](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/StableTokenWrapper.ts#L22)* - -___ - -### rate - -• **rate**: *BigNumber* - -*Defined in [contractkit/src/wrappers/StableTokenWrapper.ts:19](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/StableTokenWrapper.ts#L19)* - -___ - -### updatePeriod - -• **updatePeriod**: *BigNumber* - -*Defined in [contractkit/src/wrappers/StableTokenWrapper.ts:21](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/StableTokenWrapper.ts#L21)* diff --git a/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_stabletokenwrapper_.stabletokenconfig.md b/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_stabletokenwrapper_.stabletokenconfig.md deleted file mode 100644 index 9ac1ee3800e..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_stabletokenwrapper_.stabletokenconfig.md +++ /dev/null @@ -1,46 +0,0 @@ -# Interface: StableTokenConfig - -## Hierarchy - -* **StableTokenConfig** - -## Index - -### Properties - -* [decimals](_wrappers_stabletokenwrapper_.stabletokenconfig.md#decimals) -* [inflationParameters](_wrappers_stabletokenwrapper_.stabletokenconfig.md#inflationparameters) -* [name](_wrappers_stabletokenwrapper_.stabletokenconfig.md#name) -* [symbol](_wrappers_stabletokenwrapper_.stabletokenconfig.md#symbol) - -## Properties - -### decimals - -• **decimals**: *number* - -*Defined in [contractkit/src/wrappers/StableTokenWrapper.ts:26](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/StableTokenWrapper.ts#L26)* - -___ - -### inflationParameters - -• **inflationParameters**: *[InflationParameters](_wrappers_stabletokenwrapper_.inflationparameters.md)* - -*Defined in [contractkit/src/wrappers/StableTokenWrapper.ts:29](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/StableTokenWrapper.ts#L29)* - -___ - -### name - -• **name**: *string* - -*Defined in [contractkit/src/wrappers/StableTokenWrapper.ts:27](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/StableTokenWrapper.ts#L27)* - -___ - -### symbol - -• **symbol**: *string* - -*Defined in [contractkit/src/wrappers/StableTokenWrapper.ts:28](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/StableTokenWrapper.ts#L28)* diff --git a/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_validators_.groupmembership.md b/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_validators_.groupmembership.md deleted file mode 100644 index 5a73b796176..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_validators_.groupmembership.md +++ /dev/null @@ -1,28 +0,0 @@ -# Interface: GroupMembership - -## Hierarchy - -* **GroupMembership** - -## Index - -### Properties - -* [epoch](_wrappers_validators_.groupmembership.md#epoch) -* [group](_wrappers_validators_.groupmembership.md#group) - -## Properties - -### epoch - -• **epoch**: *number* - -*Defined in [contractkit/src/wrappers/Validators.ts:67](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L67)* - -___ - -### group - -• **group**: *Address* - -*Defined in [contractkit/src/wrappers/Validators.ts:68](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L68)* diff --git a/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_validators_.lockedgoldrequirements.md b/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_validators_.lockedgoldrequirements.md deleted file mode 100644 index 61ed7f35244..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_validators_.lockedgoldrequirements.md +++ /dev/null @@ -1,28 +0,0 @@ -# Interface: LockedGoldRequirements - -## Hierarchy - -* **LockedGoldRequirements** - -## Index - -### Properties - -* [duration](_wrappers_validators_.lockedgoldrequirements.md#duration) -* [value](_wrappers_validators_.lockedgoldrequirements.md#value) - -## Properties - -### duration - -• **duration**: *BigNumber* - -*Defined in [contractkit/src/wrappers/Validators.ts:54](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L54)* - -___ - -### value - -• **value**: *BigNumber* - -*Defined in [contractkit/src/wrappers/Validators.ts:53](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L53)* diff --git a/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_validators_.membershiphistoryextradata.md b/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_validators_.membershiphistoryextradata.md deleted file mode 100644 index 1149483d5f9..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_validators_.membershiphistoryextradata.md +++ /dev/null @@ -1,28 +0,0 @@ -# Interface: MembershipHistoryExtraData - -## Hierarchy - -* **MembershipHistoryExtraData** - -## Index - -### Properties - -* [lastRemovedFromGroupTimestamp](_wrappers_validators_.membershiphistoryextradata.md#lastremovedfromgrouptimestamp) -* [tail](_wrappers_validators_.membershiphistoryextradata.md#tail) - -## Properties - -### lastRemovedFromGroupTimestamp - -• **lastRemovedFromGroupTimestamp**: *number* - -*Defined in [contractkit/src/wrappers/Validators.ts:72](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L72)* - -___ - -### tail - -• **tail**: *number* - -*Defined in [contractkit/src/wrappers/Validators.ts:73](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L73)* diff --git a/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_validators_.validator.md b/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_validators_.validator.md deleted file mode 100644 index 5e48918bc29..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_validators_.validator.md +++ /dev/null @@ -1,73 +0,0 @@ -# Interface: Validator - -## Hierarchy - -* **Validator** - -## Index - -### Properties - -* [address](_wrappers_validators_.validator.md#address) -* [affiliation](_wrappers_validators_.validator.md#affiliation) -* [blsPublicKey](_wrappers_validators_.validator.md#blspublickey) -* [ecdsaPublicKey](_wrappers_validators_.validator.md#ecdsapublickey) -* [name](_wrappers_validators_.validator.md#name) -* [score](_wrappers_validators_.validator.md#score) -* [signer](_wrappers_validators_.validator.md#signer) - -## Properties - -### address - -• **address**: *Address* - -*Defined in [contractkit/src/wrappers/Validators.ts:23](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L23)* - -___ - -### affiliation - -• **affiliation**: *string | null* - -*Defined in [contractkit/src/wrappers/Validators.ts:26](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L26)* - -___ - -### blsPublicKey - -• **blsPublicKey**: *string* - -*Defined in [contractkit/src/wrappers/Validators.ts:25](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L25)* - -___ - -### ecdsaPublicKey - -• **ecdsaPublicKey**: *string* - -*Defined in [contractkit/src/wrappers/Validators.ts:24](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L24)* - -___ - -### name - -• **name**: *string* - -*Defined in [contractkit/src/wrappers/Validators.ts:22](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L22)* - -___ - -### score - -• **score**: *BigNumber* - -*Defined in [contractkit/src/wrappers/Validators.ts:27](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L27)* - -___ - -### signer - -• **signer**: *Address* - -*Defined in [contractkit/src/wrappers/Validators.ts:28](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L28)* diff --git a/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_validators_.validatorgroup.md b/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_validators_.validatorgroup.md deleted file mode 100644 index 68acee820cd..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_validators_.validatorgroup.md +++ /dev/null @@ -1,100 +0,0 @@ -# Interface: ValidatorGroup - -## Hierarchy - -* **ValidatorGroup** - -## Index - -### Properties - -* [address](_wrappers_validators_.validatorgroup.md#address) -* [affiliates](_wrappers_validators_.validatorgroup.md#affiliates) -* [commission](_wrappers_validators_.validatorgroup.md#commission) -* [lastSlashed](_wrappers_validators_.validatorgroup.md#lastslashed) -* [members](_wrappers_validators_.validatorgroup.md#members) -* [membersUpdated](_wrappers_validators_.validatorgroup.md#membersupdated) -* [name](_wrappers_validators_.validatorgroup.md#name) -* [nextCommission](_wrappers_validators_.validatorgroup.md#nextcommission) -* [nextCommissionBlock](_wrappers_validators_.validatorgroup.md#nextcommissionblock) -* [slashingMultiplier](_wrappers_validators_.validatorgroup.md#slashingmultiplier) - -## Properties - -### address - -• **address**: *Address* - -*Defined in [contractkit/src/wrappers/Validators.ts:33](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L33)* - -___ - -### affiliates - -• **affiliates**: *Address[]* - -*Defined in [contractkit/src/wrappers/Validators.ts:36](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L36)* - -___ - -### commission - -• **commission**: *BigNumber* - -*Defined in [contractkit/src/wrappers/Validators.ts:37](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L37)* - -___ - -### lastSlashed - -• **lastSlashed**: *BigNumber* - -*Defined in [contractkit/src/wrappers/Validators.ts:40](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L40)* - -___ - -### members - -• **members**: *Address[]* - -*Defined in [contractkit/src/wrappers/Validators.ts:34](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L34)* - -___ - -### membersUpdated - -• **membersUpdated**: *number* - -*Defined in [contractkit/src/wrappers/Validators.ts:35](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L35)* - -___ - -### name - -• **name**: *string* - -*Defined in [contractkit/src/wrappers/Validators.ts:32](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L32)* - -___ - -### nextCommission - -• **nextCommission**: *BigNumber* - -*Defined in [contractkit/src/wrappers/Validators.ts:38](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L38)* - -___ - -### nextCommissionBlock - -• **nextCommissionBlock**: *BigNumber* - -*Defined in [contractkit/src/wrappers/Validators.ts:39](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L39)* - -___ - -### slashingMultiplier - -• **slashingMultiplier**: *BigNumber* - -*Defined in [contractkit/src/wrappers/Validators.ts:41](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L41)* diff --git a/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_validators_.validatorreward.md b/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_validators_.validatorreward.md deleted file mode 100644 index 99de07e78b7..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_validators_.validatorreward.md +++ /dev/null @@ -1,55 +0,0 @@ -# Interface: ValidatorReward - -## Hierarchy - -* **ValidatorReward** - -## Index - -### Properties - -* [epochNumber](_wrappers_validators_.validatorreward.md#epochnumber) -* [group](_wrappers_validators_.validatorreward.md#group) -* [groupPayment](_wrappers_validators_.validatorreward.md#grouppayment) -* [validator](_wrappers_validators_.validatorreward.md#validator) -* [validatorPayment](_wrappers_validators_.validatorreward.md#validatorpayment) - -## Properties - -### epochNumber - -• **epochNumber**: *number* - -*Defined in [contractkit/src/wrappers/Validators.ts:49](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L49)* - -___ - -### group - -• **group**: *[ValidatorGroup](_wrappers_validators_.validatorgroup.md)* - -*Defined in [contractkit/src/wrappers/Validators.ts:47](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L47)* - -___ - -### groupPayment - -• **groupPayment**: *BigNumber* - -*Defined in [contractkit/src/wrappers/Validators.ts:48](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L48)* - -___ - -### validator - -• **validator**: *[Validator](_wrappers_validators_.validator.md)* - -*Defined in [contractkit/src/wrappers/Validators.ts:45](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L45)* - -___ - -### validatorPayment - -• **validatorPayment**: *BigNumber* - -*Defined in [contractkit/src/wrappers/Validators.ts:46](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L46)* diff --git a/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_validators_.validatorsconfig.md b/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_validators_.validatorsconfig.md deleted file mode 100644 index 57880a3d5bf..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/interfaces/_wrappers_validators_.validatorsconfig.md +++ /dev/null @@ -1,64 +0,0 @@ -# Interface: ValidatorsConfig - -## Hierarchy - -* **ValidatorsConfig** - -## Index - -### Properties - -* [commissionUpdateDelay](_wrappers_validators_.validatorsconfig.md#commissionupdatedelay) -* [groupLockedGoldRequirements](_wrappers_validators_.validatorsconfig.md#grouplockedgoldrequirements) -* [maxGroupSize](_wrappers_validators_.validatorsconfig.md#maxgroupsize) -* [membershipHistoryLength](_wrappers_validators_.validatorsconfig.md#membershiphistorylength) -* [slashingMultiplierResetPeriod](_wrappers_validators_.validatorsconfig.md#slashingmultiplierresetperiod) -* [validatorLockedGoldRequirements](_wrappers_validators_.validatorsconfig.md#validatorlockedgoldrequirements) - -## Properties - -### commissionUpdateDelay - -• **commissionUpdateDelay**: *BigNumber* - -*Defined in [contractkit/src/wrappers/Validators.ts:63](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L63)* - -___ - -### groupLockedGoldRequirements - -• **groupLockedGoldRequirements**: *[LockedGoldRequirements](_wrappers_validators_.lockedgoldrequirements.md)* - -*Defined in [contractkit/src/wrappers/Validators.ts:58](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L58)* - -___ - -### maxGroupSize - -• **maxGroupSize**: *BigNumber* - -*Defined in [contractkit/src/wrappers/Validators.ts:60](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L60)* - -___ - -### membershipHistoryLength - -• **membershipHistoryLength**: *BigNumber* - -*Defined in [contractkit/src/wrappers/Validators.ts:61](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L61)* - -___ - -### slashingMultiplierResetPeriod - -• **slashingMultiplierResetPeriod**: *BigNumber* - -*Defined in [contractkit/src/wrappers/Validators.ts:62](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L62)* - -___ - -### validatorLockedGoldRequirements - -• **validatorLockedGoldRequirements**: *[LockedGoldRequirements](_wrappers_validators_.lockedgoldrequirements.md)* - -*Defined in [contractkit/src/wrappers/Validators.ts:59](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Validators.ts#L59)* diff --git a/packages/docs/developer-resources/contractkit/reference/modules/_address_registry_.md b/packages/docs/developer-resources/contractkit/reference/modules/_address_registry_.md deleted file mode 100644 index 8287c8e807a..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/modules/_address_registry_.md +++ /dev/null @@ -1,7 +0,0 @@ -# Module: "address-registry" - -## Index - -### Classes - -* [AddressRegistry](../classes/_address_registry_.addressregistry.md) diff --git a/packages/docs/developer-resources/contractkit/reference/modules/_base_.md b/packages/docs/developer-resources/contractkit/reference/modules/_base_.md deleted file mode 100644 index b9ca33483f4..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/modules/_base_.md +++ /dev/null @@ -1,49 +0,0 @@ -# Module: "base" - -## Index - -### Enumerations - -* [CeloContract](../enums/_base_.celocontract.md) - -### Type aliases - -* [CeloToken](_base_.md#celotoken) - -### Variables - -* [AllContracts](_base_.md#const-allcontracts) -* [ProxyContracts](_base_.md#const-proxycontracts) -* [RegisteredContracts](_base_.md#const-registeredcontracts) - -## Type aliases - -### CeloToken - -Ƭ **CeloToken**: *[GoldToken](../enums/_base_.celocontract.md#goldtoken) | [StableToken](../enums/_base_.celocontract.md#stabletoken)* - -*Defined in [contractkit/src/base.ts:31](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/base.ts#L31)* - -## Variables - -### `Const` AllContracts - -• **AllContracts**: *[CeloContract](../enums/_base_.celocontract.md)[]* = Object.keys(CeloContract) as CeloContract[] - -*Defined in [contractkit/src/base.ts:33](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/base.ts#L33)* - -___ - -### `Const` ProxyContracts - -• **ProxyContracts**: *string[]* = Object.keys(CeloContract).map((c) => `${c}Proxy`) - -*Defined in [contractkit/src/base.ts:29](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/base.ts#L29)* - -___ - -### `Const` RegisteredContracts - -• **RegisteredContracts**: *[CeloContract](../enums/_base_.celocontract.md)[]* = AllContracts.filter((v) => !AuxiliaryContracts.includes(v)) - -*Defined in [contractkit/src/base.ts:39](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/base.ts#L39)* diff --git a/packages/docs/developer-resources/contractkit/reference/modules/_contract_cache_.md b/packages/docs/developer-resources/contractkit/reference/modules/_contract_cache_.md deleted file mode 100644 index db12d5d0a93..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/modules/_contract_cache_.md +++ /dev/null @@ -1,19 +0,0 @@ -# Module: "contract-cache" - -## Index - -### Classes - -* [WrapperCache](../classes/_contract_cache_.wrappercache.md) - -### Type aliases - -* [ValidWrappers](_contract_cache_.md#validwrappers) - -## Type aliases - -### ValidWrappers - -Ƭ **ValidWrappers**: *keyof CFType* - -*Defined in [contractkit/src/contract-cache.ts:53](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/contract-cache.ts#L53)* diff --git a/packages/docs/developer-resources/contractkit/reference/modules/_identity_claims_account_.md b/packages/docs/developer-resources/contractkit/reference/modules/_identity_claims_account_.md deleted file mode 100644 index cca53e3c5e2..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/modules/_identity_claims_account_.md +++ /dev/null @@ -1,77 +0,0 @@ -# Module: "identity/claims/account" - -## Index - -### Type aliases - -* [AccountClaim](_identity_claims_account_.md#accountclaim) - -### Variables - -* [AccountClaimType](_identity_claims_account_.md#const-accountclaimtype) -* [AccountClaimTypeH](_identity_claims_account_.md#const-accountclaimtypeh) - -### Functions - -* [createAccountClaim](_identity_claims_account_.md#const-createaccountclaim) - -## Type aliases - -### AccountClaim - -Ƭ **AccountClaim**: *t.TypeOf‹typeof AccountClaimTypeH›* - -*Defined in [contractkit/src/identity/claims/account.ts:32](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/identity/claims/account.ts#L32)* - -## Variables - -### `Const` AccountClaimType - -• **AccountClaimType**: *Type‹object, any, unknown›* = new t.Type( - 'AccountClaimType', - AccountClaimTypeH.is, - (unknownValue, context) => - either.chain(AccountClaimTypeH.validate(unknownValue, context), (claim) => { - if (claim.publicKey === undefined) { - return t.success(claim) - } - const derivedAddress = publicKeyToAddress(claim.publicKey) - return derivedAddress === claim.address - ? t.success(claim) - : t.failure(claim, context, 'public key did not match the address in the claim') - }), - (x) => x -) - -*Defined in [contractkit/src/identity/claims/account.ts:16](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/identity/claims/account.ts#L16)* - -___ - -### `Const` AccountClaimTypeH - -• **AccountClaimTypeH**: *TypeC‹object›* = t.type({ - type: t.literal(ClaimTypes.ACCOUNT), - timestamp: TimestampType, - address: AddressType, - // io-ts way of defining optional key-value pair - publicKey: t.union([t.undefined, PublicKeyType]), -}) - -*Defined in [contractkit/src/identity/claims/account.ts:8](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/identity/claims/account.ts#L8)* - -## Functions - -### `Const` createAccountClaim - -▸ **createAccountClaim**(`address`: string, `publicKey?`: undefined | string): *[AccountClaim](_identity_claims_account_.md#accountclaim)* - -*Defined in [contractkit/src/identity/claims/account.ts:34](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/identity/claims/account.ts#L34)* - -**Parameters:** - -Name | Type | ------- | ------ | -`address` | string | -`publicKey?` | undefined | string | - -**Returns:** *[AccountClaim](_identity_claims_account_.md#accountclaim)* diff --git a/packages/docs/developer-resources/contractkit/reference/modules/_identity_claims_attestation_service_url_.md b/packages/docs/developer-resources/contractkit/reference/modules/_identity_claims_attestation_service_url_.md deleted file mode 100644 index 3a414cd36b2..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/modules/_identity_claims_attestation_service_url_.md +++ /dev/null @@ -1,70 +0,0 @@ -# Module: "identity/claims/attestation-service-url" - -## Index - -### Type aliases - -* [AttestationServiceURLClaim](_identity_claims_attestation_service_url_.md#attestationserviceurlclaim) - -### Variables - -* [AttestationServiceURLClaimType](_identity_claims_attestation_service_url_.md#const-attestationserviceurlclaimtype) - -### Functions - -* [createAttestationServiceURLClaim](_identity_claims_attestation_service_url_.md#const-createattestationserviceurlclaim) -* [validateAttestationServiceUrl](_identity_claims_attestation_service_url_.md#validateattestationserviceurl) - -## Type aliases - -### AttestationServiceURLClaim - -Ƭ **AttestationServiceURLClaim**: *t.TypeOf‹typeof AttestationServiceURLClaimType›* - -*Defined in [contractkit/src/identity/claims/attestation-service-url.ts:20](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/identity/claims/attestation-service-url.ts#L20)* - -## Variables - -### `Const` AttestationServiceURLClaimType - -• **AttestationServiceURLClaimType**: *TypeC‹object›* = t.type({ - type: t.literal(ClaimTypes.ATTESTATION_SERVICE_URL), - timestamp: TimestampType, - url: UrlType, -}) - -*Defined in [contractkit/src/identity/claims/attestation-service-url.ts:14](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/identity/claims/attestation-service-url.ts#L14)* - -## Functions - -### `Const` createAttestationServiceURLClaim - -▸ **createAttestationServiceURLClaim**(`url`: string): *[AttestationServiceURLClaim](_identity_claims_attestation_service_url_.md#attestationserviceurlclaim)* - -*Defined in [contractkit/src/identity/claims/attestation-service-url.ts:22](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/identity/claims/attestation-service-url.ts#L22)* - -**Parameters:** - -Name | Type | ------- | ------ | -`url` | string | - -**Returns:** *[AttestationServiceURLClaim](_identity_claims_attestation_service_url_.md#attestationserviceurlclaim)* - -___ - -### validateAttestationServiceUrl - -▸ **validateAttestationServiceUrl**(`kit`: [ContractKit](../classes/_kit_.contractkit.md), `claim`: [AttestationServiceURLClaim](_identity_claims_attestation_service_url_.md#attestationserviceurlclaim), `address`: Address): *Promise‹string | undefined›* - -*Defined in [contractkit/src/identity/claims/attestation-service-url.ts:28](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/identity/claims/attestation-service-url.ts#L28)* - -**Parameters:** - -Name | Type | ------- | ------ | -`kit` | [ContractKit](../classes/_kit_.contractkit.md) | -`claim` | [AttestationServiceURLClaim](_identity_claims_attestation_service_url_.md#attestationserviceurlclaim) | -`address` | Address | - -**Returns:** *Promise‹string | undefined›* diff --git a/packages/docs/developer-resources/contractkit/reference/modules/_identity_claims_claim_.md b/packages/docs/developer-resources/contractkit/reference/modules/_identity_claims_claim_.md deleted file mode 100644 index 6e0d2606950..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/modules/_identity_claims_claim_.md +++ /dev/null @@ -1,263 +0,0 @@ -# Module: "identity/claims/claim" - -## Index - -### Type aliases - -* [Claim](_identity_claims_claim_.md#claim) -* [ClaimPayload](_identity_claims_claim_.md#claimpayload) -* [DomainClaim](_identity_claims_claim_.md#domainclaim) -* [KeybaseClaim](_identity_claims_claim_.md#keybaseclaim) -* [NameClaim](_identity_claims_claim_.md#nameclaim) -* [StorageClaim](_identity_claims_claim_.md#storageclaim) - -### Variables - -* [ClaimType](_identity_claims_claim_.md#const-claimtype) -* [DOMAIN_TXT_HEADER](_identity_claims_claim_.md#const-domain_txt_header) -* [KeybaseClaimType](_identity_claims_claim_.md#const-keybaseclaimtype) -* [SignedClaimType](_identity_claims_claim_.md#const-signedclaimtype) - -### Functions - -* [createDomainClaim](_identity_claims_claim_.md#const-createdomainclaim) -* [createNameClaim](_identity_claims_claim_.md#const-createnameclaim) -* [createStorageClaim](_identity_claims_claim_.md#const-createstorageclaim) -* [hashOfClaim](_identity_claims_claim_.md#hashofclaim) -* [hashOfClaims](_identity_claims_claim_.md#hashofclaims) -* [isOfType](_identity_claims_claim_.md#const-isoftype) -* [serializeClaim](_identity_claims_claim_.md#serializeclaim) -* [validateClaim](_identity_claims_claim_.md#validateclaim) - -## Type aliases - -### Claim - -Ƭ **Claim**: *[AttestationServiceURLClaim](_identity_claims_attestation_service_url_.md#attestationserviceurlclaim) | [DomainClaim](_identity_claims_claim_.md#domainclaim) | [KeybaseClaim](_identity_claims_claim_.md#keybaseclaim) | [NameClaim](_identity_claims_claim_.md#nameclaim) | [AccountClaim](_identity_claims_account_.md#accountclaim) | [StorageClaim](_identity_claims_claim_.md#storageclaim)* - -*Defined in [contractkit/src/identity/claims/claim.ts:57](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/identity/claims/claim.ts#L57)* - -___ - -### ClaimPayload - -Ƭ **ClaimPayload**: *K extends typeof DOMAIN ? DomainClaim : K extends typeof NAME ? NameClaim : K extends typeof KEYBASE ? KeybaseClaim : K extends typeof ATTESTATION_SERVICE_URL ? AttestationServiceURLClaim : K extends typeof ACCOUNT ? AccountClaim : StorageClaim* - -*Defined in [contractkit/src/identity/claims/claim.ts:65](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/identity/claims/claim.ts#L65)* - -___ - -### DomainClaim - -Ƭ **DomainClaim**: *t.TypeOf‹typeof DomainClaimType›* - -*Defined in [contractkit/src/identity/claims/claim.ts:54](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/identity/claims/claim.ts#L54)* - -___ - -### KeybaseClaim - -Ƭ **KeybaseClaim**: *t.TypeOf‹typeof KeybaseClaimType›* - -*Defined in [contractkit/src/identity/claims/claim.ts:18](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/identity/claims/claim.ts#L18)* - -___ - -### NameClaim - -Ƭ **NameClaim**: *t.TypeOf‹typeof NameClaimType›* - -*Defined in [contractkit/src/identity/claims/claim.ts:55](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/identity/claims/claim.ts#L55)* - -___ - -### StorageClaim - -Ƭ **StorageClaim**: *t.TypeOf‹typeof StorageClaimType›* - -*Defined in [contractkit/src/identity/claims/claim.ts:56](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/identity/claims/claim.ts#L56)* - -## Variables - -### `Const` ClaimType - -• **ClaimType**: *UnionC‹[TypeC‹object›, Type‹object, any, unknown›, TypeC‹object›, TypeC‹object›, TypeC‹object›, TypeC‹object›]›* = t.union([ - AttestationServiceURLClaimType, - AccountClaimType, - DomainClaimType, - KeybaseClaimType, - NameClaimType, - StorageClaimType, -]) - -*Defined in [contractkit/src/identity/claims/claim.ts:39](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/identity/claims/claim.ts#L39)* - -___ - -### `Const` DOMAIN_TXT_HEADER - -• **DOMAIN_TXT_HEADER**: *"celo-site-verification"* = "celo-site-verification" - -*Defined in [contractkit/src/identity/claims/claim.ts:53](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/identity/claims/claim.ts#L53)* - -___ - -### `Const` KeybaseClaimType - -• **KeybaseClaimType**: *TypeC‹object›* = t.type({ - type: t.literal(ClaimTypes.KEYBASE), - timestamp: TimestampType, - // TODO: Validate compliant username before just interpolating - username: t.string, -}) - -*Defined in [contractkit/src/identity/claims/claim.ts:12](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/identity/claims/claim.ts#L12)* - -___ - -### `Const` SignedClaimType - -• **SignedClaimType**: *TypeC‹object›* = t.type({ - claim: ClaimType, - signature: SignatureType, -}) - -*Defined in [contractkit/src/identity/claims/claim.ts:48](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/identity/claims/claim.ts#L48)* - -## Functions - -### `Const` createDomainClaim - -▸ **createDomainClaim**(`domain`: string): *[DomainClaim](_identity_claims_claim_.md#domainclaim)* - -*Defined in [contractkit/src/identity/claims/claim.ts:116](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/identity/claims/claim.ts#L116)* - -**Parameters:** - -Name | Type | ------- | ------ | -`domain` | string | - -**Returns:** *[DomainClaim](_identity_claims_claim_.md#domainclaim)* - -___ - -### `Const` createNameClaim - -▸ **createNameClaim**(`name`: string): *[NameClaim](_identity_claims_claim_.md#nameclaim)* - -*Defined in [contractkit/src/identity/claims/claim.ts:110](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/identity/claims/claim.ts#L110)* - -**Parameters:** - -Name | Type | ------- | ------ | -`name` | string | - -**Returns:** *[NameClaim](_identity_claims_claim_.md#nameclaim)* - -___ - -### `Const` createStorageClaim - -▸ **createStorageClaim**(`storageURL`: string): *[StorageClaim](_identity_claims_claim_.md#storageclaim)* - -*Defined in [contractkit/src/identity/claims/claim.ts:122](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/identity/claims/claim.ts#L122)* - -**Parameters:** - -Name | Type | ------- | ------ | -`storageURL` | string | - -**Returns:** *[StorageClaim](_identity_claims_claim_.md#storageclaim)* - -___ - -### hashOfClaim - -▸ **hashOfClaim**(`claim`: [Claim](_identity_claims_claim_.md#claim)): *string* - -*Defined in [contractkit/src/identity/claims/claim.ts:97](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/identity/claims/claim.ts#L97)* - -**Parameters:** - -Name | Type | ------- | ------ | -`claim` | [Claim](_identity_claims_claim_.md#claim) | - -**Returns:** *string* - -___ - -### hashOfClaims - -▸ **hashOfClaims**(`claims`: [Claim](_identity_claims_claim_.md#claim)[]): *string* - -*Defined in [contractkit/src/identity/claims/claim.ts:101](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/identity/claims/claim.ts#L101)* - -**Parameters:** - -Name | Type | ------- | ------ | -`claims` | [Claim](_identity_claims_claim_.md#claim)[] | - -**Returns:** *string* - -___ - -### `Const` isOfType - -▸ **isOfType**<**K**>(`type`: K): *(Anonymous function)* - -*Defined in [contractkit/src/identity/claims/claim.ts:77](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/identity/claims/claim.ts#L77)* - -**Type parameters:** - -▪ **K**: *[ClaimTypes](../enums/_identity_claims_types_.claimtypes.md)* - -**Parameters:** - -Name | Type | ------- | ------ | -`type` | K | - -**Returns:** *(Anonymous function)* - -___ - -### serializeClaim - -▸ **serializeClaim**(`claim`: [Claim](_identity_claims_claim_.md#claim)): *string* - -*Defined in [contractkit/src/identity/claims/claim.ts:106](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/identity/claims/claim.ts#L106)* - -**Parameters:** - -Name | Type | ------- | ------ | -`claim` | [Claim](_identity_claims_claim_.md#claim) | - -**Returns:** *string* - -___ - -### validateClaim - -▸ **validateClaim**(`kit`: [ContractKit](../classes/_kit_.contractkit.md), `claim`: [Claim](_identity_claims_claim_.md#claim), `address`: string): *Promise‹undefined | string›* - -*Defined in [contractkit/src/identity/claims/claim.ts:87](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/identity/claims/claim.ts#L87)* - -Validates a claim made by an account, i.e. whether the claim is usable - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`kit` | [ContractKit](../classes/_kit_.contractkit.md) | The ContractKit object | -`claim` | [Claim](_identity_claims_claim_.md#claim) | The claim to validate | -`address` | string | The address that is making the claim | - -**Returns:** *Promise‹undefined | string›* - -If valid, returns undefined. If invalid or unable to validate, returns a string with the error diff --git a/packages/docs/developer-resources/contractkit/reference/modules/_identity_claims_keybase_.md b/packages/docs/developer-resources/contractkit/reference/modules/_identity_claims_keybase_.md deleted file mode 100644 index 39352d18358..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/modules/_identity_claims_keybase_.md +++ /dev/null @@ -1,89 +0,0 @@ -# Module: "identity/claims/keybase" - -## Index - -### Variables - -* [keybaseFilePathToProof](_identity_claims_keybase_.md#const-keybasefilepathtoproof) - -### Functions - -* [createKeybaseClaim](_identity_claims_keybase_.md#const-createkeybaseclaim) -* [proofFileName](_identity_claims_keybase_.md#const-prooffilename) -* [targetURL](_identity_claims_keybase_.md#const-targeturl) -* [verifyKeybaseClaim](_identity_claims_keybase_.md#verifykeybaseclaim) - -## Variables - -### `Const` keybaseFilePathToProof - -• **keybaseFilePathToProof**: *".well-known/celo/"* = `.well-known/celo/` - -*Defined in [contractkit/src/identity/claims/keybase.ts:9](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/identity/claims/keybase.ts#L9)* - -## Functions - -### `Const` createKeybaseClaim - -▸ **createKeybaseClaim**(`username`: string): *[KeybaseClaim](_identity_claims_claim_.md#keybaseclaim)* - -*Defined in [contractkit/src/identity/claims/keybase.ts:62](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/identity/claims/keybase.ts#L62)* - -**Parameters:** - -Name | Type | ------- | ------ | -`username` | string | - -**Returns:** *[KeybaseClaim](_identity_claims_claim_.md#keybaseclaim)* - -___ - -### `Const` proofFileName - -▸ **proofFileName**(`address`: Address): *string* - -*Defined in [contractkit/src/identity/claims/keybase.ts:10](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/identity/claims/keybase.ts#L10)* - -**Parameters:** - -Name | Type | ------- | ------ | -`address` | Address | - -**Returns:** *string* - -___ - -### `Const` targetURL - -▸ **targetURL**(`username`: string, `address`: Address): *string* - -*Defined in [contractkit/src/identity/claims/keybase.ts:11](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/identity/claims/keybase.ts#L11)* - -**Parameters:** - -Name | Type | ------- | ------ | -`username` | string | -`address` | Address | - -**Returns:** *string* - -___ - -### verifyKeybaseClaim - -▸ **verifyKeybaseClaim**(`kit`: [ContractKit](../classes/_kit_.contractkit.md), `claim`: [KeybaseClaim](_identity_claims_claim_.md#keybaseclaim), `signer`: Address): *Promise‹string | undefined›* - -*Defined in [contractkit/src/identity/claims/keybase.ts:16](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/identity/claims/keybase.ts#L16)* - -**Parameters:** - -Name | Type | ------- | ------ | -`kit` | [ContractKit](../classes/_kit_.contractkit.md) | -`claim` | [KeybaseClaim](_identity_claims_claim_.md#keybaseclaim) | -`signer` | Address | - -**Returns:** *Promise‹string | undefined›* diff --git a/packages/docs/developer-resources/contractkit/reference/modules/_identity_claims_types_.md b/packages/docs/developer-resources/contractkit/reference/modules/_identity_claims_types_.md deleted file mode 100644 index 064ff190b78..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/modules/_identity_claims_types_.md +++ /dev/null @@ -1,69 +0,0 @@ -# Module: "identity/claims/types" - -## Index - -### Enumerations - -* [ClaimTypes](../enums/_identity_claims_types_.claimtypes.md) - -### Variables - -* [SINGULAR_CLAIM_TYPES](_identity_claims_types_.md#const-singular_claim_types) -* [SignatureType](_identity_claims_types_.md#const-signaturetype) -* [TimestampType](_identity_claims_types_.md#const-timestamptype) -* [VALIDATABLE_CLAIM_TYPES](_identity_claims_types_.md#const-validatable_claim_types) -* [VERIFIABLE_CLAIM_TYPES](_identity_claims_types_.md#const-verifiable_claim_types) - -### Functions - -* [now](_identity_claims_types_.md#const-now) - -## Variables - -### `Const` SINGULAR_CLAIM_TYPES - -• **SINGULAR_CLAIM_TYPES**: *[ClaimTypes](../enums/_identity_claims_types_.claimtypes.md)[]* = [ClaimTypes.NAME, ClaimTypes.ATTESTATION_SERVICE_URL] - -*Defined in [contractkit/src/identity/claims/types.ts:24](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/identity/claims/types.ts#L24)* - -___ - -### `Const` SignatureType - -• **SignatureType**: *StringC‹›* = t.string - -*Defined in [contractkit/src/identity/claims/types.ts:3](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/identity/claims/types.ts#L3)* - -___ - -### `Const` TimestampType - -• **TimestampType**: *NumberC‹›* = t.number - -*Defined in [contractkit/src/identity/claims/types.ts:4](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/identity/claims/types.ts#L4)* - -___ - -### `Const` VALIDATABLE_CLAIM_TYPES - -• **VALIDATABLE_CLAIM_TYPES**: *[ClaimTypes](../enums/_identity_claims_types_.claimtypes.md)[]* = [ClaimTypes.ATTESTATION_SERVICE_URL] - -*Defined in [contractkit/src/identity/claims/types.ts:22](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/identity/claims/types.ts#L22)* - -___ - -### `Const` VERIFIABLE_CLAIM_TYPES - -• **VERIFIABLE_CLAIM_TYPES**: *[ClaimTypes](../enums/_identity_claims_types_.claimtypes.md)[]* = [ClaimTypes.KEYBASE, ClaimTypes.ACCOUNT, ClaimTypes.DOMAIN] - -*Defined in [contractkit/src/identity/claims/types.ts:19](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/identity/claims/types.ts#L19)* - -## Functions - -### `Const` now - -▸ **now**(): *number* - -*Defined in [contractkit/src/identity/claims/types.ts:6](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/identity/claims/types.ts#L6)* - -**Returns:** *number* diff --git a/packages/docs/developer-resources/contractkit/reference/modules/_identity_claims_verify_.md b/packages/docs/developer-resources/contractkit/reference/modules/_identity_claims_verify_.md deleted file mode 100644 index cb9a35cacb0..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/modules/_identity_claims_verify_.md +++ /dev/null @@ -1,73 +0,0 @@ -# Module: "identity/claims/verify" - -## Index - -### Functions - -* [verifyAccountClaim](_identity_claims_verify_.md#const-verifyaccountclaim) -* [verifyClaim](_identity_claims_verify_.md#verifyclaim) -* [verifyDomainRecord](_identity_claims_verify_.md#const-verifydomainrecord) - -## Functions - -### `Const` verifyAccountClaim - -▸ **verifyAccountClaim**(`kit`: [ContractKit](../classes/_kit_.contractkit.md), `claim`: [AccountClaim](_identity_claims_account_.md#accountclaim), `address`: string, `tries`: number): *Promise‹undefined | string›* - -*Defined in [contractkit/src/identity/claims/verify.ts:33](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/identity/claims/verify.ts#L33)* - -**Parameters:** - -Name | Type | Default | ------- | ------ | ------ | -`kit` | [ContractKit](../classes/_kit_.contractkit.md) | - | -`claim` | [AccountClaim](_identity_claims_account_.md#accountclaim) | - | -`address` | string | - | -`tries` | number | 3 | - -**Returns:** *Promise‹undefined | string›* - -___ - -### verifyClaim - -▸ **verifyClaim**(`kit`: [ContractKit](../classes/_kit_.contractkit.md), `claim`: [Claim](_identity_claims_claim_.md#claim), `address`: string, `tries`: number): *Promise‹undefined | string›* - -*Defined in [contractkit/src/identity/claims/verify.ts:19](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/identity/claims/verify.ts#L19)* - -Verifies a claim made by an account, i.e. whether a claim can be verified to be correct - -**Parameters:** - -Name | Type | Default | Description | ------- | ------ | ------ | ------ | -`kit` | [ContractKit](../classes/_kit_.contractkit.md) | - | ContractKit object | -`claim` | [Claim](_identity_claims_claim_.md#claim) | - | The claim to verify | -`address` | string | - | The address that is making the claim | -`tries` | number | 3 | - | - -**Returns:** *Promise‹undefined | string›* - -If valid, returns undefined. If invalid or unable to verify, returns a string with the error - -___ - -### `Const` verifyDomainRecord - -▸ **verifyDomainRecord**(`kit`: [ContractKit](../classes/_kit_.contractkit.md), `claim`: [DomainClaim](_identity_claims_claim_.md#domainclaim), `address`: string, `dnsResolver`: dnsResolverFunction): *Promise‹undefined | string›* - -*Defined in [contractkit/src/identity/claims/verify.ts:72](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/identity/claims/verify.ts#L72)* - -It verifies if a DNS domain includes in the TXT records an entry with name -`celo-site-verification` and a valid signature in base64 - -**Parameters:** - -Name | Type | Default | ------- | ------ | ------ | -`kit` | [ContractKit](../classes/_kit_.contractkit.md) | - | -`claim` | [DomainClaim](_identity_claims_claim_.md#domainclaim) | - | -`address` | string | - | -`dnsResolver` | dnsResolverFunction | resolveTxt as any | - -**Returns:** *Promise‹undefined | string›* diff --git a/packages/docs/developer-resources/contractkit/reference/modules/_identity_metadata_.md b/packages/docs/developer-resources/contractkit/reference/modules/_identity_metadata_.md deleted file mode 100644 index 3f37e9b6acc..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/modules/_identity_metadata_.md +++ /dev/null @@ -1,44 +0,0 @@ -# Module: "identity/metadata" - -## Index - -### References - -* [ClaimTypes](_identity_metadata_.md#claimtypes) - -### Classes - -* [IdentityMetadataWrapper](../classes/_identity_metadata_.identitymetadatawrapper.md) - -### Type aliases - -* [IdentityMetadata](_identity_metadata_.md#identitymetadata) - -### Variables - -* [IdentityMetadataType](_identity_metadata_.md#const-identitymetadatatype) - -## References - -### ClaimTypes - -• **ClaimTypes**: - -## Type aliases - -### IdentityMetadata - -Ƭ **IdentityMetadata**: *t.TypeOf‹typeof IdentityMetadataType›* - -*Defined in [contractkit/src/identity/metadata.ts:26](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/identity/metadata.ts#L26)* - -## Variables - -### `Const` IdentityMetadataType - -• **IdentityMetadataType**: *TypeC‹object›* = t.type({ - claims: t.array(ClaimType), - meta: MetaType, -}) - -*Defined in [contractkit/src/identity/metadata.ts:22](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/identity/metadata.ts#L22)* diff --git a/packages/docs/developer-resources/contractkit/reference/modules/_kit_.md b/packages/docs/developer-resources/contractkit/reference/modules/_kit_.md deleted file mode 100644 index e14672d0787..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/modules/_kit_.md +++ /dev/null @@ -1,56 +0,0 @@ -# Module: "kit" - -## Index - -### Classes - -* [ContractKit](../classes/_kit_.contractkit.md) - -### Interfaces - -* [NetworkConfig](../interfaces/_kit_.networkconfig.md) - -### Functions - -* [newKit](_kit_.md#newkit) -* [newKitFromWeb3](_kit_.md#newkitfromweb3) - -## Functions - -### newKit - -▸ **newKit**(`url`: string, `wallet?`: ReadOnlyWallet): *[ContractKit](../classes/_kit_.contractkit.md)‹›* - -*Defined in [contractkit/src/kit.ts:37](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/kit.ts#L37)* - -Creates a new instance of `ContractKit` give a nodeUrl - -**`optional`** wallet to reuse or add a wallet different that the default (example ledger-wallet) - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`url` | string | CeloBlockchain node url | -`wallet?` | ReadOnlyWallet | - | - -**Returns:** *[ContractKit](../classes/_kit_.contractkit.md)‹›* - -___ - -### newKitFromWeb3 - -▸ **newKitFromWeb3**(`web3`: Web3, `wallet`: ReadOnlyWallet): *[ContractKit](../classes/_kit_.contractkit.md)‹›* - -*Defined in [contractkit/src/kit.ts:48](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/kit.ts#L48)* - -Creates a new instance of the `ContractKit` with a web3 instance - -**Parameters:** - -Name | Type | Default | Description | ------- | ------ | ------ | ------ | -`web3` | Web3 | - | Web3 instance | -`wallet` | ReadOnlyWallet | new LocalWallet() | - | - -**Returns:** *[ContractKit](../classes/_kit_.contractkit.md)‹›* diff --git a/packages/docs/developer-resources/contractkit/reference/modules/_proxy_.md b/packages/docs/developer-resources/contractkit/reference/modules/_proxy_.md deleted file mode 100644 index 08d275cc248..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/modules/_proxy_.md +++ /dev/null @@ -1,268 +0,0 @@ -# Module: "proxy" - -## Index - -### Variables - -* [PROXY_ABI](_proxy_.md#const-proxy_abi) -* [PROXY_SET_AND_INITIALIZE_IMPLEMENTATION_SIGNATURE](_proxy_.md#const-proxy_set_and_initialize_implementation_signature) -* [PROXY_SET_IMPLEMENTATION_SIGNATURE](_proxy_.md#const-proxy_set_implementation_signature) - -### Functions - -* [getInitializeAbiOfImplementation](_proxy_.md#const-getinitializeabiofimplementation) -* [setImplementationOnProxy](_proxy_.md#const-setimplementationonproxy) - -### Object literals - -* [GET_IMPLEMENTATION_ABI](_proxy_.md#const-get_implementation_abi) -* [SET_AND_INITIALIZE_IMPLEMENTATION_ABI](_proxy_.md#const-set_and_initialize_implementation_abi) -* [SET_IMPLEMENTATION_ABI](_proxy_.md#const-set_implementation_abi) - -## Variables - -### `Const` PROXY_ABI - -• **PROXY_ABI**: *ABIDefinition[]* = [ - GET_IMPLEMENTATION_ABI, - SET_IMPLEMENTATION_ABI, - SET_AND_INITIALIZE_IMPLEMENTATION_ABI, -] - -*Defined in [contractkit/src/proxy.ts:82](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/proxy.ts#L82)* - -___ - -### `Const` PROXY_SET_AND_INITIALIZE_IMPLEMENTATION_SIGNATURE - -• **PROXY_SET_AND_INITIALIZE_IMPLEMENTATION_SIGNATURE**: *string* = SET_AND_INITIALIZE_IMPLEMENTATION_ABI.signature - -*Defined in [contractkit/src/proxy.ts:89](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/proxy.ts#L89)* - -___ - -### `Const` PROXY_SET_IMPLEMENTATION_SIGNATURE - -• **PROXY_SET_IMPLEMENTATION_SIGNATURE**: *string* = SET_IMPLEMENTATION_ABI.signature - -*Defined in [contractkit/src/proxy.ts:88](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/proxy.ts#L88)* - -## Functions - -### `Const` getInitializeAbiOfImplementation - -▸ **getInitializeAbiOfImplementation**(`proxyContractName`: keyof typeof initializeAbiMap): *AbiItem* - -*Defined in [contractkit/src/proxy.ts:123](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/proxy.ts#L123)* - -**Parameters:** - -Name | Type | ------- | ------ | -`proxyContractName` | keyof typeof initializeAbiMap | - -**Returns:** *AbiItem* - -___ - -### `Const` setImplementationOnProxy - -▸ **setImplementationOnProxy**(`address`: string, `web3`: Web3): *any* - -*Defined in [contractkit/src/proxy.ts:133](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/proxy.ts#L133)* - -**Parameters:** - -Name | Type | ------- | ------ | -`address` | string | -`web3` | Web3 | - -**Returns:** *any* - -## Object literals - -### `Const` GET_IMPLEMENTATION_ABI - -### ▪ **GET_IMPLEMENTATION_ABI**: *object* - -*Defined in [contractkit/src/proxy.ts:30](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/proxy.ts#L30)* - -### constant - -• **constant**: *true* = true - -*Defined in [contractkit/src/proxy.ts:31](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/proxy.ts#L31)* - -### inputs - -• **inputs**: *never[]* = [] - -*Defined in [contractkit/src/proxy.ts:32](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/proxy.ts#L32)* - -### name - -• **name**: *string* = "_getImplementation" - -*Defined in [contractkit/src/proxy.ts:33](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/proxy.ts#L33)* - -### outputs - -• **outputs**: *object[]* = [ - { - name: 'implementation', - type: 'address', - }, - ] - -*Defined in [contractkit/src/proxy.ts:34](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/proxy.ts#L34)* - -### payable - -• **payable**: *false* = false - -*Defined in [contractkit/src/proxy.ts:40](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/proxy.ts#L40)* - -### signature - -• **signature**: *string* = "0x42404e07" - -*Defined in [contractkit/src/proxy.ts:43](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/proxy.ts#L43)* - -### stateMutability - -• **stateMutability**: *"view"* = "view" - -*Defined in [contractkit/src/proxy.ts:41](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/proxy.ts#L41)* - -### type - -• **type**: *"function"* = "function" - -*Defined in [contractkit/src/proxy.ts:42](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/proxy.ts#L42)* - -___ - -### `Const` SET_AND_INITIALIZE_IMPLEMENTATION_ABI - -### ▪ **SET_AND_INITIALIZE_IMPLEMENTATION_ABI**: *object* - -*Defined in [contractkit/src/proxy.ts:62](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/proxy.ts#L62)* - -### constant - -• **constant**: *false* = false - -*Defined in [contractkit/src/proxy.ts:63](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/proxy.ts#L63)* - -### inputs - -• **inputs**: *object[]* = [ - { - name: 'implementation', - type: 'address', - }, - { - name: 'callbackData', - type: 'bytes', - }, - ] - -*Defined in [contractkit/src/proxy.ts:64](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/proxy.ts#L64)* - -### name - -• **name**: *string* = "_setAndInitializeImplementation" - -*Defined in [contractkit/src/proxy.ts:74](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/proxy.ts#L74)* - -### outputs - -• **outputs**: *never[]* = [] - -*Defined in [contractkit/src/proxy.ts:75](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/proxy.ts#L75)* - -### payable - -• **payable**: *true* = true - -*Defined in [contractkit/src/proxy.ts:76](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/proxy.ts#L76)* - -### signature - -• **signature**: *string* = "0x03386ba3" - -*Defined in [contractkit/src/proxy.ts:79](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/proxy.ts#L79)* - -### stateMutability - -• **stateMutability**: *"payable"* = "payable" - -*Defined in [contractkit/src/proxy.ts:77](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/proxy.ts#L77)* - -### type - -• **type**: *"function"* = "function" - -*Defined in [contractkit/src/proxy.ts:78](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/proxy.ts#L78)* - -___ - -### `Const` SET_IMPLEMENTATION_ABI - -### ▪ **SET_IMPLEMENTATION_ABI**: *object* - -*Defined in [contractkit/src/proxy.ts:46](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/proxy.ts#L46)* - -### constant - -• **constant**: *false* = false - -*Defined in [contractkit/src/proxy.ts:47](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/proxy.ts#L47)* - -### inputs - -• **inputs**: *object[]* = [ - { - name: 'implementation', - type: 'address', - }, - ] - -*Defined in [contractkit/src/proxy.ts:48](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/proxy.ts#L48)* - -### name - -• **name**: *string* = "_setImplementation" - -*Defined in [contractkit/src/proxy.ts:54](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/proxy.ts#L54)* - -### outputs - -• **outputs**: *never[]* = [] - -*Defined in [contractkit/src/proxy.ts:55](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/proxy.ts#L55)* - -### payable - -• **payable**: *false* = false - -*Defined in [contractkit/src/proxy.ts:56](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/proxy.ts#L56)* - -### signature - -• **signature**: *string* = "0xbb913f41" - -*Defined in [contractkit/src/proxy.ts:59](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/proxy.ts#L59)* - -### stateMutability - -• **stateMutability**: *"nonpayable"* = "nonpayable" - -*Defined in [contractkit/src/proxy.ts:57](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/proxy.ts#L57)* - -### type - -• **type**: *"function"* = "function" - -*Defined in [contractkit/src/proxy.ts:58](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/proxy.ts#L58)* diff --git a/packages/docs/developer-resources/contractkit/reference/modules/_test_utils_promieventstub_.md b/packages/docs/developer-resources/contractkit/reference/modules/_test_utils_promieventstub_.md deleted file mode 100644 index fe3de3a192d..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/modules/_test_utils_promieventstub_.md +++ /dev/null @@ -1,21 +0,0 @@ -# Module: "test-utils/PromiEventStub" - -## Index - -### Functions - -* [promiEventSpy](_test_utils_promieventstub_.md#promieventspy) - -## Functions - -### promiEventSpy - -▸ **promiEventSpy**<**T**>(): *PromiEventStub‹T›* - -*Defined in [contractkit/src/test-utils/PromiEventStub.ts:11](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/test-utils/PromiEventStub.ts#L11)* - -**Type parameters:** - -▪ **T** - -**Returns:** *PromiEventStub‹T›* diff --git a/packages/docs/developer-resources/contractkit/reference/modules/_test_utils_setup_global_.md b/packages/docs/developer-resources/contractkit/reference/modules/_test_utils_setup_global_.md deleted file mode 100644 index 0ccd31e15dc..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/modules/_test_utils_setup_global_.md +++ /dev/null @@ -1,17 +0,0 @@ -# Module: "test-utils/setup.global" - -## Index - -### Functions - -* [globalSetup](_test_utils_setup_global_.md#globalsetup) - -## Functions - -### globalSetup - -▸ **globalSetup**(): *Promise‹void›* - -*Defined in [contractkit/src/test-utils/setup.global.ts:12](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/test-utils/setup.global.ts#L12)* - -**Returns:** *Promise‹void›* diff --git a/packages/docs/developer-resources/contractkit/reference/modules/_test_utils_teardown_global_.md b/packages/docs/developer-resources/contractkit/reference/modules/_test_utils_teardown_global_.md deleted file mode 100644 index 66904e03b83..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/modules/_test_utils_teardown_global_.md +++ /dev/null @@ -1,17 +0,0 @@ -# Module: "test-utils/teardown.global" - -## Index - -### Functions - -* [globalTeardown](_test_utils_teardown_global_.md#globalteardown) - -## Functions - -### globalTeardown - -▸ **globalTeardown**(): *Promise‹void›* - -*Defined in [contractkit/src/test-utils/teardown.global.ts:5](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/test-utils/teardown.global.ts#L5)* - -**Returns:** *Promise‹void›* diff --git a/packages/docs/developer-resources/contractkit/reference/modules/_web3_contract_cache_.md b/packages/docs/developer-resources/contractkit/reference/modules/_web3_contract_cache_.md deleted file mode 100644 index 1e3b5354876..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/modules/_web3_contract_cache_.md +++ /dev/null @@ -1,181 +0,0 @@ -# Module: "web3-contract-cache" - -## Index - -### Classes - -* [Web3ContractCache](../classes/_web3_contract_cache_.web3contractcache.md) - -### Type aliases - -* [CFType](_web3_contract_cache_.md#cftype) - -### Object literals - -* [ContractFactories](_web3_contract_cache_.md#const-contractfactories) - -## Type aliases - -### CFType - -Ƭ **CFType**: *typeof ContractFactories* - -*Defined in [contractkit/src/web3-contract-cache.ts:61](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/web3-contract-cache.ts#L61)* - -## Object literals - -### `Const` ContractFactories - -### ▪ **ContractFactories**: *object* - -*Defined in [contractkit/src/web3-contract-cache.ts:33](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/web3-contract-cache.ts#L33)* - -### [CeloContract.Accounts] - -• **[CeloContract.Accounts]**: *newAccounts* = newAccounts - -*Defined in [contractkit/src/web3-contract-cache.ts:34](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/web3-contract-cache.ts#L34)* - -### [CeloContract.Attestations] - -• **[CeloContract.Attestations]**: *newAttestations* = newAttestations - -*Defined in [contractkit/src/web3-contract-cache.ts:35](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/web3-contract-cache.ts#L35)* - -### [CeloContract.BlockchainParameters] - -• **[CeloContract.BlockchainParameters]**: *newBlockchainParameters* = newBlockchainParameters - -*Defined in [contractkit/src/web3-contract-cache.ts:36](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/web3-contract-cache.ts#L36)* - -### [CeloContract.DoubleSigningSlasher] - -• **[CeloContract.DoubleSigningSlasher]**: *newDoubleSigningSlasher* = newDoubleSigningSlasher - -*Defined in [contractkit/src/web3-contract-cache.ts:37](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/web3-contract-cache.ts#L37)* - -### [CeloContract.DowntimeSlasher] - -• **[CeloContract.DowntimeSlasher]**: *newDowntimeSlasher* = newDowntimeSlasher - -*Defined in [contractkit/src/web3-contract-cache.ts:38](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/web3-contract-cache.ts#L38)* - -### [CeloContract.Election] - -• **[CeloContract.Election]**: *newElection* = newElection - -*Defined in [contractkit/src/web3-contract-cache.ts:39](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/web3-contract-cache.ts#L39)* - -### [CeloContract.EpochRewards] - -• **[CeloContract.EpochRewards]**: *newEpochRewards* = newEpochRewards - -*Defined in [contractkit/src/web3-contract-cache.ts:40](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/web3-contract-cache.ts#L40)* - -### [CeloContract.Escrow] - -• **[CeloContract.Escrow]**: *newEscrow* = newEscrow - -*Defined in [contractkit/src/web3-contract-cache.ts:41](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/web3-contract-cache.ts#L41)* - -### [CeloContract.Exchange] - -• **[CeloContract.Exchange]**: *newExchange* = newExchange - -*Defined in [contractkit/src/web3-contract-cache.ts:42](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/web3-contract-cache.ts#L42)* - -### [CeloContract.FeeCurrencyWhitelist] - -• **[CeloContract.FeeCurrencyWhitelist]**: *newFeeCurrencyWhitelist* = newFeeCurrencyWhitelist - -*Defined in [contractkit/src/web3-contract-cache.ts:43](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/web3-contract-cache.ts#L43)* - -### [CeloContract.Freezer] - -• **[CeloContract.Freezer]**: *newFreezer* = newFreezer - -*Defined in [contractkit/src/web3-contract-cache.ts:44](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/web3-contract-cache.ts#L44)* - -### [CeloContract.GasPriceMinimum] - -• **[CeloContract.GasPriceMinimum]**: *newGasPriceMinimum* = newGasPriceMinimum - -*Defined in [contractkit/src/web3-contract-cache.ts:45](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/web3-contract-cache.ts#L45)* - -### [CeloContract.GoldToken] - -• **[CeloContract.GoldToken]**: *newGoldToken* = newGoldToken - -*Defined in [contractkit/src/web3-contract-cache.ts:46](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/web3-contract-cache.ts#L46)* - -### [CeloContract.Governance] - -• **[CeloContract.Governance]**: *newGovernance* = newGovernance - -*Defined in [contractkit/src/web3-contract-cache.ts:47](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/web3-contract-cache.ts#L47)* - -### [CeloContract.LockedGold] - -• **[CeloContract.LockedGold]**: *newLockedGold* = newLockedGold - -*Defined in [contractkit/src/web3-contract-cache.ts:48](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/web3-contract-cache.ts#L48)* - -### [CeloContract.MetaTransactionWalletDeployer] - -• **[CeloContract.MetaTransactionWalletDeployer]**: *newMetaTransactionWalletDeployer* = newMetaTransactionWalletDeployer - -*Defined in [contractkit/src/web3-contract-cache.ts:50](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/web3-contract-cache.ts#L50)* - -### [CeloContract.MetaTransactionWallet] - -• **[CeloContract.MetaTransactionWallet]**: *newMetaTransactionWallet* = newMetaTransactionWallet - -*Defined in [contractkit/src/web3-contract-cache.ts:49](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/web3-contract-cache.ts#L49)* - -### [CeloContract.MultiSig] - -• **[CeloContract.MultiSig]**: *newMultiSig* = newMultiSig - -*Defined in [contractkit/src/web3-contract-cache.ts:51](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/web3-contract-cache.ts#L51)* - -### [CeloContract.Random] - -• **[CeloContract.Random]**: *newRandom* = newRandom - -*Defined in [contractkit/src/web3-contract-cache.ts:52](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/web3-contract-cache.ts#L52)* - -### [CeloContract.Registry] - -• **[CeloContract.Registry]**: *newRegistry* = newRegistry - -*Defined in [contractkit/src/web3-contract-cache.ts:53](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/web3-contract-cache.ts#L53)* - -### [CeloContract.Reserve] - -• **[CeloContract.Reserve]**: *newReserve* = newReserve - -*Defined in [contractkit/src/web3-contract-cache.ts:54](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/web3-contract-cache.ts#L54)* - -### [CeloContract.SortedOracles] - -• **[CeloContract.SortedOracles]**: *newSortedOracles* = newSortedOracles - -*Defined in [contractkit/src/web3-contract-cache.ts:55](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/web3-contract-cache.ts#L55)* - -### [CeloContract.StableToken] - -• **[CeloContract.StableToken]**: *newStableToken* = newStableToken - -*Defined in [contractkit/src/web3-contract-cache.ts:56](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/web3-contract-cache.ts#L56)* - -### [CeloContract.TransferWhitelist] - -• **[CeloContract.TransferWhitelist]**: *newTransferWhitelist* = newTransferWhitelist - -*Defined in [contractkit/src/web3-contract-cache.ts:57](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/web3-contract-cache.ts#L57)* - -### [CeloContract.Validators] - -• **[CeloContract.Validators]**: *newValidators* = newValidators - -*Defined in [contractkit/src/web3-contract-cache.ts:58](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/web3-contract-cache.ts#L58)* diff --git a/packages/docs/developer-resources/contractkit/reference/modules/_wrappers_accounts_.md b/packages/docs/developer-resources/contractkit/reference/modules/_wrappers_accounts_.md deleted file mode 100644 index c4f0c61b63b..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/modules/_wrappers_accounts_.md +++ /dev/null @@ -1,7 +0,0 @@ -# Module: "wrappers/Accounts" - -## Index - -### Classes - -* [AccountsWrapper](../classes/_wrappers_accounts_.accountswrapper.md) diff --git a/packages/docs/developer-resources/contractkit/reference/modules/_wrappers_attestations_.md b/packages/docs/developer-resources/contractkit/reference/modules/_wrappers_attestations_.md deleted file mode 100644 index 9dee5d51891..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/modules/_wrappers_attestations_.md +++ /dev/null @@ -1,54 +0,0 @@ -# Module: "wrappers/Attestations" - -## Index - -### Enumerations - -* [AttestationServiceStatusState](../enums/_wrappers_attestations_.attestationservicestatusstate.md) -* [AttestationState](../enums/_wrappers_attestations_.attestationstate.md) - -### Classes - -* [AttestationsWrapper](../classes/_wrappers_attestations_.attestationswrapper.md) - -### Interfaces - -* [ActionableAttestation](../interfaces/_wrappers_attestations_.actionableattestation.md) -* [AttestationServiceStatusResponse](../interfaces/_wrappers_attestations_.attestationservicestatusresponse.md) -* [AttestationStat](../interfaces/_wrappers_attestations_.attestationstat.md) -* [AttestationStateForIssuer](../interfaces/_wrappers_attestations_.attestationstateforissuer.md) -* [AttestationsConfig](../interfaces/_wrappers_attestations_.attestationsconfig.md) -* [AttestationsToken](../interfaces/_wrappers_attestations_.attestationstoken.md) -* [UnselectedRequest](../interfaces/_wrappers_attestations_.unselectedrequest.md) - -### Type aliases - -* [IdentifierLookupResult](_wrappers_attestations_.md#identifierlookupresult) - -### Functions - -* [getSecurityCodePrefix](_wrappers_attestations_.md#getsecuritycodeprefix) - -## Type aliases - -### IdentifierLookupResult - -Ƭ **IdentifierLookupResult**: *Record‹string, Record‹Address, [AttestationStat](../interfaces/_wrappers_attestations_.attestationstat.md) | undefined› | undefined›* - -*Defined in [contractkit/src/wrappers/Attestations.ts:80](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Attestations.ts#L80)* - -## Functions - -### getSecurityCodePrefix - -▸ **getSecurityCodePrefix**(`issuerAddress`: Address): *string* - -*Defined in [contractkit/src/wrappers/Attestations.ts:29](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Attestations.ts#L29)* - -**Parameters:** - -Name | Type | ------- | ------ | -`issuerAddress` | Address | - -**Returns:** *string* diff --git a/packages/docs/developer-resources/contractkit/reference/modules/_wrappers_baseslasher_.md b/packages/docs/developer-resources/contractkit/reference/modules/_wrappers_baseslasher_.md deleted file mode 100644 index bd10cfd36b6..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/modules/_wrappers_baseslasher_.md +++ /dev/null @@ -1,7 +0,0 @@ -# Module: "wrappers/BaseSlasher" - -## Index - -### Classes - -* [BaseSlasher](../classes/_wrappers_baseslasher_.baseslasher.md) diff --git a/packages/docs/developer-resources/contractkit/reference/modules/_wrappers_basewrapper_.md b/packages/docs/developer-resources/contractkit/reference/modules/_wrappers_basewrapper_.md deleted file mode 100644 index f6ee000babd..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/modules/_wrappers_basewrapper_.md +++ /dev/null @@ -1,605 +0,0 @@ -# Module: "wrappers/BaseWrapper" - -## Index - -### Classes - -* [BaseWrapper](../classes/_wrappers_basewrapper_.basewrapper.md) - -### Functions - -* [blocksToDurationString](_wrappers_basewrapper_.md#const-blockstodurationstring) -* [bufferToSolidityBytes](_wrappers_basewrapper_.md#const-buffertosoliditybytes) -* [fixidityValueToBigNumber](_wrappers_basewrapper_.md#const-fixidityvaluetobignumber) -* [identity](_wrappers_basewrapper_.md#const-identity) -* [proxyCall](_wrappers_basewrapper_.md#proxycall) -* [proxySend](_wrappers_basewrapper_.md#proxysend) -* [secondsToDurationString](_wrappers_basewrapper_.md#secondstodurationstring) -* [solidityBytesToString](_wrappers_basewrapper_.md#const-soliditybytestostring) -* [stringIdentity](_wrappers_basewrapper_.md#const-stringidentity) -* [stringToSolidityBytes](_wrappers_basewrapper_.md#const-stringtosoliditybytes) -* [tupleParser](_wrappers_basewrapper_.md#tupleparser) -* [unixSecondsTimestampToDateString](_wrappers_basewrapper_.md#const-unixsecondstimestamptodatestring) -* [valueToBigNumber](_wrappers_basewrapper_.md#const-valuetobignumber) -* [valueToFixidityString](_wrappers_basewrapper_.md#const-valuetofixiditystring) -* [valueToFrac](_wrappers_basewrapper_.md#const-valuetofrac) -* [valueToInt](_wrappers_basewrapper_.md#const-valuetoint) -* [valueToString](_wrappers_basewrapper_.md#const-valuetostring) - -## Functions - -### `Const` blocksToDurationString - -▸ **blocksToDurationString**(`input`: BigNumber.Value): *string* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:125](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L125)* - -**Parameters:** - -Name | Type | ------- | ------ | -`input` | BigNumber.Value | - -**Returns:** *string* - -___ - -### `Const` bufferToSolidityBytes - -▸ **bufferToSolidityBytes**(`input`: Buffer): *SolidityBytes* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:135](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L135)* - -**Parameters:** - -Name | Type | ------- | ------ | -`input` | Buffer | - -**Returns:** *SolidityBytes* - -___ - -### `Const` fixidityValueToBigNumber - -▸ **fixidityValueToBigNumber**(`input`: BigNumber.Value): *BigNumber‹›* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:63](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L63)* - -**Parameters:** - -Name | Type | ------- | ------ | -`input` | BigNumber.Value | - -**Returns:** *BigNumber‹›* - -___ - -### `Const` identity - -▸ **identity**<**A**>(`a`: A): *A* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:150](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L150)* - -Identity Parser - -**Type parameters:** - -▪ **A** - -**Parameters:** - -Name | Type | ------- | ------ | -`a` | A | - -**Returns:** *A* - -___ - -### proxyCall - -▸ **proxyCall**<**InputArgs**, **ParsedInputArgs**, **PreParsedOutput**, **Output**>(`methodFn`: Method‹ParsedInputArgs, PreParsedOutput›, `parseInputArgs`: function, `parseOutput`: function): *function* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:219](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L219)* - -Creates a proxy to call a web3 native contract method. - -There are 4 cases: - - methodFn - - parseInputArgs => methodFn - - parseInputArgs => methodFn => parseOutput - - methodFn => parseOutput - -**Type parameters:** - -▪ **InputArgs**: *any[]* - -▪ **ParsedInputArgs**: *any[]* - -▪ **PreParsedOutput** - -▪ **Output** - -**Parameters:** - -▪ **methodFn**: *Method‹ParsedInputArgs, PreParsedOutput›* - -Web3 methods function - -▪ **parseInputArgs**: *function* - -parseInputArgs function, tranforms arguments into `methodFn` expected inputs - -▸ (...`args`: InputArgs): *ParsedInputArgs* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -▪ **parseOutput**: *function* - -parseOutput function, transforms `methodFn` output into proxy return - -▸ (`o`: PreParsedOutput): *Output* - -**Parameters:** - -Name | Type | ------- | ------ | -`o` | PreParsedOutput | - -**Returns:** *function* - -▸ (...`args`: InputArgs): *Promise‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -▸ **proxyCall**<**InputArgs**, **PreParsedOutput**, **Output**>(`methodFn`: Method‹InputArgs, PreParsedOutput›, `x`: undefined, `parseOutput`: function): *function* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:229](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L229)* - -**Type parameters:** - -▪ **InputArgs**: *any[]* - -▪ **PreParsedOutput** - -▪ **Output** - -**Parameters:** - -▪ **methodFn**: *Method‹InputArgs, PreParsedOutput›* - -▪ **x**: *undefined* - -▪ **parseOutput**: *function* - -▸ (`o`: PreParsedOutput): *Output* - -**Parameters:** - -Name | Type | ------- | ------ | -`o` | PreParsedOutput | - -**Returns:** *function* - -▸ (...`args`: InputArgs): *Promise‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -▸ **proxyCall**<**InputArgs**, **ParsedInputArgs**, **Output**>(`methodFn`: Method‹ParsedInputArgs, Output›, `parseInputArgs`: function): *function* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:234](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L234)* - -**Type parameters:** - -▪ **InputArgs**: *any[]* - -▪ **ParsedInputArgs**: *any[]* - -▪ **Output** - -**Parameters:** - -▪ **methodFn**: *Method‹ParsedInputArgs, Output›* - -▪ **parseInputArgs**: *function* - -▸ (...`args`: InputArgs): *ParsedInputArgs* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -**Returns:** *function* - -▸ (...`args`: InputArgs): *Promise‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -▸ **proxyCall**<**InputArgs**, **Output**>(`methodFn`: Method‹InputArgs, Output›): *function* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:238](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L238)* - -**Type parameters:** - -▪ **InputArgs**: *any[]* - -▪ **Output** - -**Parameters:** - -Name | Type | ------- | ------ | -`methodFn` | Method‹InputArgs, Output› | - -**Returns:** *function* - -▸ (...`args`: InputArgs): *Promise‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### proxySend - -▸ **proxySend**<**InputArgs**, **ParsedInputArgs**, **Output**>(`kit`: [ContractKit](../classes/_kit_.contractkit.md), ...`sendArgs`: ProxySendArgs‹InputArgs, ParsedInputArgs, Output›): *function* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:299](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L299)* - -Creates a proxy to send a tx on a web3 native contract method. - -There are 2 cases: - - call methodFn (no pre or post parsing) - - preParse arguments & call methodFn - -**Type parameters:** - -▪ **InputArgs**: *any[]* - -▪ **ParsedInputArgs**: *any[]* - -▪ **Output** - -**Parameters:** - -Name | Type | ------- | ------ | -`kit` | [ContractKit](../classes/_kit_.contractkit.md) | -`...sendArgs` | ProxySendArgs‹InputArgs, ParsedInputArgs, Output› | - -**Returns:** *function* - -▸ (...`args`: InputArgs): *CeloTransactionObject‹Output›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | InputArgs | - -___ - -### secondsToDurationString - -▸ **secondsToDurationString**(`durationSeconds`: BigNumber.Value, `outputUnits`: TimeUnit[]): *string* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:96](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L96)* - -**Parameters:** - -Name | Type | Default | ------- | ------ | ------ | -`durationSeconds` | BigNumber.Value | - | -`outputUnits` | TimeUnit[] | ['year', 'month', 'week', 'day', 'hour', 'minute', 'second'] | - -**Returns:** *string* - -___ - -### `Const` solidityBytesToString - -▸ **solidityBytesToString**(`input`: SolidityBytes): *string* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:136](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L136)* - -**Parameters:** - -Name | Type | ------- | ------ | -`input` | SolidityBytes | - -**Returns:** *string* - -___ - -### `Const` stringIdentity - -▸ **stringIdentity**(`x`: string): *string* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:151](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L151)* - -**Parameters:** - -Name | Type | ------- | ------ | -`x` | string | - -**Returns:** *string* - -___ - -### `Const` stringToSolidityBytes - -▸ **stringToSolidityBytes**(`input`: string): *SolidityBytes* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:134](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L134)* - -**Parameters:** - -Name | Type | ------- | ------ | -`input` | string | - -**Returns:** *SolidityBytes* - -___ - -### tupleParser - -▸ **tupleParser**<**A0**, **B0**>(`parser0`: Parser‹A0, B0›): *function* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:157](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L157)* - -Tuple parser -Useful to map different input arguments - -**Type parameters:** - -▪ **A0** - -▪ **B0** - -**Parameters:** - -Name | Type | ------- | ------ | -`parser0` | Parser‹A0, B0› | - -**Returns:** *function* - -▸ (...`args`: [A0]): *[B0]* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | [A0] | - -▸ **tupleParser**<**A0**, **B0**, **A1**, **B1**>(`parser0`: Parser‹A0, B0›, `parser1`: Parser‹A1, B1›): *function* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:158](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L158)* - -**Type parameters:** - -▪ **A0** - -▪ **B0** - -▪ **A1** - -▪ **B1** - -**Parameters:** - -Name | Type | ------- | ------ | -`parser0` | Parser‹A0, B0› | -`parser1` | Parser‹A1, B1› | - -**Returns:** *function* - -▸ (...`args`: [A0, A1]): *[B0, B1]* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | [A0, A1] | - -▸ **tupleParser**<**A0**, **B0**, **A1**, **B1**, **A2**, **B2**>(`parser0`: Parser‹A0, B0›, `parser1`: Parser‹A1, B1›, `parser2`: Parser‹A2, B2›): *function* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:162](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L162)* - -**Type parameters:** - -▪ **A0** - -▪ **B0** - -▪ **A1** - -▪ **B1** - -▪ **A2** - -▪ **B2** - -**Parameters:** - -Name | Type | ------- | ------ | -`parser0` | Parser‹A0, B0› | -`parser1` | Parser‹A1, B1› | -`parser2` | Parser‹A2, B2› | - -**Returns:** *function* - -▸ (...`args`: [A0, A1, A2]): *[B0, B1, B2]* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | [A0, A1, A2] | - -▸ **tupleParser**<**A0**, **B0**, **A1**, **B1**, **A2**, **B2**, **A3**, **B3**>(`parser0`: Parser‹A0, B0›, `parser1`: Parser‹A1, B1›, `parser2`: Parser‹A2, B2›, `parser3`: Parser‹A3, B3›): *function* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:167](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L167)* - -**Type parameters:** - -▪ **A0** - -▪ **B0** - -▪ **A1** - -▪ **B1** - -▪ **A2** - -▪ **B2** - -▪ **A3** - -▪ **B3** - -**Parameters:** - -Name | Type | ------- | ------ | -`parser0` | Parser‹A0, B0› | -`parser1` | Parser‹A1, B1› | -`parser2` | Parser‹A2, B2› | -`parser3` | Parser‹A3, B3› | - -**Returns:** *function* - -▸ (...`args`: [A0, A1, A2, A3]): *[B0, B1, B2, B3]* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | [A0, A1, A2, A3] | - -___ - -### `Const` unixSecondsTimestampToDateString - -▸ **unixSecondsTimestampToDateString**(`input`: BigNumber.Value): *string* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:128](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L128)* - -**Parameters:** - -Name | Type | ------- | ------ | -`input` | BigNumber.Value | - -**Returns:** *string* - -___ - -### `Const` valueToBigNumber - -▸ **valueToBigNumber**(`input`: BigNumber.Value): *BigNumber‹›* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:61](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L61)* - -**Parameters:** - -Name | Type | ------- | ------ | -`input` | BigNumber.Value | - -**Returns:** *BigNumber‹›* - -___ - -### `Const` valueToFixidityString - -▸ **valueToFixidityString**(`input`: BigNumber.Value): *string* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:67](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L67)* - -**Parameters:** - -Name | Type | ------- | ------ | -`input` | BigNumber.Value | - -**Returns:** *string* - -___ - -### `Const` valueToFrac - -▸ **valueToFrac**(`numerator`: BigNumber.Value, `denominator`: BigNumber.Value): *BigNumber‹›* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:75](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L75)* - -**Parameters:** - -Name | Type | ------- | ------ | -`numerator` | BigNumber.Value | -`denominator` | BigNumber.Value | - -**Returns:** *BigNumber‹›* - -___ - -### `Const` valueToInt - -▸ **valueToInt**(`input`: BigNumber.Value): *number* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:70](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L70)* - -**Parameters:** - -Name | Type | ------- | ------ | -`input` | BigNumber.Value | - -**Returns:** *number* - -___ - -### `Const` valueToString - -▸ **valueToString**(`input`: BigNumber.Value): *string* - -*Defined in [contractkit/src/wrappers/BaseWrapper.ts:65](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/BaseWrapper.ts#L65)* - -**Parameters:** - -Name | Type | ------- | ------ | -`input` | BigNumber.Value | - -**Returns:** *string* diff --git a/packages/docs/developer-resources/contractkit/reference/modules/_wrappers_blockchainparameters_.md b/packages/docs/developer-resources/contractkit/reference/modules/_wrappers_blockchainparameters_.md deleted file mode 100644 index 857f28ae6b0..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/modules/_wrappers_blockchainparameters_.md +++ /dev/null @@ -1,12 +0,0 @@ -# Module: "wrappers/BlockchainParameters" - -## Index - -### Classes - -* [BlockchainParametersWrapper](../classes/_wrappers_blockchainparameters_.blockchainparameterswrapper.md) - -### Interfaces - -* [BlockchainParametersConfig](../interfaces/_wrappers_blockchainparameters_.blockchainparametersconfig.md) -* [ClientVersion](../interfaces/_wrappers_blockchainparameters_.clientversion.md) diff --git a/packages/docs/developer-resources/contractkit/reference/modules/_wrappers_doublesigningslasher_.md b/packages/docs/developer-resources/contractkit/reference/modules/_wrappers_doublesigningslasher_.md deleted file mode 100644 index ac59dfb2b36..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/modules/_wrappers_doublesigningslasher_.md +++ /dev/null @@ -1,7 +0,0 @@ -# Module: "wrappers/DoubleSigningSlasher" - -## Index - -### Classes - -* [DoubleSigningSlasherWrapper](../classes/_wrappers_doublesigningslasher_.doublesigningslasherwrapper.md) diff --git a/packages/docs/developer-resources/contractkit/reference/modules/_wrappers_downtimeslasher_.md b/packages/docs/developer-resources/contractkit/reference/modules/_wrappers_downtimeslasher_.md deleted file mode 100644 index 1eb905ce384..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/modules/_wrappers_downtimeslasher_.md +++ /dev/null @@ -1,12 +0,0 @@ -# Module: "wrappers/DowntimeSlasher" - -## Index - -### Classes - -* [DowntimeSlasherWrapper](../classes/_wrappers_downtimeslasher_.downtimeslasherwrapper.md) - -### Interfaces - -* [DowntimeSlasherConfig](../interfaces/_wrappers_downtimeslasher_.downtimeslasherconfig.md) -* [Interval](../interfaces/_wrappers_downtimeslasher_.interval.md) diff --git a/packages/docs/developer-resources/contractkit/reference/modules/_wrappers_election_.md b/packages/docs/developer-resources/contractkit/reference/modules/_wrappers_election_.md deleted file mode 100644 index 65401ed0564..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/modules/_wrappers_election_.md +++ /dev/null @@ -1,17 +0,0 @@ -# Module: "wrappers/Election" - -## Index - -### Classes - -* [ElectionWrapper](../classes/_wrappers_election_.electionwrapper.md) - -### Interfaces - -* [ElectableValidators](../interfaces/_wrappers_election_.electablevalidators.md) -* [ElectionConfig](../interfaces/_wrappers_election_.electionconfig.md) -* [GroupVote](../interfaces/_wrappers_election_.groupvote.md) -* [GroupVoterReward](../interfaces/_wrappers_election_.groupvoterreward.md) -* [ValidatorGroupVote](../interfaces/_wrappers_election_.validatorgroupvote.md) -* [Voter](../interfaces/_wrappers_election_.voter.md) -* [VoterReward](../interfaces/_wrappers_election_.voterreward.md) diff --git a/packages/docs/developer-resources/contractkit/reference/modules/_wrappers_escrow_.md b/packages/docs/developer-resources/contractkit/reference/modules/_wrappers_escrow_.md deleted file mode 100644 index 5814e112fcb..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/modules/_wrappers_escrow_.md +++ /dev/null @@ -1,7 +0,0 @@ -# Module: "wrappers/Escrow" - -## Index - -### Classes - -* [EscrowWrapper](../classes/_wrappers_escrow_.escrowwrapper.md) diff --git a/packages/docs/developer-resources/contractkit/reference/modules/_wrappers_exchange_.md b/packages/docs/developer-resources/contractkit/reference/modules/_wrappers_exchange_.md deleted file mode 100644 index b4175d9838f..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/modules/_wrappers_exchange_.md +++ /dev/null @@ -1,11 +0,0 @@ -# Module: "wrappers/Exchange" - -## Index - -### Classes - -* [ExchangeWrapper](../classes/_wrappers_exchange_.exchangewrapper.md) - -### Interfaces - -* [ExchangeConfig](../interfaces/_wrappers_exchange_.exchangeconfig.md) diff --git a/packages/docs/developer-resources/contractkit/reference/modules/_wrappers_freezer_.md b/packages/docs/developer-resources/contractkit/reference/modules/_wrappers_freezer_.md deleted file mode 100644 index d1a5b5a5c6a..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/modules/_wrappers_freezer_.md +++ /dev/null @@ -1,7 +0,0 @@ -# Module: "wrappers/Freezer" - -## Index - -### Classes - -* [FreezerWrapper](../classes/_wrappers_freezer_.freezerwrapper.md) diff --git a/packages/docs/developer-resources/contractkit/reference/modules/_wrappers_gaspriceminimum_.md b/packages/docs/developer-resources/contractkit/reference/modules/_wrappers_gaspriceminimum_.md deleted file mode 100644 index b8b39922a2b..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/modules/_wrappers_gaspriceminimum_.md +++ /dev/null @@ -1,11 +0,0 @@ -# Module: "wrappers/GasPriceMinimum" - -## Index - -### Classes - -* [GasPriceMinimumWrapper](../classes/_wrappers_gaspriceminimum_.gaspriceminimumwrapper.md) - -### Interfaces - -* [GasPriceMinimumConfig](../interfaces/_wrappers_gaspriceminimum_.gaspriceminimumconfig.md) diff --git a/packages/docs/developer-resources/contractkit/reference/modules/_wrappers_goldtokenwrapper_.md b/packages/docs/developer-resources/contractkit/reference/modules/_wrappers_goldtokenwrapper_.md deleted file mode 100644 index bbdfdd11d6d..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/modules/_wrappers_goldtokenwrapper_.md +++ /dev/null @@ -1,7 +0,0 @@ -# Module: "wrappers/GoldTokenWrapper" - -## Index - -### Classes - -* [GoldTokenWrapper](../classes/_wrappers_goldtokenwrapper_.goldtokenwrapper.md) diff --git a/packages/docs/developer-resources/contractkit/reference/modules/_wrappers_governance_.md b/packages/docs/developer-resources/contractkit/reference/modules/_wrappers_governance_.md deleted file mode 100644 index 4a9a70bd8a4..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/modules/_wrappers_governance_.md +++ /dev/null @@ -1,103 +0,0 @@ -# Module: "wrappers/Governance" - -## Index - -### Enumerations - -* [ProposalStage](../enums/_wrappers_governance_.proposalstage.md) -* [VoteValue](../enums/_wrappers_governance_.votevalue.md) - -### Classes - -* [GovernanceWrapper](../classes/_wrappers_governance_.governancewrapper.md) - -### Interfaces - -* [GovernanceConfig](../interfaces/_wrappers_governance_.governanceconfig.md) -* [HotfixRecord](../interfaces/_wrappers_governance_.hotfixrecord.md) -* [ParticipationParameters](../interfaces/_wrappers_governance_.participationparameters.md) -* [ProposalMetadata](../interfaces/_wrappers_governance_.proposalmetadata.md) -* [ProposalRecord](../interfaces/_wrappers_governance_.proposalrecord.md) -* [ProposalStageDurations](../interfaces/_wrappers_governance_.proposalstagedurations.md) -* [UpvoteRecord](../interfaces/_wrappers_governance_.upvoterecord.md) -* [VoteRecord](../interfaces/_wrappers_governance_.voterecord.md) -* [Voter](../interfaces/_wrappers_governance_.voter.md) -* [Votes](../interfaces/_wrappers_governance_.votes.md) - -### Type aliases - -* [HotfixParams](_wrappers_governance_.md#hotfixparams) -* [Proposal](_wrappers_governance_.md#proposal) -* [ProposalParams](_wrappers_governance_.md#proposalparams) -* [ProposalTransaction](_wrappers_governance_.md#proposaltransaction) - -### Functions - -* [hotfixToParams](_wrappers_governance_.md#const-hotfixtoparams) -* [proposalToParams](_wrappers_governance_.md#const-proposaltoparams) - -## Type aliases - -### HotfixParams - -Ƭ **HotfixParams**: *Parameters‹Governance["methods"]["executeHotfix"]›* - -*Defined in [contractkit/src/wrappers/Governance.ts:111](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Governance.ts#L111)* - -___ - -### Proposal - -Ƭ **Proposal**: *[ProposalTransaction](_wrappers_governance_.md#proposaltransaction)[]* - -*Defined in [contractkit/src/wrappers/Governance.ts:71](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Governance.ts#L71)* - -___ - -### ProposalParams - -Ƭ **ProposalParams**: *Parameters‹Governance["methods"]["propose"]›* - -*Defined in [contractkit/src/wrappers/Governance.ts:69](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Governance.ts#L69)* - -___ - -### ProposalTransaction - -Ƭ **ProposalTransaction**: *Pick‹CeloTxPending, "to" | "input" | "value"›* - -*Defined in [contractkit/src/wrappers/Governance.ts:70](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Governance.ts#L70)* - -## Functions - -### `Const` hotfixToParams - -▸ **hotfixToParams**(`proposal`: [Proposal](_wrappers_governance_.md#proposal), `salt`: Buffer): *[HotfixParams](_wrappers_governance_.md#hotfixparams)* - -*Defined in [contractkit/src/wrappers/Governance.ts:112](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Governance.ts#L112)* - -**Parameters:** - -Name | Type | ------- | ------ | -`proposal` | [Proposal](_wrappers_governance_.md#proposal) | -`salt` | Buffer | - -**Returns:** *[HotfixParams](_wrappers_governance_.md#hotfixparams)* - -___ - -### `Const` proposalToParams - -▸ **proposalToParams**(`proposal`: [Proposal](_wrappers_governance_.md#proposal), `descriptionURL`: string): *[ProposalParams](_wrappers_governance_.md#proposalparams)* - -*Defined in [contractkit/src/wrappers/Governance.ts:73](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/Governance.ts#L73)* - -**Parameters:** - -Name | Type | ------- | ------ | -`proposal` | [Proposal](_wrappers_governance_.md#proposal) | -`descriptionURL` | string | - -**Returns:** *[ProposalParams](_wrappers_governance_.md#proposalparams)* diff --git a/packages/docs/developer-resources/contractkit/reference/modules/_wrappers_lockedgold_.md b/packages/docs/developer-resources/contractkit/reference/modules/_wrappers_lockedgold_.md deleted file mode 100644 index 09392d524bc..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/modules/_wrappers_lockedgold_.md +++ /dev/null @@ -1,14 +0,0 @@ -# Module: "wrappers/LockedGold" - -## Index - -### Classes - -* [LockedGoldWrapper](../classes/_wrappers_lockedgold_.lockedgoldwrapper.md) - -### Interfaces - -* [AccountSlashed](../interfaces/_wrappers_lockedgold_.accountslashed.md) -* [LockedGoldConfig](../interfaces/_wrappers_lockedgold_.lockedgoldconfig.md) -* [PendingWithdrawal](../interfaces/_wrappers_lockedgold_.pendingwithdrawal.md) -* [VotingDetails](../interfaces/_wrappers_lockedgold_.votingdetails.md) diff --git a/packages/docs/developer-resources/contractkit/reference/modules/_wrappers_metatransactionwallet_.md b/packages/docs/developer-resources/contractkit/reference/modules/_wrappers_metatransactionwallet_.md deleted file mode 100644 index e23e6e40d17..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/modules/_wrappers_metatransactionwallet_.md +++ /dev/null @@ -1,106 +0,0 @@ -# Module: "wrappers/MetaTransactionWallet" - -## Index - -### Classes - -* [MetaTransactionWalletWrapper](../classes/_wrappers_metatransactionwallet_.metatransactionwalletwrapper.md) - -### Interfaces - -* [RawTransaction](../interfaces/_wrappers_metatransactionwallet_.rawtransaction.md) -* [TransactionObjectWithValue](../interfaces/_wrappers_metatransactionwallet_.transactionobjectwithvalue.md) - -### Type aliases - -* [TransactionInput](_wrappers_metatransactionwallet_.md#transactioninput) - -### Functions - -* [buildMetaTxTypedData](_wrappers_metatransactionwallet_.md#const-buildmetatxtypeddata) -* [toRawTransaction](_wrappers_metatransactionwallet_.md#const-torawtransaction) -* [toTransactionBatch](_wrappers_metatransactionwallet_.md#const-totransactionbatch) - -## Type aliases - -### TransactionInput - -Ƭ **TransactionInput**: *CeloTxObject‹T› | [TransactionObjectWithValue](../interfaces/_wrappers_metatransactionwallet_.transactionobjectwithvalue.md)‹T› | [RawTransaction](../interfaces/_wrappers_metatransactionwallet_.rawtransaction.md)* - -*Defined in [contractkit/src/wrappers/MetaTransactionWallet.ts:27](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/MetaTransactionWallet.ts#L27)* - -## Functions - -### `Const` buildMetaTxTypedData - -▸ **buildMetaTxTypedData**(`walletAddress`: Address, `tx`: [RawTransaction](../interfaces/_wrappers_metatransactionwallet_.rawtransaction.md), `nonce`: number, `chainId`: number): *EIP712TypedData* - -*Defined in [contractkit/src/wrappers/MetaTransactionWallet.ts:255](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/MetaTransactionWallet.ts#L255)* - -**Parameters:** - -Name | Type | ------- | ------ | -`walletAddress` | Address | -`tx` | [RawTransaction](../interfaces/_wrappers_metatransactionwallet_.rawtransaction.md) | -`nonce` | number | -`chainId` | number | - -**Returns:** *EIP712TypedData* - -___ - -### `Const` toRawTransaction - -▸ **toRawTransaction**(`tx`: [TransactionInput](_wrappers_metatransactionwallet_.md#transactioninput)‹any›): *[RawTransaction](../interfaces/_wrappers_metatransactionwallet_.rawtransaction.md)* - -*Defined in [contractkit/src/wrappers/MetaTransactionWallet.ts:210](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/MetaTransactionWallet.ts#L210)* - -Turns any possible way to pass in a transaction into the raw values -that are actually required. This is used both internally to normalize -ways in which transactions are passed in but also public in order -for one instance of ContractKit to serialize a meta transaction to -send over the wire and be consumed somewhere else. - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`tx` | [TransactionInput](_wrappers_metatransactionwallet_.md#transactioninput)‹any› | TransactionInput union of all the ways we expect transactions | - -**Returns:** *[RawTransaction](../interfaces/_wrappers_metatransactionwallet_.rawtransaction.md)* - -a RawTransactions that's serializable - -___ - -### `Const` toTransactionBatch - -▸ **toTransactionBatch**(`txs`: Array‹[TransactionInput](_wrappers_metatransactionwallet_.md#transactioninput)‹any››): *object* - -*Defined in [contractkit/src/wrappers/MetaTransactionWallet.ts:238](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/MetaTransactionWallet.ts#L238)* - -Turns an array of transaction inputs into the argument that -need to be passed to the executeTransactions call. -Main transformation is that all the `data` parts of each -transaction in the batch are concatenated and an array -of lengths is constructed. -This is a gas optimisation on the contract. - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`txs` | Array‹[TransactionInput](_wrappers_metatransactionwallet_.md#transactioninput)‹any›› | Array> array of txs | - -**Returns:** *object* - -Params for the executeTransactions method call - -* **callData**: *string* - -* **callDataLengths**: *number[]* - -* **destinations**: *string[]* - -* **values**: *string[]* diff --git a/packages/docs/developer-resources/contractkit/reference/modules/_wrappers_metatransactionwalletdeployer_.md b/packages/docs/developer-resources/contractkit/reference/modules/_wrappers_metatransactionwalletdeployer_.md deleted file mode 100644 index 87e685c0844..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/modules/_wrappers_metatransactionwalletdeployer_.md +++ /dev/null @@ -1,7 +0,0 @@ -# Module: "wrappers/MetaTransactionWalletDeployer" - -## Index - -### Classes - -* [MetaTransactionWalletDeployerWrapper](../classes/_wrappers_metatransactionwalletdeployer_.metatransactionwalletdeployerwrapper.md) diff --git a/packages/docs/developer-resources/contractkit/reference/modules/_wrappers_multisig_.md b/packages/docs/developer-resources/contractkit/reference/modules/_wrappers_multisig_.md deleted file mode 100644 index 684937b5357..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/modules/_wrappers_multisig_.md +++ /dev/null @@ -1,11 +0,0 @@ -# Module: "wrappers/MultiSig" - -## Index - -### Classes - -* [MultiSigWrapper](../classes/_wrappers_multisig_.multisigwrapper.md) - -### Interfaces - -* [TransactionData](../interfaces/_wrappers_multisig_.transactiondata.md) diff --git a/packages/docs/developer-resources/contractkit/reference/modules/_wrappers_releasegold_.md b/packages/docs/developer-resources/contractkit/reference/modules/_wrappers_releasegold_.md deleted file mode 100644 index 081d991c4b4..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/modules/_wrappers_releasegold_.md +++ /dev/null @@ -1,12 +0,0 @@ -# Module: "wrappers/ReleaseGold" - -## Index - -### Classes - -* [ReleaseGoldWrapper](../classes/_wrappers_releasegold_.releasegoldwrapper.md) - -### Interfaces - -* [BalanceState](../interfaces/_wrappers_releasegold_.balancestate.md) -* [ReleaseGoldInfo](../interfaces/_wrappers_releasegold_.releasegoldinfo.md) diff --git a/packages/docs/developer-resources/contractkit/reference/modules/_wrappers_reserve_.md b/packages/docs/developer-resources/contractkit/reference/modules/_wrappers_reserve_.md deleted file mode 100644 index fff29bf1b54..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/modules/_wrappers_reserve_.md +++ /dev/null @@ -1,11 +0,0 @@ -# Module: "wrappers/Reserve" - -## Index - -### Classes - -* [ReserveWrapper](../classes/_wrappers_reserve_.reservewrapper.md) - -### Interfaces - -* [ReserveConfig](../interfaces/_wrappers_reserve_.reserveconfig.md) diff --git a/packages/docs/developer-resources/contractkit/reference/modules/_wrappers_sortedoracles_.md b/packages/docs/developer-resources/contractkit/reference/modules/_wrappers_sortedoracles_.md deleted file mode 100644 index 1fa61afedca..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/modules/_wrappers_sortedoracles_.md +++ /dev/null @@ -1,31 +0,0 @@ -# Module: "wrappers/SortedOracles" - -## Index - -### Enumerations - -* [MedianRelation](../enums/_wrappers_sortedoracles_.medianrelation.md) - -### Classes - -* [SortedOraclesWrapper](../classes/_wrappers_sortedoracles_.sortedoracleswrapper.md) - -### Interfaces - -* [MedianRate](../interfaces/_wrappers_sortedoracles_.medianrate.md) -* [OracleRate](../interfaces/_wrappers_sortedoracles_.oraclerate.md) -* [OracleReport](../interfaces/_wrappers_sortedoracles_.oraclereport.md) -* [OracleTimestamp](../interfaces/_wrappers_sortedoracles_.oracletimestamp.md) -* [SortedOraclesConfig](../interfaces/_wrappers_sortedoracles_.sortedoraclesconfig.md) - -### Type aliases - -* [ReportTarget](_wrappers_sortedoracles_.md#reporttarget) - -## Type aliases - -### ReportTarget - -Ƭ **ReportTarget**: *[StableToken](../enums/_base_.celocontract.md#stabletoken) | Address* - -*Defined in [contractkit/src/wrappers/SortedOracles.ts:50](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/wrappers/SortedOracles.ts#L50)* diff --git a/packages/docs/developer-resources/contractkit/reference/modules/_wrappers_stabletokenwrapper_.md b/packages/docs/developer-resources/contractkit/reference/modules/_wrappers_stabletokenwrapper_.md deleted file mode 100644 index baee5d1f3d2..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/modules/_wrappers_stabletokenwrapper_.md +++ /dev/null @@ -1,12 +0,0 @@ -# Module: "wrappers/StableTokenWrapper" - -## Index - -### Classes - -* [StableTokenWrapper](../classes/_wrappers_stabletokenwrapper_.stabletokenwrapper.md) - -### Interfaces - -* [InflationParameters](../interfaces/_wrappers_stabletokenwrapper_.inflationparameters.md) -* [StableTokenConfig](../interfaces/_wrappers_stabletokenwrapper_.stabletokenconfig.md) diff --git a/packages/docs/developer-resources/contractkit/reference/modules/_wrappers_validators_.md b/packages/docs/developer-resources/contractkit/reference/modules/_wrappers_validators_.md deleted file mode 100644 index 7c2bc5127fe..00000000000 --- a/packages/docs/developer-resources/contractkit/reference/modules/_wrappers_validators_.md +++ /dev/null @@ -1,17 +0,0 @@ -# Module: "wrappers/Validators" - -## Index - -### Classes - -* [ValidatorsWrapper](../classes/_wrappers_validators_.validatorswrapper.md) - -### Interfaces - -* [GroupMembership](../interfaces/_wrappers_validators_.groupmembership.md) -* [LockedGoldRequirements](../interfaces/_wrappers_validators_.lockedgoldrequirements.md) -* [MembershipHistoryExtraData](../interfaces/_wrappers_validators_.membershiphistoryextradata.md) -* [Validator](../interfaces/_wrappers_validators_.validator.md) -* [ValidatorGroup](../interfaces/_wrappers_validators_.validatorgroup.md) -* [ValidatorReward](../interfaces/_wrappers_validators_.validatorreward.md) -* [ValidatorsConfig](../interfaces/_wrappers_validators_.validatorsconfig.md) diff --git a/packages/docs/developer-resources/contractkit/setup.md b/packages/docs/developer-resources/contractkit/setup.md deleted file mode 100644 index c40965f2f2e..00000000000 --- a/packages/docs/developer-resources/contractkit/setup.md +++ /dev/null @@ -1,50 +0,0 @@ -# Getting Started - -## Installation and System Requirements - -To install, run the following: - -```bash -npm install @celo/contractkit -// or -yarn add @celo/contractkit -``` - -You will need Node.js v12.x. - -## Initializing the Kit - -To start working with ContractKit you need a `kit` instance and a valid net to connect with. In this example will use `alfajores` (you can read more about it [here](../../getting-started/alfajores-testnet.md)) - -```ts -import { newKit } from '@celo/contractkit' - -const kit = newKit('https://alfajores-forno.celo-testnet.org') -``` - -Go to the [page about Forno](../forno/README.md) for details about different connection types and network endpoints. - -## Initialize the Kit with your own node - -If you are hosting your own node (you can follow [this guide](../../getting-started/running-a-full-node-in-mainnet.md) to run one) you can connect our ContractKit to it. - -```ts -import { newKit } from '@celo/contractkit' - -// define localUrl and port with the ones of your node - -const kit = newKit(`${localUrl}:${port}`) -``` - -Same as `Web3` we support `WebSockets`, `RPC` and connecting via `IPC`. -For this last one you will have to initialize the `kit` with an instances of `Web3` that has a **valid** `IPC Provider` - -```ts -import Web3 from 'web3' -import { newKitFromWeb3 } from '@celo/contractkit' - -const web3Instance: Web3 = new Web3(new Web3.providers.IpcProvider('/Users/myuser/Library/CeloNode/geth.ipc', net)) - -const kit = newKitFromWeb3(web3Instance) -``` - diff --git a/packages/docs/developer-resources/contractkit/usage.md b/packages/docs/developer-resources/contractkit/usage.md deleted file mode 100644 index f9fddaf2b55..00000000000 --- a/packages/docs/developer-resources/contractkit/usage.md +++ /dev/null @@ -1,127 +0,0 @@ -# ContractKit Usage - -The following are some examples of the capabilities of the `ContractKit`, assuming it is already connected to a node. If you aren't connected, [here is a refresher.](../walkthroughs/hellocontracts.md#deploy-to-alfajores) - -## Setting Default Tx Options - -`kit` allows you to set default transaction options: - -```ts -import { CeloContract } from '@celo/contractkit' - -let accounts = await kit.web3.eth.getAccounts() -kit.defaultAccount = accounts[0] -// paid gas in cUSD -await kit.setFeeCurrency(CeloContract.StableToken) -``` - -## Getting the Total Balance - -This method from the `kit` will return the CELO, locked CELO, cUSD and total balance of the address - -```ts -let totalBalance = await kit.getTotalBalance(myAddress) -``` - -## Deploy a contract - -Deploying a contract with the default account already set. Simply send a transaction with no `to:` field. See more about sending custom transactions below. - -You can verify the deployment on the [Alfajores block explorer here](https://alfajores-blockscout.celo-testnet.org/). Wait for the receipt and log it to get the transaction details. - -```ts -let bytecode = '0x608060405234...' // compiled Solidity deployment bytecode - -let tx = await kit.sendTransaction({ - data: bytecode -}) - -let receipt = tx.waitReceipt() -console.log(receipt) -``` - -## Sending Custom Transactions - -Celo transaction object is not the same as Ethereum's. There are three new fields present: - -- `feeCurrency` (address of the ERC20 contract to use to pay for gas and the gateway fee) -- `gatewayFeeRecipient` (coinbase address of the full serving the light client's trasactions) -- `gatewayFee` (value paid to the gateway fee recipient, denominated in the fee currency) - -This means that using `web3.eth.sendTransaction` or `myContract.methods.transfer().send()` should be **avoided**. - -Instead, `contractkit` provides an utility method to send transaction in both scenarios. **If you use contract wrappers, there is no need to use this.** - -For a raw transaction: - -```ts -const tx = kit.sendTransaction({ - from: myAddress, - to: someAddress, - value: oneGold, -}) -const hash = await tx.getHash() -const receipt = await tx.waitReceipt() -``` - -When interacting with a web3 contract object: - -```ts -const goldtoken = await kit._web3Contracts.getGoldToken() -const oneGold = kit.web3.utils.toWei('1', 'ether') - -const txo = await goldtoken.methods.transfer(someAddress, oneGold) -const tx = await kit.sendTransactionObject(txo, { from: myAddress }) -const hash = await tx.getHash() -const receipt = await tx.waitReceipt() -``` - -## Interacting with Custom contracts - -You can use ContractKit to interact with any deployed smart contract, provided you have the contract address and the [ABI](https://docs.soliditylang.org/en/latest/abi-spec.html). To do so, you will initialize a new `web3` Contract instance. Then you can call functions on the contract instance to read state or send transactions to update the contract. You can see some code snippets below. For a more comprehensive example, see the [Interacting with Custom Contracts](../walkthroughs/hello-contract-remote-node.md#interacting-with-custom-contracts) section of the Deploy a Contract code example. - -```ts -let contract = new kit.web3.eth.Contract(ABI, address) // Init a web3.js contract instance -let name = await instance.methods.getName().call() // Read contract state call - -const txObject = await instance.methods.setName(newName) // Encoding a transaction object call to the contract -await kit.sendTransactionObject(txObject, { from: account.address }) // Send the transaction -``` - -## Selling CELO only if the rate is favorable - -```ts -// This is at lower price I will accept in cUSD for every CELO -const favorableAmount = 100 -const amountToExchange = kit.web3.utils.toWei('10', 'ether') -const oneGold = kit.web3.utils.toWei('1', 'ether') -const exchange = await kit.contracts.getExchange() - -const amountOfcUsd = await exchange.quoteGoldSell(oneGold) - -if (amountOfcUsd > favorableAmount) { - const goldToken = await kit.contracts.getGoldToken() - const approveTx = await goldToken.approve(exchange.address, amountToExchange).send() - const approveReceipt = await approveTx.waitReceipt() - - const usdAmount = await exchange.quoteGoldSell(amountToExchange) - const sellTx = await exchange.sellGold(amountToExchange, usdAmount).send() - const sellReceipt = await sellTx.waitReceipt() -} -``` - -## Buying all the CELO I can, with the cUSD in my account - -```ts -const stableToken = await this.contracts.getStableToken() -const exchange = await this.contracts.getExchange() - -const cUsdBalance = await stableToken.balanceOf(myAddress) - -const approveTx = await stableToken.approve(exchange.address, cUsdBalance).send() -const approveReceipt = await approveTx.waitReceipt() - -const goldAmount = await exchange.quoteUsdSell(cUsdBalance) -const sellTx = await exchange.sellDollar(cUsdBalance, goldAmount).send() -const sellReceipt = await sellTx.waitReceipt() -``` diff --git a/packages/docs/developer-resources/dappkit/README.md b/packages/docs/developer-resources/dappkit/README.md deleted file mode 100644 index 312bfe2bdac..00000000000 --- a/packages/docs/developer-resources/dappkit/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# Celo DAppKit - -DAppKit is a lightweight set of functions that allow mobile DApps to work with the Celo Wallet to sign transactions and access the user's account. This allows for a better user experience: DApps can focus on a great native experience without having to worry about key management. It also provides a simpler development experience, as no state or connection management is necessary. - -DAppKit supports the following functionality: - -- Request permission to access account information and phone number from the Celo Wallet -- Request permission to sign transaction(s) from the Celo Wallet -- Look up phone numbers using the [Identity Protocol](../../celo-codebase/protocol/identity/README.md) to find contacts using Celo. - -DAppKit is currently built with React Native in mind, though the excellent [Expo framework](https://expo.io) is still highly recommended for developers building mobile and web DApps on Celo. Expo offers awesome features like incredibly easy setup, hot-reloading, and more. Currently, most of our tutorials and examples involve Expo, though we are working on creating additional documentation for other app frameworks. While DAppKit was designed for mobile apps in particular, since version `1.1.0-beta.1` it offers beta support for web DApps running in the browser of a mobile device. More details about this are included in the `Usage` section below. - -{% page-ref page="setup.md" %} - -{% page-ref page="usage.md" %} diff --git a/packages/docs/developer-resources/dappkit/setup.md b/packages/docs/developer-resources/dappkit/setup.md deleted file mode 100644 index a4c71d9946d..00000000000 --- a/packages/docs/developer-resources/dappkit/setup.md +++ /dev/null @@ -1,109 +0,0 @@ -# DappKit - -## Quick Start - -To get started, it is easiest to just use our Truffle Box template at [https://github.com/celo-org/celo-dappkit](https://github.com/celo-org/celo-dappkit). This repository includes a "Hello World" example for getting started with DappKit. - -## Configuration - -Read on for more details about how to set up and configure DappKit. - -### Installation - -To create a new expo project, you'll want to use the expo-cli - -```bash -npm install expo-cli --global -// or -yarn global add expo-cli - -expo init $YOUR_APP_NAME -``` - -Read more about general Expo setup at [https://expo.io/learn](https://expo.io/learn) - -### Typescript Support - -We are big fans of Typescript, so if you used the tabs template, you can support typescript by just following [these guidelines](https://docs.expo.io/versions/latest/guides/typescript/) - -### Setup - -To add DAppKit, run - -```bash -npm install @celo/dappkit -// or -yarn add @celo/dappkit -``` - -You will need node version `8.13.0` or higher. - -DAppKit's dependencies require a bit of adjustment to a vanilla Expo. The first are a lot of the Node.js modules that are expected. You can get those mostly by using the following modules - -```bash -npm install node-libs-react-native vm-browserify -// or -yarn add node-libs-react-native vm-browserify -``` - -You will need to add the following `metro.config.js` to your project root and make sure that the associated npm packages are installed. - -```js -const crypto = require.resolve('crypto-browserify') -const url = require.resolve('url/') -module.exports = { - resolver: { - extraNodeModules: { - crypto, - url, - fs: require.resolve('expo-file-system'), - http: require.resolve('stream-http'), - https: require.resolve('https-browserify'), - net: require.resolve('react-native-tcp'), - os: require.resolve('os-browserify/browser.js'), - path: require.resolve('path-browserify'), - stream: require.resolve('readable-stream'), - vm: require.resolve('vm-browserify') - } - } -} -``` - -This should allow you to build the project, however some dependencies might expect certain invariants on the global environment. For that you should create a file `global.ts` with the following contents and then add `import './global'` at the top of your `App.js/tsx` file: - -```typescript -export interface Global { - btoa: any - self: any - Buffer: any - process: any - location: any -} - -declare var global: Global -if (typeof global.self === 'undefined') { - global.self = global -} -if (typeof btoa === 'undefined') { - global.btoa = function (str) { - return new Buffer(str, 'binary').toString('base64') - } -} - -global.Buffer = require('buffer').Buffer -global.process = require('process') -global.location = { - protocol: 'https', -} -``` - -You may also get two warnings that can be ignored, you can suppress them in the yellow banner with the following in your `App.js/tsx` - -```typescript -import { YellowBox } from 'react-native' - -YellowBox.ignoreWarnings([ - "Warning: The provided value 'moz", - "Warning: The provided value 'ms-stream", -]) -``` diff --git a/packages/docs/developer-resources/dappkit/usage.md b/packages/docs/developer-resources/dappkit/usage.md deleted file mode 100644 index fe751beda4a..00000000000 --- a/packages/docs/developer-resources/dappkit/usage.md +++ /dev/null @@ -1,349 +0,0 @@ -# Usage - -This page walks you through the main functionalities of DAppKit and provides small code snippets. We recommend checking out the [Celo Truffle Box](https://github.com/critesjosh/celo-dappkit) tutorial for a step-by-step guide on creating a mobile DApp using Expo. - -## Overview - -DAppKit uses [deeplinks](https://en.wikipedia.org/wiki/Mobile_deep_linking) to communicate between your DApp and the [Celo Developer Wallet](https://celo.org/developers/wallet) (for testing) and [Valora](https://valoraapp.com/) (for production). - -{% hint style="info" %} -Note: DappKit uses the same deeplink for both the testing and production wallets. This means that when testing on iOS devices, the deeplinks will open the testing wallet vs the product wallet if both are installed on the same device. On Android devices, when multiple wallets are installed users are able to select which wallet they would like to use to open the deeplink. We are currently working to make separate deeplinks. Given the low transaction fees, many developers have chosen to only develop on mainnet to get around this. -{% endhint %} - -All 'requests' that your DApp makes to the Wallet needs to contain the following meta payload: - -- `requestId` A string you can pass to DAppKit, that you can use to listen to the response for that request. -- `dappName` A string that will be displayed to the user, indicating the DApp requesting access/signature. -- `callback` The deeplink that the Celo Wallet will use to redirect the user back to the DApp with the appropriate payload. If using Expo, it's as simple as `Linking.makeUrl('/my/path')`. - -## Requesting Account Address - -One of the first actions you will want to do as a DApp Developer is to get the address of your user's account, to display relevant information to them. It can be done as simply as: - -```javascript -import { requestAccountAddress, waitForAccountAuth } from '@celo/dappkit'; -import { Linking } from 'expo'; - -login = async () => { - const requestId = 'login'; - const dappName = 'My DappName'; - const callback = Linking.makeUrl('/my/path'); - - requestAccountAddress({ - requestId, - dappName, - callback, - }); - - const dappkitResponse = await waitForAccountAuth(requestId); - - // The pepper is not available in all Valora versions - this.setState({ address: dappkitResponse.address, phoneNumber: dappkitResponse.phoneNumber, pepper: dappkitResponse.pepper }); -} -``` - -Once you have the account address, you can make calls against your own smart contract, or use [ContractKit](../contractkit/README.md) to interact with Celo Core Contracts to do actions like fetch a user's balance. - -First import and instantiate an instance of ContractKit. For ContractKit version 1.0.0 onwards, you also need to import and instantiate a Web3 instance manually: - -```javascript -// Add ContractKit to your file and instantiate the kit. -// note: for versions prior to 1.x.x, please check the legacy docs. -import { newKitFromWeb3 } from '@celo/contractkit'; -import Web3 from 'web3'; - -const web3 = new Web3('https://alfajores-forno.celo-testnet.org'); -// mainnet -- comment out the above, uncomment below for mainnet -// const web3 = new Web3('https://forno.celo.org'); - -const kit = newKitFromWeb3(web3); -``` - -Then add the following to your `login` method to fetch a user's balance: - -```javascript -// Note that `address` and `phoneNumber` are already stored in state from the first login snippet -this.setState({isLoadingBalance: true }); -// Set the default account to the account returned from the wallet -kit.defaultAccount = this.state.address; -// Get the StableToken contract -const stableToken = await kit.contracts.getStableToken(); -// Get the user account balance (cUSD) -const cUSDBalanceBig = await stableToken.balanceOf(kit.defaultAccount); - -// Convert from a big number to a string -let cUSDBalance = cUSDBalanceBig.toString(); -this.setState({ cUSDBalance, isLoadingBalance: false }); -``` - -## Checking attestations for the phone number - -If the user is using a Valora version that passes the `pepper` that Valora has for a `phone_number`, you can use both pieces of information to determine attestations for the identifier (learn more about the [lightweight identity protocol here](../../celo-codebase/protocol/identity)): - -```javascript -import { PhoneNumberUtils } from '@celo/utils' -const attestations = await kit.contracts.getAttestations(); - -const identifier = PhoneNumberUtils.getPhoneHash(dappkitResponse.phoneNumber, dappkitResponse.pepper); - -// Find all accounts that have received attestations for this phone number -const accounts = attestations.lookupAccountsForIdentifier(identifier); - -// Get the attestations stats for the accounts -for (const account of accounts) { - const stat = await attestations.getAttestationStat(identifier, account); - console.log(`Total: ${stat.total}, Completed: ${stat.completed}`); -} - -``` - -## Signing Transactions - -Let's go from accessing account information to submitting transactions. To alter state on the blockchain, you need to make a transaction object with your smart contract or any of the Celo Core Contracts in ContractKit. All that is left to do is to pass the transaction object to DAppKit. - -```javascript -import { toTxResult } from '@celo/connect'; -import { - requestTxSig, - waitForSignedTxs -} from '@celo/dappkit'; - -// Create the transaction object -const stableToken = await kit.contracts.getStableToken(); -const decimals = await stableToken.decimals(); -// This can be a specific account address, a contract address, etc. -const transferTo = '' -const transferValue = new BigNumber('10e18'); -const txObject = stableToken.transfer( - transferTo, - transferValue.toString() -).txo; - -const requestId = 'transfer'; -const dappName = 'My DappName'; -const callback = Linking.makeUrl('/my/path'); - -// Request the TX signature from DAppKit -requestTxSig( - kit, - [ - { - tx: txObject, - from: this.state.address, - to: stableToken.contract.options.address, - feeCurrency: FeeCurrency.cUSD - } - ], - { requestId, dappName, callback } -); - -const dappkitResponse = await waitForSignedTxs(requestId); -const rawTx = dappkitResponse.rawTxs[0]; - -// Send the signed transaction via the kit -const tx = await kit.connection.sendSignedTransaction(rawTx); -const receipt = await tx.waitReceipt(); - -const cUSDBalanceBig = await stableToken.balanceOf(kit.defaultAccount); -this.setState({ cUSDBalance: cUSDBalanceBig.toString(), isLoadingBalance: false }); -``` - -## Example: Exchanging cUSD and Locking CELO - -Here's an example of how to go about exchanging some cUSD to CELO, and -then Locking that CELO to be able to vote for a validator group. - -```javascript -import { - requestTxSig, - waitForSignedTxs -} from '@celo/dappkit'; - -import { BigNumber } from 'bignumber.js'; - -const dappName = 'My DappName'; -const callback = Linking.makeUrl('/my/path'); - -// Let's assume that the address has funds enough in cUSD to pay the -// transaction fees of all the transactions and enough to buy 1 CELO -// In this example, we also assume that we have already requested -// the user's account address, and it is stored in `this.state.address`. - -// We will be using the following contracts: -const stableToken = await kit.contracts.getStableToken(); -const exchange = await kit.contracts.getExchange(); -const lockedGold = await kit.contracts.getLockedGold(); -const election = await kit.contracts.getElection(); -const accounts = await kit.contracts.getAccounts(); - -// Let's ensure that the account is registered. If not, we need to call -// the `createAccount` method from the Accounts contract) - -const txIsAccount = await accounts.isAccount(this.state.address); -const txRegisterAccountObj = accounts.createAccount().txo; - -if (!txIsAccount) { - requestTxSig( - // @ts-ignore - kit, - [ - { - tx: txRegisterAccountObj, - from: this.state.address, - to: accounts.address, - feeCurrency: FeeCurrency.cUSD - } - ], - { requestId, dappName, callback } - ); - const respRegisterAccount = await waitForSignedTxs(requestId); - const txRegisterAccount = await kit.connection.sendSignedTransaction(respRegisterAccount.rawTxs[0]); - const receiptRegisterAccount = await txRegisterAccount.waitReceipt(); - console.log(`Tx hash: ${receiptRegisterAccount.transactionHash}`); - // Handle account registration -} - -// 1e18 = 1 Celo -const oneCelo = new BigNumber('1e18'); -const tenCUSD = new BigNumber('10e18'); -// Now we will generate the transactions that we require to be signed - -// First of all, we need to increase the allowance of the exchange address -// to let the contract expend the amount of stable tokens to buy one CELO. -// We are allowing the exchange contract to spend 10 cUSD -const txObjectIncAllow = stableToken.increaseAllowance( - exchange.address, - tenCUSD -).txo; - -// Then we will call the Exchange contract, and attempt to buy 1 CELO with a -// max price of 10 cUSD (it could use less than that). -const txObjectExchange = exchange.buy( - oneCelo, - tenCUSD, - true -).txo; - -// Then we will call the lockedGold contract to lock our CELO -// (Remember that the address should be a registered Account) -// Later, the amount to be locked will be the parameter `value`. -const txObjectLock = lockedGold.lock().txo; - -// Then we use the 1 CELO to vote for a specific validator group address. -// Here you have to change the validator group address -// (At the moment of writing the tuto, the 0x5edfCe0bad47e24E30625c275457F5b4Bb619241 -// was a valid address, but you could check the groups using the celocli) -const validatorGroupAddress = ''; -const txObjectVote = (await election.vote( - validatorGroupAddress, - oneCelo -)).txo; - -const requestId = 'signMeEverything'; - -// Request the TX signature from DAppKit -requestTxSig( - kit, - [ - { - tx: txObjectIncAllow, - from: this.state.address, - to: stableToken.address, - feeCurrency: FeeCurrency.cUSD - }, - { - tx: txObjectExchange, - from: this.state.address, - to: exchange.address, - feeCurrency: FeeCurrency.cUSD, - estimatedGas: 200000 - }, - { - tx: txObjectLock, - from: this.state.address, - to: lockedGold.address, - feeCurrency: FeeCurrency.cUSD, - value: oneCelo - }, - { - tx: txObjectVote, - from: this.state.address, - to: election.address, - feeCurrency: FeeCurrency.cUSD, - estimatedGas: 200000 - } - ], - { requestId, dappName, callback } -); - -const dappkitResponse = await waitForSignedTxs(requestId); - -const receipts = []; -// execute the allowance -console.log('execute the allowance'); -const tx0 = await kit.connection.sendSignedTransaction(dappkitResponse.rawTxs[0]); -receipts.push(await tx0.waitReceipt()); - -// execute the exchange -console.log('execute the exchange'); -const tx1 = await kit.connection.sendSignedTransaction(dappkitResponse.rawTxs[1]); -receipts.push(await tx1.waitReceipt()); - -// execute the lock -console.log('execute the lock'); -const tx2 = await kit.connection.sendSignedTransaction(dappkitResponse.rawTxs[2]); -receipts.push(await tx2.waitReceipt()); - -// execute the vote -console.log('execute the vote'); -const tx3 = await kit.connection.sendSignedTransaction(dappkitResponse.rawTxs[3]); -receipts.push(await tx3.waitReceipt()); -console.log('Receipts: ', receipts); - -const voteInfo = await election.getVoter(this.state.address); -console.log('Vote info: ', voteInfo); -// REMEMBER that after voting the next epoch you HAVE TO ACTIVATE those votes -// using the `activate` method in the election contract. - -this.setState({ voteInfo, isVoting: false }); -``` - -## DAppKit vs. DAppKit-web - -Originally, DAppKit was designed for mobile apps in mind and did not work out-of-the-box for web DApps running in the browser of a mobile device. DAppKit-web includes workarounds for some of the typical issues that arose for folks using DAppKit to integrate their web DApps with Valora. - -DAppKit uses React Native's `Linking` library to listen for URL changes (i.e. on return to the DApp from Valora) so it can receive and parse the requested information; this causes redirection to new tabs on web browsers, however, which means that the information requested via DAppkit does not make it back to the original session. To get around this, DAppkit-web uses the web browser's `localStorage` to store this returned URL, which can then be accessed by the old tab. - -DAppKit-web includes the main functionality from DAppKit, so all that is required is to import from `@celo/dappkit/lib/web` instead of from `@celo/dappkit`. The usage of DAppkit-web is the same as above, but calling the functions `waitForAccountAuth` and `waitForSignedTxs` should be surrounded with a `try...catch`, since these functions can throw a timeout error. - -This should look something like the following: - -```js -try { - const dappkitResponse = await waitForAccountAuth(requestId) - // Handle successful login -} catch (error) { - // Catch and handle possible timeout errors -} - -... - -let tx; -try { - const dappkitResponse = await waitForSignedTxs(requestId) - tx = dappkitResponse.rawTxs[0] -} catch (error) { - // Catch and handle possible timeout errors - return -} -// Send transaction via ContractKit or web3 directly -``` - -An example dummy web DApp can be found [here](https://github.com/celo-org/dappkit-web-starter). This is a very simple one-page app that demonstrates the flow above: requesting the user's account address in the Celo Wallet, creating a transaction object, allowing the user to sign this transaction in the Celo Wallet, and then submitting the transaction to the chain via ContractKit. It is a simplified, web-specific version based off of the [Celo Truffle Box](https://github.com/critesjosh/celo-dappkit) tutorial, which should be completed prior to using the dummy web DApp. - -### Known Issues - -DAppKit's web functionality should be regarded as a beta solution and the following are known issues: - -- Safari on iOS: if the web DApp is open in a tab that is not the most recently opened tab (bottom tab when viewing all open tabs), the user will return to the following tab after completing authentication or signing the transaction in Valora. The information is properly populated in the original web DApp's tab. -- Chrome on iOS: on returning to the web DApp from Valora, a second tab is opened which must be manually closed. The information is properly populated in the original web DApp's tab. diff --git a/packages/docs/developer-resources/develop-on-windows.md b/packages/docs/developer-resources/develop-on-windows.md deleted file mode 100644 index 3267e122918..00000000000 --- a/packages/docs/developer-resources/develop-on-windows.md +++ /dev/null @@ -1,63 +0,0 @@ -# Celo Development on Windows - -Many popular tools and resources for blockchain development are written for developers working on UNIX machines. It is common for developers working on Windows to encounter errors that are not covered in the documentation and have no luck with Google. Fortunately, Microsoft makes it easy to run a UNIX machine directly from a Windows desktop ****with the [Windows Subsystem for Linux](https://docs.microsoft.com/en-us/windows/wsl/faq). - -Here, we are going to show you how to get set up for developing on Celo on Windows. - -### **Getting set up with Windows** - -Open PowerShell as an administrator and run - -```text -Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux -``` - -Restart your computer when prompted. - -Next, install a Linux distribution from the Microsoft Store. When developing this guide, we chose [Ubuntu](https://www.microsoft.com/en-us/p/ubuntu-1804-lts/9n9tngvndl3q?rtc=1&activetab=pivot:overviewtab). - -Set up your Linux distro by setting a username and password then update and upgrade the packages by running the following command in the terminal: **`$ sudo apt update && sudo apt upgrade`** - - -You can view the source documentation for setting up the Linux distro [here](https://docs.microsoft.com/en-us/windows/wsl/initialize-distro) and the Microsoft documentation for setting up the Windows Subsystem for Linux [here](https://docs.microsoft.com/en-us/windows/wsl/install-win10?WT.mc_id=smashingmag-article-buhollan). - -### Set up the Linux Environment - -Now that you have Linux installed, let’s install [nvm](https://github.com/nvm-sh/nvm) and [yarn](https://yarnpkg.com/). Nvm \(node version manager\) makes it easy to install and manage different versions of Node.js. The following instructions are from the [celo-monoreop setup documentation for Linux](https://github.com/celo-org/celo-monorepo/blob/master/SETUP.md#linux). - -Run the following commands in the Linux terminal. - -```text -# Installing Nvm -curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash -source ~/.bashrc - -# Setting up the right version of Nvm -nvm install 12 -nvm alias default 12 -``` - -Running `$ node -v` in the terminal should print a node version if it is installed correctly. - -Yarn is a package manager similar to npm. The [celo-monorepo](https://github.com/celo-org/celo-monorepo/) uses yarn to build and manage packages. Install yarn with the following command. - -```text -# Installing Yarn - https://yarnpkg.com/en/docs/install#debian-stable -curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - -echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list -sudo apt-get update && sudo apt-get install yarn -``` - -Test that yarn is installed by running `$ yarn --version`. - -### Developing with WSL - -You can now start working on your projects in your Linux environment. Install [the WSL VS Code extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-wsl) for a seamless integration between VS Code and WSL. - -Be aware that networking will be different depending on which version of WSL you are using. The details of managing network interfaces goes beyond the scope of this guide, but you can [learn more here](https://adamtheautomator.com/windows-subsystem-for-linux/#developing-on-wsl-with-visual-studio-code-vs-code-). -You are good to go! If you have any questions, [join our Discord server](https://chat.celo.org) and just ask. - -### Additional Resources - -* [**Windows Subsystem for Linux Installation Guide for Windows 10**](https://docs.microsoft.com/en-us/windows/wsl/install-win10?WT.mc_id=smashingmag-article-buhollan) -* [**WSL: Ultimate Guide**](https://adamtheautomator.com/windows-subsystem-for-linux/#developing-on-wsl-with-visual-studio-code-vs-code-) diff --git a/packages/docs/developer-resources/explorer/reference/README.md b/packages/docs/developer-resources/explorer/reference/README.md deleted file mode 100644 index a4a8a4c8882..00000000000 --- a/packages/docs/developer-resources/explorer/reference/README.md +++ /dev/null @@ -1,162 +0,0 @@ -# @celo/explorer - -

- - celo logo - -

- -**Celo Monorepo - Official repository for core projects comprising the Celo platform** - -This repository contains the source code for the Celo core projects including the [smart contracts](https://github.com/celo-org/celo-monorepo/tree/master/packages/protocol), [wallet app](https://github.com/celo-org/celo-monorepo/tree/master/packages/mobile), -and other packages. The source code for the Celo Blockchain which operates a node on the Celo Network is kept in a separate repo [here](https://github.com/celo-org/celo-blockchain). - - - -[![CircleCI](https://img.shields.io/circleci/build/github/celo-org/celo-monorepo/master)](https://circleci.com/gh/celo-org/celo-monorepo/tree/master) -[![Codecov](https://img.shields.io/codecov/c/github/celo-org/celo-monorepo)](https://codecov.io/gh/celo-org/celo-monorepo) -[![GitHub contributors](https://img.shields.io/github/contributors/celo-org/celo-monorepo)](https://github.com/celo-org/celo-monorepo/graphs/contributors) -[![GitHub commit activity](https://img.shields.io/github/commit-activity/w/celo-org/celo-monorepo)](https://github.com/celo-org/celo-monorepo/graphs/contributors) -[![GitHub Stars](https://img.shields.io/github/stars/celo-org/celo-monorepo.svg)](https://github.com/celo-org/celo-monorepo/stargazers) -![GitHub repo size](https://img.shields.io/github/repo-size/celo-org/celo-monorepo) -[![GitHub](https://img.shields.io/github/license/celo-org/celo-monorepo?color=blue)](https://github.com/celo-org/celo-monorepo/blob/master/LICENSE) - - - -[![Website celo.org](https://img.shields.io/website-up-down-green-red/https/celo.org.svg)](https://celo.org) -[![Blog](https://img.shields.io/badge/blog-up-green)](https://medium.com/celoorg) -[![docs](https://img.shields.io/badge/docs-up-green)](https://docs.celo.org/) -[![Youtube](https://img.shields.io/badge/YouTube%20channel-up-green)](https://www.youtube.com/channel/UCCZgos_YAJSXm5QX5D5Wkcw/videos?view=0&sort=p&flow=grid) -[![forum](https://img.shields.io/badge/forum-up-green)](https://forum.celo.org) -[![Discord](https://img.shields.io/discord/600834479145353243.svg)](https://discord.gg/RfHQKtY) -[![Twitter CeloDevs](https://img.shields.io/twitter/follow/celodevs?style=social)](https://twitter.com/celodevs) -[![Twitter CeloOrg](https://img.shields.io/twitter/follow/celoorg?style=social)](https://twitter.com/CeloOrg) -[![Subreddit subscribers](https://img.shields.io/reddit/subreddit-subscribers/CeloHQ?style=social)](https://www.reddit.com/r/CeloHQ/) - - - -[![GitHub pull requests by-label](https://img.shields.io/github/issues-pr-raw/celo-org/celo-monorepo)](https://github.com/celo-org/celo-monorepo/pulls) -[![GitHub Issues](https://img.shields.io/github/issues-raw/celo-org/celo-monorepo.svg)](https://github.com/celo-org/celo-monorepo/issues) -[![GitHub issues by-label](https://img.shields.io/github/issues/celo-org/celo-monorepo/1%20hour%20tasks)](https://github.com/celo-org/celo-monorepo/issues?q=is%3Aopen+is%3Aissue+label%3A%221+hour+tasks%22) -[![GitHub issues by-label](https://img.shields.io/github/issues/celo-org/celo-monorepo/betanet-phase-2)](https://github.com/celo-org/celo-monorepo/issues?q=is%3Aopen+is%3Aissue+label%3Abetanet-phase-2) -[![GitHub issues by-label](https://img.shields.io/github/issues/celo-org/celo-monorepo/betanet-phase-3)](https://github.com/celo-org/celo-monorepo/issues?q=is%3Aopen+is%3Aissue+label%3Abetanet-phase-3) - -Contents: - - - -- [Celo's Mission - Prosperity for All](#mission) -- [The Celo Stack](#stack) -- [Documentation](#docs) -- [Issues](#issues) -- [Repo Structure](#repo) -- [Contributing](#contributing) -- [Ask Questions, Find Answers, Get in Touch](#ask) -- [License](#license) - - -## 🥅 Celo's Mission - Prosperity for All - -Celo, pronounced /ˈtselo/, means ‘purpose’ in Esperanto. In a similar spirit, we are aiming to create a new platform to connect people globally and bring financial stability to those who need it most. We believe blockchain technology is one of the most exciting innovations in recent history and as a community we look to push the boundaries of what is possible with it today. More importantly, we are driven by purpose -- to solve real-world problems such as lack of access to sound currency, or friction for cash-transfer programs aimed to alleviate poverty. Our mission is to build a monetary system that creates the conditions for prosperity for all. - - -

- - Play on Youtube - What if money were beautiful - -
- What if money were beautiful? -

- -## 🧱 The Celo Stack - -Celo is oriented around providing the simplest possible experience for end users, who may have no familiarity with cryptocurrencies, and may be using low cost devices with limited connectivity. To achieve this, the project takes a full-stack approach, where each layer of the stack is designed with the end user in mind whilst considering other stakeholders \(e.g. operators of nodes in the network\) involved in enabling the end user experience. - -The Celo stack is structured into the following logical layers: - - -

- Celo protocol -
- The Celo Blockchain and Celo Core Contracts together comprise the Celo Protocol -

- -- **Celo Blockchain**: An open cryptographic protocol that allows applications to make transactions with and run smart contracts in a secure and decentralized fashion. The Celo Blockchain has shared ancestry with [Ethereum](https://www.ethereum.org), and maintains full EVM compatibility for smart contracts. However it uses a [Byzantine Fault Tolerant](http://pmg.csail.mit.edu/papers/osdi99.pdf) \(BFT\) consensus mechanism rather than Proof of Work, and has different block format, transaction format, client synchronization protocols, and gas payment and pricing mechanisms. The network’s native asset is Celo Gold, exposed via an ERC-20 interface. - -- **Celo Core Contracts**: A set of smart contracts running on the Celo Blockchain that comprise much of the logic of the platform features including ERC-20 stable currencies, identity attestations, Proof of Stake and governance. These smart contracts are upgradeable and managed by the decentralized governance process. - - -

- Celo network -
- Topology of a Celo Network -

- -- **Applications:** Applications for end users built on the Celo platform. The Celo Wallet app, the first of an ecosystem of applications, allows end users to manage accounts and make payments securely and simply by taking advantage of the innovations in the Celo protocol. Applications take the form of external mobile or backend software: they interact with the Celo Blockchain to issue transactions and invoke code that forms the Celo Core Contracts’ API. Third parties can also deploy custom smart contracts that their own applications can invoke, which in turn can leverage Celo Core Contracts. Applications may use centralized cloud services to provide some of their functionality: in the case of the Celo Wallet, push notifications and a transaction activity feed. - -## 📚 Documentation - -Follow the instructions in [SETUP.md](SETUP.md) to get a development environment set up. - -See [Developer's Guide](https://docs.celo.org/) for full details about the design of the Celo protocol and other information about running these projects. - -## 🙋 Issues - -See the [issue backlog](https://github.com/celo-org/celo-monorepo/issues) for a list of active or proposed tasks. Feel free to create new issues to report bugs and/or request features. - -## 📂 Repo Structure - -The repository has the following packages (sub projects): - -- [attestation-service](packages/attestation-service) - service run by validators on the Celo network to send SMS messages, enabling attestations of user phone numbers and their accounts on the Celo network -- [blockchain-api](packages/blockchain-api) - service that uses Blockscout to present view of transactions by account for Celo Wallet activity feed -- [celotool](packages/celotool) - scripts for deploying and managing testnets -- [cli](packages/cli) - tool that uses ContractKit to interact with the Celo protocol ([docs](https://docs.celo.org/getting-started/using-the-cli)) -- [contractkit](packages/contractkit) - library to help developers and validators interact with the protocol and it's smart contracts ([docs](https://docs.celo.org/celo-sdk/contractkit)) -- [dappkit](packages/dappkit) - set of functions for mobile DApps to work with the wallet app (ex. sign transactions and access the user's account) ([docs](https://docs.celo.org/celo-sdk/dappkit)) -- [dev-utils](packages/dev-utils) - a utils package for use as a dev dependency -- [docs](packages/docs) - technical documentation for the Celo project ([live](https://docs.celo.org/)) -- [faucet](packages/faucet) - faucet deployment configuration ([live](https://celo.org/build/faucet)) -- [helm-charts](packages/helm-charts) - templatized deployments of entire environments to Kubernetes clusters -- [mobile](packages/mobile) - Android wallet app for the Celo platform ([docs](https://docs.celo.org/getting-started/using-the-mobile-wallet), [live](https://play.google.com/store/apps/details?id=org.celo.mobile.alfajores)) -- [notification-service](packages/notification-service) - service for managing push notifications for Celo Wallet -- [protocol](packages/protocol) - identity, stability and other smart contracts for the Celo protocol ([docs](https://docs.celo.org/celo-codebase/protocol)) -- [react-components](packages/react-components) - generalized react native components -- [reserve-site](packages/reserve-site) - website for ([Celo Reserve.org](https://celoreserve.org/)) -- [terraform-modules](packages/terraform-modules) - templatized deployments of entire VM-based testnets for Google Cloud Platform -- [typescript](packages/typescript) - no README available (improve?) -- [utils](packages/utils) - no README available (improve?) - -Code owners for each package can be found in [.github/CODEOWNERS](.github/CODEOWNERS). - -## ✍️ Contributing - -Feel free to jump on the Celo 🚂🚋🚋🚋. Improvements and contributions are highly encouraged! 🙏👊 - -See the [contributing guide](https://docs.celo.org/community/contributing) for details on how to participate. -[![GitHub issues by-label](https://img.shields.io/github/issues/celo-org/celo-monorepo/1%20hour%20tasks)](https://github.com/celo-org/celo-monorepo/issues?q=is%3Aopen+is%3Aissue+label%3A%221+hour+tasks%22) - -All communication and contributions to the Celo project are subject to the [Celo Code of Conduct](https://celo.org/code-of-conduct). - -Not yet ready to contribute but do like the project? Support Celo with a ⭐ or share the love in a [![Twitter URL](https://img.shields.io/twitter/url?style=social&url=https%3A%2F%2Fcelo.org%2F)](https://twitter.com/intent/tweet?url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DkKggE5OvyhE&via=celohq&text=Checkout%20celo%21%20Love%20what%20they%20are%20building.&hashtags=celo) - - - -## 💬 Ask Questions, Find Answers, Get in Touch - -- [Website](https://celo.org/) -- [Docs](https://docs.celo.org/) -- [Blog](https://medium.com/celohq) -- [YouTube](https://www.youtube.com/channel/UCCZgos_YAJSXm5QX5D5Wkcw/videos?view=0&sort=p&flow=grid) -- [Forum](https://forum.celo.org) -- [Discord](https://discord.gg/vRbExjv) -- [Twitter](https://twitter.com/CeloDevs) -- [Reddit](https://www.reddit.com/r/CeloHQ/) -- [Community Events](https://celo.org/community) - -## 📜 License - -All packages are licensed under the terms of the [Apache 2.0 License](LICENSE) unless otherwise specified in the LICENSE file at package's root. diff --git a/packages/docs/developer-resources/explorer/reference/SUMMARY.md b/packages/docs/developer-resources/explorer/reference/SUMMARY.md deleted file mode 100644 index f2d2e8db730..00000000000 --- a/packages/docs/developer-resources/explorer/reference/SUMMARY.md +++ /dev/null @@ -1,19 +0,0 @@ -* [Globals](globals.md) -* [Modules]() - * [base](modules/_base_.md) - * [ContractDetails](interfaces/_base_.contractdetails.md) - * [block-explorer](modules/_block_explorer_.md) - * [BlockExplorer](classes/_block_explorer_.blockexplorer.md) - * [CallDetails](interfaces/_block_explorer_.calldetails.md) - * [ParsedBlock](interfaces/_block_explorer_.parsedblock.md) - * [ParsedTx](interfaces/_block_explorer_.parsedtx.md) - * [log-explorer](modules/_log_explorer_.md) - * [LogExplorer](classes/_log_explorer_.logexplorer.md) -* [Classes]() - * [BlockExplorer](classes/_block_explorer_.blockexplorer.md) - * [LogExplorer](classes/_log_explorer_.logexplorer.md) -* [Interfaces]() - * [ContractDetails](interfaces/_base_.contractdetails.md) - * [CallDetails](interfaces/_block_explorer_.calldetails.md) - * [ParsedBlock](interfaces/_block_explorer_.parsedblock.md) - * [ParsedTx](interfaces/_block_explorer_.parsedtx.md) \ No newline at end of file diff --git a/packages/docs/developer-resources/explorer/reference/classes/_block_explorer_.blockexplorer.md b/packages/docs/developer-resources/explorer/reference/classes/_block_explorer_.blockexplorer.md deleted file mode 100644 index 48e4072591d..00000000000 --- a/packages/docs/developer-resources/explorer/reference/classes/_block_explorer_.blockexplorer.md +++ /dev/null @@ -1,165 +0,0 @@ -# Class: BlockExplorer - -## Hierarchy - -* **BlockExplorer** - -## Index - -### Constructors - -* [constructor](_block_explorer_.blockexplorer.md#constructor) - -### Properties - -* [contractDetails](_block_explorer_.blockexplorer.md#readonly-contractdetails) - -### Methods - -* [fetchBlock](_block_explorer_.blockexplorer.md#fetchblock) -* [fetchBlockByHash](_block_explorer_.blockexplorer.md#fetchblockbyhash) -* [fetchBlockRange](_block_explorer_.blockexplorer.md#fetchblockrange) -* [parseBlock](_block_explorer_.blockexplorer.md#parseblock) -* [tryParseTx](_block_explorer_.blockexplorer.md#tryparsetx) -* [tryParseTxInput](_block_explorer_.blockexplorer.md#tryparsetxinput) -* [updateContractDetailsMapping](_block_explorer_.blockexplorer.md#updatecontractdetailsmapping) - -## Constructors - -### constructor - -\+ **new BlockExplorer**(`kit`: ContractKit, `contractDetails`: [ContractDetails](../interfaces/_base_.contractdetails.md)[]): *[BlockExplorer](_block_explorer_.blockexplorer.md)* - -*Defined in [block-explorer.ts:52](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/explorer/src/block-explorer.ts#L52)* - -**Parameters:** - -Name | Type | ------- | ------ | -`kit` | ContractKit | -`contractDetails` | [ContractDetails](../interfaces/_base_.contractdetails.md)[] | - -**Returns:** *[BlockExplorer](_block_explorer_.blockexplorer.md)* - -## Properties - -### `Readonly` contractDetails - -• **contractDetails**: *[ContractDetails](../interfaces/_base_.contractdetails.md)[]* - -*Defined in [block-explorer.ts:54](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/explorer/src/block-explorer.ts#L54)* - -## Methods - -### fetchBlock - -▸ **fetchBlock**(`blockNumber`: number): *Promise‹Block›* - -*Defined in [block-explorer.ts:68](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/explorer/src/block-explorer.ts#L68)* - -**Parameters:** - -Name | Type | ------- | ------ | -`blockNumber` | number | - -**Returns:** *Promise‹Block›* - -___ - -### fetchBlockByHash - -▸ **fetchBlockByHash**(`blockHash`: string): *Promise‹Block›* - -*Defined in [block-explorer.ts:65](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/explorer/src/block-explorer.ts#L65)* - -**Parameters:** - -Name | Type | ------- | ------ | -`blockHash` | string | - -**Returns:** *Promise‹Block›* - -___ - -### fetchBlockRange - -▸ **fetchBlockRange**(`from`: number, `to`: number): *Promise‹Block[]›* - -*Defined in [block-explorer.ts:72](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/explorer/src/block-explorer.ts#L72)* - -**Parameters:** - -Name | Type | ------- | ------ | -`from` | number | -`to` | number | - -**Returns:** *Promise‹Block[]›* - -___ - -### parseBlock - -▸ **parseBlock**(`block`: Block): *Promise‹[ParsedBlock](../interfaces/_block_explorer_.parsedblock.md)›* - -*Defined in [block-explorer.ts:80](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/explorer/src/block-explorer.ts#L80)* - -**Parameters:** - -Name | Type | ------- | ------ | -`block` | Block | - -**Returns:** *Promise‹[ParsedBlock](../interfaces/_block_explorer_.parsedblock.md)›* - -___ - -### tryParseTx - -▸ **tryParseTx**(`tx`: CeloTxPending): *Promise‹null | [ParsedTx](../interfaces/_block_explorer_.parsedtx.md)›* - -*Defined in [block-explorer.ts:97](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/explorer/src/block-explorer.ts#L97)* - -**Parameters:** - -Name | Type | ------- | ------ | -`tx` | CeloTxPending | - -**Returns:** *Promise‹null | [ParsedTx](../interfaces/_block_explorer_.parsedtx.md)›* - -___ - -### tryParseTxInput - -▸ **tryParseTxInput**(`address`: string, `input`: string): *Promise‹null | [CallDetails](../interfaces/_block_explorer_.calldetails.md)›* - -*Defined in [block-explorer.ts:109](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/explorer/src/block-explorer.ts#L109)* - -**Parameters:** - -Name | Type | ------- | ------ | -`address` | string | -`input` | string | - -**Returns:** *Promise‹null | [CallDetails](../interfaces/_block_explorer_.calldetails.md)›* - -___ - -### updateContractDetailsMapping - -▸ **updateContractDetailsMapping**(`name`: string, `address`: string): *Promise‹void›* - -*Defined in [block-explorer.ts:60](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/explorer/src/block-explorer.ts#L60)* - -**Parameters:** - -Name | Type | ------- | ------ | -`name` | string | -`address` | string | - -**Returns:** *Promise‹void›* diff --git a/packages/docs/developer-resources/explorer/reference/classes/_log_explorer_.logexplorer.md b/packages/docs/developer-resources/explorer/reference/classes/_log_explorer_.logexplorer.md deleted file mode 100644 index 3bf6e06292a..00000000000 --- a/packages/docs/developer-resources/explorer/reference/classes/_log_explorer_.logexplorer.md +++ /dev/null @@ -1,94 +0,0 @@ -# Class: LogExplorer - -## Hierarchy - -* **LogExplorer** - -## Index - -### Constructors - -* [constructor](_log_explorer_.logexplorer.md#constructor) - -### Properties - -* [contractDetails](_log_explorer_.logexplorer.md#readonly-contractdetails) - -### Methods - -* [fetchTxReceipt](_log_explorer_.logexplorer.md#fetchtxreceipt) -* [getKnownLogs](_log_explorer_.logexplorer.md#getknownlogs) -* [tryParseLog](_log_explorer_.logexplorer.md#tryparselog) - -## Constructors - -### constructor - -\+ **new LogExplorer**(`kit`: ContractKit, `contractDetails`: [ContractDetails](../interfaces/_base_.contractdetails.md)[]): *[LogExplorer](_log_explorer_.logexplorer.md)* - -*Defined in [log-explorer.ts:15](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/explorer/src/log-explorer.ts#L15)* - -**Parameters:** - -Name | Type | ------- | ------ | -`kit` | ContractKit | -`contractDetails` | [ContractDetails](../interfaces/_base_.contractdetails.md)[] | - -**Returns:** *[LogExplorer](_log_explorer_.logexplorer.md)* - -## Properties - -### `Readonly` contractDetails - -• **contractDetails**: *[ContractDetails](../interfaces/_base_.contractdetails.md)[]* - -*Defined in [log-explorer.ts:17](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/explorer/src/log-explorer.ts#L17)* - -## Methods - -### fetchTxReceipt - -▸ **fetchTxReceipt**(`txhash`: string): *Promise‹CeloTxReceipt | null›* - -*Defined in [log-explorer.ts:47](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/explorer/src/log-explorer.ts#L47)* - -**Parameters:** - -Name | Type | ------- | ------ | -`txhash` | string | - -**Returns:** *Promise‹CeloTxReceipt | null›* - -___ - -### getKnownLogs - -▸ **getKnownLogs**(`tx`: CeloTxReceipt): *EventLog[]* - -*Defined in [log-explorer.ts:51](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/explorer/src/log-explorer.ts#L51)* - -**Parameters:** - -Name | Type | ------- | ------ | -`tx` | CeloTxReceipt | - -**Returns:** *EventLog[]* - -___ - -### tryParseLog - -▸ **tryParseLog**(`log`: Log): *null | EventLog* - -*Defined in [log-explorer.ts:62](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/explorer/src/log-explorer.ts#L62)* - -**Parameters:** - -Name | Type | ------- | ------ | -`log` | Log | - -**Returns:** *null | EventLog* diff --git a/packages/docs/developer-resources/explorer/reference/globals.md b/packages/docs/developer-resources/explorer/reference/globals.md deleted file mode 100644 index 227a10ae658..00000000000 --- a/packages/docs/developer-resources/explorer/reference/globals.md +++ /dev/null @@ -1,9 +0,0 @@ -# @celo/explorer - -## Index - -### Modules - -* ["base"](modules/_base_.md) -* ["block-explorer"](modules/_block_explorer_.md) -* ["log-explorer"](modules/_log_explorer_.md) diff --git a/packages/docs/developer-resources/explorer/reference/interfaces/_base_.contractdetails.md b/packages/docs/developer-resources/explorer/reference/interfaces/_base_.contractdetails.md deleted file mode 100644 index 9013e4124af..00000000000 --- a/packages/docs/developer-resources/explorer/reference/interfaces/_base_.contractdetails.md +++ /dev/null @@ -1,37 +0,0 @@ -# Interface: ContractDetails - -## Hierarchy - -* **ContractDetails** - -## Index - -### Properties - -* [address](_base_.contractdetails.md#address) -* [jsonInterface](_base_.contractdetails.md#jsoninterface) -* [name](_base_.contractdetails.md#name) - -## Properties - -### address - -• **address**: *Address* - -*Defined in [base.ts:7](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/explorer/src/base.ts#L7)* - -___ - -### jsonInterface - -• **jsonInterface**: *AbiItem[]* - -*Defined in [base.ts:8](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/explorer/src/base.ts#L8)* - -___ - -### name - -• **name**: *string* - -*Defined in [base.ts:6](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/explorer/src/base.ts#L6)* diff --git a/packages/docs/developer-resources/explorer/reference/interfaces/_block_explorer_.calldetails.md b/packages/docs/developer-resources/explorer/reference/interfaces/_block_explorer_.calldetails.md deleted file mode 100644 index 606274556cf..00000000000 --- a/packages/docs/developer-resources/explorer/reference/interfaces/_block_explorer_.calldetails.md +++ /dev/null @@ -1,46 +0,0 @@ -# Interface: CallDetails - -## Hierarchy - -* **CallDetails** - -## Index - -### Properties - -* [argList](_block_explorer_.calldetails.md#arglist) -* [contract](_block_explorer_.calldetails.md#contract) -* [function](_block_explorer_.calldetails.md#function) -* [paramMap](_block_explorer_.calldetails.md#parammap) - -## Properties - -### argList - -• **argList**: *any[]* - -*Defined in [block-explorer.ts:20](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/explorer/src/block-explorer.ts#L20)* - -___ - -### contract - -• **contract**: *string* - -*Defined in [block-explorer.ts:17](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/explorer/src/block-explorer.ts#L17)* - -___ - -### function - -• **function**: *string* - -*Defined in [block-explorer.ts:18](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/explorer/src/block-explorer.ts#L18)* - -___ - -### paramMap - -• **paramMap**: *Record‹string, any›* - -*Defined in [block-explorer.ts:19](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/explorer/src/block-explorer.ts#L19)* diff --git a/packages/docs/developer-resources/explorer/reference/interfaces/_block_explorer_.parsedblock.md b/packages/docs/developer-resources/explorer/reference/interfaces/_block_explorer_.parsedblock.md deleted file mode 100644 index 3d8be07153a..00000000000 --- a/packages/docs/developer-resources/explorer/reference/interfaces/_block_explorer_.parsedblock.md +++ /dev/null @@ -1,28 +0,0 @@ -# Interface: ParsedBlock - -## Hierarchy - -* **ParsedBlock** - -## Index - -### Properties - -* [block](_block_explorer_.parsedblock.md#block) -* [parsedTx](_block_explorer_.parsedblock.md#parsedtx) - -## Properties - -### block - -• **block**: *Block* - -*Defined in [block-explorer.ts:29](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/explorer/src/block-explorer.ts#L29)* - -___ - -### parsedTx - -• **parsedTx**: *[ParsedTx](_block_explorer_.parsedtx.md)[]* - -*Defined in [block-explorer.ts:30](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/explorer/src/block-explorer.ts#L30)* diff --git a/packages/docs/developer-resources/explorer/reference/interfaces/_block_explorer_.parsedtx.md b/packages/docs/developer-resources/explorer/reference/interfaces/_block_explorer_.parsedtx.md deleted file mode 100644 index e76a2046a0a..00000000000 --- a/packages/docs/developer-resources/explorer/reference/interfaces/_block_explorer_.parsedtx.md +++ /dev/null @@ -1,28 +0,0 @@ -# Interface: ParsedTx - -## Hierarchy - -* **ParsedTx** - -## Index - -### Properties - -* [callDetails](_block_explorer_.parsedtx.md#calldetails) -* [tx](_block_explorer_.parsedtx.md#tx) - -## Properties - -### callDetails - -• **callDetails**: *[CallDetails](_block_explorer_.calldetails.md)* - -*Defined in [block-explorer.ts:24](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/explorer/src/block-explorer.ts#L24)* - -___ - -### tx - -• **tx**: *CeloTxPending* - -*Defined in [block-explorer.ts:25](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/explorer/src/block-explorer.ts#L25)* diff --git a/packages/docs/developer-resources/explorer/reference/modules/_base_.md b/packages/docs/developer-resources/explorer/reference/modules/_base_.md deleted file mode 100644 index d632f255fb6..00000000000 --- a/packages/docs/developer-resources/explorer/reference/modules/_base_.md +++ /dev/null @@ -1,69 +0,0 @@ -# Module: "base" - -## Index - -### Interfaces - -* [ContractDetails](../interfaces/_base_.contractdetails.md) - -### Functions - -* [getContractDetailsFromContract](_base_.md#const-getcontractdetailsfromcontract) -* [mapFromPairs](_base_.md#mapfrompairs) -* [obtainKitContractDetails](_base_.md#obtainkitcontractdetails) - -## Functions - -### `Const` getContractDetailsFromContract - -▸ **getContractDetailsFromContract**(`kit`: ContractKit, `celoContract`: CeloContract, `address?`: undefined | string): *Promise‹object›* - -*Defined in [base.ts:11](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/explorer/src/base.ts#L11)* - -**Parameters:** - -Name | Type | ------- | ------ | -`kit` | ContractKit | -`celoContract` | CeloContract | -`address?` | undefined | string | - -**Returns:** *Promise‹object›* - -___ - -### mapFromPairs - -▸ **mapFromPairs**<**A**, **B**>(`pairs`: Array‹[A, B]›): *Map‹A, B›* - -*Defined in [base.ts:30](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/explorer/src/base.ts#L30)* - -**Type parameters:** - -▪ **A** - -▪ **B** - -**Parameters:** - -Name | Type | ------- | ------ | -`pairs` | Array‹[A, B]› | - -**Returns:** *Map‹A, B›* - -___ - -### obtainKitContractDetails - -▸ **obtainKitContractDetails**(`kit`: ContractKit): *Promise‹[ContractDetails](../interfaces/_base_.contractdetails.md)[]›* - -*Defined in [base.ts:24](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/explorer/src/base.ts#L24)* - -**Parameters:** - -Name | Type | ------- | ------ | -`kit` | ContractKit | - -**Returns:** *Promise‹[ContractDetails](../interfaces/_base_.contractdetails.md)[]›* diff --git a/packages/docs/developer-resources/explorer/reference/modules/_block_explorer_.md b/packages/docs/developer-resources/explorer/reference/modules/_block_explorer_.md deleted file mode 100644 index 42c2cd57a44..00000000000 --- a/packages/docs/developer-resources/explorer/reference/modules/_block_explorer_.md +++ /dev/null @@ -1,33 +0,0 @@ -# Module: "block-explorer" - -## Index - -### Classes - -* [BlockExplorer](../classes/_block_explorer_.blockexplorer.md) - -### Interfaces - -* [CallDetails](../interfaces/_block_explorer_.calldetails.md) -* [ParsedBlock](../interfaces/_block_explorer_.parsedblock.md) -* [ParsedTx](../interfaces/_block_explorer_.parsedtx.md) - -### Functions - -* [newBlockExplorer](_block_explorer_.md#newblockexplorer) - -## Functions - -### newBlockExplorer - -▸ **newBlockExplorer**(`kit`: ContractKit): *Promise‹[BlockExplorer](../classes/_block_explorer_.blockexplorer.md)‹››* - -*Defined in [block-explorer.ts:38](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/explorer/src/block-explorer.ts#L38)* - -**Parameters:** - -Name | Type | ------- | ------ | -`kit` | ContractKit | - -**Returns:** *Promise‹[BlockExplorer](../classes/_block_explorer_.blockexplorer.md)‹››* diff --git a/packages/docs/developer-resources/explorer/reference/modules/_log_explorer_.md b/packages/docs/developer-resources/explorer/reference/modules/_log_explorer_.md deleted file mode 100644 index e111f1a9cdf..00000000000 --- a/packages/docs/developer-resources/explorer/reference/modules/_log_explorer_.md +++ /dev/null @@ -1,27 +0,0 @@ -# Module: "log-explorer" - -## Index - -### Classes - -* [LogExplorer](../classes/_log_explorer_.logexplorer.md) - -### Functions - -* [newLogExplorer](_log_explorer_.md#newlogexplorer) - -## Functions - -### newLogExplorer - -▸ **newLogExplorer**(`kit`: ContractKit): *Promise‹[LogExplorer](../classes/_log_explorer_.logexplorer.md)‹››* - -*Defined in [log-explorer.ts:10](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/explorer/src/log-explorer.ts#L10)* - -**Parameters:** - -Name | Type | ------- | ------ | -`kit` | ContractKit | - -**Returns:** *Promise‹[LogExplorer](../classes/_log_explorer_.logexplorer.md)‹››* diff --git a/packages/docs/developer-resources/forno/README.md b/packages/docs/developer-resources/forno/README.md deleted file mode 100644 index 4532e48a730..00000000000 --- a/packages/docs/developer-resources/forno/README.md +++ /dev/null @@ -1,32 +0,0 @@ -# Forno - -Forno is a cLabs hosted node service for interacting with the Celo network. This allows you to connect to the Celo Blockchain without having to run your own node. - -Forno has HTTP and websocket endpoints that you can use to query current Celo data or post transactions that you would like to broadcast to the network. The service runs full nodes in non-archive mode, so you can query the current state of the blockchain, but cannot access historic state. - -Forno can be used as an `Http Provider` with [ContractKit](../contractkit/README.md). - -```javascript -const ContractKit = require('@celo/contractkit') -const kit = ContractKit.newKit('https://alfajores-forno.celo-testnet.org') -``` - -Forno is a public node, so to send transactions from a Forno connection you will have to sign transactions with a private key before sending them to Forno. The [Hello Celo](../walkthroughs/hellocelo.md) guide shows you how to connect to the Alfajores testnet with Forno and use it to sign and send transactions on the network. - -## Forno networks - -Consult [this page](../../getting-started/choosing-a-network.md) to determine which network is right for you. - -``` -Alfajores = 'https://alfajores-forno.celo-testnet.org' - 'wss://alfajores-forno.celo-testnet.org/ws' (for websocket support) - -Baklava = 'https://baklava-forno.celo-testnet.org' - -Mainnet = 'https://forno.celo.org' - 'wss://forno.celo.org/ws' (for websocket support) -``` - -### Websocket connections & Event listeners - -Websocket connections are useful for listening to logs (aka events) emitted by a smart contract, but Forno only allows a websocket connection for 20 minutes before disconnecting. On disconnect, you can reconnect to the websocket endpoint to keep listening. [Here](https://gist.github.com/critesjosh/a230e7b2eb54c8d330ca57db1f6239db) is an example script of how to set up an event listener that reconnects when the connection is broken. diff --git a/packages/docs/developer-resources/governance/reference/README.md b/packages/docs/developer-resources/governance/reference/README.md deleted file mode 100644 index 4c2f1f127e2..00000000000 --- a/packages/docs/developer-resources/governance/reference/README.md +++ /dev/null @@ -1,162 +0,0 @@ -# @celo/governance - -

- - celo logo - -

- -**Celo Monorepo - Official repository for core projects comprising the Celo platform** - -This repository contains the source code for the Celo core projects including the [smart contracts](https://github.com/celo-org/celo-monorepo/tree/master/packages/protocol), [wallet app](https://github.com/celo-org/celo-monorepo/tree/master/packages/mobile), -and other packages. The source code for the Celo Blockchain which operates a node on the Celo Network is kept in a separate repo [here](https://github.com/celo-org/celo-blockchain). - - - -[![CircleCI](https://img.shields.io/circleci/build/github/celo-org/celo-monorepo/master)](https://circleci.com/gh/celo-org/celo-monorepo/tree/master) -[![Codecov](https://img.shields.io/codecov/c/github/celo-org/celo-monorepo)](https://codecov.io/gh/celo-org/celo-monorepo) -[![GitHub contributors](https://img.shields.io/github/contributors/celo-org/celo-monorepo)](https://github.com/celo-org/celo-monorepo/graphs/contributors) -[![GitHub commit activity](https://img.shields.io/github/commit-activity/w/celo-org/celo-monorepo)](https://github.com/celo-org/celo-monorepo/graphs/contributors) -[![GitHub Stars](https://img.shields.io/github/stars/celo-org/celo-monorepo.svg)](https://github.com/celo-org/celo-monorepo/stargazers) -![GitHub repo size](https://img.shields.io/github/repo-size/celo-org/celo-monorepo) -[![GitHub](https://img.shields.io/github/license/celo-org/celo-monorepo?color=blue)](https://github.com/celo-org/celo-monorepo/blob/master/LICENSE) - - - -[![Website celo.org](https://img.shields.io/website-up-down-green-red/https/celo.org.svg)](https://celo.org) -[![Blog](https://img.shields.io/badge/blog-up-green)](https://medium.com/celoorg) -[![docs](https://img.shields.io/badge/docs-up-green)](https://docs.celo.org/) -[![Youtube](https://img.shields.io/badge/YouTube%20channel-up-green)](https://www.youtube.com/channel/UCCZgos_YAJSXm5QX5D5Wkcw/videos?view=0&sort=p&flow=grid) -[![forum](https://img.shields.io/badge/forum-up-green)](https://forum.celo.org) -[![Discord](https://img.shields.io/discord/600834479145353243.svg)](https://discord.gg/RfHQKtY) -[![Twitter CeloDevs](https://img.shields.io/twitter/follow/celodevs?style=social)](https://twitter.com/celodevs) -[![Twitter CeloOrg](https://img.shields.io/twitter/follow/celoorg?style=social)](https://twitter.com/CeloOrg) -[![Subreddit subscribers](https://img.shields.io/reddit/subreddit-subscribers/CeloHQ?style=social)](https://www.reddit.com/r/CeloHQ/) - - - -[![GitHub pull requests by-label](https://img.shields.io/github/issues-pr-raw/celo-org/celo-monorepo)](https://github.com/celo-org/celo-monorepo/pulls) -[![GitHub Issues](https://img.shields.io/github/issues-raw/celo-org/celo-monorepo.svg)](https://github.com/celo-org/celo-monorepo/issues) -[![GitHub issues by-label](https://img.shields.io/github/issues/celo-org/celo-monorepo/1%20hour%20tasks)](https://github.com/celo-org/celo-monorepo/issues?q=is%3Aopen+is%3Aissue+label%3A%221+hour+tasks%22) -[![GitHub issues by-label](https://img.shields.io/github/issues/celo-org/celo-monorepo/betanet-phase-2)](https://github.com/celo-org/celo-monorepo/issues?q=is%3Aopen+is%3Aissue+label%3Abetanet-phase-2) -[![GitHub issues by-label](https://img.shields.io/github/issues/celo-org/celo-monorepo/betanet-phase-3)](https://github.com/celo-org/celo-monorepo/issues?q=is%3Aopen+is%3Aissue+label%3Abetanet-phase-3) - -Contents: - - - -- [Celo's Mission - Prosperity for All](#mission) -- [The Celo Stack](#stack) -- [Documentation](#docs) -- [Issues](#issues) -- [Repo Structure](#repo) -- [Contributing](#contributing) -- [Ask Questions, Find Answers, Get in Touch](#ask) -- [License](#license) - - -## 🥅 Celo's Mission - Prosperity for All - -Celo, pronounced /ˈtselo/, means ‘purpose’ in Esperanto. In a similar spirit, we are aiming to create a new platform to connect people globally and bring financial stability to those who need it most. We believe blockchain technology is one of the most exciting innovations in recent history and as a community we look to push the boundaries of what is possible with it today. More importantly, we are driven by purpose -- to solve real-world problems such as lack of access to sound currency, or friction for cash-transfer programs aimed to alleviate poverty. Our mission is to build a monetary system that creates the conditions for prosperity for all. - - -

- - Play on Youtube - What if money were beautiful - -
- What if money were beautiful? -

- -## 🧱 The Celo Stack - -Celo is oriented around providing the simplest possible experience for end users, who may have no familiarity with cryptocurrencies, and may be using low cost devices with limited connectivity. To achieve this, the project takes a full-stack approach, where each layer of the stack is designed with the end user in mind whilst considering other stakeholders \(e.g. operators of nodes in the network\) involved in enabling the end user experience. - -The Celo stack is structured into the following logical layers: - - -

- Celo protocol -
- The Celo Blockchain and Celo Core Contracts together comprise the Celo Protocol -

- -- **Celo Blockchain**: An open cryptographic protocol that allows applications to make transactions with and run smart contracts in a secure and decentralized fashion. The Celo Blockchain has shared ancestry with [Ethereum](https://www.ethereum.org), and maintains full EVM compatibility for smart contracts. However it uses a [Byzantine Fault Tolerant](http://pmg.csail.mit.edu/papers/osdi99.pdf) \(BFT\) consensus mechanism rather than Proof of Work, and has different block format, transaction format, client synchronization protocols, and gas payment and pricing mechanisms. The network’s native asset is Celo Gold, exposed via an ERC-20 interface. - -- **Celo Core Contracts**: A set of smart contracts running on the Celo Blockchain that comprise much of the logic of the platform features including ERC-20 stable currencies, identity attestations, Proof of Stake and governance. These smart contracts are upgradeable and managed by the decentralized governance process. - - -

- Celo network -
- Topology of a Celo Network -

- -- **Applications:** Applications for end users built on the Celo platform. The Celo Wallet app, the first of an ecosystem of applications, allows end users to manage accounts and make payments securely and simply by taking advantage of the innovations in the Celo protocol. Applications take the form of external mobile or backend software: they interact with the Celo Blockchain to issue transactions and invoke code that forms the Celo Core Contracts’ API. Third parties can also deploy custom smart contracts that their own applications can invoke, which in turn can leverage Celo Core Contracts. Applications may use centralized cloud services to provide some of their functionality: in the case of the Celo Wallet, push notifications and a transaction activity feed. - -## 📚 Documentation - -Follow the instructions in [SETUP.md](SETUP.md) to get a development environment set up. - -See [Developer's Guide](https://docs.celo.org/) for full details about the design of the Celo protocol and other information about running these projects. - -## 🙋 Issues - -See the [issue backlog](https://github.com/celo-org/celo-monorepo/issues) for a list of active or proposed tasks. Feel free to create new issues to report bugs and/or request features. - -## 📂 Repo Structure - -The repository has the following packages (sub projects): - -- [attestation-service](packages/attestation-service) - service run by validators on the Celo network to send SMS messages, enabling attestations of user phone numbers and their accounts on the Celo network -- [blockchain-api](packages/blockchain-api) - service that uses Blockscout to present view of transactions by account for Celo Wallet activity feed -- [celotool](packages/celotool) - scripts for deploying and managing testnets -- [cli](packages/cli) - tool that uses ContractKit to interact with the Celo protocol ([docs](https://docs.celo.org/getting-started/using-the-cli)) -- [contractkit](packages/contractkit) - library to help developers and validators interact with the protocol and it's smart contracts ([docs](https://docs.celo.org/celo-sdk/contractkit)) -- [dappkit](packages/dappkit) - set of functions for mobile DApps to work with the wallet app (ex. sign transactions and access the user's account) ([docs](https://docs.celo.org/celo-sdk/dappkit)) -- [dev-utils](packages/dev-utils) - a utils package for use as a dev dependency -- [docs](packages/docs) - technical documentation for the Celo project ([live](https://docs.celo.org/)) -- [faucet](packages/faucet) - faucet deployment configuration ([live](https://celo.org/build/faucet)) -- [helm-charts](packages/helm-charts) - templatized deployments of entire environments to Kubernetes clusters -- [mobile](packages/mobile) - Android wallet app for the Celo platform ([docs](https://docs.celo.org/getting-started/using-the-mobile-wallet), [live](https://play.google.com/store/apps/details?id=org.celo.mobile.alfajores)) -- [notification-service](packages/notification-service) - service for managing push notifications for Celo Wallet -- [protocol](packages/protocol) - identity, stability and other smart contracts for the Celo protocol ([docs](https://docs.celo.org/celo-codebase/protocol)) -- [react-components](packages/react-components) - generalized react native components -- [reserve-site](packages/reserve-site) - website for ([Celo Reserve.org](https://celoreserve.org/)) -- [terraform-modules](packages/terraform-modules) - templatized deployments of entire VM-based testnets for Google Cloud Platform -- [typescript](packages/typescript) - no README available (improve?) -- [utils](packages/utils) - no README available (improve?) - -Code owners for each package can be found in [.github/CODEOWNERS](.github/CODEOWNERS). - -## ✍️ Contributing - -Feel free to jump on the Celo 🚂🚋🚋🚋. Improvements and contributions are highly encouraged! 🙏👊 - -See the [contributing guide](https://docs.celo.org/community/contributing) for details on how to participate. -[![GitHub issues by-label](https://img.shields.io/github/issues/celo-org/celo-monorepo/1%20hour%20tasks)](https://github.com/celo-org/celo-monorepo/issues?q=is%3Aopen+is%3Aissue+label%3A%221+hour+tasks%22) - -All communication and contributions to the Celo project are subject to the [Celo Code of Conduct](https://celo.org/code-of-conduct). - -Not yet ready to contribute but do like the project? Support Celo with a ⭐ or share the love in a [![Twitter URL](https://img.shields.io/twitter/url?style=social&url=https%3A%2F%2Fcelo.org%2F)](https://twitter.com/intent/tweet?url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DkKggE5OvyhE&via=celohq&text=Checkout%20celo%21%20Love%20what%20they%20are%20building.&hashtags=celo) - - - -## 💬 Ask Questions, Find Answers, Get in Touch - -- [Website](https://celo.org/) -- [Docs](https://docs.celo.org/) -- [Blog](https://medium.com/celohq) -- [YouTube](https://www.youtube.com/channel/UCCZgos_YAJSXm5QX5D5Wkcw/videos?view=0&sort=p&flow=grid) -- [Forum](https://forum.celo.org) -- [Discord](https://discord.gg/vRbExjv) -- [Twitter](https://twitter.com/CeloDevs) -- [Reddit](https://www.reddit.com/r/CeloHQ/) -- [Community Events](https://celo.org/community) - -## 📜 License - -All packages are licensed under the terms of the [Apache 2.0 License](LICENSE) unless otherwise specified in the LICENSE file at package's root. diff --git a/packages/docs/developer-resources/governance/reference/SUMMARY.md b/packages/docs/developer-resources/governance/reference/SUMMARY.md deleted file mode 100644 index 26b4c929383..00000000000 --- a/packages/docs/developer-resources/governance/reference/SUMMARY.md +++ /dev/null @@ -1,11 +0,0 @@ -* [Globals](globals.md) -* [Modules]() - * [proposals](modules/_proposals_.md) - * [InteractiveProposalBuilder](classes/_proposals_.interactiveproposalbuilder.md) - * [ProposalBuilder](classes/_proposals_.proposalbuilder.md) - * [ProposalTransactionJSON](interfaces/_proposals_.proposaltransactionjson.md) -* [Classes]() - * [InteractiveProposalBuilder](classes/_proposals_.interactiveproposalbuilder.md) - * [ProposalBuilder](classes/_proposals_.proposalbuilder.md) -* [Interfaces]() - * [ProposalTransactionJSON](interfaces/_proposals_.proposaltransactionjson.md) \ No newline at end of file diff --git a/packages/docs/developer-resources/governance/reference/classes/_proposals_.interactiveproposalbuilder.md b/packages/docs/developer-resources/governance/reference/classes/_proposals_.interactiveproposalbuilder.md deleted file mode 100644 index 5cf591d260f..00000000000 --- a/packages/docs/developer-resources/governance/reference/classes/_proposals_.interactiveproposalbuilder.md +++ /dev/null @@ -1,52 +0,0 @@ -# Class: InteractiveProposalBuilder - -## Hierarchy - -* **InteractiveProposalBuilder** - -## Index - -### Constructors - -* [constructor](_proposals_.interactiveproposalbuilder.md#constructor) - -### Methods - -* [outputTransactions](_proposals_.interactiveproposalbuilder.md#outputtransactions) -* [promptTransactions](_proposals_.interactiveproposalbuilder.md#prompttransactions) - -## Constructors - -### constructor - -\+ **new InteractiveProposalBuilder**(`builder`: [ProposalBuilder](_proposals_.proposalbuilder.md)): *[InteractiveProposalBuilder](_proposals_.interactiveproposalbuilder.md)* - -*Defined in [proposals.ts:248](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/governance/src/proposals.ts#L248)* - -**Parameters:** - -Name | Type | ------- | ------ | -`builder` | [ProposalBuilder](_proposals_.proposalbuilder.md) | - -**Returns:** *[InteractiveProposalBuilder](_proposals_.interactiveproposalbuilder.md)* - -## Methods - -### outputTransactions - -▸ **outputTransactions**(): *Promise‹void›* - -*Defined in [proposals.ts:251](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/governance/src/proposals.ts#L251)* - -**Returns:** *Promise‹void›* - -___ - -### promptTransactions - -▸ **promptTransactions**(): *Promise‹[ProposalTransactionJSON](../interfaces/_proposals_.proposaltransactionjson.md)[]›* - -*Defined in [proposals.ts:256](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/governance/src/proposals.ts#L256)* - -**Returns:** *Promise‹[ProposalTransactionJSON](../interfaces/_proposals_.proposaltransactionjson.md)[]›* diff --git a/packages/docs/developer-resources/governance/reference/classes/_proposals_.proposalbuilder.md b/packages/docs/developer-resources/governance/reference/classes/_proposals_.proposalbuilder.md deleted file mode 100644 index 59632c02044..00000000000 --- a/packages/docs/developer-resources/governance/reference/classes/_proposals_.proposalbuilder.md +++ /dev/null @@ -1,163 +0,0 @@ -# Class: ProposalBuilder - -Builder class to construct proposals from JSON or transaction objects. - -## Hierarchy - -* **ProposalBuilder** - -## Index - -### Constructors - -* [constructor](_proposals_.proposalbuilder.md#constructor) - -### Methods - -* [addJsonTx](_proposals_.proposalbuilder.md#addjsontx) -* [addProxyRepointingTx](_proposals_.proposalbuilder.md#addproxyrepointingtx) -* [addTx](_proposals_.proposalbuilder.md#addtx) -* [addWeb3Tx](_proposals_.proposalbuilder.md#addweb3tx) -* [build](_proposals_.proposalbuilder.md#build) -* [fromJsonTx](_proposals_.proposalbuilder.md#fromjsontx) -* [fromWeb3tx](_proposals_.proposalbuilder.md#fromweb3tx) - -## Constructors - -### constructor - -\+ **new ProposalBuilder**(`kit`: ContractKit, `builders`: Array‹function›, `registryAdditions`: RegistryAdditions): *[ProposalBuilder](_proposals_.proposalbuilder.md)* - -*Defined in [proposals.ts:136](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/governance/src/proposals.ts#L136)* - -**Parameters:** - -Name | Type | Default | ------- | ------ | ------ | -`kit` | ContractKit | - | -`builders` | Array‹function› | [] | -`registryAdditions` | RegistryAdditions | {} | - -**Returns:** *[ProposalBuilder](_proposals_.proposalbuilder.md)* - -## Methods - -### addJsonTx - -▸ **addJsonTx**(`tx`: [ProposalTransactionJSON](../interfaces/_proposals_.proposaltransactionjson.md)): *number* - -*Defined in [proposals.ts:243](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/governance/src/proposals.ts#L243)* - -**Parameters:** - -Name | Type | ------- | ------ | -`tx` | [ProposalTransactionJSON](../interfaces/_proposals_.proposaltransactionjson.md) | - -**Returns:** *number* - -___ - -### addProxyRepointingTx - -▸ **addProxyRepointingTx**(`contract`: CeloContract, `newImplementationAddress`: string): *void* - -*Defined in [proposals.ts:171](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/governance/src/proposals.ts#L171)* - -Adds a transaction to set the implementation on a proxy to the given address. - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`contract` | CeloContract | Celo contract name of the proxy which should have its implementation set. | -`newImplementationAddress` | string | Address of the new contract implementation. | - -**Returns:** *void* - -___ - -### addTx - -▸ **addTx**(`tx`: CeloTransactionObject‹any›, `params`: Partial‹ProposalTxParams›): *void* - -*Defined in [proposals.ts:197](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/governance/src/proposals.ts#L197)* - -Adds a Celo transaction to the list for proposal construction. - -**Parameters:** - -Name | Type | Default | Description | ------- | ------ | ------ | ------ | -`tx` | CeloTransactionObject‹any› | - | A Celo transaction object to add to the proposal. | -`params` | Partial‹ProposalTxParams› | {} | Optional parameters for how the transaction should be executed. | - -**Returns:** *void* - -___ - -### addWeb3Tx - -▸ **addWeb3Tx**(`tx`: CeloTxObject‹any›, `params`: ProposalTxParams): *number* - -*Defined in [proposals.ts:189](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/governance/src/proposals.ts#L189)* - -Adds a Web3 transaction to the list for proposal construction. - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`tx` | CeloTxObject‹any› | A Web3 transaction object to add to the proposal. | -`params` | ProposalTxParams | Parameters for how the transaction should be executed. | - -**Returns:** *number* - -___ - -### build - -▸ **build**(): *Promise‹Pick‹CeloTxPending, "to" | "input" | "value"›[]›* - -*Defined in [proposals.ts:147](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/governance/src/proposals.ts#L147)* - -Build calls all of the added build steps and returns the final proposal. - -**Returns:** *Promise‹Pick‹CeloTxPending, "to" | "input" | "value"›[]›* - -A constructed Proposal object (i.e. a list of ProposalTransaction) - -___ - -### fromJsonTx - -▸ **fromJsonTx**(`tx`: [ProposalTransactionJSON](../interfaces/_proposals_.proposaltransactionjson.md)): *Promise‹Pick‹CeloTxPending, "to" | "input" | "value"››* - -*Defined in [proposals.ts:207](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/governance/src/proposals.ts#L207)* - -**Parameters:** - -Name | Type | ------- | ------ | -`tx` | [ProposalTransactionJSON](../interfaces/_proposals_.proposaltransactionjson.md) | - -**Returns:** *Promise‹Pick‹CeloTxPending, "to" | "input" | "value"››* - -___ - -### fromWeb3tx - -▸ **fromWeb3tx**(`tx`: CeloTxObject‹any›, `params`: ProposalTxParams): *ProposalTransaction* - -*Defined in [proposals.ts:160](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/governance/src/proposals.ts#L160)* - -Converts a Web3 transaction into a proposal transaction object. - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`tx` | CeloTxObject‹any› | A Web3 transaction object to convert. | -`params` | ProposalTxParams | Parameters for how the transaction should be executed. | - -**Returns:** *ProposalTransaction* diff --git a/packages/docs/developer-resources/governance/reference/globals.md b/packages/docs/developer-resources/governance/reference/globals.md deleted file mode 100644 index 4e71d36092a..00000000000 --- a/packages/docs/developer-resources/governance/reference/globals.md +++ /dev/null @@ -1,7 +0,0 @@ -# @celo/governance - -## Index - -### Modules - -* ["proposals"](modules/_proposals_.md) diff --git a/packages/docs/developer-resources/governance/reference/interfaces/_proposals_.proposaltransactionjson.md b/packages/docs/developer-resources/governance/reference/interfaces/_proposals_.proposaltransactionjson.md deleted file mode 100644 index bba38c1d441..00000000000 --- a/packages/docs/developer-resources/governance/reference/interfaces/_proposals_.proposaltransactionjson.md +++ /dev/null @@ -1,67 +0,0 @@ -# Interface: ProposalTransactionJSON - -JSON encoding of a proposal transaction. - -Example: -```json -{ - "contract": "Election", - "function": "setElectableValidators", - "args": [ "1", "120" ], - "value": "0" -} -``` - -## Hierarchy - -* **ProposalTransactionJSON** - -## Index - -### Properties - -* [args](_proposals_.proposaltransactionjson.md#args) -* [contract](_proposals_.proposaltransactionjson.md#contract) -* [function](_proposals_.proposaltransactionjson.md#function) -* [params](_proposals_.proposaltransactionjson.md#optional-params) -* [value](_proposals_.proposaltransactionjson.md#value) - -## Properties - -### args - -• **args**: *any[]* - -*Defined in [proposals.ts:62](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/governance/src/proposals.ts#L62)* - -___ - -### contract - -• **contract**: *CeloContract* - -*Defined in [proposals.ts:60](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/governance/src/proposals.ts#L60)* - -___ - -### function - -• **function**: *string* - -*Defined in [proposals.ts:61](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/governance/src/proposals.ts#L61)* - -___ - -### `Optional` params - -• **params**? : *Record‹string, any›* - -*Defined in [proposals.ts:63](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/governance/src/proposals.ts#L63)* - -___ - -### value - -• **value**: *string* - -*Defined in [proposals.ts:64](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/governance/src/proposals.ts#L64)* diff --git a/packages/docs/developer-resources/governance/reference/modules/_proposals_.md b/packages/docs/developer-resources/governance/reference/modules/_proposals_.md deleted file mode 100644 index 0c98e078861..00000000000 --- a/packages/docs/developer-resources/governance/reference/modules/_proposals_.md +++ /dev/null @@ -1,87 +0,0 @@ -# Module: "proposals" - -## Index - -### Classes - -* [InteractiveProposalBuilder](../classes/_proposals_.interactiveproposalbuilder.md) -* [ProposalBuilder](../classes/_proposals_.proposalbuilder.md) - -### Interfaces - -* [ProposalTransactionJSON](../interfaces/_proposals_.proposaltransactionjson.md) - -### Variables - -* [HOTFIX_PARAM_ABI_TYPES](_proposals_.md#const-hotfix_param_abi_types) - -### Functions - -* [hotfixToEncodedParams](_proposals_.md#const-hotfixtoencodedparams) -* [hotfixToHash](_proposals_.md#const-hotfixtohash) -* [proposalToJSON](_proposals_.md#const-proposaltojson) - -## Variables - -### `Const` HOTFIX_PARAM_ABI_TYPES - -• **HOTFIX_PARAM_ABI_TYPES**: *string[]* = getAbiTypes(GovernanceABI as any, 'executeHotfix') - -*Defined in [proposals.ts:36](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/governance/src/proposals.ts#L36)* - -## Functions - -### `Const` hotfixToEncodedParams - -▸ **hotfixToEncodedParams**(`kit`: ContractKit, `proposal`: Proposal, `salt`: Buffer): *string* - -*Defined in [proposals.ts:38](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/governance/src/proposals.ts#L38)* - -**Parameters:** - -Name | Type | ------- | ------ | -`kit` | ContractKit | -`proposal` | Proposal | -`salt` | Buffer | - -**Returns:** *string* - -___ - -### `Const` hotfixToHash - -▸ **hotfixToHash**(`kit`: ContractKit, `proposal`: Proposal, `salt`: Buffer): *Buffer‹›* - -*Defined in [proposals.ts:43](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/governance/src/proposals.ts#L43)* - -**Parameters:** - -Name | Type | ------- | ------ | -`kit` | ContractKit | -`proposal` | Proposal | -`salt` | Buffer | - -**Returns:** *Buffer‹›* - -___ - -### `Const` proposalToJSON - -▸ **proposalToJSON**(`kit`: ContractKit, `proposal`: Proposal): *Promise‹[ProposalTransactionJSON](../interfaces/_proposals_.proposaltransactionjson.md)[]›* - -*Defined in [proposals.ts:82](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/governance/src/proposals.ts#L82)* - -Convert a compiled proposal to a human-readable JSON form using network information. - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`kit` | ContractKit | Contract kit instance used to resolve addresses to contract names. | -`proposal` | Proposal | A constructed proposal object. | - -**Returns:** *Promise‹[ProposalTransactionJSON](../interfaces/_proposals_.proposaltransactionjson.md)[]›* - -The JSON encoding of the proposal. diff --git a/packages/docs/developer-resources/identity/reference/README.md b/packages/docs/developer-resources/identity/reference/README.md deleted file mode 100644 index 70d3a4989af..00000000000 --- a/packages/docs/developer-resources/identity/reference/README.md +++ /dev/null @@ -1,162 +0,0 @@ -# @celo/identity - -

- - celo logo - -

- -**Celo Monorepo - Official repository for core projects comprising the Celo platform** - -This repository contains the source code for the Celo core projects including the [smart contracts](https://github.com/celo-org/celo-monorepo/tree/master/packages/protocol), [wallet app](https://github.com/celo-org/celo-monorepo/tree/master/packages/mobile), -and other packages. The source code for the Celo Blockchain which operates a node on the Celo Network is kept in a separate repo [here](https://github.com/celo-org/celo-blockchain). - - - -[![CircleCI](https://img.shields.io/circleci/build/github/celo-org/celo-monorepo/master)](https://circleci.com/gh/celo-org/celo-monorepo/tree/master) -[![Codecov](https://img.shields.io/codecov/c/github/celo-org/celo-monorepo)](https://codecov.io/gh/celo-org/celo-monorepo) -[![GitHub contributors](https://img.shields.io/github/contributors/celo-org/celo-monorepo)](https://github.com/celo-org/celo-monorepo/graphs/contributors) -[![GitHub commit activity](https://img.shields.io/github/commit-activity/w/celo-org/celo-monorepo)](https://github.com/celo-org/celo-monorepo/graphs/contributors) -[![GitHub Stars](https://img.shields.io/github/stars/celo-org/celo-monorepo.svg)](https://github.com/celo-org/celo-monorepo/stargazers) -![GitHub repo size](https://img.shields.io/github/repo-size/celo-org/celo-monorepo) -[![GitHub](https://img.shields.io/github/license/celo-org/celo-monorepo?color=blue)](https://github.com/celo-org/celo-monorepo/blob/master/LICENSE) - - - -[![Website celo.org](https://img.shields.io/website-up-down-green-red/https/celo.org.svg)](https://celo.org) -[![Blog](https://img.shields.io/badge/blog-up-green)](https://medium.com/celoorg) -[![docs](https://img.shields.io/badge/docs-up-green)](https://docs.celo.org/) -[![Youtube](https://img.shields.io/badge/YouTube%20channel-up-green)](https://www.youtube.com/channel/UCCZgos_YAJSXm5QX5D5Wkcw/videos?view=0&sort=p&flow=grid) -[![forum](https://img.shields.io/badge/forum-up-green)](https://forum.celo.org) -[![Discord](https://img.shields.io/discord/600834479145353243.svg)](https://discord.gg/RfHQKtY) -[![Twitter CeloDevs](https://img.shields.io/twitter/follow/celodevs?style=social)](https://twitter.com/celodevs) -[![Twitter CeloOrg](https://img.shields.io/twitter/follow/celoorg?style=social)](https://twitter.com/CeloOrg) -[![Subreddit subscribers](https://img.shields.io/reddit/subreddit-subscribers/CeloHQ?style=social)](https://www.reddit.com/r/CeloHQ/) - - - -[![GitHub pull requests by-label](https://img.shields.io/github/issues-pr-raw/celo-org/celo-monorepo)](https://github.com/celo-org/celo-monorepo/pulls) -[![GitHub Issues](https://img.shields.io/github/issues-raw/celo-org/celo-monorepo.svg)](https://github.com/celo-org/celo-monorepo/issues) -[![GitHub issues by-label](https://img.shields.io/github/issues/celo-org/celo-monorepo/1%20hour%20tasks)](https://github.com/celo-org/celo-monorepo/issues?q=is%3Aopen+is%3Aissue+label%3A%221+hour+tasks%22) -[![GitHub issues by-label](https://img.shields.io/github/issues/celo-org/celo-monorepo/betanet-phase-2)](https://github.com/celo-org/celo-monorepo/issues?q=is%3Aopen+is%3Aissue+label%3Abetanet-phase-2) -[![GitHub issues by-label](https://img.shields.io/github/issues/celo-org/celo-monorepo/betanet-phase-3)](https://github.com/celo-org/celo-monorepo/issues?q=is%3Aopen+is%3Aissue+label%3Abetanet-phase-3) - -Contents: - - - -- [Celo's Mission - Prosperity for All](#mission) -- [The Celo Stack](#stack) -- [Documentation](#docs) -- [Issues](#issues) -- [Repo Structure](#repo) -- [Contributing](#contributing) -- [Ask Questions, Find Answers, Get in Touch](#ask) -- [License](#license) - - -## 🥅 Celo's Mission - Prosperity for All - -Celo, pronounced /ˈtselo/, means ‘purpose’ in Esperanto. In a similar spirit, we are aiming to create a new platform to connect people globally and bring financial stability to those who need it most. We believe blockchain technology is one of the most exciting innovations in recent history and as a community we look to push the boundaries of what is possible with it today. More importantly, we are driven by purpose -- to solve real-world problems such as lack of access to sound currency, or friction for cash-transfer programs aimed to alleviate poverty. Our mission is to build a monetary system that creates the conditions for prosperity for all. - - -

- - Play on Youtube - What if money were beautiful - -
- What if money were beautiful? -

- -## 🧱 The Celo Stack - -Celo is oriented around providing the simplest possible experience for end users, who may have no familiarity with cryptocurrencies, and may be using low cost devices with limited connectivity. To achieve this, the project takes a full-stack approach, where each layer of the stack is designed with the end user in mind whilst considering other stakeholders \(e.g. operators of nodes in the network\) involved in enabling the end user experience. - -The Celo stack is structured into the following logical layers: - - -

- Celo protocol -
- The Celo Blockchain and Celo Core Contracts together comprise the Celo Protocol -

- -- **Celo Blockchain**: An open cryptographic protocol that allows applications to make transactions with and run smart contracts in a secure and decentralized fashion. The Celo Blockchain has shared ancestry with [Ethereum](https://www.ethereum.org), and maintains full EVM compatibility for smart contracts. However it uses a [Byzantine Fault Tolerant](http://pmg.csail.mit.edu/papers/osdi99.pdf) \(BFT\) consensus mechanism rather than Proof of Work, and has different block format, transaction format, client synchronization protocols, and gas payment and pricing mechanisms. The network’s native asset is Celo Gold, exposed via an ERC-20 interface. - -- **Celo Core Contracts**: A set of smart contracts running on the Celo Blockchain that comprise much of the logic of the platform features including ERC-20 stable currencies, identity attestations, Proof of Stake and governance. These smart contracts are upgradeable and managed by the decentralized governance process. - - -

- Celo network -
- Topology of a Celo Network -

- -- **Applications:** Applications for end users built on the Celo platform. The Celo Wallet app, the first of an ecosystem of applications, allows end users to manage accounts and make payments securely and simply by taking advantage of the innovations in the Celo protocol. Applications take the form of external mobile or backend software: they interact with the Celo Blockchain to issue transactions and invoke code that forms the Celo Core Contracts’ API. Third parties can also deploy custom smart contracts that their own applications can invoke, which in turn can leverage Celo Core Contracts. Applications may use centralized cloud services to provide some of their functionality: in the case of the Celo Wallet, push notifications and a transaction activity feed. - -## 📚 Documentation - -Follow the instructions in [SETUP.md](SETUP.md) to get a development environment set up. - -See [Developer's Guide](https://docs.celo.org/) for full details about the design of the Celo protocol and other information about running these projects. - -## 🙋 Issues - -See the [issue backlog](https://github.com/celo-org/celo-monorepo/issues) for a list of active or proposed tasks. Feel free to create new issues to report bugs and/or request features. - -## 📂 Repo Structure - -The repository has the following packages (sub projects): - -- [attestation-service](packages/attestation-service) - service run by validators on the Celo network to send SMS messages, enabling attestations of user phone numbers and their accounts on the Celo network -- [blockchain-api](packages/blockchain-api) - service that uses Blockscout to present view of transactions by account for Celo Wallet activity feed -- [celotool](packages/celotool) - scripts for deploying and managing testnets -- [cli](packages/cli) - tool that uses ContractKit to interact with the Celo protocol ([docs](https://docs.celo.org/getting-started/using-the-cli)) -- [contractkit](packages/contractkit) - library to help developers and validators interact with the protocol and it's smart contracts ([docs](https://docs.celo.org/celo-sdk/contractkit)) -- [dappkit](packages/dappkit) - set of functions for mobile DApps to work with the wallet app (ex. sign transactions and access the user's account) ([docs](https://docs.celo.org/celo-sdk/dappkit)) -- [dev-utils](packages/dev-utils) - a utils package for use as a dev dependency -- [docs](packages/docs) - technical documentation for the Celo project ([live](https://docs.celo.org/)) -- [faucet](packages/faucet) - faucet deployment configuration ([live](https://celo.org/build/faucet)) -- [helm-charts](packages/helm-charts) - templatized deployments of entire environments to Kubernetes clusters -- [mobile](packages/mobile) - Android wallet app for the Celo platform ([docs](https://docs.celo.org/getting-started/using-the-mobile-wallet), [live](https://play.google.com/store/apps/details?id=org.celo.mobile.alfajores)) -- [notification-service](packages/notification-service) - service for managing push notifications for Celo Wallet -- [protocol](packages/protocol) - identity, stability and other smart contracts for the Celo protocol ([docs](https://docs.celo.org/celo-codebase/protocol)) -- [react-components](packages/react-components) - generalized react native components -- [reserve-site](packages/reserve-site) - website for ([Celo Reserve.org](https://celoreserve.org/)) -- [terraform-modules](packages/terraform-modules) - templatized deployments of entire VM-based testnets for Google Cloud Platform -- [typescript](packages/typescript) - no README available (improve?) -- [utils](packages/utils) - no README available (improve?) - -Code owners for each package can be found in [.github/CODEOWNERS](.github/CODEOWNERS). - -## ✍️ Contributing - -Feel free to jump on the Celo 🚂🚋🚋🚋. Improvements and contributions are highly encouraged! 🙏👊 - -See the [contributing guide](https://docs.celo.org/community/contributing) for details on how to participate. -[![GitHub issues by-label](https://img.shields.io/github/issues/celo-org/celo-monorepo/1%20hour%20tasks)](https://github.com/celo-org/celo-monorepo/issues?q=is%3Aopen+is%3Aissue+label%3A%221+hour+tasks%22) - -All communication and contributions to the Celo project are subject to the [Celo Code of Conduct](https://celo.org/code-of-conduct). - -Not yet ready to contribute but do like the project? Support Celo with a ⭐ or share the love in a [![Twitter URL](https://img.shields.io/twitter/url?style=social&url=https%3A%2F%2Fcelo.org%2F)](https://twitter.com/intent/tweet?url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DkKggE5OvyhE&via=celohq&text=Checkout%20celo%21%20Love%20what%20they%20are%20building.&hashtags=celo) - - - -## 💬 Ask Questions, Find Answers, Get in Touch - -- [Website](https://celo.org/) -- [Docs](https://docs.celo.org/) -- [Blog](https://medium.com/celohq) -- [YouTube](https://www.youtube.com/channel/UCCZgos_YAJSXm5QX5D5Wkcw/videos?view=0&sort=p&flow=grid) -- [Forum](https://forum.celo.org) -- [Discord](https://discord.gg/vRbExjv) -- [Twitter](https://twitter.com/CeloDevs) -- [Reddit](https://www.reddit.com/r/CeloHQ/) -- [Community Events](https://celo.org/community) - -## 📜 License - -All packages are licensed under the terms of the [Apache 2.0 License](LICENSE) unless otherwise specified in the LICENSE file at package's root. diff --git a/packages/docs/developer-resources/identity/reference/SUMMARY.md b/packages/docs/developer-resources/identity/reference/SUMMARY.md deleted file mode 100644 index bbabc85ad32..00000000000 --- a/packages/docs/developer-resources/identity/reference/SUMMARY.md +++ /dev/null @@ -1,97 +0,0 @@ -* [Globals](globals.md) -* [Modules]() - * [odis/bls-blinding-client](modules/_odis_bls_blinding_client_.md) - * [WasmBlsBlindingClient](classes/_odis_bls_blinding_client_.wasmblsblindingclient.md) - * [BlsBlindingClient](interfaces/_odis_bls_blinding_client_.blsblindingclient.md) - * [odis/matchmaking](modules/_odis_matchmaking_.md) - * [odis/phone-number-identifier](modules/_odis_phone_number_identifier_.md) - * [PhoneNumberHashDetails](interfaces/_odis_phone_number_identifier_.phonenumberhashdetails.md) - * [odis/query](modules/_odis_query_.md) - * [AuthenticationMethod](enums/_odis_query_.authenticationmethod.md) - * [ErrorMessages](enums/_odis_query_.errormessages.md) - * [CustomSigner](interfaces/_odis_query_.customsigner.md) - * [EncryptionKeySigner](interfaces/_odis_query_.encryptionkeysigner.md) - * [MatchmakingRequest](interfaces/_odis_query_.matchmakingrequest.md) - * [MatchmakingResponse](interfaces/_odis_query_.matchmakingresponse.md) - * [PhoneNumberPrivacyRequest](interfaces/_odis_query_.phonenumberprivacyrequest.md) - * [ServiceContext](interfaces/_odis_query_.servicecontext.md) - * [SignMessageRequest](interfaces/_odis_query_.signmessagerequest.md) - * [SignMessageResponse](interfaces/_odis_query_.signmessageresponse.md) - * [WalletKeySigner](interfaces/_odis_query_.walletkeysigner.md) - * [offchain-data-wrapper](modules/_offchain_data_wrapper_.md) - * [OffchainErrorTypes](enums/_offchain_data_wrapper_.offchainerrortypes.md) - * [OffchainDataWrapper](classes/_offchain_data_wrapper_.offchaindatawrapper.md) - * [offchain/accessors/authorized-signer](modules/_offchain_accessors_authorized_signer_.md) - * [AuthorizedSignerAccessor](classes/_offchain_accessors_authorized_signer_.authorizedsigneraccessor.md) - * [offchain/accessors/binary](modules/_offchain_accessors_binary_.md) - * [PrivateBinaryAccessor](classes/_offchain_accessors_binary_.privatebinaryaccessor.md) - * [PublicBinaryAccessor](classes/_offchain_accessors_binary_.publicbinaryaccessor.md) - * [offchain/accessors/errors](modules/_offchain_accessors_errors_.md) - * [SchemaErrorTypes](enums/_offchain_accessors_errors_.schemaerrortypes.md) - * [InvalidDataError](classes/_offchain_accessors_errors_.invaliddataerror.md) - * [InvalidKey](classes/_offchain_accessors_errors_.invalidkey.md) - * [OffchainError](classes/_offchain_accessors_errors_.offchainerror.md) - * [UnavailableKey](classes/_offchain_accessors_errors_.unavailablekey.md) - * [UnknownCiphertext](classes/_offchain_accessors_errors_.unknownciphertext.md) - * [offchain/accessors/interfaces](modules/_offchain_accessors_interfaces_.md) - * [PrivateAccessor](interfaces/_offchain_accessors_interfaces_.privateaccessor.md) - * [PublicAccessor](interfaces/_offchain_accessors_interfaces_.publicaccessor.md) - * [offchain/accessors/name](modules/_offchain_accessors_name_.md) - * [PrivateNameAccessor](classes/_offchain_accessors_name_.privatenameaccessor.md) - * [PublicNameAccessor](classes/_offchain_accessors_name_.publicnameaccessor.md) - * [offchain/accessors/pictures](modules/_offchain_accessors_pictures_.md) - * [PrivatePictureAccessor](classes/_offchain_accessors_pictures_.privatepictureaccessor.md) - * [PublicPictureAccessor](classes/_offchain_accessors_pictures_.publicpictureaccessor.md) - * [offchain/accessors/simple](modules/_offchain_accessors_simple_.md) - * [PrivateSimpleAccessor](classes/_offchain_accessors_simple_.privatesimpleaccessor.md) - * [PublicSimpleAccessor](classes/_offchain_accessors_simple_.publicsimpleaccessor.md) - * [offchain/storage-writers](modules/_offchain_storage_writers_.md) - * [GitStorageWriter](classes/_offchain_storage_writers_.gitstoragewriter.md) - * [GoogleStorageWriter](classes/_offchain_storage_writers_.googlestoragewriter.md) - * [LocalStorageWriter](classes/_offchain_storage_writers_.localstoragewriter.md) - * [MockStorageWriter](classes/_offchain_storage_writers_.mockstoragewriter.md) - * [StorageWriter](classes/_offchain_storage_writers_.storagewriter.md) - * [offchain/utils](modules/_offchain_utils_.md) - * [test-utils/setup.global](modules/_test_utils_setup_global_.md) - * [test-utils/teardown.global](modules/_test_utils_teardown_global_.md) -* [Classes]() - * [WasmBlsBlindingClient](classes/_odis_bls_blinding_client_.wasmblsblindingclient.md) - * [OffchainDataWrapper](classes/_offchain_data_wrapper_.offchaindatawrapper.md) - * [AuthorizedSignerAccessor](classes/_offchain_accessors_authorized_signer_.authorizedsigneraccessor.md) - * [PrivateBinaryAccessor](classes/_offchain_accessors_binary_.privatebinaryaccessor.md) - * [PublicBinaryAccessor](classes/_offchain_accessors_binary_.publicbinaryaccessor.md) - * [InvalidDataError](classes/_offchain_accessors_errors_.invaliddataerror.md) - * [InvalidKey](classes/_offchain_accessors_errors_.invalidkey.md) - * [OffchainError](classes/_offchain_accessors_errors_.offchainerror.md) - * [UnavailableKey](classes/_offchain_accessors_errors_.unavailablekey.md) - * [UnknownCiphertext](classes/_offchain_accessors_errors_.unknownciphertext.md) - * [PrivateNameAccessor](classes/_offchain_accessors_name_.privatenameaccessor.md) - * [PublicNameAccessor](classes/_offchain_accessors_name_.publicnameaccessor.md) - * [PrivatePictureAccessor](classes/_offchain_accessors_pictures_.privatepictureaccessor.md) - * [PublicPictureAccessor](classes/_offchain_accessors_pictures_.publicpictureaccessor.md) - * [PrivateSimpleAccessor](classes/_offchain_accessors_simple_.privatesimpleaccessor.md) - * [PublicSimpleAccessor](classes/_offchain_accessors_simple_.publicsimpleaccessor.md) - * [GitStorageWriter](classes/_offchain_storage_writers_.gitstoragewriter.md) - * [GoogleStorageWriter](classes/_offchain_storage_writers_.googlestoragewriter.md) - * [LocalStorageWriter](classes/_offchain_storage_writers_.localstoragewriter.md) - * [MockStorageWriter](classes/_offchain_storage_writers_.mockstoragewriter.md) - * [StorageWriter](classes/_offchain_storage_writers_.storagewriter.md) -* [Enums]() - * [AuthenticationMethod](enums/_odis_query_.authenticationmethod.md) - * [ErrorMessages](enums/_odis_query_.errormessages.md) - * [OffchainErrorTypes](enums/_offchain_data_wrapper_.offchainerrortypes.md) - * [SchemaErrorTypes](enums/_offchain_accessors_errors_.schemaerrortypes.md) -* [Interfaces]() - * [BlsBlindingClient](interfaces/_odis_bls_blinding_client_.blsblindingclient.md) - * [PhoneNumberHashDetails](interfaces/_odis_phone_number_identifier_.phonenumberhashdetails.md) - * [CustomSigner](interfaces/_odis_query_.customsigner.md) - * [EncryptionKeySigner](interfaces/_odis_query_.encryptionkeysigner.md) - * [MatchmakingRequest](interfaces/_odis_query_.matchmakingrequest.md) - * [MatchmakingResponse](interfaces/_odis_query_.matchmakingresponse.md) - * [PhoneNumberPrivacyRequest](interfaces/_odis_query_.phonenumberprivacyrequest.md) - * [ServiceContext](interfaces/_odis_query_.servicecontext.md) - * [SignMessageRequest](interfaces/_odis_query_.signmessagerequest.md) - * [SignMessageResponse](interfaces/_odis_query_.signmessageresponse.md) - * [WalletKeySigner](interfaces/_odis_query_.walletkeysigner.md) - * [PrivateAccessor](interfaces/_offchain_accessors_interfaces_.privateaccessor.md) - * [PublicAccessor](interfaces/_offchain_accessors_interfaces_.publicaccessor.md) \ No newline at end of file diff --git a/packages/docs/developer-resources/identity/reference/classes/_odis_bls_blinding_client_.wasmblsblindingclient.md b/packages/docs/developer-resources/identity/reference/classes/_odis_bls_blinding_client_.wasmblsblindingclient.md deleted file mode 100644 index 86ee68c79d0..00000000000 --- a/packages/docs/developer-resources/identity/reference/classes/_odis_bls_blinding_client_.wasmblsblindingclient.md +++ /dev/null @@ -1,68 +0,0 @@ -# Class: WasmBlsBlindingClient - -## Hierarchy - -* **WasmBlsBlindingClient** - -## Implements - -* [BlsBlindingClient](../interfaces/_odis_bls_blinding_client_.blsblindingclient.md) - -## Index - -### Constructors - -* [constructor](_odis_bls_blinding_client_.wasmblsblindingclient.md#constructor) - -### Methods - -* [blindMessage](_odis_bls_blinding_client_.wasmblsblindingclient.md#blindmessage) -* [unblindAndVerifyMessage](_odis_bls_blinding_client_.wasmblsblindingclient.md#unblindandverifymessage) - -## Constructors - -### constructor - -\+ **new WasmBlsBlindingClient**(`odisPubKey`: string): *[WasmBlsBlindingClient](_odis_bls_blinding_client_.wasmblsblindingclient.md)* - -*Defined in [packages/sdk/identity/src/odis/bls-blinding-client.ts:25](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/odis/bls-blinding-client.ts#L25)* - -**Parameters:** - -Name | Type | ------- | ------ | -`odisPubKey` | string | - -**Returns:** *[WasmBlsBlindingClient](_odis_bls_blinding_client_.wasmblsblindingclient.md)* - -## Methods - -### blindMessage - -▸ **blindMessage**(`base64PhoneNumber`: string): *Promise‹string›* - -*Defined in [packages/sdk/identity/src/odis/bls-blinding-client.ts:39](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/odis/bls-blinding-client.ts#L39)* - -**Parameters:** - -Name | Type | ------- | ------ | -`base64PhoneNumber` | string | - -**Returns:** *Promise‹string›* - -___ - -### unblindAndVerifyMessage - -▸ **unblindAndVerifyMessage**(`base64BlindSig`: string): *Promise‹string›* - -*Defined in [packages/sdk/identity/src/odis/bls-blinding-client.ts:47](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/odis/bls-blinding-client.ts#L47)* - -**Parameters:** - -Name | Type | ------- | ------ | -`base64BlindSig` | string | - -**Returns:** *Promise‹string›* diff --git a/packages/docs/developer-resources/identity/reference/classes/_offchain_accessors_authorized_signer_.authorizedsigneraccessor.md b/packages/docs/developer-resources/identity/reference/classes/_offchain_accessors_authorized_signer_.authorizedsigneraccessor.md deleted file mode 100644 index b8bb6c1853d..00000000000 --- a/packages/docs/developer-resources/identity/reference/classes/_offchain_accessors_authorized_signer_.authorizedsigneraccessor.md +++ /dev/null @@ -1,107 +0,0 @@ -# Class: AuthorizedSignerAccessor - -## Hierarchy - -* **AuthorizedSignerAccessor** - -## Index - -### Constructors - -* [constructor](_offchain_accessors_authorized_signer_.authorizedsigneraccessor.md#constructor) - -### Properties - -* [basePath](_offchain_accessors_authorized_signer_.authorizedsigneraccessor.md#basepath) -* [read](_offchain_accessors_authorized_signer_.authorizedsigneraccessor.md#read) -* [wrapper](_offchain_accessors_authorized_signer_.authorizedsigneraccessor.md#readonly-wrapper) - -### Methods - -* [readAsResult](_offchain_accessors_authorized_signer_.authorizedsigneraccessor.md#readasresult) -* [write](_offchain_accessors_authorized_signer_.authorizedsigneraccessor.md#write) - -## Constructors - -### constructor - -\+ **new AuthorizedSignerAccessor**(`wrapper`: [OffchainDataWrapper](_offchain_data_wrapper_.offchaindatawrapper.md)): *[AuthorizedSignerAccessor](_offchain_accessors_authorized_signer_.authorizedsigneraccessor.md)* - -*Defined in [packages/sdk/identity/src/offchain/accessors/authorized-signer.ts:17](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain/accessors/authorized-signer.ts#L17)* - -**Parameters:** - -Name | Type | ------- | ------ | -`wrapper` | [OffchainDataWrapper](_offchain_data_wrapper_.offchaindatawrapper.md) | - -**Returns:** *[AuthorizedSignerAccessor](_offchain_accessors_authorized_signer_.authorizedsigneraccessor.md)* - -## Properties - -### basePath - -• **basePath**: *string* = "/account/authorizedSigners" - -*Defined in [packages/sdk/identity/src/offchain/accessors/authorized-signer.ts:17](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain/accessors/authorized-signer.ts#L17)* - -___ - -### read - -• **read**: *function* = makeAsyncThrowable(this.readAsResult.bind(this)) - -*Defined in [packages/sdk/identity/src/offchain/accessors/authorized-signer.ts:35](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain/accessors/authorized-signer.ts#L35)* - -#### Type declaration: - -▸ (...`args`: TArgs): *Promise‹TResult›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | TArgs | - -___ - -### `Readonly` wrapper - -• **wrapper**: *[OffchainDataWrapper](_offchain_data_wrapper_.offchaindatawrapper.md)* - -*Defined in [packages/sdk/identity/src/offchain/accessors/authorized-signer.ts:18](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain/accessors/authorized-signer.ts#L18)* - -## Methods - -### readAsResult - -▸ **readAsResult**(`account`: Address, `signer`: Address): *Promise‹Result‹object, [SchemaErrors](../modules/_offchain_accessors_errors_.md#schemaerrors)››* - -*Defined in [packages/sdk/identity/src/offchain/accessors/authorized-signer.ts:20](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain/accessors/authorized-signer.ts#L20)* - -**Parameters:** - -Name | Type | ------- | ------ | -`account` | Address | -`signer` | Address | - -**Returns:** *Promise‹Result‹object, [SchemaErrors](../modules/_offchain_accessors_errors_.md#schemaerrors)››* - -___ - -### write - -▸ **write**(`signer`: Address, `proofOfPossession`: string, `filteredDataPaths`: string): *Promise‹[OffchainErrors](../modules/_offchain_data_wrapper_.md#offchainerrors) | void›* - -*Defined in [packages/sdk/identity/src/offchain/accessors/authorized-signer.ts:37](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain/accessors/authorized-signer.ts#L37)* - -**Parameters:** - -Name | Type | ------- | ------ | -`signer` | Address | -`proofOfPossession` | string | -`filteredDataPaths` | string | - -**Returns:** *Promise‹[OffchainErrors](../modules/_offchain_data_wrapper_.md#offchainerrors) | void›* diff --git a/packages/docs/developer-resources/identity/reference/classes/_offchain_accessors_binary_.privatebinaryaccessor.md b/packages/docs/developer-resources/identity/reference/classes/_offchain_accessors_binary_.privatebinaryaccessor.md deleted file mode 100644 index 49d0687dc58..00000000000 --- a/packages/docs/developer-resources/identity/reference/classes/_offchain_accessors_binary_.privatebinaryaccessor.md +++ /dev/null @@ -1,117 +0,0 @@ -# Class: PrivateBinaryAccessor - -Schema for writing any encrypted binary data. - -## Hierarchy - -* **PrivateBinaryAccessor** - - ↳ [PrivatePictureAccessor](_offchain_accessors_pictures_.privatepictureaccessor.md) - -## Implements - -* [PrivateAccessor](../interfaces/_offchain_accessors_interfaces_.privateaccessor.md)‹Buffer› - -## Index - -### Constructors - -* [constructor](_offchain_accessors_binary_.privatebinaryaccessor.md#constructor) - -### Properties - -* [dataPath](_offchain_accessors_binary_.privatebinaryaccessor.md#readonly-datapath) -* [read](_offchain_accessors_binary_.privatebinaryaccessor.md#read) -* [wrapper](_offchain_accessors_binary_.privatebinaryaccessor.md#readonly-wrapper) - -### Methods - -* [readAsResult](_offchain_accessors_binary_.privatebinaryaccessor.md#readasresult) -* [write](_offchain_accessors_binary_.privatebinaryaccessor.md#write) - -## Constructors - -### constructor - -\+ **new PrivateBinaryAccessor**(`wrapper`: [OffchainDataWrapper](_offchain_data_wrapper_.offchaindatawrapper.md), `dataPath`: string): *[PrivateBinaryAccessor](_offchain_accessors_binary_.privatebinaryaccessor.md)* - -*Defined in [packages/sdk/identity/src/offchain/accessors/binary.ts:41](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain/accessors/binary.ts#L41)* - -**Parameters:** - -Name | Type | ------- | ------ | -`wrapper` | [OffchainDataWrapper](_offchain_data_wrapper_.offchaindatawrapper.md) | -`dataPath` | string | - -**Returns:** *[PrivateBinaryAccessor](_offchain_accessors_binary_.privatebinaryaccessor.md)* - -## Properties - -### `Readonly` dataPath - -• **dataPath**: *string* - -*Defined in [packages/sdk/identity/src/offchain/accessors/binary.ts:42](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain/accessors/binary.ts#L42)* - -___ - -### read - -• **read**: *function* = makeAsyncThrowable(this.readAsResult.bind(this)) - -*Implementation of [PrivateAccessor](../interfaces/_offchain_accessors_interfaces_.privateaccessor.md).[read](../interfaces/_offchain_accessors_interfaces_.privateaccessor.md#read)* - -*Defined in [packages/sdk/identity/src/offchain/accessors/binary.ts:52](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain/accessors/binary.ts#L52)* - -#### Type declaration: - -▸ (...`args`: TArgs): *Promise‹TResult›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | TArgs | - -___ - -### `Readonly` wrapper - -• **wrapper**: *[OffchainDataWrapper](_offchain_data_wrapper_.offchaindatawrapper.md)* - -*Defined in [packages/sdk/identity/src/offchain/accessors/binary.ts:42](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain/accessors/binary.ts#L42)* - -## Methods - -### readAsResult - -▸ **readAsResult**(`account`: Address): *Promise‹Result‹Buffer‹›, [SchemaErrors](../modules/_offchain_accessors_errors_.md#schemaerrors)››* - -*Defined in [packages/sdk/identity/src/offchain/accessors/binary.ts:48](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain/accessors/binary.ts#L48)* - -**Parameters:** - -Name | Type | ------- | ------ | -`account` | Address | - -**Returns:** *Promise‹Result‹Buffer‹›, [SchemaErrors](../modules/_offchain_accessors_errors_.md#schemaerrors)››* - -___ - -### write - -▸ **write**(`data`: Buffer, `toAddresses`: Address[], `symmetricKey?`: Buffer): *Promise‹void | [InvalidDataError](_offchain_accessors_errors_.invaliddataerror.md)‹› | [OffchainError](_offchain_accessors_errors_.offchainerror.md)‹› | [UnknownCiphertext](_offchain_accessors_errors_.unknownciphertext.md)‹› | [UnavailableKey](_offchain_accessors_errors_.unavailablekey.md)‹› | [InvalidKey](_offchain_accessors_errors_.invalidkey.md)‹››* - -*Defined in [packages/sdk/identity/src/offchain/accessors/binary.ts:44](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain/accessors/binary.ts#L44)* - -**Parameters:** - -Name | Type | ------- | ------ | -`data` | Buffer | -`toAddresses` | Address[] | -`symmetricKey?` | Buffer | - -**Returns:** *Promise‹void | [InvalidDataError](_offchain_accessors_errors_.invaliddataerror.md)‹› | [OffchainError](_offchain_accessors_errors_.offchainerror.md)‹› | [UnknownCiphertext](_offchain_accessors_errors_.unknownciphertext.md)‹› | [UnavailableKey](_offchain_accessors_errors_.unavailablekey.md)‹› | [InvalidKey](_offchain_accessors_errors_.invalidkey.md)‹››* diff --git a/packages/docs/developer-resources/identity/reference/classes/_offchain_accessors_binary_.publicbinaryaccessor.md b/packages/docs/developer-resources/identity/reference/classes/_offchain_accessors_binary_.publicbinaryaccessor.md deleted file mode 100644 index 56d34fa7037..00000000000 --- a/packages/docs/developer-resources/identity/reference/classes/_offchain_accessors_binary_.publicbinaryaccessor.md +++ /dev/null @@ -1,115 +0,0 @@ -# Class: PublicBinaryAccessor - -Schema for writing any generic binary data - -## Hierarchy - -* **PublicBinaryAccessor** - - ↳ [PublicPictureAccessor](_offchain_accessors_pictures_.publicpictureaccessor.md) - -## Implements - -* [PublicAccessor](../interfaces/_offchain_accessors_interfaces_.publicaccessor.md)‹Buffer› - -## Index - -### Constructors - -* [constructor](_offchain_accessors_binary_.publicbinaryaccessor.md#constructor) - -### Properties - -* [dataPath](_offchain_accessors_binary_.publicbinaryaccessor.md#readonly-datapath) -* [read](_offchain_accessors_binary_.publicbinaryaccessor.md#read) -* [wrapper](_offchain_accessors_binary_.publicbinaryaccessor.md#readonly-wrapper) - -### Methods - -* [readAsResult](_offchain_accessors_binary_.publicbinaryaccessor.md#readasresult) -* [write](_offchain_accessors_binary_.publicbinaryaccessor.md#write) - -## Constructors - -### constructor - -\+ **new PublicBinaryAccessor**(`wrapper`: [OffchainDataWrapper](_offchain_data_wrapper_.offchaindatawrapper.md), `dataPath`: string): *[PublicBinaryAccessor](_offchain_accessors_binary_.publicbinaryaccessor.md)* - -*Defined in [packages/sdk/identity/src/offchain/accessors/binary.ts:11](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain/accessors/binary.ts#L11)* - -**Parameters:** - -Name | Type | ------- | ------ | -`wrapper` | [OffchainDataWrapper](_offchain_data_wrapper_.offchaindatawrapper.md) | -`dataPath` | string | - -**Returns:** *[PublicBinaryAccessor](_offchain_accessors_binary_.publicbinaryaccessor.md)* - -## Properties - -### `Readonly` dataPath - -• **dataPath**: *string* - -*Defined in [packages/sdk/identity/src/offchain/accessors/binary.ts:12](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain/accessors/binary.ts#L12)* - -___ - -### read - -• **read**: *function* = makeAsyncThrowable(this.readAsResult.bind(this)) - -*Implementation of [PublicAccessor](../interfaces/_offchain_accessors_interfaces_.publicaccessor.md).[read](../interfaces/_offchain_accessors_interfaces_.publicaccessor.md#read)* - -*Defined in [packages/sdk/identity/src/offchain/accessors/binary.ts:35](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain/accessors/binary.ts#L35)* - -#### Type declaration: - -▸ (...`args`: TArgs): *Promise‹TResult›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | TArgs | - -___ - -### `Readonly` wrapper - -• **wrapper**: *[OffchainDataWrapper](_offchain_data_wrapper_.offchaindatawrapper.md)* - -*Defined in [packages/sdk/identity/src/offchain/accessors/binary.ts:12](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain/accessors/binary.ts#L12)* - -## Methods - -### readAsResult - -▸ **readAsResult**(`account`: Address): *Promise‹ErrorResult‹[OffchainError](_offchain_accessors_errors_.offchainerror.md)‹›› | OkResult‹Buffer‹›››* - -*Defined in [packages/sdk/identity/src/offchain/accessors/binary.ts:26](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain/accessors/binary.ts#L26)* - -**Parameters:** - -Name | Type | ------- | ------ | -`account` | Address | - -**Returns:** *Promise‹ErrorResult‹[OffchainError](_offchain_accessors_errors_.offchainerror.md)‹›› | OkResult‹Buffer‹›››* - -___ - -### write - -▸ **write**(`data`: Buffer): *Promise‹undefined | [OffchainError](_offchain_accessors_errors_.offchainerror.md)‹››* - -*Defined in [packages/sdk/identity/src/offchain/accessors/binary.ts:14](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain/accessors/binary.ts#L14)* - -**Parameters:** - -Name | Type | ------- | ------ | -`data` | Buffer | - -**Returns:** *Promise‹undefined | [OffchainError](_offchain_accessors_errors_.offchainerror.md)‹››* diff --git a/packages/docs/developer-resources/identity/reference/classes/_offchain_accessors_errors_.invaliddataerror.md b/packages/docs/developer-resources/identity/reference/classes/_offchain_accessors_errors_.invaliddataerror.md deleted file mode 100644 index 4097cad667a..00000000000 --- a/packages/docs/developer-resources/identity/reference/classes/_offchain_accessors_errors_.invaliddataerror.md +++ /dev/null @@ -1,76 +0,0 @@ -# Class: InvalidDataError - -## Hierarchy - -* RootError‹[InvalidDataError](../enums/_offchain_accessors_errors_.schemaerrortypes.md#invaliddataerror)› - - ↳ **InvalidDataError** - -## Implements - -* BaseError‹[InvalidDataError](../enums/_offchain_accessors_errors_.schemaerrortypes.md#invaliddataerror)› - -## Index - -### Constructors - -* [constructor](_offchain_accessors_errors_.invaliddataerror.md#constructor) - -### Properties - -* [errorType](_offchain_accessors_errors_.invaliddataerror.md#readonly-errortype) -* [message](_offchain_accessors_errors_.invaliddataerror.md#message) -* [name](_offchain_accessors_errors_.invaliddataerror.md#name) -* [stack](_offchain_accessors_errors_.invaliddataerror.md#optional-stack) - -## Constructors - -### constructor - -\+ **new InvalidDataError**(): *[InvalidDataError](_offchain_accessors_errors_.invaliddataerror.md)* - -*Overrides void* - -*Defined in [packages/sdk/identity/src/offchain/accessors/errors.ts:13](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain/accessors/errors.ts#L13)* - -**Returns:** *[InvalidDataError](_offchain_accessors_errors_.invaliddataerror.md)* - -## Properties - -### `Readonly` errorType - -• **errorType**: *[InvalidDataError](../enums/_offchain_accessors_errors_.schemaerrortypes.md#invaliddataerror)* - -*Inherited from [InvalidDataError](_offchain_accessors_errors_.invaliddataerror.md).[errorType](_offchain_accessors_errors_.invaliddataerror.md#readonly-errortype)* - -Defined in packages/sdk/base/lib/result.d.ts:19 - -___ - -### message - -• **message**: *string* - -*Inherited from [InvalidDataError](_offchain_accessors_errors_.invaliddataerror.md).[message](_offchain_accessors_errors_.invaliddataerror.md#message)* - -Defined in node_modules/typescript/lib/lib.es5.d.ts:974 - -___ - -### name - -• **name**: *string* - -*Inherited from [InvalidDataError](_offchain_accessors_errors_.invaliddataerror.md).[name](_offchain_accessors_errors_.invaliddataerror.md#name)* - -Defined in node_modules/typescript/lib/lib.es5.d.ts:973 - -___ - -### `Optional` stack - -• **stack**? : *undefined | string* - -*Inherited from [InvalidDataError](_offchain_accessors_errors_.invaliddataerror.md).[stack](_offchain_accessors_errors_.invaliddataerror.md#optional-stack)* - -Defined in node_modules/typescript/lib/lib.es5.d.ts:975 diff --git a/packages/docs/developer-resources/identity/reference/classes/_offchain_accessors_errors_.invalidkey.md b/packages/docs/developer-resources/identity/reference/classes/_offchain_accessors_errors_.invalidkey.md deleted file mode 100644 index 835c8a5005f..00000000000 --- a/packages/docs/developer-resources/identity/reference/classes/_offchain_accessors_errors_.invalidkey.md +++ /dev/null @@ -1,76 +0,0 @@ -# Class: InvalidKey - -## Hierarchy - -* RootError‹[InvalidKey](../enums/_offchain_accessors_errors_.schemaerrortypes.md#invalidkey)› - - ↳ **InvalidKey** - -## Implements - -* BaseError‹[InvalidKey](../enums/_offchain_accessors_errors_.schemaerrortypes.md#invalidkey)› - -## Index - -### Constructors - -* [constructor](_offchain_accessors_errors_.invalidkey.md#constructor) - -### Properties - -* [errorType](_offchain_accessors_errors_.invalidkey.md#readonly-errortype) -* [message](_offchain_accessors_errors_.invalidkey.md#message) -* [name](_offchain_accessors_errors_.invalidkey.md#name) -* [stack](_offchain_accessors_errors_.invalidkey.md#optional-stack) - -## Constructors - -### constructor - -\+ **new InvalidKey**(): *[InvalidKey](_offchain_accessors_errors_.invalidkey.md)* - -*Overrides void* - -*Defined in [packages/sdk/identity/src/offchain/accessors/errors.ts:38](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain/accessors/errors.ts#L38)* - -**Returns:** *[InvalidKey](_offchain_accessors_errors_.invalidkey.md)* - -## Properties - -### `Readonly` errorType - -• **errorType**: *[InvalidKey](../enums/_offchain_accessors_errors_.schemaerrortypes.md#invalidkey)* - -*Inherited from [InvalidDataError](_offchain_accessors_errors_.invaliddataerror.md).[errorType](_offchain_accessors_errors_.invaliddataerror.md#readonly-errortype)* - -Defined in packages/sdk/base/lib/result.d.ts:19 - -___ - -### message - -• **message**: *string* - -*Inherited from [InvalidDataError](_offchain_accessors_errors_.invaliddataerror.md).[message](_offchain_accessors_errors_.invaliddataerror.md#message)* - -Defined in node_modules/typescript/lib/lib.es5.d.ts:974 - -___ - -### name - -• **name**: *string* - -*Inherited from [InvalidDataError](_offchain_accessors_errors_.invaliddataerror.md).[name](_offchain_accessors_errors_.invaliddataerror.md#name)* - -Defined in node_modules/typescript/lib/lib.es5.d.ts:973 - -___ - -### `Optional` stack - -• **stack**? : *undefined | string* - -*Inherited from [InvalidDataError](_offchain_accessors_errors_.invaliddataerror.md).[stack](_offchain_accessors_errors_.invaliddataerror.md#optional-stack)* - -Defined in node_modules/typescript/lib/lib.es5.d.ts:975 diff --git a/packages/docs/developer-resources/identity/reference/classes/_offchain_accessors_errors_.offchainerror.md b/packages/docs/developer-resources/identity/reference/classes/_offchain_accessors_errors_.offchainerror.md deleted file mode 100644 index f4e009d53b2..00000000000 --- a/packages/docs/developer-resources/identity/reference/classes/_offchain_accessors_errors_.offchainerror.md +++ /dev/null @@ -1,91 +0,0 @@ -# Class: OffchainError - -## Hierarchy - -* RootError‹[OffchainError](../enums/_offchain_accessors_errors_.schemaerrortypes.md#offchainerror)› - - ↳ **OffchainError** - -## Implements - -* BaseError‹[OffchainError](../enums/_offchain_accessors_errors_.schemaerrortypes.md#offchainerror)› - -## Index - -### Constructors - -* [constructor](_offchain_accessors_errors_.offchainerror.md#constructor) - -### Properties - -* [error](_offchain_accessors_errors_.offchainerror.md#readonly-error) -* [errorType](_offchain_accessors_errors_.offchainerror.md#readonly-errortype) -* [message](_offchain_accessors_errors_.offchainerror.md#message) -* [name](_offchain_accessors_errors_.offchainerror.md#name) -* [stack](_offchain_accessors_errors_.offchainerror.md#optional-stack) - -## Constructors - -### constructor - -\+ **new OffchainError**(`error`: [OffchainErrors](../modules/_offchain_data_wrapper_.md#offchainerrors)): *[OffchainError](_offchain_accessors_errors_.offchainerror.md)* - -*Overrides void* - -*Defined in [packages/sdk/identity/src/offchain/accessors/errors.ts:19](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain/accessors/errors.ts#L19)* - -**Parameters:** - -Name | Type | ------- | ------ | -`error` | [OffchainErrors](../modules/_offchain_data_wrapper_.md#offchainerrors) | - -**Returns:** *[OffchainError](_offchain_accessors_errors_.offchainerror.md)* - -## Properties - -### `Readonly` error - -• **error**: *[OffchainErrors](../modules/_offchain_data_wrapper_.md#offchainerrors)* - -*Defined in [packages/sdk/identity/src/offchain/accessors/errors.ts:20](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain/accessors/errors.ts#L20)* - -___ - -### `Readonly` errorType - -• **errorType**: *[OffchainError](../enums/_offchain_accessors_errors_.schemaerrortypes.md#offchainerror)* - -*Inherited from [InvalidDataError](_offchain_accessors_errors_.invaliddataerror.md).[errorType](_offchain_accessors_errors_.invaliddataerror.md#readonly-errortype)* - -Defined in packages/sdk/base/lib/result.d.ts:19 - -___ - -### message - -• **message**: *string* - -*Inherited from [InvalidDataError](_offchain_accessors_errors_.invaliddataerror.md).[message](_offchain_accessors_errors_.invaliddataerror.md#message)* - -Defined in node_modules/typescript/lib/lib.es5.d.ts:974 - -___ - -### name - -• **name**: *string* - -*Inherited from [InvalidDataError](_offchain_accessors_errors_.invaliddataerror.md).[name](_offchain_accessors_errors_.invaliddataerror.md#name)* - -Defined in node_modules/typescript/lib/lib.es5.d.ts:973 - -___ - -### `Optional` stack - -• **stack**? : *undefined | string* - -*Inherited from [InvalidDataError](_offchain_accessors_errors_.invaliddataerror.md).[stack](_offchain_accessors_errors_.invaliddataerror.md#optional-stack)* - -Defined in node_modules/typescript/lib/lib.es5.d.ts:975 diff --git a/packages/docs/developer-resources/identity/reference/classes/_offchain_accessors_errors_.unavailablekey.md b/packages/docs/developer-resources/identity/reference/classes/_offchain_accessors_errors_.unavailablekey.md deleted file mode 100644 index 19ad57b51df..00000000000 --- a/packages/docs/developer-resources/identity/reference/classes/_offchain_accessors_errors_.unavailablekey.md +++ /dev/null @@ -1,91 +0,0 @@ -# Class: UnavailableKey - -## Hierarchy - -* RootError‹[UnavailableKey](../enums/_offchain_accessors_errors_.schemaerrortypes.md#unavailablekey)› - - ↳ **UnavailableKey** - -## Implements - -* BaseError‹[UnavailableKey](../enums/_offchain_accessors_errors_.schemaerrortypes.md#unavailablekey)› - -## Index - -### Constructors - -* [constructor](_offchain_accessors_errors_.unavailablekey.md#constructor) - -### Properties - -* [account](_offchain_accessors_errors_.unavailablekey.md#readonly-account) -* [errorType](_offchain_accessors_errors_.unavailablekey.md#readonly-errortype) -* [message](_offchain_accessors_errors_.unavailablekey.md#message) -* [name](_offchain_accessors_errors_.unavailablekey.md#name) -* [stack](_offchain_accessors_errors_.unavailablekey.md#optional-stack) - -## Constructors - -### constructor - -\+ **new UnavailableKey**(`account`: Address): *[UnavailableKey](_offchain_accessors_errors_.unavailablekey.md)* - -*Overrides void* - -*Defined in [packages/sdk/identity/src/offchain/accessors/errors.ts:31](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain/accessors/errors.ts#L31)* - -**Parameters:** - -Name | Type | ------- | ------ | -`account` | Address | - -**Returns:** *[UnavailableKey](_offchain_accessors_errors_.unavailablekey.md)* - -## Properties - -### `Readonly` account - -• **account**: *Address* - -*Defined in [packages/sdk/identity/src/offchain/accessors/errors.ts:32](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain/accessors/errors.ts#L32)* - -___ - -### `Readonly` errorType - -• **errorType**: *[UnavailableKey](../enums/_offchain_accessors_errors_.schemaerrortypes.md#unavailablekey)* - -*Inherited from [InvalidDataError](_offchain_accessors_errors_.invaliddataerror.md).[errorType](_offchain_accessors_errors_.invaliddataerror.md#readonly-errortype)* - -Defined in packages/sdk/base/lib/result.d.ts:19 - -___ - -### message - -• **message**: *string* - -*Inherited from [InvalidDataError](_offchain_accessors_errors_.invaliddataerror.md).[message](_offchain_accessors_errors_.invaliddataerror.md#message)* - -Defined in node_modules/typescript/lib/lib.es5.d.ts:974 - -___ - -### name - -• **name**: *string* - -*Inherited from [InvalidDataError](_offchain_accessors_errors_.invaliddataerror.md).[name](_offchain_accessors_errors_.invaliddataerror.md#name)* - -Defined in node_modules/typescript/lib/lib.es5.d.ts:973 - -___ - -### `Optional` stack - -• **stack**? : *undefined | string* - -*Inherited from [InvalidDataError](_offchain_accessors_errors_.invaliddataerror.md).[stack](_offchain_accessors_errors_.invaliddataerror.md#optional-stack)* - -Defined in node_modules/typescript/lib/lib.es5.d.ts:975 diff --git a/packages/docs/developer-resources/identity/reference/classes/_offchain_accessors_errors_.unknownciphertext.md b/packages/docs/developer-resources/identity/reference/classes/_offchain_accessors_errors_.unknownciphertext.md deleted file mode 100644 index cdd99fac5d7..00000000000 --- a/packages/docs/developer-resources/identity/reference/classes/_offchain_accessors_errors_.unknownciphertext.md +++ /dev/null @@ -1,76 +0,0 @@ -# Class: UnknownCiphertext - -## Hierarchy - -* RootError‹[UnknownCiphertext](../enums/_offchain_accessors_errors_.schemaerrortypes.md#unknownciphertext)› - - ↳ **UnknownCiphertext** - -## Implements - -* BaseError‹[UnknownCiphertext](../enums/_offchain_accessors_errors_.schemaerrortypes.md#unknownciphertext)› - -## Index - -### Constructors - -* [constructor](_offchain_accessors_errors_.unknownciphertext.md#constructor) - -### Properties - -* [errorType](_offchain_accessors_errors_.unknownciphertext.md#readonly-errortype) -* [message](_offchain_accessors_errors_.unknownciphertext.md#message) -* [name](_offchain_accessors_errors_.unknownciphertext.md#name) -* [stack](_offchain_accessors_errors_.unknownciphertext.md#optional-stack) - -## Constructors - -### constructor - -\+ **new UnknownCiphertext**(): *[UnknownCiphertext](_offchain_accessors_errors_.unknownciphertext.md)* - -*Overrides void* - -*Defined in [packages/sdk/identity/src/offchain/accessors/errors.ts:25](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain/accessors/errors.ts#L25)* - -**Returns:** *[UnknownCiphertext](_offchain_accessors_errors_.unknownciphertext.md)* - -## Properties - -### `Readonly` errorType - -• **errorType**: *[UnknownCiphertext](../enums/_offchain_accessors_errors_.schemaerrortypes.md#unknownciphertext)* - -*Inherited from [InvalidDataError](_offchain_accessors_errors_.invaliddataerror.md).[errorType](_offchain_accessors_errors_.invaliddataerror.md#readonly-errortype)* - -Defined in packages/sdk/base/lib/result.d.ts:19 - -___ - -### message - -• **message**: *string* - -*Inherited from [InvalidDataError](_offchain_accessors_errors_.invaliddataerror.md).[message](_offchain_accessors_errors_.invaliddataerror.md#message)* - -Defined in node_modules/typescript/lib/lib.es5.d.ts:974 - -___ - -### name - -• **name**: *string* - -*Inherited from [InvalidDataError](_offchain_accessors_errors_.invaliddataerror.md).[name](_offchain_accessors_errors_.invaliddataerror.md#name)* - -Defined in node_modules/typescript/lib/lib.es5.d.ts:973 - -___ - -### `Optional` stack - -• **stack**? : *undefined | string* - -*Inherited from [InvalidDataError](_offchain_accessors_errors_.invaliddataerror.md).[stack](_offchain_accessors_errors_.invaliddataerror.md#optional-stack)* - -Defined in node_modules/typescript/lib/lib.es5.d.ts:975 diff --git a/packages/docs/developer-resources/identity/reference/classes/_offchain_accessors_name_.privatenameaccessor.md b/packages/docs/developer-resources/identity/reference/classes/_offchain_accessors_name_.privatenameaccessor.md deleted file mode 100644 index d4b1835452d..00000000000 --- a/packages/docs/developer-resources/identity/reference/classes/_offchain_accessors_name_.privatenameaccessor.md +++ /dev/null @@ -1,137 +0,0 @@ -# Class: PrivateNameAccessor - -## Hierarchy - -* [PrivateSimpleAccessor](_offchain_accessors_simple_.privatesimpleaccessor.md)‹[NameType](../modules/_offchain_accessors_name_.md#nametype)› - - ↳ **PrivateNameAccessor** - -## Implements - -* [PrivateAccessor](../interfaces/_offchain_accessors_interfaces_.privateaccessor.md)‹[NameType](../modules/_offchain_accessors_name_.md#nametype)› - -## Index - -### Constructors - -* [constructor](_offchain_accessors_name_.privatenameaccessor.md#constructor) - -### Properties - -* [dataPath](_offchain_accessors_name_.privatenameaccessor.md#readonly-datapath) -* [read](_offchain_accessors_name_.privatenameaccessor.md#read) -* [type](_offchain_accessors_name_.privatenameaccessor.md#readonly-type) -* [wrapper](_offchain_accessors_name_.privatenameaccessor.md#readonly-wrapper) - -### Methods - -* [readAsResult](_offchain_accessors_name_.privatenameaccessor.md#readasresult) -* [write](_offchain_accessors_name_.privatenameaccessor.md#write) - -## Constructors - -### constructor - -\+ **new PrivateNameAccessor**(`wrapper`: [OffchainDataWrapper](_offchain_data_wrapper_.offchaindatawrapper.md)): *[PrivateNameAccessor](_offchain_accessors_name_.privatenameaccessor.md)* - -*Overrides [PrivateSimpleAccessor](_offchain_accessors_simple_.privatesimpleaccessor.md).[constructor](_offchain_accessors_simple_.privatesimpleaccessor.md#constructor)* - -*Defined in [packages/sdk/identity/src/offchain/accessors/name.ts:17](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain/accessors/name.ts#L17)* - -**Parameters:** - -Name | Type | ------- | ------ | -`wrapper` | [OffchainDataWrapper](_offchain_data_wrapper_.offchaindatawrapper.md) | - -**Returns:** *[PrivateNameAccessor](_offchain_accessors_name_.privatenameaccessor.md)* - -## Properties - -### `Readonly` dataPath - -• **dataPath**: *string* - -*Inherited from [PrivateSimpleAccessor](_offchain_accessors_simple_.privatesimpleaccessor.md).[dataPath](_offchain_accessors_simple_.privatesimpleaccessor.md#readonly-datapath)* - -*Defined in [packages/sdk/identity/src/offchain/accessors/simple.ts:72](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain/accessors/simple.ts#L72)* - -___ - -### read - -• **read**: *function* = makeAsyncThrowable(this.readAsResult.bind(this)) - -*Implementation of [PrivateAccessor](../interfaces/_offchain_accessors_interfaces_.privateaccessor.md).[read](../interfaces/_offchain_accessors_interfaces_.privateaccessor.md#read)* - -*Inherited from [PrivateSimpleAccessor](_offchain_accessors_simple_.privatesimpleaccessor.md).[read](_offchain_accessors_simple_.privatesimpleaccessor.md#read)* - -*Defined in [packages/sdk/identity/src/offchain/accessors/simple.ts:93](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain/accessors/simple.ts#L93)* - -#### Type declaration: - -▸ (...`args`: TArgs): *Promise‹TResult›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | TArgs | - -___ - -### `Readonly` type - -• **type**: *Type‹[NameType](../modules/_offchain_accessors_name_.md#nametype)›* - -*Inherited from [PrivateSimpleAccessor](_offchain_accessors_simple_.privatesimpleaccessor.md).[type](_offchain_accessors_simple_.privatesimpleaccessor.md#readonly-type)* - -*Defined in [packages/sdk/identity/src/offchain/accessors/simple.ts:71](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain/accessors/simple.ts#L71)* - -___ - -### `Readonly` wrapper - -• **wrapper**: *[OffchainDataWrapper](_offchain_data_wrapper_.offchaindatawrapper.md)* - -*Overrides [PrivateSimpleAccessor](_offchain_accessors_simple_.privatesimpleaccessor.md).[wrapper](_offchain_accessors_simple_.privatesimpleaccessor.md#readonly-wrapper)* - -*Defined in [packages/sdk/identity/src/offchain/accessors/name.ts:18](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain/accessors/name.ts#L18)* - -## Methods - -### readAsResult - -▸ **readAsResult**(`account`: Address): *Promise‹Result‹[NameType](../modules/_offchain_accessors_name_.md#nametype), [SchemaErrors](../modules/_offchain_accessors_errors_.md#schemaerrors)››* - -*Inherited from [PrivateSimpleAccessor](_offchain_accessors_simple_.privatesimpleaccessor.md).[readAsResult](_offchain_accessors_simple_.privatesimpleaccessor.md#readasresult)* - -*Defined in [packages/sdk/identity/src/offchain/accessors/simple.ts:83](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain/accessors/simple.ts#L83)* - -**Parameters:** - -Name | Type | ------- | ------ | -`account` | Address | - -**Returns:** *Promise‹Result‹[NameType](../modules/_offchain_accessors_name_.md#nametype), [SchemaErrors](../modules/_offchain_accessors_errors_.md#schemaerrors)››* - -___ - -### write - -▸ **write**(`data`: [NameType](../modules/_offchain_accessors_name_.md#nametype), `toAddresses`: Address[], `symmetricKey?`: Buffer): *Promise‹void | [InvalidDataError](_offchain_accessors_errors_.invaliddataerror.md)‹› | [OffchainError](_offchain_accessors_errors_.offchainerror.md)‹› | [UnknownCiphertext](_offchain_accessors_errors_.unknownciphertext.md)‹› | [UnavailableKey](_offchain_accessors_errors_.unavailablekey.md)‹› | [InvalidKey](_offchain_accessors_errors_.invalidkey.md)‹››* - -*Inherited from [PrivateSimpleAccessor](_offchain_accessors_simple_.privatesimpleaccessor.md).[write](_offchain_accessors_simple_.privatesimpleaccessor.md#write)* - -*Defined in [packages/sdk/identity/src/offchain/accessors/simple.ts:75](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain/accessors/simple.ts#L75)* - -**Parameters:** - -Name | Type | ------- | ------ | -`data` | [NameType](../modules/_offchain_accessors_name_.md#nametype) | -`toAddresses` | Address[] | -`symmetricKey?` | Buffer | - -**Returns:** *Promise‹void | [InvalidDataError](_offchain_accessors_errors_.invaliddataerror.md)‹› | [OffchainError](_offchain_accessors_errors_.offchainerror.md)‹› | [UnknownCiphertext](_offchain_accessors_errors_.unknownciphertext.md)‹› | [UnavailableKey](_offchain_accessors_errors_.unavailablekey.md)‹› | [InvalidKey](_offchain_accessors_errors_.invalidkey.md)‹››* diff --git a/packages/docs/developer-resources/identity/reference/classes/_offchain_accessors_name_.publicnameaccessor.md b/packages/docs/developer-resources/identity/reference/classes/_offchain_accessors_name_.publicnameaccessor.md deleted file mode 100644 index 558023dad7a..00000000000 --- a/packages/docs/developer-resources/identity/reference/classes/_offchain_accessors_name_.publicnameaccessor.md +++ /dev/null @@ -1,135 +0,0 @@ -# Class: PublicNameAccessor - -## Hierarchy - -* [PublicSimpleAccessor](_offchain_accessors_simple_.publicsimpleaccessor.md)‹[NameType](../modules/_offchain_accessors_name_.md#nametype)› - - ↳ **PublicNameAccessor** - -## Implements - -* [PublicAccessor](../interfaces/_offchain_accessors_interfaces_.publicaccessor.md)‹[NameType](../modules/_offchain_accessors_name_.md#nametype)› - -## Index - -### Constructors - -* [constructor](_offchain_accessors_name_.publicnameaccessor.md#constructor) - -### Properties - -* [dataPath](_offchain_accessors_name_.publicnameaccessor.md#readonly-datapath) -* [read](_offchain_accessors_name_.publicnameaccessor.md#read) -* [type](_offchain_accessors_name_.publicnameaccessor.md#readonly-type) -* [wrapper](_offchain_accessors_name_.publicnameaccessor.md#readonly-wrapper) - -### Methods - -* [readAsResult](_offchain_accessors_name_.publicnameaccessor.md#readasresult) -* [write](_offchain_accessors_name_.publicnameaccessor.md#write) - -## Constructors - -### constructor - -\+ **new PublicNameAccessor**(`wrapper`: [OffchainDataWrapper](_offchain_data_wrapper_.offchaindatawrapper.md)): *[PublicNameAccessor](_offchain_accessors_name_.publicnameaccessor.md)* - -*Overrides [PublicSimpleAccessor](_offchain_accessors_simple_.publicsimpleaccessor.md).[constructor](_offchain_accessors_simple_.publicsimpleaccessor.md#constructor)* - -*Defined in [packages/sdk/identity/src/offchain/accessors/name.ts:11](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain/accessors/name.ts#L11)* - -**Parameters:** - -Name | Type | ------- | ------ | -`wrapper` | [OffchainDataWrapper](_offchain_data_wrapper_.offchaindatawrapper.md) | - -**Returns:** *[PublicNameAccessor](_offchain_accessors_name_.publicnameaccessor.md)* - -## Properties - -### `Readonly` dataPath - -• **dataPath**: *string* - -*Inherited from [PublicSimpleAccessor](_offchain_accessors_simple_.publicsimpleaccessor.md).[dataPath](_offchain_accessors_simple_.publicsimpleaccessor.md#readonly-datapath)* - -*Defined in [packages/sdk/identity/src/offchain/accessors/simple.ts:21](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain/accessors/simple.ts#L21)* - -___ - -### read - -• **read**: *function* = makeAsyncThrowable(this.readAsResult.bind(this)) - -*Implementation of [PublicAccessor](../interfaces/_offchain_accessors_interfaces_.publicaccessor.md).[read](../interfaces/_offchain_accessors_interfaces_.publicaccessor.md#read)* - -*Inherited from [PublicSimpleAccessor](_offchain_accessors_simple_.publicsimpleaccessor.md).[read](_offchain_accessors_simple_.publicsimpleaccessor.md#read)* - -*Defined in [packages/sdk/identity/src/offchain/accessors/simple.ts:61](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain/accessors/simple.ts#L61)* - -#### Type declaration: - -▸ (...`args`: TArgs): *Promise‹TResult›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | TArgs | - -___ - -### `Readonly` type - -• **type**: *Type‹[NameType](../modules/_offchain_accessors_name_.md#nametype)›* - -*Inherited from [PublicSimpleAccessor](_offchain_accessors_simple_.publicsimpleaccessor.md).[type](_offchain_accessors_simple_.publicsimpleaccessor.md#readonly-type)* - -*Defined in [packages/sdk/identity/src/offchain/accessors/simple.ts:20](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain/accessors/simple.ts#L20)* - -___ - -### `Readonly` wrapper - -• **wrapper**: *[OffchainDataWrapper](_offchain_data_wrapper_.offchaindatawrapper.md)* - -*Overrides [PublicSimpleAccessor](_offchain_accessors_simple_.publicsimpleaccessor.md).[wrapper](_offchain_accessors_simple_.publicsimpleaccessor.md#readonly-wrapper)* - -*Defined in [packages/sdk/identity/src/offchain/accessors/name.ts:12](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain/accessors/name.ts#L12)* - -## Methods - -### readAsResult - -▸ **readAsResult**(`account`: Address): *Promise‹Result‹[NameType](../modules/_offchain_accessors_name_.md#nametype), [SchemaErrors](../modules/_offchain_accessors_errors_.md#schemaerrors)››* - -*Inherited from [PublicSimpleAccessor](_offchain_accessors_simple_.publicsimpleaccessor.md).[readAsResult](_offchain_accessors_simple_.publicsimpleaccessor.md#readasresult)* - -*Defined in [packages/sdk/identity/src/offchain/accessors/simple.ts:46](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain/accessors/simple.ts#L46)* - -**Parameters:** - -Name | Type | ------- | ------ | -`account` | Address | - -**Returns:** *Promise‹Result‹[NameType](../modules/_offchain_accessors_name_.md#nametype), [SchemaErrors](../modules/_offchain_accessors_errors_.md#schemaerrors)››* - -___ - -### write - -▸ **write**(`data`: [NameType](../modules/_offchain_accessors_name_.md#nametype)): *Promise‹undefined | [InvalidDataError](_offchain_accessors_errors_.invaliddataerror.md)‹› | [OffchainError](_offchain_accessors_errors_.offchainerror.md)‹››* - -*Inherited from [PublicSimpleAccessor](_offchain_accessors_simple_.publicsimpleaccessor.md).[write](_offchain_accessors_simple_.publicsimpleaccessor.md#write)* - -*Defined in [packages/sdk/identity/src/offchain/accessors/simple.ts:30](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain/accessors/simple.ts#L30)* - -**Parameters:** - -Name | Type | ------- | ------ | -`data` | [NameType](../modules/_offchain_accessors_name_.md#nametype) | - -**Returns:** *Promise‹undefined | [InvalidDataError](_offchain_accessors_errors_.invaliddataerror.md)‹› | [OffchainError](_offchain_accessors_errors_.offchainerror.md)‹››* diff --git a/packages/docs/developer-resources/identity/reference/classes/_offchain_accessors_pictures_.privatepictureaccessor.md b/packages/docs/developer-resources/identity/reference/classes/_offchain_accessors_pictures_.privatepictureaccessor.md deleted file mode 100644 index 17de5e4636a..00000000000 --- a/packages/docs/developer-resources/identity/reference/classes/_offchain_accessors_pictures_.privatepictureaccessor.md +++ /dev/null @@ -1,126 +0,0 @@ -# Class: PrivatePictureAccessor - -## Hierarchy - -* [PrivateBinaryAccessor](_offchain_accessors_binary_.privatebinaryaccessor.md) - - ↳ **PrivatePictureAccessor** - -## Implements - -* [PrivateAccessor](../interfaces/_offchain_accessors_interfaces_.privateaccessor.md)‹Buffer› - -## Index - -### Constructors - -* [constructor](_offchain_accessors_pictures_.privatepictureaccessor.md#constructor) - -### Properties - -* [dataPath](_offchain_accessors_pictures_.privatepictureaccessor.md#readonly-datapath) -* [read](_offchain_accessors_pictures_.privatepictureaccessor.md#read) -* [wrapper](_offchain_accessors_pictures_.privatepictureaccessor.md#readonly-wrapper) - -### Methods - -* [readAsResult](_offchain_accessors_pictures_.privatepictureaccessor.md#readasresult) -* [write](_offchain_accessors_pictures_.privatepictureaccessor.md#write) - -## Constructors - -### constructor - -\+ **new PrivatePictureAccessor**(`wrapper`: [OffchainDataWrapper](_offchain_data_wrapper_.offchaindatawrapper.md)): *[PrivatePictureAccessor](_offchain_accessors_pictures_.privatepictureaccessor.md)* - -*Overrides [PrivateBinaryAccessor](_offchain_accessors_binary_.privatebinaryaccessor.md).[constructor](_offchain_accessors_binary_.privatebinaryaccessor.md#constructor)* - -*Defined in [packages/sdk/identity/src/offchain/accessors/pictures.ts:10](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain/accessors/pictures.ts#L10)* - -**Parameters:** - -Name | Type | ------- | ------ | -`wrapper` | [OffchainDataWrapper](_offchain_data_wrapper_.offchaindatawrapper.md) | - -**Returns:** *[PrivatePictureAccessor](_offchain_accessors_pictures_.privatepictureaccessor.md)* - -## Properties - -### `Readonly` dataPath - -• **dataPath**: *string* - -*Inherited from [PrivateBinaryAccessor](_offchain_accessors_binary_.privatebinaryaccessor.md).[dataPath](_offchain_accessors_binary_.privatebinaryaccessor.md#readonly-datapath)* - -*Defined in [packages/sdk/identity/src/offchain/accessors/binary.ts:42](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain/accessors/binary.ts#L42)* - -___ - -### read - -• **read**: *function* = makeAsyncThrowable(this.readAsResult.bind(this)) - -*Implementation of [PrivateAccessor](../interfaces/_offchain_accessors_interfaces_.privateaccessor.md).[read](../interfaces/_offchain_accessors_interfaces_.privateaccessor.md#read)* - -*Inherited from [PrivateBinaryAccessor](_offchain_accessors_binary_.privatebinaryaccessor.md).[read](_offchain_accessors_binary_.privatebinaryaccessor.md#read)* - -*Defined in [packages/sdk/identity/src/offchain/accessors/binary.ts:52](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain/accessors/binary.ts#L52)* - -#### Type declaration: - -▸ (...`args`: TArgs): *Promise‹TResult›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | TArgs | - -___ - -### `Readonly` wrapper - -• **wrapper**: *[OffchainDataWrapper](_offchain_data_wrapper_.offchaindatawrapper.md)* - -*Overrides [PrivateBinaryAccessor](_offchain_accessors_binary_.privatebinaryaccessor.md).[wrapper](_offchain_accessors_binary_.privatebinaryaccessor.md#readonly-wrapper)* - -*Defined in [packages/sdk/identity/src/offchain/accessors/pictures.ts:11](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain/accessors/pictures.ts#L11)* - -## Methods - -### readAsResult - -▸ **readAsResult**(`account`: Address): *Promise‹Result‹Buffer‹›, [SchemaErrors](../modules/_offchain_accessors_errors_.md#schemaerrors)››* - -*Inherited from [PrivateBinaryAccessor](_offchain_accessors_binary_.privatebinaryaccessor.md).[readAsResult](_offchain_accessors_binary_.privatebinaryaccessor.md#readasresult)* - -*Defined in [packages/sdk/identity/src/offchain/accessors/binary.ts:48](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain/accessors/binary.ts#L48)* - -**Parameters:** - -Name | Type | ------- | ------ | -`account` | Address | - -**Returns:** *Promise‹Result‹Buffer‹›, [SchemaErrors](../modules/_offchain_accessors_errors_.md#schemaerrors)››* - -___ - -### write - -▸ **write**(`data`: Buffer, `toAddresses`: Address[], `symmetricKey?`: Buffer): *Promise‹void | [InvalidDataError](_offchain_accessors_errors_.invaliddataerror.md)‹› | [OffchainError](_offchain_accessors_errors_.offchainerror.md)‹› | [UnknownCiphertext](_offchain_accessors_errors_.unknownciphertext.md)‹› | [UnavailableKey](_offchain_accessors_errors_.unavailablekey.md)‹› | [InvalidKey](_offchain_accessors_errors_.invalidkey.md)‹››* - -*Inherited from [PrivateBinaryAccessor](_offchain_accessors_binary_.privatebinaryaccessor.md).[write](_offchain_accessors_binary_.privatebinaryaccessor.md#write)* - -*Defined in [packages/sdk/identity/src/offchain/accessors/binary.ts:44](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain/accessors/binary.ts#L44)* - -**Parameters:** - -Name | Type | ------- | ------ | -`data` | Buffer | -`toAddresses` | Address[] | -`symmetricKey?` | Buffer | - -**Returns:** *Promise‹void | [InvalidDataError](_offchain_accessors_errors_.invaliddataerror.md)‹› | [OffchainError](_offchain_accessors_errors_.offchainerror.md)‹› | [UnknownCiphertext](_offchain_accessors_errors_.unknownciphertext.md)‹› | [UnavailableKey](_offchain_accessors_errors_.unavailablekey.md)‹› | [InvalidKey](_offchain_accessors_errors_.invalidkey.md)‹››* diff --git a/packages/docs/developer-resources/identity/reference/classes/_offchain_accessors_pictures_.publicpictureaccessor.md b/packages/docs/developer-resources/identity/reference/classes/_offchain_accessors_pictures_.publicpictureaccessor.md deleted file mode 100644 index 1dbccbeefbc..00000000000 --- a/packages/docs/developer-resources/identity/reference/classes/_offchain_accessors_pictures_.publicpictureaccessor.md +++ /dev/null @@ -1,124 +0,0 @@ -# Class: PublicPictureAccessor - -## Hierarchy - -* [PublicBinaryAccessor](_offchain_accessors_binary_.publicbinaryaccessor.md) - - ↳ **PublicPictureAccessor** - -## Implements - -* [PublicAccessor](../interfaces/_offchain_accessors_interfaces_.publicaccessor.md)‹Buffer› - -## Index - -### Constructors - -* [constructor](_offchain_accessors_pictures_.publicpictureaccessor.md#constructor) - -### Properties - -* [dataPath](_offchain_accessors_pictures_.publicpictureaccessor.md#readonly-datapath) -* [read](_offchain_accessors_pictures_.publicpictureaccessor.md#read) -* [wrapper](_offchain_accessors_pictures_.publicpictureaccessor.md#readonly-wrapper) - -### Methods - -* [readAsResult](_offchain_accessors_pictures_.publicpictureaccessor.md#readasresult) -* [write](_offchain_accessors_pictures_.publicpictureaccessor.md#write) - -## Constructors - -### constructor - -\+ **new PublicPictureAccessor**(`wrapper`: [OffchainDataWrapper](_offchain_data_wrapper_.offchaindatawrapper.md)): *[PublicPictureAccessor](_offchain_accessors_pictures_.publicpictureaccessor.md)* - -*Overrides [PublicBinaryAccessor](_offchain_accessors_binary_.publicbinaryaccessor.md).[constructor](_offchain_accessors_binary_.publicbinaryaccessor.md#constructor)* - -*Defined in [packages/sdk/identity/src/offchain/accessors/pictures.ts:4](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain/accessors/pictures.ts#L4)* - -**Parameters:** - -Name | Type | ------- | ------ | -`wrapper` | [OffchainDataWrapper](_offchain_data_wrapper_.offchaindatawrapper.md) | - -**Returns:** *[PublicPictureAccessor](_offchain_accessors_pictures_.publicpictureaccessor.md)* - -## Properties - -### `Readonly` dataPath - -• **dataPath**: *string* - -*Inherited from [PublicBinaryAccessor](_offchain_accessors_binary_.publicbinaryaccessor.md).[dataPath](_offchain_accessors_binary_.publicbinaryaccessor.md#readonly-datapath)* - -*Defined in [packages/sdk/identity/src/offchain/accessors/binary.ts:12](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain/accessors/binary.ts#L12)* - -___ - -### read - -• **read**: *function* = makeAsyncThrowable(this.readAsResult.bind(this)) - -*Implementation of [PublicAccessor](../interfaces/_offchain_accessors_interfaces_.publicaccessor.md).[read](../interfaces/_offchain_accessors_interfaces_.publicaccessor.md#read)* - -*Inherited from [PublicBinaryAccessor](_offchain_accessors_binary_.publicbinaryaccessor.md).[read](_offchain_accessors_binary_.publicbinaryaccessor.md#read)* - -*Defined in [packages/sdk/identity/src/offchain/accessors/binary.ts:35](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain/accessors/binary.ts#L35)* - -#### Type declaration: - -▸ (...`args`: TArgs): *Promise‹TResult›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | TArgs | - -___ - -### `Readonly` wrapper - -• **wrapper**: *[OffchainDataWrapper](_offchain_data_wrapper_.offchaindatawrapper.md)* - -*Overrides [PublicBinaryAccessor](_offchain_accessors_binary_.publicbinaryaccessor.md).[wrapper](_offchain_accessors_binary_.publicbinaryaccessor.md#readonly-wrapper)* - -*Defined in [packages/sdk/identity/src/offchain/accessors/pictures.ts:5](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain/accessors/pictures.ts#L5)* - -## Methods - -### readAsResult - -▸ **readAsResult**(`account`: Address): *Promise‹ErrorResult‹[OffchainError](_offchain_accessors_errors_.offchainerror.md)‹›› | OkResult‹Buffer‹›››* - -*Inherited from [PublicBinaryAccessor](_offchain_accessors_binary_.publicbinaryaccessor.md).[readAsResult](_offchain_accessors_binary_.publicbinaryaccessor.md#readasresult)* - -*Defined in [packages/sdk/identity/src/offchain/accessors/binary.ts:26](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain/accessors/binary.ts#L26)* - -**Parameters:** - -Name | Type | ------- | ------ | -`account` | Address | - -**Returns:** *Promise‹ErrorResult‹[OffchainError](_offchain_accessors_errors_.offchainerror.md)‹›› | OkResult‹Buffer‹›››* - -___ - -### write - -▸ **write**(`data`: Buffer): *Promise‹undefined | [OffchainError](_offchain_accessors_errors_.offchainerror.md)‹››* - -*Inherited from [PublicBinaryAccessor](_offchain_accessors_binary_.publicbinaryaccessor.md).[write](_offchain_accessors_binary_.publicbinaryaccessor.md#write)* - -*Defined in [packages/sdk/identity/src/offchain/accessors/binary.ts:14](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain/accessors/binary.ts#L14)* - -**Parameters:** - -Name | Type | ------- | ------ | -`data` | Buffer | - -**Returns:** *Promise‹undefined | [OffchainError](_offchain_accessors_errors_.offchainerror.md)‹››* diff --git a/packages/docs/developer-resources/identity/reference/classes/_offchain_accessors_simple_.privatesimpleaccessor.md b/packages/docs/developer-resources/identity/reference/classes/_offchain_accessors_simple_.privatesimpleaccessor.md deleted file mode 100644 index 5b6f1e9022e..00000000000 --- a/packages/docs/developer-resources/identity/reference/classes/_offchain_accessors_simple_.privatesimpleaccessor.md +++ /dev/null @@ -1,132 +0,0 @@ -# Class: PrivateSimpleAccessor <**DataType**> - -A generic schema for writing and reading encrypted objects to and from storage. Passing -in a type parameter is supported for runtime type safety. - -## Type parameters - -▪ **DataType** - -## Hierarchy - -* **PrivateSimpleAccessor** - - ↳ [PrivateNameAccessor](_offchain_accessors_name_.privatenameaccessor.md) - -## Implements - -* [PrivateAccessor](../interfaces/_offchain_accessors_interfaces_.privateaccessor.md)‹DataType› - -## Index - -### Constructors - -* [constructor](_offchain_accessors_simple_.privatesimpleaccessor.md#constructor) - -### Properties - -* [dataPath](_offchain_accessors_simple_.privatesimpleaccessor.md#readonly-datapath) -* [read](_offchain_accessors_simple_.privatesimpleaccessor.md#read) -* [type](_offchain_accessors_simple_.privatesimpleaccessor.md#readonly-type) -* [wrapper](_offchain_accessors_simple_.privatesimpleaccessor.md#readonly-wrapper) - -### Methods - -* [readAsResult](_offchain_accessors_simple_.privatesimpleaccessor.md#readasresult) -* [write](_offchain_accessors_simple_.privatesimpleaccessor.md#write) - -## Constructors - -### constructor - -\+ **new PrivateSimpleAccessor**(`wrapper`: [OffchainDataWrapper](_offchain_data_wrapper_.offchaindatawrapper.md), `type`: Type‹DataType›, `dataPath`: string): *[PrivateSimpleAccessor](_offchain_accessors_simple_.privatesimpleaccessor.md)* - -*Defined in [packages/sdk/identity/src/offchain/accessors/simple.ts:68](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain/accessors/simple.ts#L68)* - -**Parameters:** - -Name | Type | ------- | ------ | -`wrapper` | [OffchainDataWrapper](_offchain_data_wrapper_.offchaindatawrapper.md) | -`type` | Type‹DataType› | -`dataPath` | string | - -**Returns:** *[PrivateSimpleAccessor](_offchain_accessors_simple_.privatesimpleaccessor.md)* - -## Properties - -### `Readonly` dataPath - -• **dataPath**: *string* - -*Defined in [packages/sdk/identity/src/offchain/accessors/simple.ts:72](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain/accessors/simple.ts#L72)* - -___ - -### read - -• **read**: *function* = makeAsyncThrowable(this.readAsResult.bind(this)) - -*Implementation of [PrivateAccessor](../interfaces/_offchain_accessors_interfaces_.privateaccessor.md).[read](../interfaces/_offchain_accessors_interfaces_.privateaccessor.md#read)* - -*Defined in [packages/sdk/identity/src/offchain/accessors/simple.ts:93](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain/accessors/simple.ts#L93)* - -#### Type declaration: - -▸ (...`args`: TArgs): *Promise‹TResult›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | TArgs | - -___ - -### `Readonly` type - -• **type**: *Type‹DataType›* - -*Defined in [packages/sdk/identity/src/offchain/accessors/simple.ts:71](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain/accessors/simple.ts#L71)* - -___ - -### `Readonly` wrapper - -• **wrapper**: *[OffchainDataWrapper](_offchain_data_wrapper_.offchaindatawrapper.md)* - -*Defined in [packages/sdk/identity/src/offchain/accessors/simple.ts:70](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain/accessors/simple.ts#L70)* - -## Methods - -### readAsResult - -▸ **readAsResult**(`account`: Address): *Promise‹Result‹DataType, [SchemaErrors](../modules/_offchain_accessors_errors_.md#schemaerrors)››* - -*Defined in [packages/sdk/identity/src/offchain/accessors/simple.ts:83](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain/accessors/simple.ts#L83)* - -**Parameters:** - -Name | Type | ------- | ------ | -`account` | Address | - -**Returns:** *Promise‹Result‹DataType, [SchemaErrors](../modules/_offchain_accessors_errors_.md#schemaerrors)››* - -___ - -### write - -▸ **write**(`data`: DataType, `toAddresses`: Address[], `symmetricKey?`: Buffer): *Promise‹void | [InvalidDataError](_offchain_accessors_errors_.invaliddataerror.md)‹› | [OffchainError](_offchain_accessors_errors_.offchainerror.md)‹› | [UnknownCiphertext](_offchain_accessors_errors_.unknownciphertext.md)‹› | [UnavailableKey](_offchain_accessors_errors_.unavailablekey.md)‹› | [InvalidKey](_offchain_accessors_errors_.invalidkey.md)‹››* - -*Defined in [packages/sdk/identity/src/offchain/accessors/simple.ts:75](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain/accessors/simple.ts#L75)* - -**Parameters:** - -Name | Type | ------- | ------ | -`data` | DataType | -`toAddresses` | Address[] | -`symmetricKey?` | Buffer | - -**Returns:** *Promise‹void | [InvalidDataError](_offchain_accessors_errors_.invaliddataerror.md)‹› | [OffchainError](_offchain_accessors_errors_.offchainerror.md)‹› | [UnknownCiphertext](_offchain_accessors_errors_.unknownciphertext.md)‹› | [UnavailableKey](_offchain_accessors_errors_.unavailablekey.md)‹› | [InvalidKey](_offchain_accessors_errors_.invalidkey.md)‹››* diff --git a/packages/docs/developer-resources/identity/reference/classes/_offchain_accessors_simple_.publicsimpleaccessor.md b/packages/docs/developer-resources/identity/reference/classes/_offchain_accessors_simple_.publicsimpleaccessor.md deleted file mode 100644 index ad9270857c3..00000000000 --- a/packages/docs/developer-resources/identity/reference/classes/_offchain_accessors_simple_.publicsimpleaccessor.md +++ /dev/null @@ -1,130 +0,0 @@ -# Class: PublicSimpleAccessor <**DataType**> - -A generic schema for reading and writing objects to and from storage. Passing -in a type parameter is supported for runtime type safety. - -## Type parameters - -▪ **DataType** - -## Hierarchy - -* **PublicSimpleAccessor** - - ↳ [PublicNameAccessor](_offchain_accessors_name_.publicnameaccessor.md) - -## Implements - -* [PublicAccessor](../interfaces/_offchain_accessors_interfaces_.publicaccessor.md)‹DataType› - -## Index - -### Constructors - -* [constructor](_offchain_accessors_simple_.publicsimpleaccessor.md#constructor) - -### Properties - -* [dataPath](_offchain_accessors_simple_.publicsimpleaccessor.md#readonly-datapath) -* [read](_offchain_accessors_simple_.publicsimpleaccessor.md#read) -* [type](_offchain_accessors_simple_.publicsimpleaccessor.md#readonly-type) -* [wrapper](_offchain_accessors_simple_.publicsimpleaccessor.md#readonly-wrapper) - -### Methods - -* [readAsResult](_offchain_accessors_simple_.publicsimpleaccessor.md#readasresult) -* [write](_offchain_accessors_simple_.publicsimpleaccessor.md#write) - -## Constructors - -### constructor - -\+ **new PublicSimpleAccessor**(`wrapper`: [OffchainDataWrapper](_offchain_data_wrapper_.offchaindatawrapper.md), `type`: Type‹DataType›, `dataPath`: string): *[PublicSimpleAccessor](_offchain_accessors_simple_.publicsimpleaccessor.md)* - -*Defined in [packages/sdk/identity/src/offchain/accessors/simple.ts:17](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain/accessors/simple.ts#L17)* - -**Parameters:** - -Name | Type | ------- | ------ | -`wrapper` | [OffchainDataWrapper](_offchain_data_wrapper_.offchaindatawrapper.md) | -`type` | Type‹DataType› | -`dataPath` | string | - -**Returns:** *[PublicSimpleAccessor](_offchain_accessors_simple_.publicsimpleaccessor.md)* - -## Properties - -### `Readonly` dataPath - -• **dataPath**: *string* - -*Defined in [packages/sdk/identity/src/offchain/accessors/simple.ts:21](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain/accessors/simple.ts#L21)* - -___ - -### read - -• **read**: *function* = makeAsyncThrowable(this.readAsResult.bind(this)) - -*Implementation of [PublicAccessor](../interfaces/_offchain_accessors_interfaces_.publicaccessor.md).[read](../interfaces/_offchain_accessors_interfaces_.publicaccessor.md#read)* - -*Defined in [packages/sdk/identity/src/offchain/accessors/simple.ts:61](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain/accessors/simple.ts#L61)* - -#### Type declaration: - -▸ (...`args`: TArgs): *Promise‹TResult›* - -**Parameters:** - -Name | Type | ------- | ------ | -`...args` | TArgs | - -___ - -### `Readonly` type - -• **type**: *Type‹DataType›* - -*Defined in [packages/sdk/identity/src/offchain/accessors/simple.ts:20](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain/accessors/simple.ts#L20)* - -___ - -### `Readonly` wrapper - -• **wrapper**: *[OffchainDataWrapper](_offchain_data_wrapper_.offchaindatawrapper.md)* - -*Defined in [packages/sdk/identity/src/offchain/accessors/simple.ts:19](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain/accessors/simple.ts#L19)* - -## Methods - -### readAsResult - -▸ **readAsResult**(`account`: Address): *Promise‹Result‹DataType, [SchemaErrors](../modules/_offchain_accessors_errors_.md#schemaerrors)››* - -*Defined in [packages/sdk/identity/src/offchain/accessors/simple.ts:46](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain/accessors/simple.ts#L46)* - -**Parameters:** - -Name | Type | ------- | ------ | -`account` | Address | - -**Returns:** *Promise‹Result‹DataType, [SchemaErrors](../modules/_offchain_accessors_errors_.md#schemaerrors)››* - -___ - -### write - -▸ **write**(`data`: DataType): *Promise‹undefined | [InvalidDataError](_offchain_accessors_errors_.invaliddataerror.md)‹› | [OffchainError](_offchain_accessors_errors_.offchainerror.md)‹››* - -*Defined in [packages/sdk/identity/src/offchain/accessors/simple.ts:30](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain/accessors/simple.ts#L30)* - -**Parameters:** - -Name | Type | ------- | ------ | -`data` | DataType | - -**Returns:** *Promise‹undefined | [InvalidDataError](_offchain_accessors_errors_.invaliddataerror.md)‹› | [OffchainError](_offchain_accessors_errors_.offchainerror.md)‹››* diff --git a/packages/docs/developer-resources/identity/reference/classes/_offchain_data_wrapper_.offchaindatawrapper.md b/packages/docs/developer-resources/identity/reference/classes/_offchain_data_wrapper_.offchaindatawrapper.md deleted file mode 100644 index 2b3eeaeaae6..00000000000 --- a/packages/docs/developer-resources/identity/reference/classes/_offchain_data_wrapper_.offchaindatawrapper.md +++ /dev/null @@ -1,123 +0,0 @@ -# Class: OffchainDataWrapper - -## Hierarchy - -* **OffchainDataWrapper** - -## Index - -### Constructors - -* [constructor](_offchain_data_wrapper_.offchaindatawrapper.md#constructor) - -### Properties - -* [kit](_offchain_data_wrapper_.offchaindatawrapper.md#readonly-kit) -* [readDataFrom](_offchain_data_wrapper_.offchaindatawrapper.md#readdatafrom) -* [self](_offchain_data_wrapper_.offchaindatawrapper.md#readonly-self) -* [signer](_offchain_data_wrapper_.offchaindatawrapper.md#signer) -* [storageWriter](_offchain_data_wrapper_.offchaindatawrapper.md#storagewriter) - -### Methods - -* [readDataFromAsResult](_offchain_data_wrapper_.offchaindatawrapper.md#readdatafromasresult) -* [writeDataTo](_offchain_data_wrapper_.offchaindatawrapper.md#writedatato) - -## Constructors - -### constructor - -\+ **new OffchainDataWrapper**(`self`: string, `kit`: ContractKit, `signer?`: undefined | string): *[OffchainDataWrapper](_offchain_data_wrapper_.offchaindatawrapper.md)* - -*Defined in [packages/sdk/identity/src/offchain-data-wrapper.ts:56](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain-data-wrapper.ts#L56)* - -**Parameters:** - -Name | Type | ------- | ------ | -`self` | string | -`kit` | ContractKit | -`signer?` | undefined | string | - -**Returns:** *[OffchainDataWrapper](_offchain_data_wrapper_.offchaindatawrapper.md)* - -## Properties - -### `Readonly` kit - -• **kit**: *ContractKit* - -*Defined in [packages/sdk/identity/src/offchain-data-wrapper.ts:58](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain-data-wrapper.ts#L58)* - -___ - -### readDataFrom - -• **readDataFrom**: *Object* = makeAsyncThrowable(this.readDataFromAsResult.bind(this)) - -*Defined in [packages/sdk/identity/src/offchain-data-wrapper.ts:93](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain-data-wrapper.ts#L93)* - -___ - -### `Readonly` self - -• **self**: *string* - -*Defined in [packages/sdk/identity/src/offchain-data-wrapper.ts:58](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain-data-wrapper.ts#L58)* - -___ - -### signer - -• **signer**: *string* - -*Defined in [packages/sdk/identity/src/offchain-data-wrapper.ts:56](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain-data-wrapper.ts#L56)* - -___ - -### storageWriter - -• **storageWriter**: *[StorageWriter](_offchain_storage_writers_.storagewriter.md) | undefined* - -*Defined in [packages/sdk/identity/src/offchain-data-wrapper.ts:55](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain-data-wrapper.ts#L55)* - -## Methods - -### readDataFromAsResult - -▸ **readDataFromAsResult**<**DataType**>(`account`: Address, `dataPath`: string, `checkOffchainSigners`: boolean, `type?`: t.Type‹DataType›): *Promise‹Result‹Buffer, [OffchainErrors](../modules/_offchain_data_wrapper_.md#offchainerrors)››* - -*Defined in [packages/sdk/identity/src/offchain-data-wrapper.ts:62](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain-data-wrapper.ts#L62)* - -**Type parameters:** - -▪ **DataType** - -**Parameters:** - -Name | Type | ------- | ------ | -`account` | Address | -`dataPath` | string | -`checkOffchainSigners` | boolean | -`type?` | t.Type‹DataType› | - -**Returns:** *Promise‹Result‹Buffer, [OffchainErrors](../modules/_offchain_data_wrapper_.md#offchainerrors)››* - -___ - -### writeDataTo - -▸ **writeDataTo**(`data`: Buffer, `signature`: Buffer, `dataPath`: string): *Promise‹[OffchainErrors](../modules/_offchain_data_wrapper_.md#offchainerrors) | void›* - -*Defined in [packages/sdk/identity/src/offchain-data-wrapper.ts:95](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain-data-wrapper.ts#L95)* - -**Parameters:** - -Name | Type | ------- | ------ | -`data` | Buffer | -`signature` | Buffer | -`dataPath` | string | - -**Returns:** *Promise‹[OffchainErrors](../modules/_offchain_data_wrapper_.md#offchainerrors) | void›* diff --git a/packages/docs/developer-resources/identity/reference/classes/_offchain_storage_writers_.awsstoragewriter.md b/packages/docs/developer-resources/identity/reference/classes/_offchain_storage_writers_.awsstoragewriter.md deleted file mode 100644 index ec9041799bc..00000000000 --- a/packages/docs/developer-resources/identity/reference/classes/_offchain_storage_writers_.awsstoragewriter.md +++ /dev/null @@ -1,78 +0,0 @@ -# Class: AwsStorageWriter - -## Hierarchy - - ↳ [LocalStorageWriter](_offchain_storage_writers_.localstoragewriter.md) - - ↳ **AwsStorageWriter** - -## Index - -### Constructors - -* [constructor](_offchain_storage_writers_.awsstoragewriter.md#constructor) - -### Properties - -* [local](_offchain_storage_writers_.awsstoragewriter.md#readonly-local) -* [root](_offchain_storage_writers_.awsstoragewriter.md#readonly-root) - -### Methods - -* [write](_offchain_storage_writers_.awsstoragewriter.md#write) - -## Constructors - -### constructor - -\+ **new AwsStorageWriter**(`local`: string, `bucket`: string): *[AwsStorageWriter](_offchain_storage_writers_.awsstoragewriter.md)* - -*Overrides [LocalStorageWriter](_offchain_storage_writers_.localstoragewriter.md).[constructor](_offchain_storage_writers_.localstoragewriter.md#constructor)* - -*Defined in [packages/sdk/identity/src/offchain/storage-writers.ts:56](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain/storage-writers.ts#L56)* - -**Parameters:** - -Name | Type | ------- | ------ | -`local` | string | -`bucket` | string | - -**Returns:** *[AwsStorageWriter](_offchain_storage_writers_.awsstoragewriter.md)* - -## Properties - -### `Readonly` local - -• **local**: *string* - -*Defined in [packages/sdk/identity/src/offchain/storage-writers.ts:58](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain/storage-writers.ts#L58)* - -___ - -### `Readonly` root - -• **root**: *string* - -*Inherited from [LocalStorageWriter](_offchain_storage_writers_.localstoragewriter.md).[root](_offchain_storage_writers_.localstoragewriter.md#readonly-root)* - -*Defined in [packages/sdk/identity/src/offchain/storage-writers.ts:13](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain/storage-writers.ts#L13)* - -## Methods - -### write - -▸ **write**(`data`: Buffer, `dataPath`: string): *Promise‹void›* - -*Overrides [LocalStorageWriter](_offchain_storage_writers_.localstoragewriter.md).[write](_offchain_storage_writers_.localstoragewriter.md#write)* - -*Defined in [packages/sdk/identity/src/offchain/storage-writers.ts:63](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain/storage-writers.ts#L63)* - -**Parameters:** - -Name | Type | ------- | ------ | -`data` | Buffer | -`dataPath` | string | - -**Returns:** *Promise‹void›* diff --git a/packages/docs/developer-resources/identity/reference/classes/_offchain_storage_writers_.gitstoragewriter.md b/packages/docs/developer-resources/identity/reference/classes/_offchain_storage_writers_.gitstoragewriter.md deleted file mode 100644 index 7571369241f..00000000000 --- a/packages/docs/developer-resources/identity/reference/classes/_offchain_storage_writers_.gitstoragewriter.md +++ /dev/null @@ -1,68 +0,0 @@ -# Class: GitStorageWriter - -## Hierarchy - - ↳ [LocalStorageWriter](_offchain_storage_writers_.localstoragewriter.md) - - ↳ **GitStorageWriter** - -## Index - -### Constructors - -* [constructor](_offchain_storage_writers_.gitstoragewriter.md#constructor) - -### Properties - -* [root](_offchain_storage_writers_.gitstoragewriter.md#readonly-root) - -### Methods - -* [write](_offchain_storage_writers_.gitstoragewriter.md#write) - -## Constructors - -### constructor - -\+ **new GitStorageWriter**(`root`: string): *[GitStorageWriter](_offchain_storage_writers_.gitstoragewriter.md)* - -*Inherited from [LocalStorageWriter](_offchain_storage_writers_.localstoragewriter.md).[constructor](_offchain_storage_writers_.localstoragewriter.md#constructor)* - -*Defined in [packages/sdk/identity/src/offchain/storage-writers.ts:12](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain/storage-writers.ts#L12)* - -**Parameters:** - -Name | Type | ------- | ------ | -`root` | string | - -**Returns:** *[GitStorageWriter](_offchain_storage_writers_.gitstoragewriter.md)* - -## Properties - -### `Readonly` root - -• **root**: *string* - -*Inherited from [LocalStorageWriter](_offchain_storage_writers_.localstoragewriter.md).[root](_offchain_storage_writers_.localstoragewriter.md#readonly-root)* - -*Defined in [packages/sdk/identity/src/offchain/storage-writers.ts:13](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain/storage-writers.ts#L13)* - -## Methods - -### write - -▸ **write**(`data`: Buffer, `dataPath`: string): *Promise‹void›* - -*Overrides [LocalStorageWriter](_offchain_storage_writers_.localstoragewriter.md).[write](_offchain_storage_writers_.localstoragewriter.md#write)* - -*Defined in [packages/sdk/identity/src/offchain/storage-writers.ts:28](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain/storage-writers.ts#L28)* - -**Parameters:** - -Name | Type | ------- | ------ | -`data` | Buffer | -`dataPath` | string | - -**Returns:** *Promise‹void›* diff --git a/packages/docs/developer-resources/identity/reference/classes/_offchain_storage_writers_.googlestoragewriter.md b/packages/docs/developer-resources/identity/reference/classes/_offchain_storage_writers_.googlestoragewriter.md deleted file mode 100644 index e2065ba2afc..00000000000 --- a/packages/docs/developer-resources/identity/reference/classes/_offchain_storage_writers_.googlestoragewriter.md +++ /dev/null @@ -1,78 +0,0 @@ -# Class: GoogleStorageWriter - -## Hierarchy - - ↳ [LocalStorageWriter](_offchain_storage_writers_.localstoragewriter.md) - - ↳ **GoogleStorageWriter** - -## Index - -### Constructors - -* [constructor](_offchain_storage_writers_.googlestoragewriter.md#constructor) - -### Properties - -* [local](_offchain_storage_writers_.googlestoragewriter.md#readonly-local) -* [root](_offchain_storage_writers_.googlestoragewriter.md#readonly-root) - -### Methods - -* [write](_offchain_storage_writers_.googlestoragewriter.md#write) - -## Constructors - -### constructor - -\+ **new GoogleStorageWriter**(`local`: string, `bucket`: string): *[GoogleStorageWriter](_offchain_storage_writers_.googlestoragewriter.md)* - -*Overrides [LocalStorageWriter](_offchain_storage_writers_.localstoragewriter.md).[constructor](_offchain_storage_writers_.localstoragewriter.md#constructor)* - -*Defined in [packages/sdk/identity/src/offchain/storage-writers.ts:40](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain/storage-writers.ts#L40)* - -**Parameters:** - -Name | Type | ------- | ------ | -`local` | string | -`bucket` | string | - -**Returns:** *[GoogleStorageWriter](_offchain_storage_writers_.googlestoragewriter.md)* - -## Properties - -### `Readonly` local - -• **local**: *string* - -*Defined in [packages/sdk/identity/src/offchain/storage-writers.ts:42](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain/storage-writers.ts#L42)* - -___ - -### `Readonly` root - -• **root**: *string* - -*Inherited from [LocalStorageWriter](_offchain_storage_writers_.localstoragewriter.md).[root](_offchain_storage_writers_.localstoragewriter.md#readonly-root)* - -*Defined in [packages/sdk/identity/src/offchain/storage-writers.ts:13](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain/storage-writers.ts#L13)* - -## Methods - -### write - -▸ **write**(`data`: Buffer, `dataPath`: string): *Promise‹void›* - -*Overrides [LocalStorageWriter](_offchain_storage_writers_.localstoragewriter.md).[write](_offchain_storage_writers_.localstoragewriter.md#write)* - -*Defined in [packages/sdk/identity/src/offchain/storage-writers.ts:47](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain/storage-writers.ts#L47)* - -**Parameters:** - -Name | Type | ------- | ------ | -`data` | Buffer | -`dataPath` | string | - -**Returns:** *Promise‹void›* diff --git a/packages/docs/developer-resources/identity/reference/classes/_offchain_storage_writers_.localstoragewriter.md b/packages/docs/developer-resources/identity/reference/classes/_offchain_storage_writers_.localstoragewriter.md deleted file mode 100644 index a89eb0ce510..00000000000 --- a/packages/docs/developer-resources/identity/reference/classes/_offchain_storage_writers_.localstoragewriter.md +++ /dev/null @@ -1,70 +0,0 @@ -# Class: LocalStorageWriter - -## Hierarchy - -* [StorageWriter](_offchain_storage_writers_.storagewriter.md) - - ↳ **LocalStorageWriter** - - ↳ [GitStorageWriter](_offchain_storage_writers_.gitstoragewriter.md) - - ↳ [GoogleStorageWriter](_offchain_storage_writers_.googlestoragewriter.md) - - ↳ [MockStorageWriter](_offchain_storage_writers_.mockstoragewriter.md) - -## Index - -### Constructors - -* [constructor](_offchain_storage_writers_.localstoragewriter.md#constructor) - -### Properties - -* [root](_offchain_storage_writers_.localstoragewriter.md#readonly-root) - -### Methods - -* [write](_offchain_storage_writers_.localstoragewriter.md#write) - -## Constructors - -### constructor - -\+ **new LocalStorageWriter**(`root`: string): *[LocalStorageWriter](_offchain_storage_writers_.localstoragewriter.md)* - -*Defined in [packages/sdk/identity/src/offchain/storage-writers.ts:12](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain/storage-writers.ts#L12)* - -**Parameters:** - -Name | Type | ------- | ------ | -`root` | string | - -**Returns:** *[LocalStorageWriter](_offchain_storage_writers_.localstoragewriter.md)* - -## Properties - -### `Readonly` root - -• **root**: *string* - -*Defined in [packages/sdk/identity/src/offchain/storage-writers.ts:13](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain/storage-writers.ts#L13)* - -## Methods - -### write - -▸ **write**(`data`: Buffer, `dataPath`: string): *Promise‹void›* - -*Overrides [StorageWriter](_offchain_storage_writers_.storagewriter.md).[write](_offchain_storage_writers_.storagewriter.md#abstract-write)* - -*Defined in [packages/sdk/identity/src/offchain/storage-writers.ts:16](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain/storage-writers.ts#L16)* - -**Parameters:** - -Name | Type | ------- | ------ | -`data` | Buffer | -`dataPath` | string | - -**Returns:** *Promise‹void›* diff --git a/packages/docs/developer-resources/identity/reference/classes/_offchain_storage_writers_.mockstoragewriter.md b/packages/docs/developer-resources/identity/reference/classes/_offchain_storage_writers_.mockstoragewriter.md deleted file mode 100644 index fc63a4dcaba..00000000000 --- a/packages/docs/developer-resources/identity/reference/classes/_offchain_storage_writers_.mockstoragewriter.md +++ /dev/null @@ -1,88 +0,0 @@ -# Class: MockStorageWriter - -## Hierarchy - - ↳ [LocalStorageWriter](_offchain_storage_writers_.localstoragewriter.md) - - ↳ **MockStorageWriter** - -## Index - -### Constructors - -* [constructor](_offchain_storage_writers_.mockstoragewriter.md#constructor) - -### Properties - -* [fetchMock](_offchain_storage_writers_.mockstoragewriter.md#readonly-fetchmock) -* [mockedStorageRoot](_offchain_storage_writers_.mockstoragewriter.md#readonly-mockedstorageroot) -* [root](_offchain_storage_writers_.mockstoragewriter.md#readonly-root) - -### Methods - -* [write](_offchain_storage_writers_.mockstoragewriter.md#write) - -## Constructors - -### constructor - -\+ **new MockStorageWriter**(`root`: string, `mockedStorageRoot`: string, `fetchMock`: any): *[MockStorageWriter](_offchain_storage_writers_.mockstoragewriter.md)* - -*Overrides [LocalStorageWriter](_offchain_storage_writers_.localstoragewriter.md).[constructor](_offchain_storage_writers_.localstoragewriter.md#constructor)* - -*Defined in [packages/sdk/identity/src/offchain/storage-writers.ts:55](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain/storage-writers.ts#L55)* - -**Parameters:** - -Name | Type | ------- | ------ | -`root` | string | -`mockedStorageRoot` | string | -`fetchMock` | any | - -**Returns:** *[MockStorageWriter](_offchain_storage_writers_.mockstoragewriter.md)* - -## Properties - -### `Readonly` fetchMock - -• **fetchMock**: *any* - -*Defined in [packages/sdk/identity/src/offchain/storage-writers.ts:56](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain/storage-writers.ts#L56)* - -___ - -### `Readonly` mockedStorageRoot - -• **mockedStorageRoot**: *string* - -*Defined in [packages/sdk/identity/src/offchain/storage-writers.ts:56](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain/storage-writers.ts#L56)* - -___ - -### `Readonly` root - -• **root**: *string* - -*Overrides [LocalStorageWriter](_offchain_storage_writers_.localstoragewriter.md).[root](_offchain_storage_writers_.localstoragewriter.md#readonly-root)* - -*Defined in [packages/sdk/identity/src/offchain/storage-writers.ts:56](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain/storage-writers.ts#L56)* - -## Methods - -### write - -▸ **write**(`data`: Buffer, `dataPath`: string): *Promise‹void›* - -*Overrides [LocalStorageWriter](_offchain_storage_writers_.localstoragewriter.md).[write](_offchain_storage_writers_.localstoragewriter.md#write)* - -*Defined in [packages/sdk/identity/src/offchain/storage-writers.ts:59](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain/storage-writers.ts#L59)* - -**Parameters:** - -Name | Type | ------- | ------ | -`data` | Buffer | -`dataPath` | string | - -**Returns:** *Promise‹void›* diff --git a/packages/docs/developer-resources/identity/reference/classes/_offchain_storage_writers_.storagewriter.md b/packages/docs/developer-resources/identity/reference/classes/_offchain_storage_writers_.storagewriter.md deleted file mode 100644 index df3fd478486..00000000000 --- a/packages/docs/developer-resources/identity/reference/classes/_offchain_storage_writers_.storagewriter.md +++ /dev/null @@ -1,30 +0,0 @@ -# Class: StorageWriter - -## Hierarchy - -* **StorageWriter** - - ↳ [LocalStorageWriter](_offchain_storage_writers_.localstoragewriter.md) - -## Index - -### Methods - -* [write](_offchain_storage_writers_.storagewriter.md#abstract-write) - -## Methods - -### `Abstract` write - -▸ **write**(`_data`: Buffer, `_dataPath`: string): *Promise‹void›* - -*Defined in [packages/sdk/identity/src/offchain/storage-writers.ts:9](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain/storage-writers.ts#L9)* - -**Parameters:** - -Name | Type | ------- | ------ | -`_data` | Buffer | -`_dataPath` | string | - -**Returns:** *Promise‹void›* diff --git a/packages/docs/developer-resources/identity/reference/enums/_odis_query_.authenticationmethod.md b/packages/docs/developer-resources/identity/reference/enums/_odis_query_.authenticationmethod.md deleted file mode 100644 index 034efb8826e..00000000000 --- a/packages/docs/developer-resources/identity/reference/enums/_odis_query_.authenticationmethod.md +++ /dev/null @@ -1,33 +0,0 @@ -# Enumeration: AuthenticationMethod - -## Index - -### Enumeration members - -* [CUSTOM_SIGNER](_odis_query_.authenticationmethod.md#custom_signer) -* [ENCRYPTION_KEY](_odis_query_.authenticationmethod.md#encryption_key) -* [WALLET_KEY](_odis_query_.authenticationmethod.md#wallet_key) - -## Enumeration members - -### CUSTOM_SIGNER - -• **CUSTOM_SIGNER**: = "custom_signer" - -*Defined in [packages/sdk/identity/src/odis/query.ts:34](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/odis/query.ts#L34)* - -___ - -### ENCRYPTION_KEY - -• **ENCRYPTION_KEY**: = "encryption_key" - -*Defined in [packages/sdk/identity/src/odis/query.ts:33](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/odis/query.ts#L33)* - -___ - -### WALLET_KEY - -• **WALLET_KEY**: = "wallet_key" - -*Defined in [packages/sdk/identity/src/odis/query.ts:32](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/odis/query.ts#L32)* diff --git a/packages/docs/developer-resources/identity/reference/enums/_odis_query_.errormessages.md b/packages/docs/developer-resources/identity/reference/enums/_odis_query_.errormessages.md deleted file mode 100644 index 4e8863682a5..00000000000 --- a/packages/docs/developer-resources/identity/reference/enums/_odis_query_.errormessages.md +++ /dev/null @@ -1,42 +0,0 @@ -# Enumeration: ErrorMessages - -## Index - -### Enumeration members - -* [ODIS_AUTH_ERROR](_odis_query_.errormessages.md#odis_auth_error) -* [ODIS_CLIENT_ERROR](_odis_query_.errormessages.md#odis_client_error) -* [ODIS_INPUT_ERROR](_odis_query_.errormessages.md#odis_input_error) -* [ODIS_QUOTA_ERROR](_odis_query_.errormessages.md#odis_quota_error) - -## Enumeration members - -### ODIS_AUTH_ERROR - -• **ODIS_AUTH_ERROR**: = "odisAuthError" - -*Defined in [packages/sdk/identity/src/odis/query.ts:71](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/odis/query.ts#L71)* - -___ - -### ODIS_CLIENT_ERROR - -• **ODIS_CLIENT_ERROR**: = "Unknown Client Error" - -*Defined in [packages/sdk/identity/src/odis/query.ts:72](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/odis/query.ts#L72)* - -___ - -### ODIS_INPUT_ERROR - -• **ODIS_INPUT_ERROR**: = "odisBadInputError" - -*Defined in [packages/sdk/identity/src/odis/query.ts:70](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/odis/query.ts#L70)* - -___ - -### ODIS_QUOTA_ERROR - -• **ODIS_QUOTA_ERROR**: = "odisQuotaError" - -*Defined in [packages/sdk/identity/src/odis/query.ts:69](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/odis/query.ts#L69)* diff --git a/packages/docs/developer-resources/identity/reference/enums/_offchain_accessors_errors_.schemaerrortypes.md b/packages/docs/developer-resources/identity/reference/enums/_offchain_accessors_errors_.schemaerrortypes.md deleted file mode 100644 index da7fd550b21..00000000000 --- a/packages/docs/developer-resources/identity/reference/enums/_offchain_accessors_errors_.schemaerrortypes.md +++ /dev/null @@ -1,51 +0,0 @@ -# Enumeration: SchemaErrorTypes - -## Index - -### Enumeration members - -* [InvalidDataError](_offchain_accessors_errors_.schemaerrortypes.md#invaliddataerror) -* [InvalidKey](_offchain_accessors_errors_.schemaerrortypes.md#invalidkey) -* [OffchainError](_offchain_accessors_errors_.schemaerrortypes.md#offchainerror) -* [UnavailableKey](_offchain_accessors_errors_.schemaerrortypes.md#unavailablekey) -* [UnknownCiphertext](_offchain_accessors_errors_.schemaerrortypes.md#unknownciphertext) - -## Enumeration members - -### InvalidDataError - -• **InvalidDataError**: = "InvalidDataError" - -*Defined in [packages/sdk/identity/src/offchain/accessors/errors.ts:6](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain/accessors/errors.ts#L6)* - -___ - -### InvalidKey - -• **InvalidKey**: = "InvalidKey" - -*Defined in [packages/sdk/identity/src/offchain/accessors/errors.ts:10](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain/accessors/errors.ts#L10)* - -___ - -### OffchainError - -• **OffchainError**: = "OffchainError" - -*Defined in [packages/sdk/identity/src/offchain/accessors/errors.ts:7](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain/accessors/errors.ts#L7)* - -___ - -### UnavailableKey - -• **UnavailableKey**: = "UnavailableKey" - -*Defined in [packages/sdk/identity/src/offchain/accessors/errors.ts:9](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain/accessors/errors.ts#L9)* - -___ - -### UnknownCiphertext - -• **UnknownCiphertext**: = "UnknownCiphertext" - -*Defined in [packages/sdk/identity/src/offchain/accessors/errors.ts:8](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain/accessors/errors.ts#L8)* diff --git a/packages/docs/developer-resources/identity/reference/enums/_offchain_data_wrapper_.offchainerrortypes.md b/packages/docs/developer-resources/identity/reference/enums/_offchain_data_wrapper_.offchainerrortypes.md deleted file mode 100644 index 0447eb62da6..00000000000 --- a/packages/docs/developer-resources/identity/reference/enums/_offchain_data_wrapper_.offchainerrortypes.md +++ /dev/null @@ -1,42 +0,0 @@ -# Enumeration: OffchainErrorTypes - -## Index - -### Enumeration members - -* [FetchError](_offchain_data_wrapper_.offchainerrortypes.md#fetcherror) -* [InvalidSignature](_offchain_data_wrapper_.offchainerrortypes.md#invalidsignature) -* [NoStorageProvider](_offchain_data_wrapper_.offchainerrortypes.md#nostorageprovider) -* [NoStorageRootProvidedData](_offchain_data_wrapper_.offchainerrortypes.md#nostoragerootprovideddata) - -## Enumeration members - -### FetchError - -• **FetchError**: = "FetchError" - -*Defined in [packages/sdk/identity/src/offchain-data-wrapper.ts:17](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain-data-wrapper.ts#L17)* - -___ - -### InvalidSignature - -• **InvalidSignature**: = "InvalidSignature" - -*Defined in [packages/sdk/identity/src/offchain-data-wrapper.ts:18](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain-data-wrapper.ts#L18)* - -___ - -### NoStorageProvider - -• **NoStorageProvider**: = "NoStorageProvider" - -*Defined in [packages/sdk/identity/src/offchain-data-wrapper.ts:20](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain-data-wrapper.ts#L20)* - -___ - -### NoStorageRootProvidedData - -• **NoStorageRootProvidedData**: = "NoStorageRootProvidedData" - -*Defined in [packages/sdk/identity/src/offchain-data-wrapper.ts:19](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain-data-wrapper.ts#L19)* diff --git a/packages/docs/developer-resources/identity/reference/globals.md b/packages/docs/developer-resources/identity/reference/globals.md deleted file mode 100644 index 760e4ad7201..00000000000 --- a/packages/docs/developer-resources/identity/reference/globals.md +++ /dev/null @@ -1,22 +0,0 @@ -# @celo/identity - -## Index - -### Modules - -* ["odis/bls-blinding-client"](modules/_odis_bls_blinding_client_.md) -* ["odis/matchmaking"](modules/_odis_matchmaking_.md) -* ["odis/phone-number-identifier"](modules/_odis_phone_number_identifier_.md) -* ["odis/query"](modules/_odis_query_.md) -* ["offchain-data-wrapper"](modules/_offchain_data_wrapper_.md) -* ["offchain/accessors/authorized-signer"](modules/_offchain_accessors_authorized_signer_.md) -* ["offchain/accessors/binary"](modules/_offchain_accessors_binary_.md) -* ["offchain/accessors/errors"](modules/_offchain_accessors_errors_.md) -* ["offchain/accessors/interfaces"](modules/_offchain_accessors_interfaces_.md) -* ["offchain/accessors/name"](modules/_offchain_accessors_name_.md) -* ["offchain/accessors/pictures"](modules/_offchain_accessors_pictures_.md) -* ["offchain/accessors/simple"](modules/_offchain_accessors_simple_.md) -* ["offchain/storage-writers"](modules/_offchain_storage_writers_.md) -* ["offchain/utils"](modules/_offchain_utils_.md) -* ["test-utils/setup.global"](modules/_test_utils_setup_global_.md) -* ["test-utils/teardown.global"](modules/_test_utils_teardown_global_.md) diff --git a/packages/docs/developer-resources/identity/reference/interfaces/_odis_bls_blinding_client_.blsblindingclient.md b/packages/docs/developer-resources/identity/reference/interfaces/_odis_bls_blinding_client_.blsblindingclient.md deleted file mode 100644 index 555049809e8..00000000000 --- a/packages/docs/developer-resources/identity/reference/interfaces/_odis_bls_blinding_client_.blsblindingclient.md +++ /dev/null @@ -1,52 +0,0 @@ -# Interface: BlsBlindingClient - -## Hierarchy - -* **BlsBlindingClient** - -## Implemented by - -* [WasmBlsBlindingClient](../classes/_odis_bls_blinding_client_.wasmblsblindingclient.md) - -## Index - -### Properties - -* [blindMessage](_odis_bls_blinding_client_.blsblindingclient.md#blindmessage) -* [unblindAndVerifyMessage](_odis_bls_blinding_client_.blsblindingclient.md#unblindandverifymessage) - -## Properties - -### blindMessage - -• **blindMessage**: *function* - -*Defined in [packages/sdk/identity/src/odis/bls-blinding-client.ts:4](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/odis/bls-blinding-client.ts#L4)* - -#### Type declaration: - -▸ (`base64PhoneNumber`: string): *Promise‹string›* - -**Parameters:** - -Name | Type | ------- | ------ | -`base64PhoneNumber` | string | - -___ - -### unblindAndVerifyMessage - -• **unblindAndVerifyMessage**: *function* - -*Defined in [packages/sdk/identity/src/odis/bls-blinding-client.ts:5](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/odis/bls-blinding-client.ts#L5)* - -#### Type declaration: - -▸ (`blindedMessage`: string): *Promise‹string›* - -**Parameters:** - -Name | Type | ------- | ------ | -`blindedMessage` | string | diff --git a/packages/docs/developer-resources/identity/reference/interfaces/_odis_phone_number_identifier_.phonenumberhashdetails.md b/packages/docs/developer-resources/identity/reference/interfaces/_odis_phone_number_identifier_.phonenumberhashdetails.md deleted file mode 100644 index 70533f7e1b3..00000000000 --- a/packages/docs/developer-resources/identity/reference/interfaces/_odis_phone_number_identifier_.phonenumberhashdetails.md +++ /dev/null @@ -1,37 +0,0 @@ -# Interface: PhoneNumberHashDetails - -## Hierarchy - -* **PhoneNumberHashDetails** - -## Index - -### Properties - -* [e164Number](_odis_phone_number_identifier_.phonenumberhashdetails.md#e164number) -* [pepper](_odis_phone_number_identifier_.phonenumberhashdetails.md#pepper) -* [phoneHash](_odis_phone_number_identifier_.phonenumberhashdetails.md#phonehash) - -## Properties - -### e164Number - -• **e164Number**: *string* - -*Defined in [packages/sdk/identity/src/odis/phone-number-identifier.ts:27](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/odis/phone-number-identifier.ts#L27)* - -___ - -### pepper - -• **pepper**: *string* - -*Defined in [packages/sdk/identity/src/odis/phone-number-identifier.ts:29](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/odis/phone-number-identifier.ts#L29)* - -___ - -### phoneHash - -• **phoneHash**: *string* - -*Defined in [packages/sdk/identity/src/odis/phone-number-identifier.ts:28](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/odis/phone-number-identifier.ts#L28)* diff --git a/packages/docs/developer-resources/identity/reference/interfaces/_odis_query_.customsigner.md b/packages/docs/developer-resources/identity/reference/interfaces/_odis_query_.customsigner.md deleted file mode 100644 index ac247147542..00000000000 --- a/packages/docs/developer-resources/identity/reference/interfaces/_odis_query_.customsigner.md +++ /dev/null @@ -1,38 +0,0 @@ -# Interface: CustomSigner - -## Hierarchy - -* **CustomSigner** - -## Index - -### Properties - -* [authenticationMethod](_odis_query_.customsigner.md#authenticationmethod) -* [customSigner](_odis_query_.customsigner.md#customsigner) - -## Properties - -### authenticationMethod - -• **authenticationMethod**: *[CUSTOM_SIGNER](../enums/_odis_query_.authenticationmethod.md#custom_signer)* - -*Defined in [packages/sdk/identity/src/odis/query.ts:24](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/odis/query.ts#L24)* - -___ - -### customSigner - -• **customSigner**: *function* - -*Defined in [packages/sdk/identity/src/odis/query.ts:25](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/odis/query.ts#L25)* - -#### Type declaration: - -▸ (`body`: string): *Promise‹string›* - -**Parameters:** - -Name | Type | ------- | ------ | -`body` | string | diff --git a/packages/docs/developer-resources/identity/reference/interfaces/_odis_query_.encryptionkeysigner.md b/packages/docs/developer-resources/identity/reference/interfaces/_odis_query_.encryptionkeysigner.md deleted file mode 100644 index 6ddd6c3e6f0..00000000000 --- a/packages/docs/developer-resources/identity/reference/interfaces/_odis_query_.encryptionkeysigner.md +++ /dev/null @@ -1,28 +0,0 @@ -# Interface: EncryptionKeySigner - -## Hierarchy - -* **EncryptionKeySigner** - -## Index - -### Properties - -* [authenticationMethod](_odis_query_.encryptionkeysigner.md#authenticationmethod) -* [rawKey](_odis_query_.encryptionkeysigner.md#rawkey) - -## Properties - -### authenticationMethod - -• **authenticationMethod**: *[ENCRYPTION_KEY](../enums/_odis_query_.authenticationmethod.md#encryption_key)* - -*Defined in [packages/sdk/identity/src/odis/query.ts:19](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/odis/query.ts#L19)* - -___ - -### rawKey - -• **rawKey**: *string* - -*Defined in [packages/sdk/identity/src/odis/query.ts:20](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/odis/query.ts#L20)* diff --git a/packages/docs/developer-resources/identity/reference/interfaces/_odis_query_.matchmakingrequest.md b/packages/docs/developer-resources/identity/reference/interfaces/_odis_query_.matchmakingrequest.md deleted file mode 100644 index b61ee600bb0..00000000000 --- a/packages/docs/developer-resources/identity/reference/interfaces/_odis_query_.matchmakingrequest.md +++ /dev/null @@ -1,83 +0,0 @@ -# Interface: MatchmakingRequest - -## Hierarchy - -* [PhoneNumberPrivacyRequest](_odis_query_.phonenumberprivacyrequest.md) - - ↳ **MatchmakingRequest** - -## Index - -### Properties - -* [account](_odis_query_.matchmakingrequest.md#account) -* [authenticationMethod](_odis_query_.matchmakingrequest.md#authenticationmethod) -* [contactPhoneNumbers](_odis_query_.matchmakingrequest.md#contactphonenumbers) -* [hashedPhoneNumber](_odis_query_.matchmakingrequest.md#hashedphonenumber) -* [sessionID](_odis_query_.matchmakingrequest.md#optional-sessionid) -* [userPhoneNumber](_odis_query_.matchmakingrequest.md#userphonenumber) -* [version](_odis_query_.matchmakingrequest.md#optional-version) - -## Properties - -### account - -• **account**: *string* - -*Inherited from [PhoneNumberPrivacyRequest](_odis_query_.phonenumberprivacyrequest.md).[account](_odis_query_.phonenumberprivacyrequest.md#account)* - -*Defined in [packages/sdk/identity/src/odis/query.ts:38](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/odis/query.ts#L38)* - -___ - -### authenticationMethod - -• **authenticationMethod**: *[AuthenticationMethod](../enums/_odis_query_.authenticationmethod.md)* - -*Inherited from [PhoneNumberPrivacyRequest](_odis_query_.phonenumberprivacyrequest.md).[authenticationMethod](_odis_query_.phonenumberprivacyrequest.md#authenticationmethod)* - -*Defined in [packages/sdk/identity/src/odis/query.ts:39](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/odis/query.ts#L39)* - -___ - -### contactPhoneNumbers - -• **contactPhoneNumbers**: *string[]* - -*Defined in [packages/sdk/identity/src/odis/query.ts:52](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/odis/query.ts#L52)* - -___ - -### hashedPhoneNumber - -• **hashedPhoneNumber**: *string* - -*Defined in [packages/sdk/identity/src/odis/query.ts:53](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/odis/query.ts#L53)* - -___ - -### `Optional` sessionID - -• **sessionID**? : *undefined | string* - -*Inherited from [PhoneNumberPrivacyRequest](_odis_query_.phonenumberprivacyrequest.md).[sessionID](_odis_query_.phonenumberprivacyrequest.md#optional-sessionid)* - -*Defined in [packages/sdk/identity/src/odis/query.ts:41](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/odis/query.ts#L41)* - -___ - -### userPhoneNumber - -• **userPhoneNumber**: *string* - -*Defined in [packages/sdk/identity/src/odis/query.ts:51](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/odis/query.ts#L51)* - -___ - -### `Optional` version - -• **version**? : *undefined | string* - -*Inherited from [PhoneNumberPrivacyRequest](_odis_query_.phonenumberprivacyrequest.md).[version](_odis_query_.phonenumberprivacyrequest.md#optional-version)* - -*Defined in [packages/sdk/identity/src/odis/query.ts:40](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/odis/query.ts#L40)* diff --git a/packages/docs/developer-resources/identity/reference/interfaces/_odis_query_.matchmakingresponse.md b/packages/docs/developer-resources/identity/reference/interfaces/_odis_query_.matchmakingresponse.md deleted file mode 100644 index 48d7fd5921c..00000000000 --- a/packages/docs/developer-resources/identity/reference/interfaces/_odis_query_.matchmakingresponse.md +++ /dev/null @@ -1,28 +0,0 @@ -# Interface: MatchmakingResponse - -## Hierarchy - -* **MatchmakingResponse** - -## Index - -### Properties - -* [matchedContacts](_odis_query_.matchmakingresponse.md#matchedcontacts) -* [success](_odis_query_.matchmakingresponse.md#success) - -## Properties - -### matchedContacts - -• **matchedContacts**: *Array‹object›* - -*Defined in [packages/sdk/identity/src/odis/query.ts:63](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/odis/query.ts#L63)* - -___ - -### success - -• **success**: *boolean* - -*Defined in [packages/sdk/identity/src/odis/query.ts:62](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/odis/query.ts#L62)* diff --git a/packages/docs/developer-resources/identity/reference/interfaces/_odis_query_.phonenumberprivacyrequest.md b/packages/docs/developer-resources/identity/reference/interfaces/_odis_query_.phonenumberprivacyrequest.md deleted file mode 100644 index 259faf6264b..00000000000 --- a/packages/docs/developer-resources/identity/reference/interfaces/_odis_query_.phonenumberprivacyrequest.md +++ /dev/null @@ -1,50 +0,0 @@ -# Interface: PhoneNumberPrivacyRequest - -## Hierarchy - -* **PhoneNumberPrivacyRequest** - - ↳ [SignMessageRequest](_odis_query_.signmessagerequest.md) - - ↳ [MatchmakingRequest](_odis_query_.matchmakingrequest.md) - -## Index - -### Properties - -* [account](_odis_query_.phonenumberprivacyrequest.md#account) -* [authenticationMethod](_odis_query_.phonenumberprivacyrequest.md#authenticationmethod) -* [sessionID](_odis_query_.phonenumberprivacyrequest.md#optional-sessionid) -* [version](_odis_query_.phonenumberprivacyrequest.md#optional-version) - -## Properties - -### account - -• **account**: *string* - -*Defined in [packages/sdk/identity/src/odis/query.ts:38](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/odis/query.ts#L38)* - -___ - -### authenticationMethod - -• **authenticationMethod**: *[AuthenticationMethod](../enums/_odis_query_.authenticationmethod.md)* - -*Defined in [packages/sdk/identity/src/odis/query.ts:39](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/odis/query.ts#L39)* - -___ - -### `Optional` sessionID - -• **sessionID**? : *undefined | string* - -*Defined in [packages/sdk/identity/src/odis/query.ts:41](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/odis/query.ts#L41)* - -___ - -### `Optional` version - -• **version**? : *undefined | string* - -*Defined in [packages/sdk/identity/src/odis/query.ts:40](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/odis/query.ts#L40)* diff --git a/packages/docs/developer-resources/identity/reference/interfaces/_odis_query_.servicecontext.md b/packages/docs/developer-resources/identity/reference/interfaces/_odis_query_.servicecontext.md deleted file mode 100644 index f28bd5e59dd..00000000000 --- a/packages/docs/developer-resources/identity/reference/interfaces/_odis_query_.servicecontext.md +++ /dev/null @@ -1,28 +0,0 @@ -# Interface: ServiceContext - -## Hierarchy - -* **ServiceContext** - -## Index - -### Properties - -* [odisPubKey](_odis_query_.servicecontext.md#odispubkey) -* [odisUrl](_odis_query_.servicecontext.md#odisurl) - -## Properties - -### odisPubKey - -• **odisPubKey**: *string* - -*Defined in [packages/sdk/identity/src/odis/query.ts:77](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/odis/query.ts#L77)* - -___ - -### odisUrl - -• **odisUrl**: *string* - -*Defined in [packages/sdk/identity/src/odis/query.ts:76](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/odis/query.ts#L76)* diff --git a/packages/docs/developer-resources/identity/reference/interfaces/_odis_query_.signmessagerequest.md b/packages/docs/developer-resources/identity/reference/interfaces/_odis_query_.signmessagerequest.md deleted file mode 100644 index 11078598abc..00000000000 --- a/packages/docs/developer-resources/identity/reference/interfaces/_odis_query_.signmessagerequest.md +++ /dev/null @@ -1,83 +0,0 @@ -# Interface: SignMessageRequest - -## Hierarchy - -* [PhoneNumberPrivacyRequest](_odis_query_.phonenumberprivacyrequest.md) - - ↳ **SignMessageRequest** - -## Index - -### Properties - -* [account](_odis_query_.signmessagerequest.md#account) -* [authenticationMethod](_odis_query_.signmessagerequest.md#authenticationmethod) -* [blindedQueryPhoneNumber](_odis_query_.signmessagerequest.md#blindedqueryphonenumber) -* [hashedPhoneNumber](_odis_query_.signmessagerequest.md#optional-hashedphonenumber) -* [sessionID](_odis_query_.signmessagerequest.md#optional-sessionid) -* [timestamp](_odis_query_.signmessagerequest.md#optional-timestamp) -* [version](_odis_query_.signmessagerequest.md#optional-version) - -## Properties - -### account - -• **account**: *string* - -*Inherited from [PhoneNumberPrivacyRequest](_odis_query_.phonenumberprivacyrequest.md).[account](_odis_query_.phonenumberprivacyrequest.md#account)* - -*Defined in [packages/sdk/identity/src/odis/query.ts:38](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/odis/query.ts#L38)* - -___ - -### authenticationMethod - -• **authenticationMethod**: *[AuthenticationMethod](../enums/_odis_query_.authenticationmethod.md)* - -*Inherited from [PhoneNumberPrivacyRequest](_odis_query_.phonenumberprivacyrequest.md).[authenticationMethod](_odis_query_.phonenumberprivacyrequest.md#authenticationmethod)* - -*Defined in [packages/sdk/identity/src/odis/query.ts:39](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/odis/query.ts#L39)* - -___ - -### blindedQueryPhoneNumber - -• **blindedQueryPhoneNumber**: *string* - -*Defined in [packages/sdk/identity/src/odis/query.ts:45](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/odis/query.ts#L45)* - -___ - -### `Optional` hashedPhoneNumber - -• **hashedPhoneNumber**? : *undefined | string* - -*Defined in [packages/sdk/identity/src/odis/query.ts:47](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/odis/query.ts#L47)* - -___ - -### `Optional` sessionID - -• **sessionID**? : *undefined | string* - -*Inherited from [PhoneNumberPrivacyRequest](_odis_query_.phonenumberprivacyrequest.md).[sessionID](_odis_query_.phonenumberprivacyrequest.md#optional-sessionid)* - -*Defined in [packages/sdk/identity/src/odis/query.ts:41](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/odis/query.ts#L41)* - -___ - -### `Optional` timestamp - -• **timestamp**? : *undefined | number* - -*Defined in [packages/sdk/identity/src/odis/query.ts:46](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/odis/query.ts#L46)* - -___ - -### `Optional` version - -• **version**? : *undefined | string* - -*Inherited from [PhoneNumberPrivacyRequest](_odis_query_.phonenumberprivacyrequest.md).[version](_odis_query_.phonenumberprivacyrequest.md#optional-version)* - -*Defined in [packages/sdk/identity/src/odis/query.ts:40](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/odis/query.ts#L40)* diff --git a/packages/docs/developer-resources/identity/reference/interfaces/_odis_query_.signmessageresponse.md b/packages/docs/developer-resources/identity/reference/interfaces/_odis_query_.signmessageresponse.md deleted file mode 100644 index f28e5a12f42..00000000000 --- a/packages/docs/developer-resources/identity/reference/interfaces/_odis_query_.signmessageresponse.md +++ /dev/null @@ -1,28 +0,0 @@ -# Interface: SignMessageResponse - -## Hierarchy - -* **SignMessageResponse** - -## Index - -### Properties - -* [combinedSignature](_odis_query_.signmessageresponse.md#combinedsignature) -* [success](_odis_query_.signmessageresponse.md#success) - -## Properties - -### combinedSignature - -• **combinedSignature**: *string* - -*Defined in [packages/sdk/identity/src/odis/query.ts:58](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/odis/query.ts#L58)* - -___ - -### success - -• **success**: *boolean* - -*Defined in [packages/sdk/identity/src/odis/query.ts:57](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/odis/query.ts#L57)* diff --git a/packages/docs/developer-resources/identity/reference/interfaces/_odis_query_.walletkeysigner.md b/packages/docs/developer-resources/identity/reference/interfaces/_odis_query_.walletkeysigner.md deleted file mode 100644 index 28639c013b4..00000000000 --- a/packages/docs/developer-resources/identity/reference/interfaces/_odis_query_.walletkeysigner.md +++ /dev/null @@ -1,28 +0,0 @@ -# Interface: WalletKeySigner - -## Hierarchy - -* **WalletKeySigner** - -## Index - -### Properties - -* [authenticationMethod](_odis_query_.walletkeysigner.md#authenticationmethod) -* [contractKit](_odis_query_.walletkeysigner.md#contractkit) - -## Properties - -### authenticationMethod - -• **authenticationMethod**: *[WALLET_KEY](../enums/_odis_query_.authenticationmethod.md#wallet_key)* - -*Defined in [packages/sdk/identity/src/odis/query.ts:14](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/odis/query.ts#L14)* - -___ - -### contractKit - -• **contractKit**: *ContractKit* - -*Defined in [packages/sdk/identity/src/odis/query.ts:15](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/odis/query.ts#L15)* diff --git a/packages/docs/developer-resources/identity/reference/interfaces/_offchain_accessors_interfaces_.privateaccessor.md b/packages/docs/developer-resources/identity/reference/interfaces/_offchain_accessors_interfaces_.privateaccessor.md deleted file mode 100644 index 37b16e00674..00000000000 --- a/packages/docs/developer-resources/identity/reference/interfaces/_offchain_accessors_interfaces_.privateaccessor.md +++ /dev/null @@ -1,80 +0,0 @@ -# Interface: PrivateAccessor <**DataType**> - -## Type parameters - -▪ **DataType** - -## Hierarchy - -* **PrivateAccessor** - -## Implemented by - -* [PrivateBinaryAccessor](../classes/_offchain_accessors_binary_.privatebinaryaccessor.md) -* [PrivateNameAccessor](../classes/_offchain_accessors_name_.privatenameaccessor.md) -* [PrivatePictureAccessor](../classes/_offchain_accessors_pictures_.privatepictureaccessor.md) -* [PrivateSimpleAccessor](../classes/_offchain_accessors_simple_.privatesimpleaccessor.md) - -## Index - -### Properties - -* [read](_offchain_accessors_interfaces_.privateaccessor.md#read) -* [readAsResult](_offchain_accessors_interfaces_.privateaccessor.md#readasresult) -* [write](_offchain_accessors_interfaces_.privateaccessor.md#write) - -## Properties - -### read - -• **read**: *function* - -*Defined in [packages/sdk/identity/src/offchain/accessors/interfaces.ts:12](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain/accessors/interfaces.ts#L12)* - -#### Type declaration: - -▸ (`from`: string): *Promise‹DataType›* - -**Parameters:** - -Name | Type | ------- | ------ | -`from` | string | - -___ - -### readAsResult - -• **readAsResult**: *function* - -*Defined in [packages/sdk/identity/src/offchain/accessors/interfaces.ts:13](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain/accessors/interfaces.ts#L13)* - -#### Type declaration: - -▸ (`from`: string): *Promise‹Result‹DataType, [SchemaErrors](../modules/_offchain_accessors_errors_.md#schemaerrors)››* - -**Parameters:** - -Name | Type | ------- | ------ | -`from` | string | - -___ - -### write - -• **write**: *function* - -*Defined in [packages/sdk/identity/src/offchain/accessors/interfaces.ts:11](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain/accessors/interfaces.ts#L11)* - -#### Type declaration: - -▸ (`data`: DataType, `to`: string[], `symmetricKey?`: Buffer): *Promise‹[SchemaErrors](../modules/_offchain_accessors_errors_.md#schemaerrors) | void›* - -**Parameters:** - -Name | Type | ------- | ------ | -`data` | DataType | -`to` | string[] | -`symmetricKey?` | Buffer | diff --git a/packages/docs/developer-resources/identity/reference/interfaces/_offchain_accessors_interfaces_.publicaccessor.md b/packages/docs/developer-resources/identity/reference/interfaces/_offchain_accessors_interfaces_.publicaccessor.md deleted file mode 100644 index a1b0087b321..00000000000 --- a/packages/docs/developer-resources/identity/reference/interfaces/_offchain_accessors_interfaces_.publicaccessor.md +++ /dev/null @@ -1,78 +0,0 @@ -# Interface: PublicAccessor <**DataType**> - -## Type parameters - -▪ **DataType** - -## Hierarchy - -* **PublicAccessor** - -## Implemented by - -* [PublicBinaryAccessor](../classes/_offchain_accessors_binary_.publicbinaryaccessor.md) -* [PublicNameAccessor](../classes/_offchain_accessors_name_.publicnameaccessor.md) -* [PublicPictureAccessor](../classes/_offchain_accessors_pictures_.publicpictureaccessor.md) -* [PublicSimpleAccessor](../classes/_offchain_accessors_simple_.publicsimpleaccessor.md) - -## Index - -### Properties - -* [read](_offchain_accessors_interfaces_.publicaccessor.md#read) -* [readAsResult](_offchain_accessors_interfaces_.publicaccessor.md#readasresult) -* [write](_offchain_accessors_interfaces_.publicaccessor.md#write) - -## Properties - -### read - -• **read**: *function* - -*Defined in [packages/sdk/identity/src/offchain/accessors/interfaces.ts:6](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain/accessors/interfaces.ts#L6)* - -#### Type declaration: - -▸ (`from`: string): *Promise‹DataType›* - -**Parameters:** - -Name | Type | ------- | ------ | -`from` | string | - -___ - -### readAsResult - -• **readAsResult**: *function* - -*Defined in [packages/sdk/identity/src/offchain/accessors/interfaces.ts:7](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain/accessors/interfaces.ts#L7)* - -#### Type declaration: - -▸ (`from`: string): *Promise‹Result‹DataType, [SchemaErrors](../modules/_offchain_accessors_errors_.md#schemaerrors)››* - -**Parameters:** - -Name | Type | ------- | ------ | -`from` | string | - -___ - -### write - -• **write**: *function* - -*Defined in [packages/sdk/identity/src/offchain/accessors/interfaces.ts:5](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain/accessors/interfaces.ts#L5)* - -#### Type declaration: - -▸ (`data`: DataType): *Promise‹[SchemaErrors](../modules/_offchain_accessors_errors_.md#schemaerrors) | void›* - -**Parameters:** - -Name | Type | ------- | ------ | -`data` | DataType | diff --git a/packages/docs/developer-resources/identity/reference/modules/_odis_bls_blinding_client_.md b/packages/docs/developer-resources/identity/reference/modules/_odis_bls_blinding_client_.md deleted file mode 100644 index 92d19771e85..00000000000 --- a/packages/docs/developer-resources/identity/reference/modules/_odis_bls_blinding_client_.md +++ /dev/null @@ -1,11 +0,0 @@ -# Module: "odis/bls-blinding-client" - -## Index - -### Classes - -* [WasmBlsBlindingClient](../classes/_odis_bls_blinding_client_.wasmblsblindingclient.md) - -### Interfaces - -* [BlsBlindingClient](../interfaces/_odis_bls_blinding_client_.blsblindingclient.md) diff --git a/packages/docs/developer-resources/identity/reference/modules/_odis_matchmaking_.md b/packages/docs/developer-resources/identity/reference/modules/_odis_matchmaking_.md deleted file mode 100644 index 52ca99a9b6d..00000000000 --- a/packages/docs/developer-resources/identity/reference/modules/_odis_matchmaking_.md +++ /dev/null @@ -1,47 +0,0 @@ -# Module: "odis/matchmaking" - -## Index - -### Functions - -* [getContactMatches](_odis_matchmaking_.md#getcontactmatches) -* [obfuscateNumberForMatchmaking](_odis_matchmaking_.md#obfuscatenumberformatchmaking) - -## Functions - -### getContactMatches - -▸ **getContactMatches**(`e164NumberCaller`: E164Number, `e164NumberContacts`: E164Number[], `account`: string, `phoneNumberIdentifier`: string, `signer`: [AuthSigner](_odis_query_.md#authsigner), `context`: [ServiceContext](../interfaces/_odis_query_.servicecontext.md), `clientVersion?`: undefined | string, `sessionID?`: undefined | string): *Promise‹E164Number[]›* - -*Defined in [packages/sdk/identity/src/odis/matchmaking.ts:20](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/odis/matchmaking.ts#L20)* - -**Parameters:** - -Name | Type | ------- | ------ | -`e164NumberCaller` | E164Number | -`e164NumberContacts` | E164Number[] | -`account` | string | -`phoneNumberIdentifier` | string | -`signer` | [AuthSigner](_odis_query_.md#authsigner) | -`context` | [ServiceContext](../interfaces/_odis_query_.servicecontext.md) | -`clientVersion?` | undefined | string | -`sessionID?` | undefined | string | - -**Returns:** *Promise‹E164Number[]›* - -___ - -### obfuscateNumberForMatchmaking - -▸ **obfuscateNumberForMatchmaking**(`e164Number`: string): *string* - -*Defined in [packages/sdk/identity/src/odis/matchmaking.ts:73](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/odis/matchmaking.ts#L73)* - -**Parameters:** - -Name | Type | ------- | ------ | -`e164Number` | string | - -**Returns:** *string* diff --git a/packages/docs/developer-resources/identity/reference/modules/_odis_phone_number_identifier_.md b/packages/docs/developer-resources/identity/reference/modules/_odis_phone_number_identifier_.md deleted file mode 100644 index f1c48f9767a..00000000000 --- a/packages/docs/developer-resources/identity/reference/modules/_odis_phone_number_identifier_.md +++ /dev/null @@ -1,164 +0,0 @@ -# Module: "odis/phone-number-identifier" - -## Index - -### Interfaces - -* [PhoneNumberHashDetails](../interfaces/_odis_phone_number_identifier_.phonenumberhashdetails.md) - -### Variables - -* [ODIS_MINIMUM_CELO_BALANCE](_odis_phone_number_identifier_.md#const-odis_minimum_celo_balance) -* [ODIS_MINIMUM_DOLLAR_BALANCE](_odis_phone_number_identifier_.md#const-odis_minimum_dollar_balance) - -### Functions - -* [getBlindedPhoneNumber](_odis_phone_number_identifier_.md#getblindedphonenumber) -* [getBlindedPhoneNumberSignature](_odis_phone_number_identifier_.md#getblindedphonenumbersignature) -* [getPepperFromThresholdSignature](_odis_phone_number_identifier_.md#getpepperfromthresholdsignature) -* [getPhoneNumberIdentifier](_odis_phone_number_identifier_.md#getphonenumberidentifier) -* [getPhoneNumberIdentifierFromSignature](_odis_phone_number_identifier_.md#getphonenumberidentifierfromsignature) -* [isBalanceSufficientForSigRetrieval](_odis_phone_number_identifier_.md#isbalancesufficientforsigretrieval) - -## Variables - -### `Const` ODIS_MINIMUM_CELO_BALANCE - -• **ODIS_MINIMUM_CELO_BALANCE**: *0.005* = 0.005 - -*Defined in [packages/sdk/identity/src/odis/phone-number-identifier.ts:18](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/odis/phone-number-identifier.ts#L18)* - -___ - -### `Const` ODIS_MINIMUM_DOLLAR_BALANCE - -• **ODIS_MINIMUM_DOLLAR_BALANCE**: *0.01* = 0.01 - -*Defined in [packages/sdk/identity/src/odis/phone-number-identifier.ts:16](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/odis/phone-number-identifier.ts#L16)* - -## Functions - -### getBlindedPhoneNumber - -▸ **getBlindedPhoneNumber**(`e164Number`: string, `blsBlindingClient`: [BlsBlindingClient](../interfaces/_odis_bls_blinding_client_.blsblindingclient.md)): *Promise‹string›* - -*Defined in [packages/sdk/identity/src/odis/phone-number-identifier.ts:76](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/odis/phone-number-identifier.ts#L76)* - -Blinds the phone number in preparation for the ODIS request -Caller should use the same blsBlindingClient instance for unblinding - -**Parameters:** - -Name | Type | ------- | ------ | -`e164Number` | string | -`blsBlindingClient` | [BlsBlindingClient](../interfaces/_odis_bls_blinding_client_.blsblindingclient.md) | - -**Returns:** *Promise‹string›* - -___ - -### getBlindedPhoneNumberSignature - -▸ **getBlindedPhoneNumberSignature**(`account`: string, `signer`: [AuthSigner](_odis_query_.md#authsigner), `context`: [ServiceContext](../interfaces/_odis_query_.servicecontext.md), `base64BlindedMessage`: string, `selfPhoneHash?`: undefined | string, `clientVersion?`: undefined | string, `sessionID?`: undefined | string): *Promise‹string›* - -*Defined in [packages/sdk/identity/src/odis/phone-number-identifier.ts:90](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/odis/phone-number-identifier.ts#L90)* - -Query ODIS for the blinded signature -Response can be passed into getPhoneNumberIdentifierFromSignature -to retrieve the on-chain identifier - -**Parameters:** - -Name | Type | ------- | ------ | -`account` | string | -`signer` | [AuthSigner](_odis_query_.md#authsigner) | -`context` | [ServiceContext](../interfaces/_odis_query_.servicecontext.md) | -`base64BlindedMessage` | string | -`selfPhoneHash?` | undefined | string | -`clientVersion?` | undefined | string | -`sessionID?` | undefined | string | - -**Returns:** *Promise‹string›* - -___ - -### getPepperFromThresholdSignature - -▸ **getPepperFromThresholdSignature**(`sigBuf`: Buffer): *string* - -*Defined in [packages/sdk/identity/src/odis/phone-number-identifier.ts:141](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/odis/phone-number-identifier.ts#L141)* - -**Parameters:** - -Name | Type | ------- | ------ | -`sigBuf` | Buffer | - -**Returns:** *string* - -___ - -### getPhoneNumberIdentifier - -▸ **getPhoneNumberIdentifier**(`e164Number`: string, `account`: string, `signer`: [AuthSigner](_odis_query_.md#authsigner), `context`: [ServiceContext](../interfaces/_odis_query_.servicecontext.md), `selfPhoneHash?`: undefined | string, `clientVersion?`: undefined | string, `blsBlindingClient?`: [BlsBlindingClient](../interfaces/_odis_bls_blinding_client_.blsblindingclient.md), `sessionID?`: undefined | string): *Promise‹[PhoneNumberHashDetails](../interfaces/_odis_phone_number_identifier_.phonenumberhashdetails.md)›* - -*Defined in [packages/sdk/identity/src/odis/phone-number-identifier.ts:36](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/odis/phone-number-identifier.ts#L36)* - -Retrieve the on-chain identifier for the provided phone number -Performs blinding, querying, and unblinding - -**Parameters:** - -Name | Type | ------- | ------ | -`e164Number` | string | -`account` | string | -`signer` | [AuthSigner](_odis_query_.md#authsigner) | -`context` | [ServiceContext](../interfaces/_odis_query_.servicecontext.md) | -`selfPhoneHash?` | undefined | string | -`clientVersion?` | undefined | string | -`blsBlindingClient?` | [BlsBlindingClient](../interfaces/_odis_bls_blinding_client_.blsblindingclient.md) | -`sessionID?` | undefined | string | - -**Returns:** *Promise‹[PhoneNumberHashDetails](../interfaces/_odis_phone_number_identifier_.phonenumberhashdetails.md)›* - -___ - -### getPhoneNumberIdentifierFromSignature - -▸ **getPhoneNumberIdentifierFromSignature**(`e164Number`: string, `base64BlindedSignature`: string, `blsBlindingClient`: [BlsBlindingClient](../interfaces/_odis_bls_blinding_client_.blsblindingclient.md)): *Promise‹[PhoneNumberHashDetails](../interfaces/_odis_phone_number_identifier_.phonenumberhashdetails.md)›* - -*Defined in [packages/sdk/identity/src/odis/phone-number-identifier.ts:124](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/odis/phone-number-identifier.ts#L124)* - -Unblind the response and return the on-chain identifier - -**Parameters:** - -Name | Type | ------- | ------ | -`e164Number` | string | -`base64BlindedSignature` | string | -`blsBlindingClient` | [BlsBlindingClient](../interfaces/_odis_bls_blinding_client_.blsblindingclient.md) | - -**Returns:** *Promise‹[PhoneNumberHashDetails](../interfaces/_odis_phone_number_identifier_.phonenumberhashdetails.md)›* - -___ - -### isBalanceSufficientForSigRetrieval - -▸ **isBalanceSufficientForSigRetrieval**(`dollarBalance`: BigNumber.Value, `celoBalance`: BigNumber.Value): *boolean* - -*Defined in [packages/sdk/identity/src/odis/phone-number-identifier.ts:152](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/odis/phone-number-identifier.ts#L152)* - -Check if balance is sufficient for quota retrieval - -**Parameters:** - -Name | Type | ------- | ------ | -`dollarBalance` | BigNumber.Value | -`celoBalance` | BigNumber.Value | - -**Returns:** *boolean* diff --git a/packages/docs/developer-resources/identity/reference/modules/_odis_query_.md b/packages/docs/developer-resources/identity/reference/modules/_odis_query_.md deleted file mode 100644 index 2bc2c48bc6c..00000000000 --- a/packages/docs/developer-resources/identity/reference/modules/_odis_query_.md +++ /dev/null @@ -1,144 +0,0 @@ -# Module: "odis/query" - -## Index - -### Enumerations - -* [AuthenticationMethod](../enums/_odis_query_.authenticationmethod.md) -* [ErrorMessages](../enums/_odis_query_.errormessages.md) - -### Interfaces - -* [CustomSigner](../interfaces/_odis_query_.customsigner.md) -* [EncryptionKeySigner](../interfaces/_odis_query_.encryptionkeysigner.md) -* [MatchmakingRequest](../interfaces/_odis_query_.matchmakingrequest.md) -* [MatchmakingResponse](../interfaces/_odis_query_.matchmakingresponse.md) -* [PhoneNumberPrivacyRequest](../interfaces/_odis_query_.phonenumberprivacyrequest.md) -* [ServiceContext](../interfaces/_odis_query_.servicecontext.md) -* [SignMessageRequest](../interfaces/_odis_query_.signmessagerequest.md) -* [SignMessageResponse](../interfaces/_odis_query_.signmessageresponse.md) -* [WalletKeySigner](../interfaces/_odis_query_.walletkeysigner.md) - -### Type aliases - -* [AuthSigner](_odis_query_.md#authsigner) - -### Functions - -* [getServiceContext](_odis_query_.md#getservicecontext) -* [queryOdis](_odis_query_.md#queryodis) - -### Object literals - -* [ODIS_ALFAJORESSTAGING_CONTEXT](_odis_query_.md#const-odis_alfajoresstaging_context) -* [ODIS_ALFAJORES_CONTEXT](_odis_query_.md#const-odis_alfajores_context) -* [ODIS_MAINNET_CONTEXT](_odis_query_.md#const-odis_mainnet_context) - -## Type aliases - -### AuthSigner - -Ƭ **AuthSigner**: *[WalletKeySigner](../interfaces/_odis_query_.walletkeysigner.md) | [EncryptionKeySigner](../interfaces/_odis_query_.encryptionkeysigner.md) | [CustomSigner](../interfaces/_odis_query_.customsigner.md)* - -*Defined in [packages/sdk/identity/src/odis/query.ts:29](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/odis/query.ts#L29)* - -## Functions - -### getServiceContext - -▸ **getServiceContext**(`contextName`: string): *[ServiceContext](../interfaces/_odis_query_.servicecontext.md)* - -*Defined in [packages/sdk/identity/src/odis/query.ts:98](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/odis/query.ts#L98)* - -**Parameters:** - -Name | Type | Default | ------- | ------ | ------ | -`contextName` | string | "mainnet" | - -**Returns:** *[ServiceContext](../interfaces/_odis_query_.servicecontext.md)* - -___ - -### queryOdis - -▸ **queryOdis**<**ResponseType**>(`signer`: [AuthSigner](_odis_query_.md#authsigner), `body`: [PhoneNumberPrivacyRequest](../interfaces/_odis_query_.phonenumberprivacyrequest.md), `context`: [ServiceContext](../interfaces/_odis_query_.servicecontext.md), `endpoint`: string): *Promise‹ResponseType›* - -*Defined in [packages/sdk/identity/src/odis/query.ts:116](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/odis/query.ts#L116)* - -Make a request to lookup the phone number identifier or perform matchmaking - -**Type parameters:** - -▪ **ResponseType** - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`signer` | [AuthSigner](_odis_query_.md#authsigner) | type of key to sign with | -`body` | [PhoneNumberPrivacyRequest](../interfaces/_odis_query_.phonenumberprivacyrequest.md) | request body | -`context` | [ServiceContext](../interfaces/_odis_query_.servicecontext.md) | contains service URL | -`endpoint` | string | endpoint to hit | - -**Returns:** *Promise‹ResponseType›* - -## Object literals - -### `Const` ODIS_ALFAJORESSTAGING_CONTEXT - -### ▪ **ODIS_ALFAJORESSTAGING_CONTEXT**: *object* - -*Defined in [packages/sdk/identity/src/odis/query.ts:86](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/odis/query.ts#L86)* - -### odisPubKey - -• **odisPubKey**: *string* = "7FsWGsFnmVvRfMDpzz95Np76wf/1sPaK0Og9yiB+P8QbjiC8FV67NBans9hzZEkBaQMhiapzgMR6CkZIZPvgwQboAxl65JWRZecGe5V3XO4sdKeNemdAZ2TzQuWkuZoA" - -*Defined in [packages/sdk/identity/src/odis/query.ts:88](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/odis/query.ts#L88)* - -### odisUrl - -• **odisUrl**: *string* = "https://us-central1-celo-phone-number-privacy-stg.cloudfunctions.net" - -*Defined in [packages/sdk/identity/src/odis/query.ts:87](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/odis/query.ts#L87)* - -___ - -### `Const` ODIS_ALFAJORES_CONTEXT - -### ▪ **ODIS_ALFAJORES_CONTEXT**: *object* - -*Defined in [packages/sdk/identity/src/odis/query.ts:80](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/odis/query.ts#L80)* - -### odisPubKey - -• **odisPubKey**: *string* = "kPoRxWdEdZ/Nd3uQnp3FJFs54zuiS+ksqvOm9x8vY6KHPG8jrfqysvIRU0wtqYsBKA7SoAsICMBv8C/Fb2ZpDOqhSqvr/sZbZoHmQfvbqrzbtDIPvUIrHgRS0ydJCMsA" - -*Defined in [packages/sdk/identity/src/odis/query.ts:82](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/odis/query.ts#L82)* - -### odisUrl - -• **odisUrl**: *string* = "https://us-central1-celo-phone-number-privacy.cloudfunctions.net" - -*Defined in [packages/sdk/identity/src/odis/query.ts:81](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/odis/query.ts#L81)* - -___ - -### `Const` ODIS_MAINNET_CONTEXT - -### ▪ **ODIS_MAINNET_CONTEXT**: *object* - -*Defined in [packages/sdk/identity/src/odis/query.ts:92](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/odis/query.ts#L92)* - -### odisPubKey - -• **odisPubKey**: *string* = "FvreHfLmhBjwxHxsxeyrcOLtSonC9j7K3WrS4QapYsQH6LdaDTaNGmnlQMfFY04Bp/K4wAvqQwO9/bqPVCKf8Ze8OZo8Frmog4JY4xAiwrsqOXxug11+htjEe1pj4uMA" - -*Defined in [packages/sdk/identity/src/odis/query.ts:94](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/odis/query.ts#L94)* - -### odisUrl - -• **odisUrl**: *string* = "https://us-central1-celo-pgpnp-mainnet.cloudfunctions.net" - -*Defined in [packages/sdk/identity/src/odis/query.ts:93](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/odis/query.ts#L93)* diff --git a/packages/docs/developer-resources/identity/reference/modules/_offchain_accessors_authorized_signer_.md b/packages/docs/developer-resources/identity/reference/modules/_offchain_accessors_authorized_signer_.md deleted file mode 100644 index ee1d7554383..00000000000 --- a/packages/docs/developer-resources/identity/reference/modules/_offchain_accessors_authorized_signer_.md +++ /dev/null @@ -1,7 +0,0 @@ -# Module: "offchain/accessors/authorized-signer" - -## Index - -### Classes - -* [AuthorizedSignerAccessor](../classes/_offchain_accessors_authorized_signer_.authorizedsigneraccessor.md) diff --git a/packages/docs/developer-resources/identity/reference/modules/_offchain_accessors_binary_.md b/packages/docs/developer-resources/identity/reference/modules/_offchain_accessors_binary_.md deleted file mode 100644 index 3ee1009afd6..00000000000 --- a/packages/docs/developer-resources/identity/reference/modules/_offchain_accessors_binary_.md +++ /dev/null @@ -1,8 +0,0 @@ -# Module: "offchain/accessors/binary" - -## Index - -### Classes - -* [PrivateBinaryAccessor](../classes/_offchain_accessors_binary_.privatebinaryaccessor.md) -* [PublicBinaryAccessor](../classes/_offchain_accessors_binary_.publicbinaryaccessor.md) diff --git a/packages/docs/developer-resources/identity/reference/modules/_offchain_accessors_errors_.md b/packages/docs/developer-resources/identity/reference/modules/_offchain_accessors_errors_.md deleted file mode 100644 index 83d6160d2c0..00000000000 --- a/packages/docs/developer-resources/identity/reference/modules/_offchain_accessors_errors_.md +++ /dev/null @@ -1,27 +0,0 @@ -# Module: "offchain/accessors/errors" - -## Index - -### Enumerations - -* [SchemaErrorTypes](../enums/_offchain_accessors_errors_.schemaerrortypes.md) - -### Classes - -* [InvalidDataError](../classes/_offchain_accessors_errors_.invaliddataerror.md) -* [InvalidKey](../classes/_offchain_accessors_errors_.invalidkey.md) -* [OffchainError](../classes/_offchain_accessors_errors_.offchainerror.md) -* [UnavailableKey](../classes/_offchain_accessors_errors_.unavailablekey.md) -* [UnknownCiphertext](../classes/_offchain_accessors_errors_.unknownciphertext.md) - -### Type aliases - -* [SchemaErrors](_offchain_accessors_errors_.md#schemaerrors) - -## Type aliases - -### SchemaErrors - -Ƭ **SchemaErrors**: *[InvalidDataError](../classes/_offchain_accessors_errors_.invaliddataerror.md) | [OffchainError](../classes/_offchain_accessors_errors_.offchainerror.md) | [UnknownCiphertext](../classes/_offchain_accessors_errors_.unknownciphertext.md) | [UnavailableKey](../classes/_offchain_accessors_errors_.unavailablekey.md) | [InvalidKey](../classes/_offchain_accessors_errors_.invalidkey.md)* - -*Defined in [packages/sdk/identity/src/offchain/accessors/errors.ts:44](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain/accessors/errors.ts#L44)* diff --git a/packages/docs/developer-resources/identity/reference/modules/_offchain_accessors_interfaces_.md b/packages/docs/developer-resources/identity/reference/modules/_offchain_accessors_interfaces_.md deleted file mode 100644 index 77bdb11e75e..00000000000 --- a/packages/docs/developer-resources/identity/reference/modules/_offchain_accessors_interfaces_.md +++ /dev/null @@ -1,8 +0,0 @@ -# Module: "offchain/accessors/interfaces" - -## Index - -### Interfaces - -* [PrivateAccessor](../interfaces/_offchain_accessors_interfaces_.privateaccessor.md) -* [PublicAccessor](../interfaces/_offchain_accessors_interfaces_.publicaccessor.md) diff --git a/packages/docs/developer-resources/identity/reference/modules/_offchain_accessors_name_.md b/packages/docs/developer-resources/identity/reference/modules/_offchain_accessors_name_.md deleted file mode 100644 index 3be235a4574..00000000000 --- a/packages/docs/developer-resources/identity/reference/modules/_offchain_accessors_name_.md +++ /dev/null @@ -1,20 +0,0 @@ -# Module: "offchain/accessors/name" - -## Index - -### Classes - -* [PrivateNameAccessor](../classes/_offchain_accessors_name_.privatenameaccessor.md) -* [PublicNameAccessor](../classes/_offchain_accessors_name_.publicnameaccessor.md) - -### Type aliases - -* [NameType](_offchain_accessors_name_.md#nametype) - -## Type aliases - -### NameType - -Ƭ **NameType**: *t.TypeOf‹typeof NameSchema›* - -*Defined in [packages/sdk/identity/src/offchain/accessors/name.ts:9](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain/accessors/name.ts#L9)* diff --git a/packages/docs/developer-resources/identity/reference/modules/_offchain_accessors_pictures_.md b/packages/docs/developer-resources/identity/reference/modules/_offchain_accessors_pictures_.md deleted file mode 100644 index aff7b89033f..00000000000 --- a/packages/docs/developer-resources/identity/reference/modules/_offchain_accessors_pictures_.md +++ /dev/null @@ -1,8 +0,0 @@ -# Module: "offchain/accessors/pictures" - -## Index - -### Classes - -* [PrivatePictureAccessor](../classes/_offchain_accessors_pictures_.privatepictureaccessor.md) -* [PublicPictureAccessor](../classes/_offchain_accessors_pictures_.publicpictureaccessor.md) diff --git a/packages/docs/developer-resources/identity/reference/modules/_offchain_accessors_simple_.md b/packages/docs/developer-resources/identity/reference/modules/_offchain_accessors_simple_.md deleted file mode 100644 index 3e6261279f5..00000000000 --- a/packages/docs/developer-resources/identity/reference/modules/_offchain_accessors_simple_.md +++ /dev/null @@ -1,8 +0,0 @@ -# Module: "offchain/accessors/simple" - -## Index - -### Classes - -* [PrivateSimpleAccessor](../classes/_offchain_accessors_simple_.privatesimpleaccessor.md) -* [PublicSimpleAccessor](../classes/_offchain_accessors_simple_.publicsimpleaccessor.md) diff --git a/packages/docs/developer-resources/identity/reference/modules/_offchain_data_wrapper_.md b/packages/docs/developer-resources/identity/reference/modules/_offchain_data_wrapper_.md deleted file mode 100644 index 23932151fc0..00000000000 --- a/packages/docs/developer-resources/identity/reference/modules/_offchain_data_wrapper_.md +++ /dev/null @@ -1,23 +0,0 @@ -# Module: "offchain-data-wrapper" - -## Index - -### Enumerations - -* [OffchainErrorTypes](../enums/_offchain_data_wrapper_.offchainerrortypes.md) - -### Classes - -* [OffchainDataWrapper](../classes/_offchain_data_wrapper_.offchaindatawrapper.md) - -### Type aliases - -* [OffchainErrors](_offchain_data_wrapper_.md#offchainerrors) - -## Type aliases - -### OffchainErrors - -Ƭ **OffchainErrors**: *FetchError | InvalidSignature | NoStorageRootProvidedData | NoStorageProvider* - -*Defined in [packages/sdk/identity/src/offchain-data-wrapper.ts:48](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain-data-wrapper.ts#L48)* diff --git a/packages/docs/developer-resources/identity/reference/modules/_offchain_storage_writers_.md b/packages/docs/developer-resources/identity/reference/modules/_offchain_storage_writers_.md deleted file mode 100644 index d47f86ed87c..00000000000 --- a/packages/docs/developer-resources/identity/reference/modules/_offchain_storage_writers_.md +++ /dev/null @@ -1,11 +0,0 @@ -# Module: "offchain/storage-writers" - -## Index - -### Classes - -* [GitStorageWriter](../classes/_offchain_storage_writers_.gitstoragewriter.md) -* [GoogleStorageWriter](../classes/_offchain_storage_writers_.googlestoragewriter.md) -* [LocalStorageWriter](../classes/_offchain_storage_writers_.localstoragewriter.md) -* [MockStorageWriter](../classes/_offchain_storage_writers_.mockstoragewriter.md) -* [StorageWriter](../classes/_offchain_storage_writers_.storagewriter.md) diff --git a/packages/docs/developer-resources/identity/reference/modules/_offchain_utils_.md b/packages/docs/developer-resources/identity/reference/modules/_offchain_utils_.md deleted file mode 100644 index 68442982213..00000000000 --- a/packages/docs/developer-resources/identity/reference/modules/_offchain_utils_.md +++ /dev/null @@ -1,140 +0,0 @@ -# Module: "offchain/utils" - -## Index - -### Functions - -* [buildEIP712TypedData](_offchain_utils_.md#const-buildeip712typeddata) -* [deserialize](_offchain_utils_.md#const-deserialize) -* [readEncrypted](_offchain_utils_.md#const-readencrypted) -* [resolvePath](_offchain_utils_.md#resolvepath) -* [signBuffer](_offchain_utils_.md#const-signbuffer) -* [writeEncrypted](_offchain_utils_.md#const-writeencrypted) - -## Functions - -### `Const` buildEIP712TypedData - -▸ **buildEIP712TypedData**<**DataType**>(`wrapper`: [OffchainDataWrapper](../classes/_offchain_data_wrapper_.offchaindatawrapper.md), `path`: string, `data`: DataType | Buffer, `type?`: t.Type‹DataType›): *Promise‹EIP712TypedData›* - -*Defined in [packages/sdk/identity/src/offchain/utils.ts:274](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain/utils.ts#L274)* - -**Type parameters:** - -▪ **DataType** - -**Parameters:** - -Name | Type | ------- | ------ | -`wrapper` | [OffchainDataWrapper](../classes/_offchain_data_wrapper_.offchaindatawrapper.md) | -`path` | string | -`data` | DataType | Buffer | -`type?` | t.Type‹DataType› | - -**Returns:** *Promise‹EIP712TypedData›* - -___ - -### `Const` deserialize - -▸ **deserialize**<**DataType**>(`type`: Type‹DataType›, `buf`: Buffer): *Result‹DataType, [SchemaErrors](_offchain_accessors_errors_.md#schemaerrors)›* - -*Defined in [packages/sdk/identity/src/offchain/utils.ts:257](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain/utils.ts#L257)* - -**Type parameters:** - -▪ **DataType** - -**Parameters:** - -Name | Type | ------- | ------ | -`type` | Type‹DataType› | -`buf` | Buffer | - -**Returns:** *Result‹DataType, [SchemaErrors](_offchain_accessors_errors_.md#schemaerrors)›* - -___ - -### `Const` readEncrypted - -▸ **readEncrypted**(`wrapper`: [OffchainDataWrapper](../classes/_offchain_data_wrapper_.offchaindatawrapper.md), `dataPath`: string, `senderAddress`: Address): *Promise‹Result‹Buffer, [SchemaErrors](_offchain_accessors_errors_.md#schemaerrors)››* - -*Defined in [packages/sdk/identity/src/offchain/utils.ts:227](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain/utils.ts#L227)* - -Reads and decrypts a payload that has been encrypted to your data encryption key. Will -resolve the symmetric key used to encrypt the payload. - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`wrapper` | [OffchainDataWrapper](../classes/_offchain_data_wrapper_.offchaindatawrapper.md) | the offchain data wrapper | -`dataPath` | string | path to where the encrypted data is stored. Used to derive the key location | -`senderAddress` | Address | the address that encrypted this key to you | - -**Returns:** *Promise‹Result‹Buffer, [SchemaErrors](_offchain_accessors_errors_.md#schemaerrors)››* - -___ - -### resolvePath - -▸ **resolvePath**(`base`: string, `path`: string): *string* - -*Defined in [packages/sdk/identity/src/offchain/utils.ts:382](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain/utils.ts#L382)* - -We want users to be able to specify a root + path as their base -storage url, https://example.com/store-under/path, for example. Constructing -a URL doesn't respect these paths if the appended path is absolute, so we ensure -it's not and ensure the base is - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`base` | string | root or base of the domain | -`path` | string | the path to append | - -**Returns:** *string* - -___ - -### `Const` signBuffer - -▸ **signBuffer**(`wrapper`: [OffchainDataWrapper](../classes/_offchain_data_wrapper_.offchaindatawrapper.md), `dataPath`: string, `buf`: Buffer): *Promise‹string›* - -*Defined in [packages/sdk/identity/src/offchain/utils.ts:331](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain/utils.ts#L331)* - -**Parameters:** - -Name | Type | ------- | ------ | -`wrapper` | [OffchainDataWrapper](../classes/_offchain_data_wrapper_.offchaindatawrapper.md) | -`dataPath` | string | -`buf` | Buffer | - -**Returns:** *Promise‹string›* - -___ - -### `Const` writeEncrypted - -▸ **writeEncrypted**(`wrapper`: [OffchainDataWrapper](../classes/_offchain_data_wrapper_.offchaindatawrapper.md), `dataPath`: string, `data`: Buffer, `toAddresses`: Address[], `symmetricKey?`: Buffer): *Promise‹[SchemaErrors](_offchain_accessors_errors_.md#schemaerrors) | void›* - -*Defined in [packages/sdk/identity/src/offchain/utils.ts:134](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain/utils.ts#L134)* - -Handles encrypting the data with a symmetric key, then distributing said key to each address -in the `toAddresses` array. - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`wrapper` | [OffchainDataWrapper](../classes/_offchain_data_wrapper_.offchaindatawrapper.md) | the offchain data wrapper | -`dataPath` | string | path to where the encrypted data is stored. Used to derive the key location | -`data` | Buffer | the data to encrypt | -`toAddresses` | Address[] | the addresses to distribute the symmetric key to | -`symmetricKey?` | Buffer | the symmetric key to use to encrypt the data. One will be found or generated if not provided | - -**Returns:** *Promise‹[SchemaErrors](_offchain_accessors_errors_.md#schemaerrors) | void›* diff --git a/packages/docs/developer-resources/identity/reference/modules/_test_utils_setup_global_.md b/packages/docs/developer-resources/identity/reference/modules/_test_utils_setup_global_.md deleted file mode 100644 index 1e564c196f7..00000000000 --- a/packages/docs/developer-resources/identity/reference/modules/_test_utils_setup_global_.md +++ /dev/null @@ -1,17 +0,0 @@ -# Module: "test-utils/setup.global" - -## Index - -### Functions - -* [globalSetup](_test_utils_setup_global_.md#globalsetup) - -## Functions - -### globalSetup - -▸ **globalSetup**(): *Promise‹void›* - -*Defined in [packages/sdk/identity/src/test-utils/setup.global.ts:12](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/test-utils/setup.global.ts#L12)* - -**Returns:** *Promise‹void›* diff --git a/packages/docs/developer-resources/identity/reference/modules/_test_utils_teardown_global_.md b/packages/docs/developer-resources/identity/reference/modules/_test_utils_teardown_global_.md deleted file mode 100644 index ccd2a0ff125..00000000000 --- a/packages/docs/developer-resources/identity/reference/modules/_test_utils_teardown_global_.md +++ /dev/null @@ -1,17 +0,0 @@ -# Module: "test-utils/teardown.global" - -## Index - -### Functions - -* [globalTeardown](_test_utils_teardown_global_.md#globalteardown) - -## Functions - -### globalTeardown - -▸ **globalTeardown**(): *Promise‹void›* - -*Defined in [packages/sdk/identity/src/test-utils/teardown.global.ts:5](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/test-utils/teardown.global.ts#L5)* - -**Returns:** *Promise‹void›* diff --git a/packages/docs/developer-resources/integrations/checklist.md b/packages/docs/developer-resources/integrations/checklist.md deleted file mode 100644 index cedab89e934..00000000000 --- a/packages/docs/developer-resources/integrations/checklist.md +++ /dev/null @@ -1,68 +0,0 @@ -# Checklist - -This page serves as a checklist for applications building and integrating on Celo. Using common features and standards across applications in the Celo ecosystem will lead to a superior user experience. - -## General - -### Addresses - -Addresses are identical to Ethereum addresses. When displaying and asking for user-inputted addresses, consider using and validating address checksums following the [EIP55 standard](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-55.md) to detect typos. - -For core smart contracts, developers are highly encouraged to use the Registry to reference the contracts in case they will have to be repointed (via Governance) - -### QR Codes - -Celo has [WIP QR code standard CIP16](https://github.com/celo-org/celo-proposals/pull/40) that aims to standardize how applications can ask wallets for transactions to avoid the user having to manually copy/paste addresses and other transaction metadata. - - -## Custodian/Exchange - -Please read more under [Custody](./custody.md), but here is a shortened version: - -### Detect Transfers -Stable-value currencies, currently cUSD and cEUR, are contracts, `StableToken` and `StableTokenEUR` respectively, that can be accessed via the ERC20 interface. The native asset CELO can be accessed via the `GoldToken` ERC20 interface, or natively, similar to ETH on Ethereum. - -Addresses for those contracts can be found by querying the [registry](../contractkit/contracts-wrappers-registry.md) or in the [Listing Guide](./listings.md). - -### Proof of Stake -Users may want to participate in Celo's Proof of Stake system to help secure the network and earn rewards. - -### Authorized Signers -Celo's core smart contracts use Celo's `Accounts` abstraction to allow balance-moving keys to be held in cold storage, while other keys can be authorized to vote and be held in warm storage or online. - -### Release Gold -There is an audited `ReleaseGold` smart contract which allows for the release of CELO over a set schedule through which CELO might be distributed to a user. - -## Wallets -These suggestions apply to any application that custodies a key and allows users to interact and transfer value on the Celo platform. - -### Key Derivation -Celo wallets should follow the [BIP44](https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki) for deriving private keys from [BIP39 mnemonics](https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki). Celo's key derivation path is at `m/44'/52752'/0'/0`. The first key typically is the `account key` that wallets should register themselves with and accept balance transfers on. The second key can be derived to be an account's `dataEncryptionKey` to allow other users on Celo to encrypt information to. - -### Identity Protocol -Celo has a [lightweight identity protocol](/celo-codebase/protocol/identity) that allows users to address each other via their phone number instead of addresses that Celo wallets should implement. Since user privacy is important, Celo wallets should leverage the built-in [Phone Number Privacy protocol](/celo-codebase/protocol/identity/phone-number-privacy) to protect against large-scale harvesting of user phone numbers. - -### Wallet Address -When transferring assets to an account, wallets should check the receiving account's `walletAddress` at which they want to receive funds at. Use cases might be smart contract accounts that want different recovery characteristics, but receive funds at a different address. Also, `walletAddresses` of `0x0` should indicate that the account requires a different mechanism to acquire the `walletAddress`. - -### Transaction metadata -cUSD (aka StableToken) adds an additional method to the ERC20 interface called `transferWithComment` which allows senders to specify an additional comment that Celo wallets should support. Additionally, comments should be encrypted to the `dataEncryptionKey` when applicable. - -### Dappkit -The Celo ecosystem relies on a diverse set of applications to be built so that users can interact with them. To ensure interoperability and avoid fragmentation due to proprietary interfaces, wallets should be implementing the deeplink-based dappkit to have a consistent interface for dapp developers to implement. - -## Validator Group Explorers - -[Validator Group Explorers](../../celo-holder-guide/voting-validators.md#validator-explorers) are critical to Celo's Proof of Stake system. Explorers will consider using the following standards to provide a minimum experience across all explorers. - -### Names - -All Celo accounts on `Accounts.sol` can claim any name they want. While explorers should display it, they should also be cognizant of the fraud potential. - -### Identities - -Celo accounts can make claims to existing identities, some of which are verifiable (Domain Names or Keybase profiles). Explorers should consider displaying those identities to reduce the potential for impersonation. - -### Performance indicators - -Validator Groups and their validators can perform their duties differently and explorers should reflect that to allow voters to ensure an optimal validator set. While uptime in the form of block signatures by the validators ultimately affect rewards, explorers should also consider displaying [other metrics](../../celo-holder-guide/voting-validators.md#choosing-a-validator-group) that impact the success of the Celo ecosystem, such as validators' performance in the identity protocol. diff --git a/packages/docs/developer-resources/integrations/cloud-hsm.md b/packages/docs/developer-resources/integrations/cloud-hsm.md deleted file mode 100644 index ba51df09b49..00000000000 --- a/packages/docs/developer-resources/integrations/cloud-hsm.md +++ /dev/null @@ -1,104 +0,0 @@ -# Using a Cloud HSM - -A cloud Hardware Security Module (HSM) provides a good balance between security and accessibility. A cloud HSM can manage a Celo private key and can be used seamlessly with `celocli` and `contractkit`. Similar to a ledger device, a key in an HSM avoids the key from ever being sent over the network or stored on disk since the key can never leave the hardware boundary and all signing is performed within the HSM. To authenticate to the HSM, it's recommended to create a service principal account that has been granted access to sign with the managed keys. A cloud HSM can be a great option for managing vote signer keys, since you may want these keys to be portable but also maintain good security practices. This guide will walk you through creating a cloud HSM in Azure and connecting it to `celocli`. - -## Create an Azure subscription - -If you don't have an Azure subscription already, you can [create a free trial here](https://azure.microsoft.com/free/) that starts with $200 credit. You can [view the pricing for Eliptic Curve Cryptography (ECC) HSM keys here](https://azure.microsoft.com/pricing/details/key-vault/). - -## Deploy your Azure Key Vault - -The Key Vault can store keys, secrets, and certificates. Permission can be specified to perform certain actions across the entire Key Vault (ex. key signing). -- Search the marketplace for "Key Vault" -- Click Create and fill out the deployment information -- Ensure you select the Premium pricing tier for HSM support -- Enable soft-delete and purge protection to ensure your keys aren't accidentally deleted - -## Create your key - -Next, we'll create the ECDSA key. -- Navigate to your newly created Key Vault and click on the `Keys` section. -- Click on "Generate/Import" -- Select "EC-HSM" -- Select "SECP256K1" - -You'll see your newly generated key listed in the `Keys` section. - -```bash -# On your local machine -export AZURE_VAULT_NAME= -export AZURE_KEY_NAME= -``` - -## Create a Service Principal - -A Service Principal (SP) is preferred over your personal account so that permission can be heavily restricted. In general, Service Principal accounts should be used for any automation or services that need to access Azure resources. - -Use the [Cloud Shell](https://shell.azure.com/bash) to create the client credentials. - -Create a service principal and configure its access to Azure resources: - -```bash -# In the Cloud Shell -az ad sp create-for-rbac -n --skip-assignment -``` - -The account will be created and will output the account's credentials. - -```bash -{ - "appId": "generated-app-ID", - "displayName": "dummy-app-name", - "name": "http://dummy-app-name", - "password": "random-password", - "tenant": "tenant-ID" -} -``` - -Set these as environment variables so that they can be used by `celocli` or `contractkit`. - -```bash -# On your local machine -export AZURE_CLIENT_ID= -export AZURE_CLIENT_SECRET= -export AZURE_TENANT_ID= -``` - -## Grant your Service Principal access to the key - -In the Cloud Shell or Access Policies pane of the Key Vault, set the [GET, LIST, SIGN] permission for the new account. - -```bash -# In the Cloud Shell -az keyvault set-policy --name --spn $AZURE_CLIENT_ID --key-permissions get list sign -``` - -## Connecting CeloCLI to KeyVault - -Now that your environment variables are set, we just need to let `celocli` know that we want to use this Key Vault signer. We do this by passing in the flag `--useAKV` and `--azureVaultName`. Similar to `--useLedger`, all CLI commands will use the HSM signer when `--useAKV` is specified. - -```bash -# On your local machine -celocli account:list --useAKV --azureVaultName $AZURE_VAULT_NAME -``` - -Your Key Vault address will show up under "Local Addresses". If you'd like to use this key as your vote signer key, you can follow [this guide](../../celo-holder-guide/quick-start.md#authorize-vote-signer-keys) and replace `--useLedger` with `--useAKV --azureVaultName $AZURE_VAULT_NAME`. - -## Connecting ContractKit to KeyVault - -To leverage your HSM keys in `contractkit`, first create an `AzureHSMWallet` object and use it to create a `ContractKit` object with `newKitFromWeb3`. Note that `AzureHSMWallet` expects AZURE_CLIENT_ID, AZURE_CLIENT_SECRET, and AZURE_TENANT_ID environment variables to be specified. - -```js -import { ContractKit, newKitFromWeb3 } from '@celo/contractkit' -import { AzureHSMWallet } from '@celo/wallet-hsm-azure' - -const azureVaultName = "AZURE-VAULT-NAME" -const akvWallet = await new AzureHSMWallet(azureVaultName) -await akvWallet.init() -console.log(`Found addresses: ${await akvWallet.getAccounts()}`) -const contractKit = newKitFromWeb3(this.web3, akvWallet) -``` - -## Summary - -You can now leverage a cloud HSM key to perform signing as a user or application. This improves both security and availability of your Celo keys. We also recommend enabling two-factor authentication across your Azure subscription and to leverage [Managed Service Identities](https://docs.microsoft.com/azure/active-directory/managed-identities-azure-resources/overview) where possible. diff --git a/packages/docs/developer-resources/integrations/custody.md b/packages/docs/developer-resources/integrations/custody.md deleted file mode 100644 index 247e8e782fe..00000000000 --- a/packages/docs/developer-resources/integrations/custody.md +++ /dev/null @@ -1,80 +0,0 @@ -# Custodying Celo Assets and Monitoring Balances - -This section is intended for Custodians, Exchanges, and other services that intend to custody Celo assets such as Celo Dollar and CELO on behalf of a user. Generally speaking, custodying CELO, the native token on the Celo network, requires understanding the various states that CELO can exist in at any time. This is to provide useful services beyond custody such as allowing users to lock up their CELO and vote with it. Many of these "states" are implemented as smart contracts, and involve sending CELO from a user owned account to a contract address. Thus, in order to be able to show a user's true balance, services need to be able to observe every balance changing operation and reconcile CELO balances from all the various contracts and states CELO can be in. - -## Balance Model - -As a fork of Ethereum, Celo retains the account model to keep track of users' balances. Celo Dollar and CELO implement the [ERC20](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md) interface. As mentioned previously, it is common for smart contracts to hold balances on behalf of other addresses. One example is the [`LockedGold`](../../celo-codebase/protocol/proof-of-stake/locked-gold.md) smart contract that holds the "locked portion of a user's `CELO` balance". Another one is the [`ReleaseGold`](https://github.com/celo-org/celo-monorepo/blob/master/packages/protocol/contracts/governance/ReleaseGold.sol) smart contract that holds `CELO` that is being released to a beneficiary address over time according to some schedule. - -{% hint style="warning" %} -Celo assets assets exist on an independent blockchain, and although they implement the ERC20 interface, they cannot be accessed through wallets that connect to the Ethereum network. Wallets and other integrations must connect to the Celo network to transfer tokens on Celo. -{% endhint %} - -Applications that display balances may need to be written to be aware of this possibility. - -## Transfers - -CELO and Celo Dollars implement the ERC20 interface, as will any future core stable Celo currencies. CELO, as the native currency of the network, can also be transferred by specifying the value field of a transaction, in the same way that ETH can be transferred in Ethereum. Therefore, for CELO, application developers should be aware that transactions can be specified in both ways. - -## CELO State Machine - -CELO as described previously can also exist in various states that represent a specific user behavior. For example, if a user wants to lock CELO to either participate in consensus directly or vote, that CELO will be sent to the `LockedGold` smart contract. To understand the high level flow, please read [this description of the various states CELO can exist in](../../celo-codebase/protocol/proof-of-stake/locked-gold.md#locking-and-voting-flow). - -## Smart Contracts - -The following smart contracts are helpful to understand in order to map the conceptual states to actual accounts and function calls. - -### Accounts - -[Accounts.sol](https://github.com/celo-org/celo-monorepo/blob/master/packages/protocol/contracts/common/Accounts.sol) allows the mapping of an address to an account in storage, after which all further functionality (locking, voting, etc.) can be accessed. - -The [`createAccount`](https://github.com/celo-org/celo-monorepo/blob/master/packages/protocol/contracts/common/Accounts.sol#L103) function indexes the address as an account in storage, and is required to differentiate an arbitrary key-pair from a user-owned account in the Celo network. - -The `Accounts` contract also allows for the authorization of various signer keys, such as a [vote signer key](https://github.com/celo-org/celo-monorepo/blob/master/packages/protocol/contracts/common/Accounts.sol#L175). This allows for the user who owns the primary account key to authorize a separate key that can only vote on behalf of the account. This allows for the ability to custody keys in a manner corresponding to their exposure or "warmth". Eg. the primary account private key can be kept in cold storage after authorizing the signer keys, which can be in warmer environments, and potentially more exposed to the network. See the [key management guide](../../validator-guide/key-management/detailed.md) for more details. - -### LockedGold - -[LockedGold.sol](https://github.com/celo-org/celo-monorepo/blob/master/packages/protocol/contracts/governance/LockedGold.sol), which references Celo Gold, the deprecated name for the native token, is used as part of Celo's [proof-of-stake](/../../celo-codebase/protocol/proof-of-stake/README.md) mechanism. Users can lock CELO by sending it to the `LockedGold` contract after creating an account via the `Accounts` contract as described above. This allows users to vote in validator elections, receive epoch rewards, and participate in on-chain governance. - -There are two ways in which users can vote: - -- Directly, by sending voting transactions with the same key used to lock up CELO -- Via an authorized vote signer, which can submit voting transactions on behalf of the account with locked CELO - -`LockedGold` has a mapping of addresses to `balances` which is a [type](https://github.com/celo-org/celo-monorepo/blob/master/packages/protocol/contracts/governance/LockedGold.sol#L26) that contains both the `nonvoting` amount of CELO as well as `pendingWithdrawals`, which contain values corresponding to timestamps at which they can be withdrawn. The reason for the latter is because all locked CELO has an unlocking period that is [set at time of contract initialization](https://github.com/celo-org/celo-monorepo/blob/master/packages/protocol/contracts/governance/LockedGold.sol#L78), which is 3 days in the Celo network's deployed `LockedGold` contract. Hence, if users unlock CELO in tranches, multiple pending withdrawals could exist at once. Once the timestamp has eclipsed, CELO can be [withdrawn back to the user's address](https://github.com/celo-org/celo-monorepo/blob/master/packages/protocol/contracts/governance/LockedGold.sol#L193). - -### Election - -Once CELO has been locked via `LockedGold`, it can then be used to vote for validator groups. [Election.sol](https://github.com/celo-org/celo-monorepo/blob/master/packages/protocol/contracts/governance/Election.sol) is the contract that manages this functionality. - -The `votes` in this contract are tracked by a [Votes type](https://github.com/celo-org/celo-monorepo/blob/master/packages/protocol/contracts/governance/Election.sol#L87) which has `pending`, `active`, and `total` votes. Pending votes are those that have been cast for a validator group, and active votes are those that have been activated after an epoch, meaning that these votes generate voter rewards. - -Votes are cast for a validator group using the [`vote` function](https://github.com/celo-org/celo-monorepo/blob/master/packages/protocol/contracts/governance/Election.sol#L229). This increments the `pending` and `total` votes in the `Election` contract, and decrements the equivalent amount of CELO from the `nonvoting` balance in the `LockedGold` contract, for the associated account. - -The [`activate` function](https://github.com/celo-org/celo-monorepo/blob/master/packages/protocol/contracts/governance/Election.sol#L263) can then be called to shift `pending` votes into `active` votes in a following epoch. Votes in either state can then be revoked, which decrements votes from the `Election` contract and returns them to the `LockedGold` balance for the associated account. Users can revoke votes at any time and this takes effect instantly. - -### ReleaseGold - -A common problem in other proof-of-stake protocols is the tension between wanting early token holders' balances to release over time to ensure long-term alignment, while also wanting them to be able to participate in consensus to increase the security of the network. To bridge both goals, many early token balances in the Celo network are released via the [`ReleaseGold`](https://github.com/celo-org/celo-monorepo/blob/master/packages/protocol/contracts/governance/ReleaseGold.sol) contract. Beneficiaries of these contracts can then participate in the proof-of-stake system by staking and voting with CELO that has not yet been "released" for transfers. Please find more high level information about the `ReleaseGold` contract [here](../../celo-holder-guide/release-gold.md). - -From a technical perspective, `ReleaseGold` can be thought of as a "puppet" account controlled by the "puppeteer", or the beneficiary private key corresponding to the `beneficiary` address in the contract. This beneficiary key can then authorize validator signer and vote signer keys that can then call respective functions associated with validating or voting. Most of the required function calls described above can be made by the signer keys directly to the `LockedGold` or `Election` contracts associated with the `ReleaseGold` account. However, some functions in the `ReleaseGold` contract are proxied to the underlying `LockedGold` or `Election` contracts, and have a separate function signature that can be called by the `beneficiary` address. Notably: - -- [`createAccount`](https://github.com/celo-org/celo-monorepo/blob/master/packages/protocol/contracts/governance/ReleaseGold.sol#L669) -- [`authorizeVoteSigner`](https://github.com/celo-org/celo-monorepo/blob/master/packages/protocol/contracts/governance/ReleaseGold.sol#L525) and similar functions for other signer keys -- [`lockGold`](https://github.com/celo-org/celo-monorepo/blob/master/packages/protocol/contracts/governance/ReleaseGold.sol#L469) and [`unlockGold`](https://github.com/celo-org/celo-monorepo/blob/master/packages/protocol/contracts/governance/ReleaseGold.sol#L477) - -Notice that all these functions have corresponding functions that are called on the underlying contract. The `ReleaseGold` contract can then just be thought of as brokering the transaction to the correct place, when necessary. - -## Other Balance Changing Operations - -In addition to transfers (both native and ERC-20) and locking / voting flows affecting user balances, there are also several additional Celo network features that may cause user balances to change: - -- Gas fee payments: the fee paid by transaction senders to use the network -- Tobin tax: a tax on CELO transfers when the reserve balance is low and needs to be repleted -- Epoch rewards distribution: reward payments to voters, validators, and validator groups - -Some of these may occur as events rather than transactions on the network, and therefore when updating balances, special attention should be paid to them. - -## Useful Tools - -Since monitoring balance changing operations is important to be able to display user balances properly, it can be helpful to use a tracing or reconciling system. [Celo Rosetta](https://github.com/celo-org/rosetta) is an RPC server that exposes an API to query the Celo blockchain, obtain balance changing operations, and construct airgapped transactions. With a special focus on getting balance change operations, Celo Rosetta provides an easy way to obtain changes that are not easily queryable using the celo-blockchain RPC. diff --git a/packages/docs/developer-resources/integrations/general.md b/packages/docs/developer-resources/integrations/general.md deleted file mode 100644 index 6ca52cbbc41..00000000000 --- a/packages/docs/developer-resources/integrations/general.md +++ /dev/null @@ -1,84 +0,0 @@ -# General - -Here you find some general information about integrations regardless of your service or use case: - -## Accessing the chain - -There are a myriad of ways through which you can access chain data: - -### Running your own node - -To be completely independent and have a reliable view into the latest chain data, you will likely want to run your own node(s). - -You can just clone [`celo-blockchain`](https://github.com/celo-org/celo-blockchain) and then run `make geth` to receive the binary. - -By default, `geth` will use `/root/.celo` as the data dir, if you would like to change that specify the `--datadir` argument. - -This is all you should need to connect to a network: - -For Mainnet: - -```bash -geth -``` - -For Alfajores: - -```bash -geth --alfajores -``` - -For Baklava: - -```bash -geth --baklava -``` - -For more command line options, please see [https://github.com/ethereum/go-ethereum/wiki/Command-Line-Options](https://github.com/ethereum/go-ethereum/wiki/Command-Line-Options) - - -### Forno - -Forno is a hosted node service for interacting with the Celo network. This allow the user to get connected to the Celo Blockchain without having to run its own node. - -Can be used as an `Http Provider` with `ContractKit` - -As Forno is a public node you will have to sign transactions locally because with your own private key, because Forno doesn't store them. But don't worry, the `ContractKit` will handle this for you. - -Forno networks: - -``` -Alfajores = 'https://alfajores-forno.celo-testnet.org' - -Baklava = 'https://baklava-forno.celo-testnet.org' - -Mainnet = 'https://forno.celo.org' -``` - -### Blockscout - -We also expose data on the cLabs run blockscout instance. Blockscout itself exposes an API. - -``` -Alfajores = 'https://alfajores-blockscout.celo-testnet.org' - -Baklava = 'https://baklava-blockscout.celo-testnet.org' - -Mainnet = 'https://explorer.celo.org/' -``` - - -## Signing Transactions - -Compared to Ethereum transaction, Celo transactions have 3 additional, optional fields: - -- `feeCurrency` - Specifies the address of the currency in which fees should be paid. If `null`, the native token `CELO` is assumed. -- `gatewayFeeRecipient` - As part of [Full Node Incentives](../../celo-codebase/protocol/transactions/full-node-incentives.md), light clients will need to specify the address of their gateway for it to forward the transactions onto the network. -- `gatewayFee` - The value of the gateway fee. - -[Read more about Celo Transactions](../../celo-codebase/protocol/transactions) - -To sign transactions, you have the following options: - -- Use the JSON-RPC [`sendTransaction`](https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_sendtransaction) method to your node which would have the account in question unlocked. (Either manually or via a library such as `web3`) -- Use [ContractKit's](../contractkit/README.md) local signing feature. diff --git a/packages/docs/developer-resources/integrations/integrations.md b/packages/docs/developer-resources/integrations/integrations.md deleted file mode 100644 index a98e9955c80..00000000000 --- a/packages/docs/developer-resources/integrations/integrations.md +++ /dev/null @@ -1,8 +0,0 @@ -This section gives some guides about common ways of integrating Celo into your service. - -The [General](general.md) page provides some general information about integrating with Celo. - -The [Custody](custody.md) page provides information that may be more relevant to custodians, exchanges and other services that intend to custody Celo assets such as the Celo Dollar and CELO on behalf of a user. - -The [Using a Cloud HSM](cloud-hsm.md) page provides information about how to integrate with cloud hardware security modules. - diff --git a/packages/docs/developer-resources/integrations/listings.md b/packages/docs/developer-resources/integrations/listings.md deleted file mode 100644 index 7cf7aee1e66..00000000000 --- a/packages/docs/developer-resources/integrations/listings.md +++ /dev/null @@ -1,126 +0,0 @@ -# Listing Guide -Welcome to the Listing Guide documentation page. If you are a digital asset exchange or ranking site, this guide will help you run a node and audit your setup. - -## Support -If you have any questions or need assistance with these instructions, please contact cLabs or ask in the #exchanges channel on [Celo’s Discord server](https://chat.celo.org/). Remember that Discord is a public channel: never disclose recovery phrases (also known as backup keys, or mnemonics), private keys, unsanitized log output, or personal information. - -This guide will also help you find all the necessary information about brand assets, how to integrate with Celo and what useful listing information are made available to you as well as any information about looking for support. - -## Celo Brand Assets for Listing -If you are listing Celo on your exchange, you will probably need access to the Celo Platform brand assets. They can be found [here](https://celo.org/experience/brand#overview). - -Please ensure your use of the Celo Platform assets provided follows the brand policy found [here](https://celo.org/brand-policy). - -## How To's -### Integrating Celo With Your Infrastructure -There are several ways to integrate the Celo Platform with your infrastructure. - -A general overview of integrations that would be relevant to you listing Celo Platform are shown [here](https://docs.celo.org/developer-guide/integrations/general). - -For more specific use-cases for exchanges, please checkout the [Custody and Exchange Integration Guide](https://docs.celo.org/developer-guide/integrations/custody) as well. - -## Important Information -### Celo Native Asset and Stable Value Currencies - -There are key assets on the Celo network, the Celo native asset (CELO) and Celo-powered Stable Value Currencies, such as Celo Dollar (cUSD) and Celo Euro (cEUR). CELO was formerly called Celo Gold (cGLD) when the contract was deployed, so you will often see references to Celo Gold and CGLD in the codebase. To learn more about the two, please read [this](https://docs.celo.org/developer-guide/celo-for-eth-devs#the-celo-native-asset-and-the-celo-dollar) section of the docs. - -You can also view the CGP proposal regarding the name change [here](https://github.com/celo-org/celo-proposals/blob/master/CGPs/0003.md) and the forum post about the name change [here](https://forum.celo.org/t/proposal-to-rename-celo-gold-to-celo-native-asset/528). - -## Resources -### Address for CELO and Stable Value Currencies - -* CELO ($CELO) - [`0x471ece3750da237f93b8e339c536989b8978a438`](https://explorer.celo.org/address/0x471ece3750da237f93b8e339c536989b8978a438/transactions) -* Celo Dollar ($cUSD) - [`0x765de816845861e75a25fca122bb6898b8b1282a`](https://explorer.celo.org/address/0x765de816845861e75a25fca122bb6898b8b1282a/transactions) -* Celo Euro ($cEUR) - [`0xd8763cba276a3738e6de85b4b3bf5fded6d6ca73`](https://explorer.celo.org/address/0xd8763cba276a3738e6de85b4b3bf5fded6d6ca73/transactions) - - -### Useful API endpoints -The following are useful API endpoints available to you that would help you in your listings of the CELO and cUSD digital assets. - -#### CELO and Stable Value Currencies - -##### Total CELO supply -For querying the API on total coins in circulation in CELO, which are the total amount of coins in existence right now, the following endpoint will provide you with that: -```sh -$ curl [https://thecelo.com/api/v0.1.js?method=ex_totalcoins](https://thecelo.com/api/v0.1.js?method=ex_totalcoins) {"code":"200","msg":"success","data":{"CELO":608485841.9959723,"cUSD":10250632.56099673}} -``` - -##### Stable Value Currencies -###### cUSD Circulating Supply -Circulating Supply refers to the # of coins that are circulating in the market and in the general public's hands. -```sh -$ curl https://thecelo.com/api/v0.1.js?method=ex_cusd_circulating -11353464.550486518 -``` -###### cEUR Circulating Supply -This endpoint is not yet available. -#### CP-DOTO (Stability Algorithm) - -CP-DOTO information can be found [here](https://docs.celo.org/celo-codebase/protocol/stability/doto). - -For API endpoints useful for listing that follow [CMC requirements](https://docs.google.com/document/d/1S4urpzUnO2t7DmS_1dc4EL4tgnnbTObPYXvDeBnukCg/edit#) - -##### Mento Addresses -* cUSD/CELO contract - [`0x67316300f17f063085Ca8bCa4bd3f7a5a3C66275`](https://explorer.celo.org/address/0x67316300f17f063085Ca8bCa4bd3f7a5a3C66275/transactions) -* cEUR/CELO contract - [`0xE383394B913d7302c49F794C7d3243c429d53D1d`](https://explorer.celo.org/address/0xE383394B913d7302c49F794C7d3243c429d53D1d/transactions) - -##### Summary -Summary overview of market data for all tickers and all markets. These endpoints don't yet support cEUR. - -```sh -$ curl https://thecelo.com/api/v0.1.js?method=ex_summary - -{"trading_pairs":"CELO_CUSD","last_price":2.6143,"lowest_ask":2.5933609958506225,"highest_bid":2.5676,"base_volume":37524.32000000003,"quote_volume":14714.520000000002,"price_change_percent_24h":3.7027120070382127,"highest_price_24h":2.649,"lowest_price_24h":2.4787}} -``` - -##### Assets -In depth details of the assets available on the exchange. - -```sh -$ curl https://thecelo.com/api/v0.1.js?method=ex_assets - -{"code":"200","msg":"success","data":{"CELO":{"name":"CELO","unified_cryptoasset_id":"5567","can_withdraw":"true","can_deposit":"true","min_withdraw":"0.000000000000000001","max_withdraw":"0.000000000000000001","maker_fee":"0.00","taker_fee":"0.005"},"CUSD":{"name":"Celo Dollars","unified_cryptoasset_id":"825","can_withdraw":"true","can_deposit":"true","min_withdraw":"0.000000000000000001","max_withdraw":"0.000000000000000001","maker_fee":"0.00","taker_fee":"0.005"}}} -``` - -##### Ticker -24-hour rolling window price change statistics. - -```sh -$ curl https://thecelo.com/api/v0.1.js?method=ex_ticker - -{"code":"200","msg":"success","data":{"CELO_CUSD":{"base_id":"5567","quote_id":"825","last_price":2.6124,"quote_volume":14789.520000000002,"base_volume":37720.30000000003,"isFrozen":"0"}}} -``` - -##### Orderbook -Market depth of a trading pair. One array containing a list of ask prices and another array containing bid prices. - -```sh -$ curl https://thecelo.com/api/v0.1.js?method=ex_orderbook - -{"code":"200","msg":"success","data":{"timestamp":1601061465962,"bids":[["2.5964","100"]],"asks":[["2.622606871230003","100"]]}} -``` - -##### CELO cUSD -Recently completed (past 24h) trades. - -```sh -$ curl https://thecelo.com/api/v0.1.js?method=ex_celocusd - -{"code":"200","msg":"success","data":{"CELO_CUSD":[{"trade_id":2697341,"timestamp":1601061491,"price":0.38238291620515147,"quote_volume":25,"base_volume":65.37948987916423,"type":"Sell"},{"trade_id":2697336,"timestamp":1601061466,"price":0.382293821845672,"quote_volume":25,"base_volume":65.39472670341044,"type":"Sell"}]}} -``` - -### Whitepapers -To learn about the Celo Protocol, please refer to the [whitepaper](https://celo.org/papers/Celo_A_Multi_Asset_Cryptographic_Protocol_for_Decentralized_Social_Payments.pdf). - -If you need more information to explore other aspects of the Celo Protocol, there’s a [useful links](https://docs.celo.org/#useful-links) page. - -To learn more about the Stability Mechanism, you can find it over [here](https://docs.celo.org/celo-codebase/protocol/stability). -The [Stability Analysis Whitepaper](https://celo.org/papers/Celo_Stability_Analysis.pdf) and [blog post](https://medium.com/celohq/a-look-at-the-celo-stability-analysis-white-paper-part-1-23edd5ef8b5) will provide a lot more information on the stability algorithm. - -If you want to find more information about the Celo Reserve, a diversified portfolio of cryptocurrencies supporting the ability of the Celo protocol to expand and contract the supply of Celo stable assets, please visit [https://celoreserve.org](https://celoreserve.org ). - -### Github -The Celo Protocol GitHub is located [here.](https://github.com/celo-org/) - -### Audits -All the security audits on the smart contracts, security and economics of the Celo Platform can be found [here](https://celo.org/audits). diff --git a/packages/docs/developer-resources/introduction.md b/packages/docs/developer-resources/introduction.md deleted file mode 100644 index b6b6a2248e0..00000000000 --- a/packages/docs/developer-resources/introduction.md +++ /dev/null @@ -1,20 +0,0 @@ -# The Celo SDK - -Welcome to the Celo SDK Docs Homepage! Here, you can find resources for DAppKit and ContractKit, two services that allow you to build mobile dApps, apps, and more on Celo. - -- **[ContractKit](contractkit/README.md)** is a library to help developers and validators interact with the Celo Blockchain and Celo Core Contracts. It is well suited to developers looking for an easy way to integrate Celo Smart Contracts within their applications. - -- **[DAppKit](dappkit/README.md)** is a lightweight set of functions that allow mobile DApps to work with the Celo Wallet to sign transactions and access the user's account. This allows for a better user experience: DApps can focus on a great native experience without having to worry about key management. It also provides a simpler development experience, as no state or connection management is necessary. - -- **[Forno](forno/README.md)** is a hosted node service for interacting with the Celo network. This allow the user to get connected to the Celo Blockchain without having to run its own node. - -## Get Started -To get started, check out the [Quick Start Guides](start.md) - -## Get Involved - -If you'd like to see the Celo SDK expanded to support your favorite technology or application, please join the conversation on the [Celo Forum](https://forum.celo.org/c/applications-and-ecosystem-development) or [Discord](https://discordapp.com/channels/600834479145353243/600834479145353245) and tell us what you'd like to build- we highly encourage contributions! - -{% hint style="info" %} -Please note, financial products built on the Celo protocol may be regulated in their respective jurisdictions, so it is important that developers are responsible and attentive to their end consumers and the regulations that may apply. This commitment is also part of the [Celo Code of Conduct](https://celo.org/code-of-conduct). -{% endhint %} diff --git a/packages/docs/developer-resources/keystores/reference/README.md b/packages/docs/developer-resources/keystores/reference/README.md deleted file mode 100644 index d99af247a00..00000000000 --- a/packages/docs/developer-resources/keystores/reference/README.md +++ /dev/null @@ -1,162 +0,0 @@ -# @celo/keystores - -

- - celo logo - -

- -**Celo Monorepo - Official repository for core projects comprising the Celo platform** - -This repository contains the source code for the Celo core projects including the [smart contracts](https://github.com/celo-org/celo-monorepo/tree/master/packages/protocol), [wallet app](https://github.com/celo-org/celo-monorepo/tree/master/packages/mobile), -and other packages. The source code for the Celo Blockchain which operates a node on the Celo Network is kept in a separate repo [here](https://github.com/celo-org/celo-blockchain). - - - -[![CircleCI](https://img.shields.io/circleci/build/github/celo-org/celo-monorepo/master)](https://circleci.com/gh/celo-org/celo-monorepo/tree/master) -[![Codecov](https://img.shields.io/codecov/c/github/celo-org/celo-monorepo)](https://codecov.io/gh/celo-org/celo-monorepo) -[![GitHub contributors](https://img.shields.io/github/contributors/celo-org/celo-monorepo)](https://github.com/celo-org/celo-monorepo/graphs/contributors) -[![GitHub commit activity](https://img.shields.io/github/commit-activity/w/celo-org/celo-monorepo)](https://github.com/celo-org/celo-monorepo/graphs/contributors) -[![GitHub Stars](https://img.shields.io/github/stars/celo-org/celo-monorepo.svg)](https://github.com/celo-org/celo-monorepo/stargazers) -![GitHub repo size](https://img.shields.io/github/repo-size/celo-org/celo-monorepo) -[![GitHub](https://img.shields.io/github/license/celo-org/celo-monorepo?color=blue)](https://github.com/celo-org/celo-monorepo/blob/master/LICENSE) - - - -[![Website celo.org](https://img.shields.io/website-up-down-green-red/https/celo.org.svg)](https://celo.org) -[![Blog](https://img.shields.io/badge/blog-up-green)](https://medium.com/celoorg) -[![docs](https://img.shields.io/badge/docs-up-green)](https://docs.celo.org/) -[![Youtube](https://img.shields.io/badge/YouTube%20channel-up-green)](https://www.youtube.com/channel/UCCZgos_YAJSXm5QX5D5Wkcw/videos?view=0&sort=p&flow=grid) -[![forum](https://img.shields.io/badge/forum-up-green)](https://forum.celo.org) -[![Discord](https://img.shields.io/discord/600834479145353243.svg)](https://discord.gg/RfHQKtY) -[![Twitter CeloDevs](https://img.shields.io/twitter/follow/celodevs?style=social)](https://twitter.com/celodevs) -[![Twitter CeloOrg](https://img.shields.io/twitter/follow/celoorg?style=social)](https://twitter.com/CeloOrg) -[![Subreddit subscribers](https://img.shields.io/reddit/subreddit-subscribers/CeloHQ?style=social)](https://www.reddit.com/r/CeloHQ/) - - - -[![GitHub pull requests by-label](https://img.shields.io/github/issues-pr-raw/celo-org/celo-monorepo)](https://github.com/celo-org/celo-monorepo/pulls) -[![GitHub Issues](https://img.shields.io/github/issues-raw/celo-org/celo-monorepo.svg)](https://github.com/celo-org/celo-monorepo/issues) -[![GitHub issues by-label](https://img.shields.io/github/issues/celo-org/celo-monorepo/1%20hour%20tasks)](https://github.com/celo-org/celo-monorepo/issues?q=is%3Aopen+is%3Aissue+label%3A%221+hour+tasks%22) -[![GitHub issues by-label](https://img.shields.io/github/issues/celo-org/celo-monorepo/betanet-phase-2)](https://github.com/celo-org/celo-monorepo/issues?q=is%3Aopen+is%3Aissue+label%3Abetanet-phase-2) -[![GitHub issues by-label](https://img.shields.io/github/issues/celo-org/celo-monorepo/betanet-phase-3)](https://github.com/celo-org/celo-monorepo/issues?q=is%3Aopen+is%3Aissue+label%3Abetanet-phase-3) - -Contents: - - - -- [Celo's Mission - Prosperity for All](#mission) -- [The Celo Stack](#stack) -- [Documentation](#docs) -- [Issues](#issues) -- [Repo Structure](#repo) -- [Contributing](#contributing) -- [Ask Questions, Find Answers, Get in Touch](#ask) -- [License](#license) - - -## 🥅 Celo's Mission - Prosperity for All - -Celo, pronounced /ˈtselo/, means ‘purpose’ in Esperanto. In a similar spirit, we are aiming to create a new platform to connect people globally and bring financial stability to those who need it most. We believe blockchain technology is one of the most exciting innovations in recent history and as a community we look to push the boundaries of what is possible with it today. More importantly, we are driven by purpose -- to solve real-world problems such as lack of access to sound currency, or friction for cash-transfer programs aimed to alleviate poverty. Our mission is to build a monetary system that creates the conditions for prosperity for all. - - -

- - Play on Youtube - What if money were beautiful - -
- What if money were beautiful? -

- -## 🧱 The Celo Stack - -Celo is oriented around providing the simplest possible experience for end users, who may have no familiarity with cryptocurrencies, and may be using low cost devices with limited connectivity. To achieve this, the project takes a full-stack approach, where each layer of the stack is designed with the end user in mind whilst considering other stakeholders \(e.g. operators of nodes in the network\) involved in enabling the end user experience. - -The Celo stack is structured into the following logical layers: - - -

- Celo protocol -
- The Celo Blockchain and Celo Core Contracts together comprise the Celo Protocol -

- -- **Celo Blockchain**: An open cryptographic protocol that allows applications to make transactions with and run smart contracts in a secure and decentralized fashion. The Celo Blockchain has shared ancestry with [Ethereum](https://www.ethereum.org), and maintains full EVM compatibility for smart contracts. However it uses a [Byzantine Fault Tolerant](http://pmg.csail.mit.edu/papers/osdi99.pdf) \(BFT\) consensus mechanism rather than Proof of Work, and has different block format, transaction format, client synchronization protocols, and gas payment and pricing mechanisms. The network’s native asset is Celo Gold, exposed via an ERC-20 interface. - -- **Celo Core Contracts**: A set of smart contracts running on the Celo Blockchain that comprise much of the logic of the platform features including ERC-20 stable currencies, identity attestations, Proof of Stake and governance. These smart contracts are upgradeable and managed by the decentralized governance process. - - -

- Celo network -
- Topology of a Celo Network -

- -- **Applications:** Applications for end users built on the Celo platform. The Celo Wallet app, the first of an ecosystem of applications, allows end users to manage accounts and make payments securely and simply by taking advantage of the innovations in the Celo protocol. Applications take the form of external mobile or backend software: they interact with the Celo Blockchain to issue transactions and invoke code that forms the Celo Core Contracts’ API. Third parties can also deploy custom smart contracts that their own applications can invoke, which in turn can leverage Celo Core Contracts. Applications may use centralized cloud services to provide some of their functionality: in the case of the Celo Wallet, push notifications and a transaction activity feed. - -## 📚 Documentation - -Follow the instructions in [SETUP.md](SETUP.md) to get a development environment set up. - -See [Developer's Guide](https://docs.celo.org/) for full details about the design of the Celo protocol and other information about running these projects. - -## 🙋 Issues - -See the [issue backlog](https://github.com/celo-org/celo-monorepo/issues) for a list of active or proposed tasks. Feel free to create new issues to report bugs and/or request features. - -## 📂 Repo Structure - -The repository has the following packages (sub projects): - -- [attestation-service](packages/attestation-service) - service run by validators on the Celo network to send SMS messages, enabling attestations of user phone numbers and their accounts on the Celo network -- [blockchain-api](packages/blockchain-api) - service that uses Blockscout to present view of transactions by account for Celo Wallet activity feed -- [celotool](packages/celotool) - scripts for deploying and managing testnets -- [cli](packages/cli) - tool that uses ContractKit to interact with the Celo protocol ([docs](https://docs.celo.org/command-line-interface/introduction)) -- [contractkit](packages/contractkit) - library to help developers and validators interact with the protocol and it's smart contracts ([docs](https://docs.celo.org/celo-sdk/contractkit)) -- [dappkit](packages/dappkit) - set of functions for mobile DApps to work with the wallet app (ex. sign transactions and access the user's account) ([docs](https://docs.celo.org/celo-sdk/dappkit)) -- [dev-utils](packages/dev-utils) - a utils package for use as a dev dependency -- [docs](packages/docs) - technical documentation for the Celo project ([live](https://docs.celo.org/)) -- [faucet](packages/faucet) - faucet deployment configuration ([live](https://celo.org/build/faucet)) -- [helm-charts](packages/helm-charts) - templatized deployments of entire environments to Kubernetes clusters -- [mobile](packages/mobile) - Android wallet app for the Celo platform ([docs](https://docs.celo.org/getting-started/using-the-mobile-wallet), [live](https://play.google.com/store/apps/details?id=org.celo.mobile.alfajores)) -- [notification-service](packages/notification-service) - service for managing push notifications for Celo Wallet -- [protocol](packages/protocol) - identity, stability and other smart contracts for the Celo protocol ([docs](https://docs.celo.org/celo-codebase/protocol)) -- [react-components](packages/react-components) - generalized react native components -- [reserve-site](packages/reserve-site) - website for ([Celo Reserve.org](https://celoreserve.org/)) -- [terraform-modules](packages/terraform-modules) - templatized deployments of entire VM-based testnets for Google Cloud Platform -- [typescript](packages/typescript) - no README available (improve?) -- [utils](packages/utils) - no README available (improve?) - -Code owners for each package can be found in [.github/CODEOWNERS](.github/CODEOWNERS). - -## ✍️ Contributing - -Feel free to jump on the Celo 🚂🚋🚋🚋. Improvements and contributions are highly encouraged! 🙏👊 - -See the [contributing guide](https://docs.celo.org/community/contributing) for details on how to participate. -[![GitHub issues by-label](https://img.shields.io/github/issues/celo-org/celo-monorepo/1%20hour%20tasks)](https://github.com/celo-org/celo-monorepo/issues?q=is%3Aopen+is%3Aissue+label%3A%221+hour+tasks%22) - -All communication and contributions to the Celo project are subject to the [Celo Code of Conduct](https://celo.org/code-of-conduct). - -Not yet ready to contribute but do like the project? Support Celo with a ⭐ or share the love in a [![Twitter URL](https://img.shields.io/twitter/url?style=social&url=https%3A%2F%2Fcelo.org%2F)](https://twitter.com/intent/tweet?url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DkKggE5OvyhE&via=celohq&text=Checkout%20celo%21%20Love%20what%20they%20are%20building.&hashtags=celo) - - - -## 💬 Ask Questions, Find Answers, Get in Touch - -- [Website](https://celo.org/) -- [Docs](https://docs.celo.org/) -- [Blog](https://medium.com/celohq) -- [YouTube](https://www.youtube.com/channel/UCCZgos_YAJSXm5QX5D5Wkcw/videos?view=0&sort=p&flow=grid) -- [Forum](https://forum.celo.org) -- [Discord](https://discord.gg/vRbExjv) -- [Twitter](https://twitter.com/CeloDevs) -- [Reddit](https://www.reddit.com/r/CeloHQ/) -- [Community Events](https://celo.org/community) - -## 📜 License - -All packages are licensed under the terms of the [Apache 2.0 License](LICENSE) unless otherwise specified in the LICENSE file at package's root. diff --git a/packages/docs/developer-resources/keystores/reference/SUMMARY.md b/packages/docs/developer-resources/keystores/reference/SUMMARY.md deleted file mode 100644 index 1ec029bca1c..00000000000 --- a/packages/docs/developer-resources/keystores/reference/SUMMARY.md +++ /dev/null @@ -1,19 +0,0 @@ -* [Globals](globals.md) -* [Modules]() - * [file-keystore](modules/_file_keystore_.md) - * [FileKeystore](classes/_file_keystore_.filekeystore.md) - * [inmemory-keystore](modules/_inmemory_keystore_.md) - * [InMemoryKeystore](classes/_inmemory_keystore_.inmemorykeystore.md) - * [keystore-base](modules/_keystore_base_.md) - * [ErrorMessages](enums/_keystore_base_.errormessages.md) - * [KeystoreBase](classes/_keystore_base_.keystorebase.md) - * [keystore-wallet-wrapper](modules/_keystore_wallet_wrapper_.md) - * [KeystoreWalletWrapper](classes/_keystore_wallet_wrapper_.keystorewalletwrapper.md) - * [test-constants](modules/_test_constants_.md) -* [Classes]() - * [FileKeystore](classes/_file_keystore_.filekeystore.md) - * [InMemoryKeystore](classes/_inmemory_keystore_.inmemorykeystore.md) - * [KeystoreBase](classes/_keystore_base_.keystorebase.md) - * [KeystoreWalletWrapper](classes/_keystore_wallet_wrapper_.keystorewalletwrapper.md) -* [Enums]() - * [ErrorMessages](enums/_keystore_base_.errormessages.md) \ No newline at end of file diff --git a/packages/docs/developer-resources/keystores/reference/classes/_file_keystore_.filekeystore.md b/packages/docs/developer-resources/keystores/reference/classes/_file_keystore_.filekeystore.md deleted file mode 100644 index 4b453914968..00000000000 --- a/packages/docs/developer-resources/keystores/reference/classes/_file_keystore_.filekeystore.md +++ /dev/null @@ -1,284 +0,0 @@ -# Class: FileKeystore - -## Hierarchy - -* [KeystoreBase](_keystore_base_.keystorebase.md) - - ↳ **FileKeystore** - -## Index - -### Constructors - -* [constructor](_file_keystore_.filekeystore.md#constructor) - -### Methods - -* [changeKeystorePassphrase](_file_keystore_.filekeystore.md#changekeystorepassphrase) -* [deleteKeystore](_file_keystore_.filekeystore.md#deletekeystore) -* [getAddress](_file_keystore_.filekeystore.md#getaddress) -* [getAddressMap](_file_keystore_.filekeystore.md#getaddressmap) -* [getAllKeystoreNames](_file_keystore_.filekeystore.md#getallkeystorenames) -* [getKeystoreName](_file_keystore_.filekeystore.md#getkeystorename) -* [getPrivateKey](_file_keystore_.filekeystore.md#getprivatekey) -* [getRawKeystore](_file_keystore_.filekeystore.md#getrawkeystore) -* [importPrivateKey](_file_keystore_.filekeystore.md#importprivatekey) -* [listKeystoreAddresses](_file_keystore_.filekeystore.md#listkeystoreaddresses) -* [persistKeystore](_file_keystore_.filekeystore.md#persistkeystore) -* [removeKeystore](_file_keystore_.filekeystore.md#removekeystore) - -## Constructors - -### constructor - -\+ **new FileKeystore**(`keystoreDir`: string): *[FileKeystore](_file_keystore_.filekeystore.md)* - -*Defined in [file-keystore.ts:10](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/keystores/src/file-keystore.ts#L10)* - -Creates (but does not overwrite existing) directory -for containing keystore entries. - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`keystoreDir` | string | Path to directory where keystore will be saved | - -**Returns:** *[FileKeystore](_file_keystore_.filekeystore.md)* - -## Methods - -### changeKeystorePassphrase - -▸ **changeKeystorePassphrase**(`address`: string, `oldPassphrase`: string, `newPassphrase`: string): *Promise‹void›* - -*Inherited from [KeystoreBase](_keystore_base_.keystorebase.md).[changeKeystorePassphrase](_keystore_base_.keystorebase.md#changekeystorepassphrase)* - -*Defined in [keystore-base.ts:132](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/keystores/src/keystore-base.ts#L132)* - -Change secret phrase used to encrypt the private key of an address - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`address` | string | Account address | -`oldPassphrase` | string | Secret phrase used to encrypt the private key | -`newPassphrase` | string | New secret phrase to re-encrypt the private key | - -**Returns:** *Promise‹void›* - -___ - -### deleteKeystore - -▸ **deleteKeystore**(`address`: string): *Promise‹void›* - -*Inherited from [KeystoreBase](_keystore_base_.keystorebase.md).[deleteKeystore](_keystore_base_.keystorebase.md#deletekeystore)* - -*Defined in [keystore-base.ts:145](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/keystores/src/keystore-base.ts#L145)* - -Permanently removes keystore entry from keystore - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`address` | string | Account address of keystore to be deleted | - -**Returns:** *Promise‹void›* - -___ - -### getAddress - -▸ **getAddress**(`keystoreName`: string): *string* - -*Inherited from [KeystoreBase](_keystore_base_.keystorebase.md).[getAddress](_keystore_base_.keystorebase.md#getaddress)* - -*Defined in [keystore-base.ts:51](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/keystores/src/keystore-base.ts#L51)* - -Gets the address corresponding to a particular keystore entry - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`keystoreName` | string | Name of keystore entry belonging to the address | - -**Returns:** *string* - -Account address - -___ - -### getAddressMap - -▸ **getAddressMap**(): *Promise‹Record‹string, string››* - -*Inherited from [KeystoreBase](_keystore_base_.keystorebase.md).[getAddressMap](_keystore_base_.keystorebase.md#getaddressmap)* - -*Defined in [keystore-base.ts:72](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/keystores/src/keystore-base.ts#L72)* - -Maps account addresses to their respective keystore entries (names) - -**Returns:** *Promise‹Record‹string, string››* - -Record with account addresses as keys, keystore entry names as values - -___ - -### getAllKeystoreNames - -▸ **getAllKeystoreNames**(): *Promise‹string[]›* - -*Overrides [KeystoreBase](_keystore_base_.keystorebase.md).[getAllKeystoreNames](_keystore_base_.keystorebase.md#abstract-getallkeystorenames)* - -*Defined in [file-keystore.ts:27](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/keystores/src/file-keystore.ts#L27)* - -**Returns:** *Promise‹string[]›* - -List of file names (keystore entries) in the keystore - -___ - -### getKeystoreName - -▸ **getKeystoreName**(`address`: string): *Promise‹string›* - -*Inherited from [KeystoreBase](_keystore_base_.keystorebase.md).[getKeystoreName](_keystore_base_.keystorebase.md#getkeystorename)* - -*Defined in [keystore-base.ts:106](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/keystores/src/keystore-base.ts#L106)* - -Gets name of keystore entry corresponding to an address - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`address` | string | Account address | - -**Returns:** *Promise‹string›* - -Name of corresponding keystore entry - -___ - -### getPrivateKey - -▸ **getPrivateKey**(`address`: string, `passphrase`: string): *Promise‹string›* - -*Inherited from [KeystoreBase](_keystore_base_.keystorebase.md).[getPrivateKey](_keystore_base_.keystorebase.md#getprivatekey)* - -*Defined in [keystore-base.ts:120](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/keystores/src/keystore-base.ts#L120)* - -Gets decrypted (plaintext) private key for an account address - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`address` | string | Account address | -`passphrase` | string | Secret phrase used to encrypt the private key | - -**Returns:** *Promise‹string›* - -___ - -### getRawKeystore - -▸ **getRawKeystore**(`keystoreName`: string): *string* - -*Overrides [KeystoreBase](_keystore_base_.keystorebase.md).[getRawKeystore](_keystore_base_.keystorebase.md#abstract-getrawkeystore)* - -*Defined in [file-keystore.ts:45](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/keystores/src/file-keystore.ts#L45)* - -Gets contents of keystore entry file - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`keystoreName` | string | File name of keystore entry | - -**Returns:** *string* - -V3Keystore string entry - -___ - -### importPrivateKey - -▸ **importPrivateKey**(`privateKey`: string, `passphrase`: string): *Promise‹void›* - -*Inherited from [KeystoreBase](_keystore_base_.keystorebase.md).[importPrivateKey](_keystore_base_.keystorebase.md#importprivatekey)* - -*Defined in [keystore-base.ts:86](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/keystores/src/keystore-base.ts#L86)* - -Encrypts and stores a private key as a new keystore entry - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`privateKey` | string | Private key to encrypted | -`passphrase` | string | Secret string to encrypt private key | - -**Returns:** *Promise‹void›* - -___ - -### listKeystoreAddresses - -▸ **listKeystoreAddresses**(): *Promise‹string[]›* - -*Inherited from [KeystoreBase](_keystore_base_.keystorebase.md).[listKeystoreAddresses](_keystore_base_.keystorebase.md#listkeystoreaddresses)* - -*Defined in [keystore-base.ts:64](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/keystores/src/keystore-base.ts#L64)* - -Gets a list of all account addresses in the keystore - -**Returns:** *Promise‹string[]›* - -List of account address strings - -___ - -### persistKeystore - -▸ **persistKeystore**(`keystoreName`: string, `keystore`: string): *void* - -*Overrides [KeystoreBase](_keystore_base_.keystorebase.md).[persistKeystore](_keystore_base_.keystorebase.md#abstract-persistkeystore)* - -*Defined in [file-keystore.ts:36](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/keystores/src/file-keystore.ts#L36)* - -Saves keystore entries as a file in the keystore directory - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`keystoreName` | string | File name of keystore entry | -`keystore` | string | V3Keystore string entry | - -**Returns:** *void* - -___ - -### removeKeystore - -▸ **removeKeystore**(`keystoreName`: string): *void* - -*Overrides [KeystoreBase](_keystore_base_.keystorebase.md).[removeKeystore](_keystore_base_.keystorebase.md#abstract-removekeystore)* - -*Defined in [file-keystore.ts:53](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/keystores/src/file-keystore.ts#L53)* - -Deletes file keystore entry from directory - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`keystoreName` | string | File name of keystore entry to be removed | - -**Returns:** *void* diff --git a/packages/docs/developer-resources/keystores/reference/classes/_inmemory_keystore_.inmemorykeystore.md b/packages/docs/developer-resources/keystores/reference/classes/_inmemory_keystore_.inmemorykeystore.md deleted file mode 100644 index d9c15d30dac..00000000000 --- a/packages/docs/developer-resources/keystores/reference/classes/_inmemory_keystore_.inmemorykeystore.md +++ /dev/null @@ -1,251 +0,0 @@ -# Class: InMemoryKeystore - -## Hierarchy - -* [KeystoreBase](_keystore_base_.keystorebase.md) - - ↳ **InMemoryKeystore** - -## Index - -### Methods - -* [changeKeystorePassphrase](_inmemory_keystore_.inmemorykeystore.md#changekeystorepassphrase) -* [deleteKeystore](_inmemory_keystore_.inmemorykeystore.md#deletekeystore) -* [getAddress](_inmemory_keystore_.inmemorykeystore.md#getaddress) -* [getAddressMap](_inmemory_keystore_.inmemorykeystore.md#getaddressmap) -* [getAllKeystoreNames](_inmemory_keystore_.inmemorykeystore.md#getallkeystorenames) -* [getKeystoreName](_inmemory_keystore_.inmemorykeystore.md#getkeystorename) -* [getPrivateKey](_inmemory_keystore_.inmemorykeystore.md#getprivatekey) -* [getRawKeystore](_inmemory_keystore_.inmemorykeystore.md#getrawkeystore) -* [importPrivateKey](_inmemory_keystore_.inmemorykeystore.md#importprivatekey) -* [listKeystoreAddresses](_inmemory_keystore_.inmemorykeystore.md#listkeystoreaddresses) -* [persistKeystore](_inmemory_keystore_.inmemorykeystore.md#persistkeystore) -* [removeKeystore](_inmemory_keystore_.inmemorykeystore.md#removekeystore) - -## Methods - -### changeKeystorePassphrase - -▸ **changeKeystorePassphrase**(`address`: string, `oldPassphrase`: string, `newPassphrase`: string): *Promise‹void›* - -*Inherited from [KeystoreBase](_keystore_base_.keystorebase.md).[changeKeystorePassphrase](_keystore_base_.keystorebase.md#changekeystorepassphrase)* - -*Defined in [keystore-base.ts:132](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/keystores/src/keystore-base.ts#L132)* - -Change secret phrase used to encrypt the private key of an address - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`address` | string | Account address | -`oldPassphrase` | string | Secret phrase used to encrypt the private key | -`newPassphrase` | string | New secret phrase to re-encrypt the private key | - -**Returns:** *Promise‹void›* - -___ - -### deleteKeystore - -▸ **deleteKeystore**(`address`: string): *Promise‹void›* - -*Inherited from [KeystoreBase](_keystore_base_.keystorebase.md).[deleteKeystore](_keystore_base_.keystorebase.md#deletekeystore)* - -*Defined in [keystore-base.ts:145](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/keystores/src/keystore-base.ts#L145)* - -Permanently removes keystore entry from keystore - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`address` | string | Account address of keystore to be deleted | - -**Returns:** *Promise‹void›* - -___ - -### getAddress - -▸ **getAddress**(`keystoreName`: string): *string* - -*Inherited from [KeystoreBase](_keystore_base_.keystorebase.md).[getAddress](_keystore_base_.keystorebase.md#getaddress)* - -*Defined in [keystore-base.ts:51](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/keystores/src/keystore-base.ts#L51)* - -Gets the address corresponding to a particular keystore entry - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`keystoreName` | string | Name of keystore entry belonging to the address | - -**Returns:** *string* - -Account address - -___ - -### getAddressMap - -▸ **getAddressMap**(): *Promise‹Record‹string, string››* - -*Inherited from [KeystoreBase](_keystore_base_.keystorebase.md).[getAddressMap](_keystore_base_.keystorebase.md#getaddressmap)* - -*Defined in [keystore-base.ts:72](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/keystores/src/keystore-base.ts#L72)* - -Maps account addresses to their respective keystore entries (names) - -**Returns:** *Promise‹Record‹string, string››* - -Record with account addresses as keys, keystore entry names as values - -___ - -### getAllKeystoreNames - -▸ **getAllKeystoreNames**(): *Promise‹string[]›* - -*Overrides [KeystoreBase](_keystore_base_.keystorebase.md).[getAllKeystoreNames](_keystore_base_.keystorebase.md#abstract-getallkeystorenames)* - -*Defined in [inmemory-keystore.ts:18](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/keystores/src/inmemory-keystore.ts#L18)* - -**Returns:** *Promise‹string[]›* - -___ - -### getKeystoreName - -▸ **getKeystoreName**(`address`: string): *Promise‹string›* - -*Inherited from [KeystoreBase](_keystore_base_.keystorebase.md).[getKeystoreName](_keystore_base_.keystorebase.md#getkeystorename)* - -*Defined in [keystore-base.ts:106](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/keystores/src/keystore-base.ts#L106)* - -Gets name of keystore entry corresponding to an address - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`address` | string | Account address | - -**Returns:** *Promise‹string›* - -Name of corresponding keystore entry - -___ - -### getPrivateKey - -▸ **getPrivateKey**(`address`: string, `passphrase`: string): *Promise‹string›* - -*Inherited from [KeystoreBase](_keystore_base_.keystorebase.md).[getPrivateKey](_keystore_base_.keystorebase.md#getprivatekey)* - -*Defined in [keystore-base.ts:120](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/keystores/src/keystore-base.ts#L120)* - -Gets decrypted (plaintext) private key for an account address - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`address` | string | Account address | -`passphrase` | string | Secret phrase used to encrypt the private key | - -**Returns:** *Promise‹string›* - -___ - -### getRawKeystore - -▸ **getRawKeystore**(`keystoreName`: string): *string* - -*Overrides [KeystoreBase](_keystore_base_.keystorebase.md).[getRawKeystore](_keystore_base_.keystorebase.md#abstract-getrawkeystore)* - -*Defined in [inmemory-keystore.ts:14](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/keystores/src/inmemory-keystore.ts#L14)* - -**Parameters:** - -Name | Type | ------- | ------ | -`keystoreName` | string | - -**Returns:** *string* - -___ - -### importPrivateKey - -▸ **importPrivateKey**(`privateKey`: string, `passphrase`: string): *Promise‹void›* - -*Inherited from [KeystoreBase](_keystore_base_.keystorebase.md).[importPrivateKey](_keystore_base_.keystorebase.md#importprivatekey)* - -*Defined in [keystore-base.ts:86](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/keystores/src/keystore-base.ts#L86)* - -Encrypts and stores a private key as a new keystore entry - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`privateKey` | string | Private key to encrypted | -`passphrase` | string | Secret string to encrypt private key | - -**Returns:** *Promise‹void›* - -___ - -### listKeystoreAddresses - -▸ **listKeystoreAddresses**(): *Promise‹string[]›* - -*Inherited from [KeystoreBase](_keystore_base_.keystorebase.md).[listKeystoreAddresses](_keystore_base_.keystorebase.md#listkeystoreaddresses)* - -*Defined in [keystore-base.ts:64](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/keystores/src/keystore-base.ts#L64)* - -Gets a list of all account addresses in the keystore - -**Returns:** *Promise‹string[]›* - -List of account address strings - -___ - -### persistKeystore - -▸ **persistKeystore**(`keystoreName`: string, `keystore`: string): *void* - -*Overrides [KeystoreBase](_keystore_base_.keystorebase.md).[persistKeystore](_keystore_base_.keystorebase.md#abstract-persistkeystore)* - -*Defined in [inmemory-keystore.ts:10](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/keystores/src/inmemory-keystore.ts#L10)* - -**Parameters:** - -Name | Type | ------- | ------ | -`keystoreName` | string | -`keystore` | string | - -**Returns:** *void* - -___ - -### removeKeystore - -▸ **removeKeystore**(`keystoreName`: string): *void* - -*Overrides [KeystoreBase](_keystore_base_.keystorebase.md).[removeKeystore](_keystore_base_.keystorebase.md#abstract-removekeystore)* - -*Defined in [inmemory-keystore.ts:22](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/keystores/src/inmemory-keystore.ts#L22)* - -**Parameters:** - -Name | Type | ------- | ------ | -`keystoreName` | string | - -**Returns:** *void* diff --git a/packages/docs/developer-resources/keystores/reference/classes/_keystore_base_.keystorebase.md b/packages/docs/developer-resources/keystores/reference/classes/_keystore_base_.keystorebase.md deleted file mode 100644 index 8e2a1c836f5..00000000000 --- a/packages/docs/developer-resources/keystores/reference/classes/_keystore_base_.keystorebase.md +++ /dev/null @@ -1,237 +0,0 @@ -# Class: KeystoreBase - -## Hierarchy - -* **KeystoreBase** - - ↳ [FileKeystore](_file_keystore_.filekeystore.md) - - ↳ [InMemoryKeystore](_inmemory_keystore_.inmemorykeystore.md) - -## Index - -### Methods - -* [changeKeystorePassphrase](_keystore_base_.keystorebase.md#changekeystorepassphrase) -* [deleteKeystore](_keystore_base_.keystorebase.md#deletekeystore) -* [getAddress](_keystore_base_.keystorebase.md#getaddress) -* [getAddressMap](_keystore_base_.keystorebase.md#getaddressmap) -* [getAllKeystoreNames](_keystore_base_.keystorebase.md#abstract-getallkeystorenames) -* [getKeystoreName](_keystore_base_.keystorebase.md#getkeystorename) -* [getPrivateKey](_keystore_base_.keystorebase.md#getprivatekey) -* [getRawKeystore](_keystore_base_.keystorebase.md#abstract-getrawkeystore) -* [importPrivateKey](_keystore_base_.keystorebase.md#importprivatekey) -* [listKeystoreAddresses](_keystore_base_.keystorebase.md#listkeystoreaddresses) -* [persistKeystore](_keystore_base_.keystorebase.md#abstract-persistkeystore) -* [removeKeystore](_keystore_base_.keystorebase.md#abstract-removekeystore) - -## Methods - -### changeKeystorePassphrase - -▸ **changeKeystorePassphrase**(`address`: string, `oldPassphrase`: string, `newPassphrase`: string): *Promise‹void›* - -*Defined in [keystore-base.ts:132](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/keystores/src/keystore-base.ts#L132)* - -Change secret phrase used to encrypt the private key of an address - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`address` | string | Account address | -`oldPassphrase` | string | Secret phrase used to encrypt the private key | -`newPassphrase` | string | New secret phrase to re-encrypt the private key | - -**Returns:** *Promise‹void›* - -___ - -### deleteKeystore - -▸ **deleteKeystore**(`address`: string): *Promise‹void›* - -*Defined in [keystore-base.ts:145](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/keystores/src/keystore-base.ts#L145)* - -Permanently removes keystore entry from keystore - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`address` | string | Account address of keystore to be deleted | - -**Returns:** *Promise‹void›* - -___ - -### getAddress - -▸ **getAddress**(`keystoreName`: string): *string* - -*Defined in [keystore-base.ts:51](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/keystores/src/keystore-base.ts#L51)* - -Gets the address corresponding to a particular keystore entry - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`keystoreName` | string | Name of keystore entry belonging to the address | - -**Returns:** *string* - -Account address - -___ - -### getAddressMap - -▸ **getAddressMap**(): *Promise‹Record‹string, string››* - -*Defined in [keystore-base.ts:72](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/keystores/src/keystore-base.ts#L72)* - -Maps account addresses to their respective keystore entries (names) - -**Returns:** *Promise‹Record‹string, string››* - -Record with account addresses as keys, keystore entry names as values - -___ - -### `Abstract` getAllKeystoreNames - -▸ **getAllKeystoreNames**(): *Promise‹string[]›* - -*Defined in [keystore-base.ts:38](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/keystores/src/keystore-base.ts#L38)* - -Gets a list of the names of each entry in the keystore - -**Returns:** *Promise‹string[]›* - -___ - -### getKeystoreName - -▸ **getKeystoreName**(`address`: string): *Promise‹string›* - -*Defined in [keystore-base.ts:106](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/keystores/src/keystore-base.ts#L106)* - -Gets name of keystore entry corresponding to an address - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`address` | string | Account address | - -**Returns:** *Promise‹string›* - -Name of corresponding keystore entry - -___ - -### getPrivateKey - -▸ **getPrivateKey**(`address`: string, `passphrase`: string): *Promise‹string›* - -*Defined in [keystore-base.ts:120](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/keystores/src/keystore-base.ts#L120)* - -Gets decrypted (plaintext) private key for an account address - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`address` | string | Account address | -`passphrase` | string | Secret phrase used to encrypt the private key | - -**Returns:** *Promise‹string›* - -___ - -### `Abstract` getRawKeystore - -▸ **getRawKeystore**(`keystoreName`: string): *string* - -*Defined in [keystore-base.ts:33](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/keystores/src/keystore-base.ts#L33)* - -Returns raw encrypted keystore entry string by name - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`keystoreName` | string | Name of keystore entry to retrieve | - -**Returns:** *string* - -___ - -### importPrivateKey - -▸ **importPrivateKey**(`privateKey`: string, `passphrase`: string): *Promise‹void›* - -*Defined in [keystore-base.ts:86](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/keystores/src/keystore-base.ts#L86)* - -Encrypts and stores a private key as a new keystore entry - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`privateKey` | string | Private key to encrypted | -`passphrase` | string | Secret string to encrypt private key | - -**Returns:** *Promise‹void›* - -___ - -### listKeystoreAddresses - -▸ **listKeystoreAddresses**(): *Promise‹string[]›* - -*Defined in [keystore-base.ts:64](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/keystores/src/keystore-base.ts#L64)* - -Gets a list of all account addresses in the keystore - -**Returns:** *Promise‹string[]›* - -List of account address strings - -___ - -### `Abstract` persistKeystore - -▸ **persistKeystore**(`keystoreName`: string, `keystore`: string): *void* - -*Defined in [keystore-base.ts:27](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/keystores/src/keystore-base.ts#L27)* - -Saves encrypted keystore entry (i.e. to disk, database, ...). Must be implemented by subclass. - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`keystoreName` | string | Name of keystore entry to be saved | -`keystore` | string | encrypted V3Keystore string entry | - -**Returns:** *void* - -___ - -### `Abstract` removeKeystore - -▸ **removeKeystore**(`keystoreName`: string): *void* - -*Defined in [keystore-base.ts:44](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/keystores/src/keystore-base.ts#L44)* - -Removes keystore entry from keystore permanently - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`keystoreName` | string | Name of keystore entry to remove | - -**Returns:** *void* diff --git a/packages/docs/developer-resources/keystores/reference/classes/_keystore_wallet_wrapper_.keystorewalletwrapper.md b/packages/docs/developer-resources/keystores/reference/classes/_keystore_wallet_wrapper_.keystorewalletwrapper.md deleted file mode 100644 index 82e13de0043..00000000000 --- a/packages/docs/developer-resources/keystores/reference/classes/_keystore_wallet_wrapper_.keystorewalletwrapper.md +++ /dev/null @@ -1,107 +0,0 @@ -# Class: KeystoreWalletWrapper - -Convenience wrapper of the LocalWallet to connect to a keystore - -## Hierarchy - -* **KeystoreWalletWrapper** - -## Index - -### Constructors - -* [constructor](_keystore_wallet_wrapper_.keystorewalletwrapper.md#constructor) - -### Methods - -* [getKeystore](_keystore_wallet_wrapper_.keystorewalletwrapper.md#getkeystore) -* [getLocalWallet](_keystore_wallet_wrapper_.keystorewalletwrapper.md#getlocalwallet) -* [importPrivateKey](_keystore_wallet_wrapper_.keystorewalletwrapper.md#importprivatekey) -* [lockAccount](_keystore_wallet_wrapper_.keystorewalletwrapper.md#lockaccount) -* [unlockAccount](_keystore_wallet_wrapper_.keystorewalletwrapper.md#unlockaccount) - -## Constructors - -### constructor - -\+ **new KeystoreWalletWrapper**(`keystore`: [KeystoreBase](_keystore_base_.keystorebase.md)): *[KeystoreWalletWrapper](_keystore_wallet_wrapper_.keystorewalletwrapper.md)* - -*Defined in [keystore-wallet-wrapper.ts:9](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/keystores/src/keystore-wallet-wrapper.ts#L9)* - -**Parameters:** - -Name | Type | ------- | ------ | -`keystore` | [KeystoreBase](_keystore_base_.keystorebase.md) | - -**Returns:** *[KeystoreWalletWrapper](_keystore_wallet_wrapper_.keystorewalletwrapper.md)* - -## Methods - -### getKeystore - -▸ **getKeystore**(): *[KeystoreBase](_keystore_base_.keystorebase.md)* - -*Defined in [keystore-wallet-wrapper.ts:25](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/keystores/src/keystore-wallet-wrapper.ts#L25)* - -**Returns:** *[KeystoreBase](_keystore_base_.keystorebase.md)* - -___ - -### getLocalWallet - -▸ **getLocalWallet**(): *LocalWallet* - -*Defined in [keystore-wallet-wrapper.ts:21](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/keystores/src/keystore-wallet-wrapper.ts#L21)* - -**Returns:** *LocalWallet* - -___ - -### importPrivateKey - -▸ **importPrivateKey**(`privateKey`: string, `passphrase`: string): *Promise‹void›* - -*Defined in [keystore-wallet-wrapper.ts:16](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/keystores/src/keystore-wallet-wrapper.ts#L16)* - -**Parameters:** - -Name | Type | ------- | ------ | -`privateKey` | string | -`passphrase` | string | - -**Returns:** *Promise‹void›* - -___ - -### lockAccount - -▸ **lockAccount**(`address`: string): *Promise‹void›* - -*Defined in [keystore-wallet-wrapper.ts:34](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/keystores/src/keystore-wallet-wrapper.ts#L34)* - -**Parameters:** - -Name | Type | ------- | ------ | -`address` | string | - -**Returns:** *Promise‹void›* - -___ - -### unlockAccount - -▸ **unlockAccount**(`address`: string, `passphrase`: string): *Promise‹void›* - -*Defined in [keystore-wallet-wrapper.ts:29](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/keystores/src/keystore-wallet-wrapper.ts#L29)* - -**Parameters:** - -Name | Type | ------- | ------ | -`address` | string | -`passphrase` | string | - -**Returns:** *Promise‹void›* diff --git a/packages/docs/developer-resources/keystores/reference/enums/_keystore_base_.errormessages.md b/packages/docs/developer-resources/keystores/reference/enums/_keystore_base_.errormessages.md deleted file mode 100644 index 2e04491cfb1..00000000000 --- a/packages/docs/developer-resources/keystores/reference/enums/_keystore_base_.errormessages.md +++ /dev/null @@ -1,33 +0,0 @@ -# Enumeration: ErrorMessages - -## Index - -### Enumeration members - -* [KEYSTORE_ENTRY_EXISTS](_keystore_base_.errormessages.md#keystore_entry_exists) -* [NO_MATCHING_ENTRY](_keystore_base_.errormessages.md#no_matching_entry) -* [UNKNOWN_STRUCTURE](_keystore_base_.errormessages.md#unknown_structure) - -## Enumeration members - -### KEYSTORE_ENTRY_EXISTS - -• **KEYSTORE_ENTRY_EXISTS**: = "Existing encrypted keystore for address" - -*Defined in [keystore-base.ts:9](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/keystores/src/keystore-base.ts#L9)* - -___ - -### NO_MATCHING_ENTRY - -• **NO_MATCHING_ENTRY**: = "Keystore entry not found for address" - -*Defined in [keystore-base.ts:10](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/keystores/src/keystore-base.ts#L10)* - -___ - -### UNKNOWN_STRUCTURE - -• **UNKNOWN_STRUCTURE**: = "Unexpected keystore entry structure" - -*Defined in [keystore-base.ts:11](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/keystores/src/keystore-base.ts#L11)* diff --git a/packages/docs/developer-resources/keystores/reference/globals.md b/packages/docs/developer-resources/keystores/reference/globals.md deleted file mode 100644 index 74fc8746aba..00000000000 --- a/packages/docs/developer-resources/keystores/reference/globals.md +++ /dev/null @@ -1,11 +0,0 @@ -# @celo/keystores - -## Index - -### Modules - -* ["file-keystore"](modules/_file_keystore_.md) -* ["inmemory-keystore"](modules/_inmemory_keystore_.md) -* ["keystore-base"](modules/_keystore_base_.md) -* ["keystore-wallet-wrapper"](modules/_keystore_wallet_wrapper_.md) -* ["test-constants"](modules/_test_constants_.md) diff --git a/packages/docs/developer-resources/keystores/reference/modules/_file_keystore_.md b/packages/docs/developer-resources/keystores/reference/modules/_file_keystore_.md deleted file mode 100644 index 26c7b329110..00000000000 --- a/packages/docs/developer-resources/keystores/reference/modules/_file_keystore_.md +++ /dev/null @@ -1,7 +0,0 @@ -# Module: "file-keystore" - -## Index - -### Classes - -* [FileKeystore](../classes/_file_keystore_.filekeystore.md) diff --git a/packages/docs/developer-resources/keystores/reference/modules/_inmemory_keystore_.md b/packages/docs/developer-resources/keystores/reference/modules/_inmemory_keystore_.md deleted file mode 100644 index 5655be7e5ec..00000000000 --- a/packages/docs/developer-resources/keystores/reference/modules/_inmemory_keystore_.md +++ /dev/null @@ -1,7 +0,0 @@ -# Module: "inmemory-keystore" - -## Index - -### Classes - -* [InMemoryKeystore](../classes/_inmemory_keystore_.inmemorykeystore.md) diff --git a/packages/docs/developer-resources/keystores/reference/modules/_keystore_base_.md b/packages/docs/developer-resources/keystores/reference/modules/_keystore_base_.md deleted file mode 100644 index 00c681fd42e..00000000000 --- a/packages/docs/developer-resources/keystores/reference/modules/_keystore_base_.md +++ /dev/null @@ -1,11 +0,0 @@ -# Module: "keystore-base" - -## Index - -### Enumerations - -* [ErrorMessages](../enums/_keystore_base_.errormessages.md) - -### Classes - -* [KeystoreBase](../classes/_keystore_base_.keystorebase.md) diff --git a/packages/docs/developer-resources/keystores/reference/modules/_keystore_wallet_wrapper_.md b/packages/docs/developer-resources/keystores/reference/modules/_keystore_wallet_wrapper_.md deleted file mode 100644 index 295d4c8ce1e..00000000000 --- a/packages/docs/developer-resources/keystores/reference/modules/_keystore_wallet_wrapper_.md +++ /dev/null @@ -1,7 +0,0 @@ -# Module: "keystore-wallet-wrapper" - -## Index - -### Classes - -* [KeystoreWalletWrapper](../classes/_keystore_wallet_wrapper_.keystorewalletwrapper.md) diff --git a/packages/docs/developer-resources/keystores/reference/modules/_test_constants_.md b/packages/docs/developer-resources/keystores/reference/modules/_test_constants_.md deleted file mode 100644 index cf477067e99..00000000000 --- a/packages/docs/developer-resources/keystores/reference/modules/_test_constants_.md +++ /dev/null @@ -1,96 +0,0 @@ -# Module: "test-constants" - -## Index - -### Variables - -* [ADDRESS1](_test_constants_.md#const-address1) -* [ADDRESS2](_test_constants_.md#const-address2) -* [GETH_GEN_KEYSTORE1](_test_constants_.md#const-geth_gen_keystore1) -* [GETH_GEN_KEYSTORE2](_test_constants_.md#const-geth_gen_keystore2) -* [KEYSTORE_NAME1](_test_constants_.md#const-keystore_name1) -* [KEYSTORE_NAME2](_test_constants_.md#const-keystore_name2) -* [PASSPHRASE1](_test_constants_.md#const-passphrase1) -* [PASSPHRASE2](_test_constants_.md#const-passphrase2) -* [PK1](_test_constants_.md#const-pk1) -* [PK2](_test_constants_.md#const-pk2) - -## Variables - -### `Const` ADDRESS1 - -• **ADDRESS1**: *string* = normalizeAddressWith0x(privateKeyToAddress(PK1)) - -*Defined in [test-constants.ts:8](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/keystores/src/test-constants.ts#L8)* - -___ - -### `Const` ADDRESS2 - -• **ADDRESS2**: *string* = normalizeAddressWith0x(privateKeyToAddress(PK2)) - -*Defined in [test-constants.ts:13](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/keystores/src/test-constants.ts#L13)* - -___ - -### `Const` GETH_GEN_KEYSTORE1 - -• **GETH_GEN_KEYSTORE1**: *"{"address":"8233d802bdc645d0d1b9b2e6face6e5825905081","blspublickey":"ed2ed9b2670458d01df329a4c750e7a6f89ec0e86676d4e093b2f32b4f3b603b6927b8dfe12e9fdf5c9f4bbbc504770052d816dbcaae90f4ef0af19333965b29f29b069c1f28eaa4bcaa62b27459855e4ad201aac245de05c3cb51dcab118080","crypto":{"cipher":"aes-128-ctr","ciphertext":"7b2ccdede461b9f7cc33fbbd7a9bfe23fdf455f3d4a8558cb10e86c5a4c5cc39","cipherparams":{"iv":"a78b8382da088a544edef093e922947b"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"2007752e0c72eed75a793cddba6a9e3c698b95a259002b32443d8c0430038505"},"mac":"e1599623f8957e538e17512e39693bf1a85fc4eab10fdb243c7d33fd18f9c766"},"id":"3b9465ac-eca1-4923-84e6-4624bd41ab0b","version":3}"* = `{"address":"8233d802bdc645d0d1b9b2e6face6e5825905081","blspublickey":"ed2ed9b2670458d01df329a4c750e7a6f89ec0e86676d4e093b2f32b4f3b603b6927b8dfe12e9fdf5c9f4bbbc504770052d816dbcaae90f4ef0af19333965b29f29b069c1f28eaa4bcaa62b27459855e4ad201aac245de05c3cb51dcab118080","crypto":{"cipher":"aes-128-ctr","ciphertext":"7b2ccdede461b9f7cc33fbbd7a9bfe23fdf455f3d4a8558cb10e86c5a4c5cc39","cipherparams":{"iv":"a78b8382da088a544edef093e922947b"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"2007752e0c72eed75a793cddba6a9e3c698b95a259002b32443d8c0430038505"},"mac":"e1599623f8957e538e17512e39693bf1a85fc4eab10fdb243c7d33fd18f9c766"},"id":"3b9465ac-eca1-4923-84e6-4624bd41ab0b","version":3}` - -*Defined in [test-constants.ts:6](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/keystores/src/test-constants.ts#L6)* - -___ - -### `Const` GETH_GEN_KEYSTORE2 - -• **GETH_GEN_KEYSTORE2**: *"{"address":"b81a82696018fd9d8b43431966b60c31bdcdc2e8","blspublickey":"b9f862e2ced58bb2eef8ffde7020189ab2bb050603630eceec9b80c1636d98f8c3b9bd517d673937a0551c3a0698a00086bda4db1f0d859912a91988775ae388886013e7eb254d195871f9ced6643e288755da0b483ebe6dda448fea2eb75481","crypto":{"cipher":"aes-128-ctr","ciphertext":"6f3cd02b2d3d81b2bbf76743396c9c3c1685ddc6cfafbba34195ab03476831d3","cipherparams":{"iv":"af1f9853e0ff20ee5d495cf7d9461e1c"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"cf0446914e5d214f2a312c08ef24e7e3dd15e948d2ca67d59b3bb97903a96147"},"mac":"58348f6d843d28b3ac8cf40542d10da198016f28f132c32389ab56a945c858e1"},"id":"b224dac6-c089-4b47-8557-e04ae60b3506","version":3}"* = `{"address":"b81a82696018fd9d8b43431966b60c31bdcdc2e8","blspublickey":"b9f862e2ced58bb2eef8ffde7020189ab2bb050603630eceec9b80c1636d98f8c3b9bd517d673937a0551c3a0698a00086bda4db1f0d859912a91988775ae388886013e7eb254d195871f9ced6643e288755da0b483ebe6dda448fea2eb75481","crypto":{"cipher":"aes-128-ctr","ciphertext":"6f3cd02b2d3d81b2bbf76743396c9c3c1685ddc6cfafbba34195ab03476831d3","cipherparams":{"iv":"af1f9853e0ff20ee5d495cf7d9461e1c"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"cf0446914e5d214f2a312c08ef24e7e3dd15e948d2ca67d59b3bb97903a96147"},"mac":"58348f6d843d28b3ac8cf40542d10da198016f28f132c32389ab56a945c858e1"},"id":"b224dac6-c089-4b47-8557-e04ae60b3506","version":3}` - -*Defined in [test-constants.ts:12](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/keystores/src/test-constants.ts#L12)* - -___ - -### `Const` KEYSTORE_NAME1 - -• **KEYSTORE_NAME1**: *"PK1 keystore name"* = "PK1 keystore name" - -*Defined in [test-constants.ts:7](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/keystores/src/test-constants.ts#L7)* - -___ - -### `Const` KEYSTORE_NAME2 - -• **KEYSTORE_NAME2**: *"PK2 keystore name"* = "PK2 keystore name" - -*Defined in [test-constants.ts:11](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/keystores/src/test-constants.ts#L11)* - -___ - -### `Const` PASSPHRASE1 - -• **PASSPHRASE1**: *"test- passwøörd1!"* = "test- passwøörd1!" - -*Defined in [test-constants.ts:3](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/keystores/src/test-constants.ts#L3)* - -___ - -### `Const` PASSPHRASE2 - -• **PASSPHRASE2**: *"test-password2 !!"* = "test-password2 !!" - -*Defined in [test-constants.ts:9](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/keystores/src/test-constants.ts#L9)* - -___ - -### `Const` PK1 - -• **PK1**: *"d72f6c0b0d7348a72eaa7d3c997bd49293bdc7d4bf79eba03e9f7ca9c5ac6b7f"* = "d72f6c0b0d7348a72eaa7d3c997bd49293bdc7d4bf79eba03e9f7ca9c5ac6b7f" - -*Defined in [test-constants.ts:4](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/keystores/src/test-constants.ts#L4)* - -___ - -### `Const` PK2 - -• **PK2**: *"bb6f3fa4a83b7b06e72e580a3b09df5dd6fb4fa745ee2b0d865413ad6299e64e"* = "bb6f3fa4a83b7b06e72e580a3b09df5dd6fb4fa745ee2b0d865413ad6299e64e" - -*Defined in [test-constants.ts:10](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/keystores/src/test-constants.ts#L10)* diff --git a/packages/docs/developer-resources/network-utils/reference/README.md b/packages/docs/developer-resources/network-utils/reference/README.md deleted file mode 100644 index eafd8528f40..00000000000 --- a/packages/docs/developer-resources/network-utils/reference/README.md +++ /dev/null @@ -1,162 +0,0 @@ -# @celo/network-utils - -

- - celo logo - -

- -**Celo Monorepo - Official repository for core projects comprising the Celo platform** - -This repository contains the source code for the Celo core projects including the [smart contracts](https://github.com/celo-org/celo-monorepo/tree/master/packages/protocol), [wallet app](https://github.com/celo-org/celo-monorepo/tree/master/packages/mobile), -and other packages. The source code for the Celo Blockchain which operates a node on the Celo Network is kept in a separate repo [here](https://github.com/celo-org/celo-blockchain). - - - -[![CircleCI](https://img.shields.io/circleci/build/github/celo-org/celo-monorepo/master)](https://circleci.com/gh/celo-org/celo-monorepo/tree/master) -[![Codecov](https://img.shields.io/codecov/c/github/celo-org/celo-monorepo)](https://codecov.io/gh/celo-org/celo-monorepo) -[![GitHub contributors](https://img.shields.io/github/contributors/celo-org/celo-monorepo)](https://github.com/celo-org/celo-monorepo/graphs/contributors) -[![GitHub commit activity](https://img.shields.io/github/commit-activity/w/celo-org/celo-monorepo)](https://github.com/celo-org/celo-monorepo/graphs/contributors) -[![GitHub Stars](https://img.shields.io/github/stars/celo-org/celo-monorepo.svg)](https://github.com/celo-org/celo-monorepo/stargazers) -![GitHub repo size](https://img.shields.io/github/repo-size/celo-org/celo-monorepo) -[![GitHub](https://img.shields.io/github/license/celo-org/celo-monorepo?color=blue)](https://github.com/celo-org/celo-monorepo/blob/master/LICENSE) - - - -[![Website celo.org](https://img.shields.io/website-up-down-green-red/https/celo.org.svg)](https://celo.org) -[![Blog](https://img.shields.io/badge/blog-up-green)](https://medium.com/celoorg) -[![docs](https://img.shields.io/badge/docs-up-green)](https://docs.celo.org/) -[![Youtube](https://img.shields.io/badge/YouTube%20channel-up-green)](https://www.youtube.com/channel/UCCZgos_YAJSXm5QX5D5Wkcw/videos?view=0&sort=p&flow=grid) -[![forum](https://img.shields.io/badge/forum-up-green)](https://forum.celo.org) -[![Discord](https://img.shields.io/discord/600834479145353243.svg)](https://discord.gg/RfHQKtY) -[![Twitter CeloDevs](https://img.shields.io/twitter/follow/celodevs?style=social)](https://twitter.com/celodevs) -[![Twitter CeloOrg](https://img.shields.io/twitter/follow/celoorg?style=social)](https://twitter.com/CeloOrg) -[![Subreddit subscribers](https://img.shields.io/reddit/subreddit-subscribers/CeloHQ?style=social)](https://www.reddit.com/r/CeloHQ/) - - - -[![GitHub pull requests by-label](https://img.shields.io/github/issues-pr-raw/celo-org/celo-monorepo)](https://github.com/celo-org/celo-monorepo/pulls) -[![GitHub Issues](https://img.shields.io/github/issues-raw/celo-org/celo-monorepo.svg)](https://github.com/celo-org/celo-monorepo/issues) -[![GitHub issues by-label](https://img.shields.io/github/issues/celo-org/celo-monorepo/1%20hour%20tasks)](https://github.com/celo-org/celo-monorepo/issues?q=is%3Aopen+is%3Aissue+label%3A%221+hour+tasks%22) -[![GitHub issues by-label](https://img.shields.io/github/issues/celo-org/celo-monorepo/betanet-phase-2)](https://github.com/celo-org/celo-monorepo/issues?q=is%3Aopen+is%3Aissue+label%3Abetanet-phase-2) -[![GitHub issues by-label](https://img.shields.io/github/issues/celo-org/celo-monorepo/betanet-phase-3)](https://github.com/celo-org/celo-monorepo/issues?q=is%3Aopen+is%3Aissue+label%3Abetanet-phase-3) - -Contents: - - - -- [Celo's Mission - Prosperity for All](#mission) -- [The Celo Stack](#stack) -- [Documentation](#docs) -- [Issues](#issues) -- [Repo Structure](#repo) -- [Contributing](#contributing) -- [Ask Questions, Find Answers, Get in Touch](#ask) -- [License](#license) - - -## 🥅 Celo's Mission - Prosperity for All - -Celo, pronounced /ˈtselo/, means ‘purpose’ in Esperanto. In a similar spirit, we are aiming to create a new platform to connect people globally and bring financial stability to those who need it most. We believe blockchain technology is one of the most exciting innovations in recent history and as a community we look to push the boundaries of what is possible with it today. More importantly, we are driven by purpose -- to solve real-world problems such as lack of access to sound currency, or friction for cash-transfer programs aimed to alleviate poverty. Our mission is to build a monetary system that creates the conditions for prosperity for all. - - -

- - Play on Youtube - What if money were beautiful - -
- What if money were beautiful? -

- -## 🧱 The Celo Stack - -Celo is oriented around providing the simplest possible experience for end users, who may have no familiarity with cryptocurrencies, and may be using low cost devices with limited connectivity. To achieve this, the project takes a full-stack approach, where each layer of the stack is designed with the end user in mind whilst considering other stakeholders \(e.g. operators of nodes in the network\) involved in enabling the end user experience. - -The Celo stack is structured into the following logical layers: - - -

- Celo protocol -
- The Celo Blockchain and Celo Core Contracts together comprise the Celo Protocol -

- -- **Celo Blockchain**: An open cryptographic protocol that allows applications to make transactions with and run smart contracts in a secure and decentralized fashion. The Celo Blockchain has shared ancestry with [Ethereum](https://www.ethereum.org), and maintains full EVM compatibility for smart contracts. However it uses a [Byzantine Fault Tolerant](http://pmg.csail.mit.edu/papers/osdi99.pdf) \(BFT\) consensus mechanism rather than Proof of Work, and has different block format, transaction format, client synchronization protocols, and gas payment and pricing mechanisms. The network’s native asset is Celo Gold, exposed via an ERC-20 interface. - -- **Celo Core Contracts**: A set of smart contracts running on the Celo Blockchain that comprise much of the logic of the platform features including ERC-20 stable currencies, identity attestations, Proof of Stake and governance. These smart contracts are upgradeable and managed by the decentralized governance process. - - -

- Celo network -
- Topology of a Celo Network -

- -- **Applications:** Applications for end users built on the Celo platform. The Celo Wallet app, the first of an ecosystem of applications, allows end users to manage accounts and make payments securely and simply by taking advantage of the innovations in the Celo protocol. Applications take the form of external mobile or backend software: they interact with the Celo Blockchain to issue transactions and invoke code that forms the Celo Core Contracts’ API. Third parties can also deploy custom smart contracts that their own applications can invoke, which in turn can leverage Celo Core Contracts. Applications may use centralized cloud services to provide some of their functionality: in the case of the Celo Wallet, push notifications and a transaction activity feed. - -## 📚 Documentation - -Follow the instructions in [SETUP.md](SETUP.md) to get a development environment set up. - -See [Developer's Guide](https://docs.celo.org/) for full details about the design of the Celo protocol and other information about running these projects. - -## 🙋 Issues - -See the [issue backlog](https://github.com/celo-org/celo-monorepo/issues) for a list of active or proposed tasks. Feel free to create new issues to report bugs and/or request features. - -## 📂 Repo Structure - -The repository has the following packages (sub projects): - -- [attestation-service](packages/attestation-service) - service run by validators on the Celo network to send SMS messages, enabling attestations of user phone numbers and their accounts on the Celo network -- [blockchain-api](packages/blockchain-api) - service that uses Blockscout to present view of transactions by account for Celo Wallet activity feed -- [celotool](packages/celotool) - scripts for deploying and managing testnets -- [cli](packages/cli) - tool that uses ContractKit to interact with the Celo protocol ([docs](https://docs.celo.org/getting-started/using-the-cli)) -- [contractkit](packages/contractkit) - library to help developers and validators interact with the protocol and it's smart contracts ([docs](https://docs.celo.org/celo-sdk/contractkit)) -- [dappkit](packages/dappkit) - set of functions for mobile DApps to work with the wallet app (ex. sign transactions and access the user's account) ([docs](https://docs.celo.org/celo-sdk/dappkit)) -- [dev-utils](packages/dev-utils) - a utils package for use as a dev dependency -- [docs](packages/docs) - technical documentation for the Celo project ([live](https://docs.celo.org/)) -- [faucet](packages/faucet) - faucet deployment configuration ([live](https://celo.org/build/faucet)) -- [helm-charts](packages/helm-charts) - templatized deployments of entire environments to Kubernetes clusters -- [mobile](packages/mobile) - Android wallet app for the Celo platform ([docs](https://docs.celo.org/getting-started/using-the-mobile-wallet), [live](https://play.google.com/store/apps/details?id=org.celo.mobile.alfajores)) -- [notification-service](packages/notification-service) - service for managing push notifications for Celo Wallet -- [protocol](packages/protocol) - identity, stability and other smart contracts for the Celo protocol ([docs](https://docs.celo.org/celo-codebase/protocol)) -- [react-components](packages/react-components) - generalized react native components -- [reserve-site](packages/reserve-site) - website for ([Celo Reserve.org](https://celoreserve.org/)) -- [terraform-modules](packages/terraform-modules) - templatized deployments of entire VM-based testnets for Google Cloud Platform -- [typescript](packages/typescript) - no README available (improve?) -- [utils](packages/utils) - no README available (improve?) - -Code owners for each package can be found in [.github/CODEOWNERS](.github/CODEOWNERS). - -## ✍️ Contributing - -Feel free to jump on the Celo 🚂🚋🚋🚋. Improvements and contributions are highly encouraged! 🙏👊 - -See the [contributing guide](https://docs.celo.org/community/contributing) for details on how to participate. -[![GitHub issues by-label](https://img.shields.io/github/issues/celo-org/celo-monorepo/1%20hour%20tasks)](https://github.com/celo-org/celo-monorepo/issues?q=is%3Aopen+is%3Aissue+label%3A%221+hour+tasks%22) - -All communication and contributions to the Celo project are subject to the [Celo Code of Conduct](https://celo.org/code-of-conduct). - -Not yet ready to contribute but do like the project? Support Celo with a ⭐ or share the love in a [![Twitter URL](https://img.shields.io/twitter/url?style=social&url=https%3A%2F%2Fcelo.org%2F)](https://twitter.com/intent/tweet?url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DkKggE5OvyhE&via=celohq&text=Checkout%20celo%21%20Love%20what%20they%20are%20building.&hashtags=celo) - - - -## 💬 Ask Questions, Find Answers, Get in Touch - -- [Website](https://celo.org/) -- [Docs](https://docs.celo.org/) -- [Blog](https://medium.com/celohq) -- [YouTube](https://www.youtube.com/channel/UCCZgos_YAJSXm5QX5D5Wkcw/videos?view=0&sort=p&flow=grid) -- [Forum](https://forum.celo.org) -- [Discord](https://discord.gg/vRbExjv) -- [Twitter](https://twitter.com/CeloDevs) -- [Reddit](https://www.reddit.com/r/CeloHQ/) -- [Community Events](https://celo.org/community) - -## 📜 License - -All packages are licensed under the terms of the [Apache 2.0 License](LICENSE) unless otherwise specified in the LICENSE file at package's root. diff --git a/packages/docs/developer-resources/network-utils/reference/SUMMARY.md b/packages/docs/developer-resources/network-utils/reference/SUMMARY.md deleted file mode 100644 index b2fb0932cae..00000000000 --- a/packages/docs/developer-resources/network-utils/reference/SUMMARY.md +++ /dev/null @@ -1,18 +0,0 @@ -* [Globals](globals.md) -* [Modules]() - * [genesis-block-utils](modules/_genesis_block_utils_.md) - * [GenesisBlockUtils](classes/_genesis_block_utils_.genesisblockutils.md) - * [google-storage-utils](modules/_google_storage_utils_.md) - * [GoogleStorageUtils](classes/_google_storage_utils_.googlestorageutils.md) - * [static-node-utils](modules/_static_node_utils_.md) - * [StaticNodeUtils](classes/_static_node_utils_.staticnodeutils.md) - * [utils/timezone](modules/_utils_timezone_.md) - * [Coordinates](interfaces/_utils_timezone_.coordinates.md) - * [Timezone](interfaces/_utils_timezone_.timezone.md) -* [Classes]() - * [GenesisBlockUtils](classes/_genesis_block_utils_.genesisblockutils.md) - * [GoogleStorageUtils](classes/_google_storage_utils_.googlestorageutils.md) - * [StaticNodeUtils](classes/_static_node_utils_.staticnodeutils.md) -* [Interfaces]() - * [Coordinates](interfaces/_utils_timezone_.coordinates.md) - * [Timezone](interfaces/_utils_timezone_.timezone.md) \ No newline at end of file diff --git a/packages/docs/developer-resources/network-utils/reference/classes/_genesis_block_utils_.genesisblockutils.md b/packages/docs/developer-resources/network-utils/reference/classes/_genesis_block_utils_.genesisblockutils.md deleted file mode 100644 index 47cf30482e8..00000000000 --- a/packages/docs/developer-resources/network-utils/reference/classes/_genesis_block_utils_.genesisblockutils.md +++ /dev/null @@ -1,48 +0,0 @@ -# Class: GenesisBlockUtils - -## Hierarchy - -* **GenesisBlockUtils** - -## Index - -### Methods - -* [getChainIdFromGenesis](_genesis_block_utils_.genesisblockutils.md#static-getchainidfromgenesis) -* [getGenesisBlockAsync](_genesis_block_utils_.genesisblockutils.md#static-getgenesisblockasync) - -## Methods - -### `Static` getChainIdFromGenesis - -▸ **getChainIdFromGenesis**(`genesis`: string): *number* - -*Defined in [genesis-block-utils.ts:22](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/network-utils/src/genesis-block-utils.ts#L22)* - -**Parameters:** - -Name | Type | ------- | ------ | -`genesis` | string | - -**Returns:** *number* - -___ - -### `Static` getGenesisBlockAsync - -▸ **getGenesisBlockAsync**(`networkName`: string): *Promise‹string›* - -*Defined in [genesis-block-utils.ts:14](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/network-utils/src/genesis-block-utils.ts#L14)* - -Fetches the genesis block (as JSON data) from Google Storage. -If the network is not working, the method will reject the returned promise -along with the response data from Google api. - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`networkName` | string | Name of the network to fetch genesis block for | - -**Returns:** *Promise‹string›* diff --git a/packages/docs/developer-resources/network-utils/reference/classes/_google_storage_utils_.googlestorageutils.md b/packages/docs/developer-resources/network-utils/reference/classes/_google_storage_utils_.googlestorageutils.md deleted file mode 100644 index 498903c4563..00000000000 --- a/packages/docs/developer-resources/network-utils/reference/classes/_google_storage_utils_.googlestorageutils.md +++ /dev/null @@ -1,28 +0,0 @@ -# Class: GoogleStorageUtils - -## Hierarchy - -* **GoogleStorageUtils** - -## Index - -### Methods - -* [fetchFileFromGoogleStorage](_google_storage_utils_.googlestorageutils.md#static-fetchfilefromgooglestorage) - -## Methods - -### `Static` fetchFileFromGoogleStorage - -▸ **fetchFileFromGoogleStorage**(`bucketName`: string, `fileName`: string): *Promise‹string›* - -*Defined in [google-storage-utils.ts:9](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/network-utils/src/google-storage-utils.ts#L9)* - -**Parameters:** - -Name | Type | ------- | ------ | -`bucketName` | string | -`fileName` | string | - -**Returns:** *Promise‹string›* diff --git a/packages/docs/developer-resources/network-utils/reference/classes/_static_node_utils_.staticnodeutils.md b/packages/docs/developer-resources/network-utils/reference/classes/_static_node_utils_.staticnodeutils.md deleted file mode 100644 index 82171ac6571..00000000000 --- a/packages/docs/developer-resources/network-utils/reference/classes/_static_node_utils_.staticnodeutils.md +++ /dev/null @@ -1,92 +0,0 @@ -# Class: StaticNodeUtils - -## Hierarchy - -* **StaticNodeUtils** - -## Index - -### Methods - -* [getRegionalStaticNodesAsync](_static_node_utils_.staticnodeutils.md#static-getregionalstaticnodesasync) -* [getStaticNodeRegion](_static_node_utils_.staticnodeutils.md#static-getstaticnoderegion) -* [getStaticNodesAsync](_static_node_utils_.staticnodeutils.md#static-getstaticnodesasync) -* [getStaticNodesGoogleStorageBucketName](_static_node_utils_.staticnodeutils.md#static-getstaticnodesgooglestoragebucketname) - -## Methods - -### `Static` getRegionalStaticNodesAsync - -▸ **getRegionalStaticNodesAsync**(`networkName`: string, `region?`: undefined | string): *Promise‹string›* - -*Defined in [static-node-utils.ts:110](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/network-utils/src/static-node-utils.ts#L110)* - -Fetches the static nodes (as JSON data) from Google Storage corresponding -to the best available region for this caller. -If the network is not working, the method will reject the returned promise -along with the response data from Google API. - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`networkName` | string | Name of the network to fetch config for | -`region?` | undefined | string | - | - -**Returns:** *Promise‹string›* - -___ - -### `Static` getStaticNodeRegion - -▸ **getStaticNodeRegion**(`networkName`: string, `tz?`: undefined | string): *string* - -*Defined in [static-node-utils.ts:88](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/network-utils/src/static-node-utils.ts#L88)* - -Resolves the best region to use for static node connections. - -**`remarks`** This method currently uses the interpreter's timezone and the -IANA timezone database to establish what region of the world the client is -in, then map that to a static list of static node clusters run by cLabs. -If the timezone is not set according to the user's location, this method -may route them to suboptimal set of static nodes. The resolution method -may be replaced in the future. - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`networkName` | string | Name of the network to get a region for. | -`tz?` | undefined | string | - | - -**Returns:** *string* - -___ - -### `Static` getStaticNodesAsync - -▸ **getStaticNodesAsync**(`networkName`: string): *Promise‹string›* - -*Defined in [static-node-utils.ts:123](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/network-utils/src/static-node-utils.ts#L123)* - -Fetches the static nodes (as JSON data) from Google Storage. -If the network is not working, the method will reject the returned promise -along with the response data from Google API. - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`networkName` | string | Name of the network to fetch config for | - -**Returns:** *Promise‹string›* - -___ - -### `Static` getStaticNodesGoogleStorageBucketName - -▸ **getStaticNodesGoogleStorageBucketName**(): *string* - -*Defined in [static-node-utils.ts:74](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/network-utils/src/static-node-utils.ts#L74)* - -**Returns:** *string* diff --git a/packages/docs/developer-resources/network-utils/reference/globals.md b/packages/docs/developer-resources/network-utils/reference/globals.md deleted file mode 100644 index 8b86cd44348..00000000000 --- a/packages/docs/developer-resources/network-utils/reference/globals.md +++ /dev/null @@ -1,10 +0,0 @@ -# @celo/network-utils - -## Index - -### Modules - -* ["genesis-block-utils"](modules/_genesis_block_utils_.md) -* ["google-storage-utils"](modules/_google_storage_utils_.md) -* ["static-node-utils"](modules/_static_node_utils_.md) -* ["utils/timezone"](modules/_utils_timezone_.md) diff --git a/packages/docs/developer-resources/network-utils/reference/interfaces/_utils_timezone_.coordinates.md b/packages/docs/developer-resources/network-utils/reference/interfaces/_utils_timezone_.coordinates.md deleted file mode 100644 index 57292febb17..00000000000 --- a/packages/docs/developer-resources/network-utils/reference/interfaces/_utils_timezone_.coordinates.md +++ /dev/null @@ -1,28 +0,0 @@ -# Interface: Coordinates - -## Hierarchy - -* **Coordinates** - -## Index - -### Properties - -* [latitude](_utils_timezone_.coordinates.md#latitude) -* [longitude](_utils_timezone_.coordinates.md#longitude) - -## Properties - -### latitude - -• **latitude**: *number* - -*Defined in [utils/timezone.ts:12](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/network-utils/src/utils/timezone.ts#L12)* - -___ - -### longitude - -• **longitude**: *number* - -*Defined in [utils/timezone.ts:13](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/network-utils/src/utils/timezone.ts#L13)* diff --git a/packages/docs/developer-resources/network-utils/reference/interfaces/_utils_timezone_.timezone.md b/packages/docs/developer-resources/network-utils/reference/interfaces/_utils_timezone_.timezone.md deleted file mode 100644 index ea2ab238ac1..00000000000 --- a/packages/docs/developer-resources/network-utils/reference/interfaces/_utils_timezone_.timezone.md +++ /dev/null @@ -1,46 +0,0 @@ -# Interface: Timezone - -## Hierarchy - -* **Timezone** - -## Index - -### Properties - -* [comments](_utils_timezone_.timezone.md#optional-comments) -* [coordinates](_utils_timezone_.timezone.md#optional-coordinates) -* [countryCodes](_utils_timezone_.timezone.md#optional-countrycodes) -* [name](_utils_timezone_.timezone.md#name) - -## Properties - -### `Optional` comments - -• **comments**? : *undefined | string* - -*Defined in [utils/timezone.ts:22](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/network-utils/src/utils/timezone.ts#L22)* - -___ - -### `Optional` coordinates - -• **coordinates**? : *[Coordinates](_utils_timezone_.coordinates.md)* - -*Defined in [utils/timezone.ts:21](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/network-utils/src/utils/timezone.ts#L21)* - -___ - -### `Optional` countryCodes - -• **countryCodes**? : *string[]* - -*Defined in [utils/timezone.ts:20](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/network-utils/src/utils/timezone.ts#L20)* - -___ - -### name - -• **name**: *string* - -*Defined in [utils/timezone.ts:19](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/network-utils/src/utils/timezone.ts#L19)* diff --git a/packages/docs/developer-resources/network-utils/reference/modules/_genesis_block_utils_.md b/packages/docs/developer-resources/network-utils/reference/modules/_genesis_block_utils_.md deleted file mode 100644 index 5ed854aec88..00000000000 --- a/packages/docs/developer-resources/network-utils/reference/modules/_genesis_block_utils_.md +++ /dev/null @@ -1,19 +0,0 @@ -# Module: "genesis-block-utils" - -## Index - -### Classes - -* [GenesisBlockUtils](../classes/_genesis_block_utils_.genesisblockutils.md) - -### Variables - -* [GenesisBlocksGoogleStorageBucketName](_genesis_block_utils_.md#const-genesisblocksgooglestoragebucketname) - -## Variables - -### `Const` GenesisBlocksGoogleStorageBucketName - -• **GenesisBlocksGoogleStorageBucketName**: *"genesis_blocks"* = "genesis_blocks" - -*Defined in [genesis-block-utils.ts:5](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/network-utils/src/genesis-block-utils.ts#L5)* diff --git a/packages/docs/developer-resources/network-utils/reference/modules/_google_storage_utils_.md b/packages/docs/developer-resources/network-utils/reference/modules/_google_storage_utils_.md deleted file mode 100644 index 3127e9fe3fa..00000000000 --- a/packages/docs/developer-resources/network-utils/reference/modules/_google_storage_utils_.md +++ /dev/null @@ -1,7 +0,0 @@ -# Module: "google-storage-utils" - -## Index - -### Classes - -* [GoogleStorageUtils](../classes/_google_storage_utils_.googlestorageutils.md) diff --git a/packages/docs/developer-resources/network-utils/reference/modules/_static_node_utils_.md b/packages/docs/developer-resources/network-utils/reference/modules/_static_node_utils_.md deleted file mode 100644 index 1ef80d632c3..00000000000 --- a/packages/docs/developer-resources/network-utils/reference/modules/_static_node_utils_.md +++ /dev/null @@ -1,7 +0,0 @@ -# Module: "static-node-utils" - -## Index - -### Classes - -* [StaticNodeUtils](../classes/_static_node_utils_.staticnodeutils.md) diff --git a/packages/docs/developer-resources/network-utils/reference/modules/_utils_timezone_.md b/packages/docs/developer-resources/network-utils/reference/modules/_utils_timezone_.md deleted file mode 100644 index 3783362c0cb..00000000000 --- a/packages/docs/developer-resources/network-utils/reference/modules/_utils_timezone_.md +++ /dev/null @@ -1,45 +0,0 @@ -# Module: "utils/timezone" - -## Index - -### Interfaces - -* [Coordinates](../interfaces/_utils_timezone_.coordinates.md) -* [Timezone](../interfaces/_utils_timezone_.timezone.md) - -### Functions - -* [_testSetTimezoneOverride](_utils_timezone_.md#_testsettimezoneoverride) -* [timezone](_utils_timezone_.md#timezone) - -## Functions - -### _testSetTimezoneOverride - -▸ **_testSetTimezoneOverride**(`zone`: string | undefined): *void* - -*Defined in [utils/timezone.ts:7](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/network-utils/src/utils/timezone.ts#L7)* - -**Parameters:** - -Name | Type | ------- | ------ | -`zone` | string | undefined | - -**Returns:** *void* - -___ - -### timezone - -▸ **timezone**(`tz?`: undefined | string): *[Timezone](../interfaces/_utils_timezone_.timezone.md) | undefined* - -*Defined in [utils/timezone.ts:41](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/network-utils/src/utils/timezone.ts#L41)* - -**Parameters:** - -Name | Type | ------- | ------ | -`tz?` | undefined | string | - -**Returns:** *[Timezone](../interfaces/_utils_timezone_.timezone.md) | undefined* diff --git a/packages/docs/developer-resources/overview.md b/packages/docs/developer-resources/overview.md deleted file mode 100644 index a20c8c92ee7..00000000000 --- a/packages/docs/developer-resources/overview.md +++ /dev/null @@ -1,71 +0,0 @@ -# Overview - -This section contains information about some of the key tools and resources that will help developers start building applications -on Celo. - -## Quick Start Guides - -View the [Developer Code Examples page](start.md) to get started using the Celo SDKs with guided coding exercises. - -## Tools - -### SDKs - -- [ContractKit](contractkit/) - - Javascript package of Celo blockchain utilities - - Manage connections to the Celo blockchain, accounts, send transactions, interact with smart contracts, etc. - - A set of wrappers around the core protocol smart contracts to easily connect with contracts related to governance, validators, on-chain exchange, etc. - - Includes [web3.js](https://web3js.readthedocs.io/en/v1.2.4/) -- [Celo Ethers.js Wrapper](https://github.com/celo-tools/celo-ethers-wrapper) (_experimental_) - - A minimal wrapper to make [ethers.js](https://docs.ethers.io/v5/) compatible with the Celo network -- [use-contractkit](https://github.com/celo-tools/use-contractkit) - - A [Web3Modal](https://web3modal.com/)-like experience that injects ContractKit into your web-based application. Supports a variety of different wallets, including but not limited to Valora, Ledger, Metamask (Celo compatible fork) and any WalletConnect compatible wallets -- [DappKit](dappkit/) - - Easily connect to the [Valora](http://valoraapp.com/) wallet with your React Native mobile application - - Valora manages user account, private keys and transaction signing, so you can focus on building your dapp - - Learn more and see the code with the [Dappkit truffle box](https://github.com/critesjosh/celo-dappkit) -- [Python SDK](https://github.com/blaize-tech/celo-sdk-py) -- [Java SDK](https://github.com/blaize-tech/celo-sdk-java) - -### Infrastructure - -- [Valora](https://valoraapp.com/) provides a clean, intuitive UI where users can send transactions and interact with smart contracts -- [Forno](forno/) - - Node access service so you can connect your dapp to the Celo blockchain without having to run node infrastructure -- [ODIS](contractkit/odis.md) - - Oblivious decentralized identity service - - Lightweight identity layer that makes it easy to send cryptocurrency to a phone number -- Blockscout block explorers - - [Alfajores testnet](http://alfajores-blockscout.celo-testnet.org/) & [mainnet](http://explorer.celo.org/) -- [Stats.celo.org](http://stats.celo.org) to check network activity and health - -#### Networks - -- [Alfajores Testnet](../getting-started/alfajores-testnet.md) - - [Faucet](https://celo.org/developers/faucet) for free testnet CELO and cUSD - - [Forno](forno/) supports connections to alfajores - - Requires Alfajores Celo wallet for mobile device testing (please request, [support@clabs.co](mailto:support@clabs.co)) -- [Baklava testnet](../getting-started/baklava-testnet.md) for validators and testing protocol changes - -### Ethereum Tools - -- Similarities between Celo and Ethereum means you can use many of the most popular Ethereum developer tools. - - Celo supports the EVM, so tools for writing smart contracts in Solidity (or any language that compiles to EVM bytecode) are compatible with Celo - - ERC20, NFT (ERC721) and other smart contract interface standards are supported, see [Celo for Ethereum Developers](celo-for-eth-devs.md) - - [Truffle](https://www.trufflesuite.com/) - - [OpenZeppelin](https://openzeppelin.com/) - - [Remix](https://remix.ethereum.org/) - - Many more - -### Ongoing projects - -- [Community projects](celo-dapp-gallery.md) -- [Grant recipients](https://celo.org/experience/grants/directory) -- Web wallets - - [celowallet.app](https://celowallet.app) - - [Celo Terminal](https://github.com/zviadm/celoterminal/) - -## Community - -- Join our [Discord](https://chat.celo.org) -- [Discourse Forum](https://forum.celo.org/) diff --git a/packages/docs/developer-resources/reference.md b/packages/docs/developer-resources/reference.md deleted file mode 100644 index a3a934bdfef..00000000000 --- a/packages/docs/developer-resources/reference.md +++ /dev/null @@ -1,5 +0,0 @@ -# Celo SDK Reference - -This page contains a function-level reference of the SDK. - -TODO diff --git a/packages/docs/developer-resources/start.md b/packages/docs/developer-resources/start.md deleted file mode 100644 index 8b08d25dc4e..00000000000 --- a/packages/docs/developer-resources/start.md +++ /dev/null @@ -1,30 +0,0 @@ -# Start - -The following examples and guides will help you start building on Celo. - -## Interacting with Smart Contracts and Celo Networks - -- [Sending CELO](walkthroughs/hellocelo.md) - - - The sending CELO walkthrough will guide you through the basics of connecting to Celo networks using ContractKit and sending a test transaction. - -- [Deploy a Contract (local node)](walkthroughs/hellocontracts.md) - - - Our Deploy a Contract walkthrough will guide you through the basics of how to deploy your own smart contracts from a local Celo node. In this tutorial you'll deploy a contract with a simple API for writing and reading names. - -- [Deploy a Contract (Forno)](walkthroughs/hello-contract-remote-node.md) - - - Our second Deploy a Contract tutorial demonstrates how to deploy smart contracts with [Truffle](https://www.trufflesuite.com/truffle) and [Forno](forno/), a remote node service provider. - -## Mobile DApps - -- [DappKit Truffle Box](walkthroughs/hello-mobile-dapp.md) - - The [DappKit Truffle Box](walkthroughs/hello-mobile-dapp.md) walkthrough will help you create a simple mobile dApp using dAppKit and the React Native Expo framework. This application will allow connecting to your Valora account and sending transactions. - -## Web DApps - - - - -- [Interact with Celo core contracts](walkthroughs/web-dapp.md) - - This React based tutorial will walk you through creating a basic Governance voting DApp. Topics covered include ContractKit usage, connecting to a users wallet and some best practices for general DApp development diff --git a/packages/docs/developer-resources/style-guide/typescript.md b/packages/docs/developer-resources/style-guide/typescript.md deleted file mode 100644 index c556e809130..00000000000 --- a/packages/docs/developer-resources/style-guide/typescript.md +++ /dev/null @@ -1,64 +0,0 @@ -# TypeScript Style Guide - -### Function parameters - -_Vanilla parameters_ are preferred over Object Destructuring. - -Example of Vanilla parameters: - -``` -export const tokenFetchFactory = ( - actionName, - contractGetter, - actionCreator, - tag, -) -``` - -Example of Object Destructuring: - -``` -export const tokenFetchFactory = ({ - actionName, - contractGetter, - actionCreator, - tag, -}: TokenFetchFactory) -``` - -This is for simplicity, with fewer lines and some evidence shows it's [faster](https://codeburst.io/es6s-function-destructuring-assignment-is-not-free-lunch-19caacc18137). - -### Function definitions: Arrow functions vs Vanilla functions - -In the root scope, _Vanilla functions_ are preferred over Arrow functions. - -This is because it's consistent with generator functions, simpler to understand, easier to debug, supports recursion and functions are hoisted, meaning no concern about definition order. - -### Class methods: anonymous functions vs native methods - -Anonymous functions are the preferred way. As shown in the example: - -``` -class myClass { - myMethod = () => {} -} -``` - -### Exporting variables only for testing - -When a variable is exported only for the propose of getting accessed by tests, a low dash should be added before the name. - -For example instead of doing this: - -``` -export myFunction{...} -``` - -This is the preferred way: - -``` -const myFunction{...} -export _myFunction = myFunction -``` - -In case it's necessary, a decorator could wrap the exported function to allow it only to be accessed during testing. diff --git a/packages/docs/developer-resources/transactions-uri/reference/README.md b/packages/docs/developer-resources/transactions-uri/reference/README.md deleted file mode 100644 index 8678b0aaff2..00000000000 --- a/packages/docs/developer-resources/transactions-uri/reference/README.md +++ /dev/null @@ -1,162 +0,0 @@ -# @celo/transactions-uri - -

- - celo logo - -

- -**Celo Monorepo - Official repository for core projects comprising the Celo platform** - -This repository contains the source code for the Celo core projects including the [smart contracts](https://github.com/celo-org/celo-monorepo/tree/master/packages/protocol), [wallet app](https://github.com/celo-org/celo-monorepo/tree/master/packages/mobile), -and other packages. The source code for the Celo Blockchain which operates a node on the Celo Network is kept in a separate repo [here](https://github.com/celo-org/celo-blockchain). - - - -[![CircleCI](https://img.shields.io/circleci/build/github/celo-org/celo-monorepo/master)](https://circleci.com/gh/celo-org/celo-monorepo/tree/master) -[![Codecov](https://img.shields.io/codecov/c/github/celo-org/celo-monorepo)](https://codecov.io/gh/celo-org/celo-monorepo) -[![GitHub contributors](https://img.shields.io/github/contributors/celo-org/celo-monorepo)](https://github.com/celo-org/celo-monorepo/graphs/contributors) -[![GitHub commit activity](https://img.shields.io/github/commit-activity/w/celo-org/celo-monorepo)](https://github.com/celo-org/celo-monorepo/graphs/contributors) -[![GitHub Stars](https://img.shields.io/github/stars/celo-org/celo-monorepo.svg)](https://github.com/celo-org/celo-monorepo/stargazers) -![GitHub repo size](https://img.shields.io/github/repo-size/celo-org/celo-monorepo) -[![GitHub](https://img.shields.io/github/license/celo-org/celo-monorepo?color=blue)](https://github.com/celo-org/celo-monorepo/blob/master/LICENSE) - - - -[![Website celo.org](https://img.shields.io/website-up-down-green-red/https/celo.org.svg)](https://celo.org) -[![Blog](https://img.shields.io/badge/blog-up-green)](https://medium.com/celoorg) -[![docs](https://img.shields.io/badge/docs-up-green)](https://docs.celo.org/) -[![Youtube](https://img.shields.io/badge/YouTube%20channel-up-green)](https://www.youtube.com/channel/UCCZgos_YAJSXm5QX5D5Wkcw/videos?view=0&sort=p&flow=grid) -[![forum](https://img.shields.io/badge/forum-up-green)](https://forum.celo.org) -[![Discord](https://img.shields.io/discord/600834479145353243.svg)](https://discord.gg/RfHQKtY) -[![Twitter CeloDevs](https://img.shields.io/twitter/follow/celodevs?style=social)](https://twitter.com/celodevs) -[![Twitter CeloOrg](https://img.shields.io/twitter/follow/celoorg?style=social)](https://twitter.com/CeloOrg) -[![Subreddit subscribers](https://img.shields.io/reddit/subreddit-subscribers/CeloHQ?style=social)](https://www.reddit.com/r/CeloHQ/) - - - -[![GitHub pull requests by-label](https://img.shields.io/github/issues-pr-raw/celo-org/celo-monorepo)](https://github.com/celo-org/celo-monorepo/pulls) -[![GitHub Issues](https://img.shields.io/github/issues-raw/celo-org/celo-monorepo.svg)](https://github.com/celo-org/celo-monorepo/issues) -[![GitHub issues by-label](https://img.shields.io/github/issues/celo-org/celo-monorepo/1%20hour%20tasks)](https://github.com/celo-org/celo-monorepo/issues?q=is%3Aopen+is%3Aissue+label%3A%221+hour+tasks%22) -[![GitHub issues by-label](https://img.shields.io/github/issues/celo-org/celo-monorepo/betanet-phase-2)](https://github.com/celo-org/celo-monorepo/issues?q=is%3Aopen+is%3Aissue+label%3Abetanet-phase-2) -[![GitHub issues by-label](https://img.shields.io/github/issues/celo-org/celo-monorepo/betanet-phase-3)](https://github.com/celo-org/celo-monorepo/issues?q=is%3Aopen+is%3Aissue+label%3Abetanet-phase-3) - -Contents: - - - -- [Celo's Mission - Prosperity for All](#mission) -- [The Celo Stack](#stack) -- [Documentation](#docs) -- [Issues](#issues) -- [Repo Structure](#repo) -- [Contributing](#contributing) -- [Ask Questions, Find Answers, Get in Touch](#ask) -- [License](#license) - - -## 🥅 Celo's Mission - Prosperity for All - -Celo, pronounced /ˈtselo/, means ‘purpose’ in Esperanto. In a similar spirit, we are aiming to create a new platform to connect people globally and bring financial stability to those who need it most. We believe blockchain technology is one of the most exciting innovations in recent history and as a community we look to push the boundaries of what is possible with it today. More importantly, we are driven by purpose -- to solve real-world problems such as lack of access to sound currency, or friction for cash-transfer programs aimed to alleviate poverty. Our mission is to build a monetary system that creates the conditions for prosperity for all. - - -

- - Play on Youtube - What if money were beautiful - -
- What if money were beautiful? -

- -## 🧱 The Celo Stack - -Celo is oriented around providing the simplest possible experience for end users, who may have no familiarity with cryptocurrencies, and may be using low cost devices with limited connectivity. To achieve this, the project takes a full-stack approach, where each layer of the stack is designed with the end user in mind whilst considering other stakeholders \(e.g. operators of nodes in the network\) involved in enabling the end user experience. - -The Celo stack is structured into the following logical layers: - - -

- Celo protocol -
- The Celo Blockchain and Celo Core Contracts together comprise the Celo Protocol -

- -- **Celo Blockchain**: An open cryptographic protocol that allows applications to make transactions with and run smart contracts in a secure and decentralized fashion. The Celo Blockchain has shared ancestry with [Ethereum](https://www.ethereum.org), and maintains full EVM compatibility for smart contracts. However it uses a [Byzantine Fault Tolerant](http://pmg.csail.mit.edu/papers/osdi99.pdf) \(BFT\) consensus mechanism rather than Proof of Work, and has different block format, transaction format, client synchronization protocols, and gas payment and pricing mechanisms. The network’s native asset is Celo Gold, exposed via an ERC-20 interface. - -- **Celo Core Contracts**: A set of smart contracts running on the Celo Blockchain that comprise much of the logic of the platform features including ERC-20 stable currencies, identity attestations, Proof of Stake and governance. These smart contracts are upgradeable and managed by the decentralized governance process. - - -

- Celo network -
- Topology of a Celo Network -

- -- **Applications:** Applications for end users built on the Celo platform. The Celo Wallet app, the first of an ecosystem of applications, allows end users to manage accounts and make payments securely and simply by taking advantage of the innovations in the Celo protocol. Applications take the form of external mobile or backend software: they interact with the Celo Blockchain to issue transactions and invoke code that forms the Celo Core Contracts’ API. Third parties can also deploy custom smart contracts that their own applications can invoke, which in turn can leverage Celo Core Contracts. Applications may use centralized cloud services to provide some of their functionality: in the case of the Celo Wallet, push notifications and a transaction activity feed. - -## 📚 Documentation - -Follow the instructions in [SETUP.md](SETUP.md) to get a development environment set up. - -See [Developer's Guide](https://docs.celo.org/) for full details about the design of the Celo protocol and other information about running these projects. - -## 🙋 Issues - -See the [issue backlog](https://github.com/celo-org/celo-monorepo/issues) for a list of active or proposed tasks. Feel free to create new issues to report bugs and/or request features. - -## 📂 Repo Structure - -The repository has the following packages (sub projects): - -- [attestation-service](packages/attestation-service) - service run by validators on the Celo network to send SMS messages, enabling attestations of user phone numbers and their accounts on the Celo network -- [blockchain-api](packages/blockchain-api) - service that uses Blockscout to present view of transactions by account for Celo Wallet activity feed -- [celotool](packages/celotool) - scripts for deploying and managing testnets -- [cli](packages/cli) - tool that uses ContractKit to interact with the Celo protocol ([docs](https://docs.celo.org/getting-started/using-the-cli)) -- [contractkit](packages/contractkit) - library to help developers and validators interact with the protocol and it's smart contracts ([docs](https://docs.celo.org/celo-sdk/contractkit)) -- [dappkit](packages/dappkit) - set of functions for mobile DApps to work with the wallet app (ex. sign transactions and access the user's account) ([docs](https://docs.celo.org/celo-sdk/dappkit)) -- [dev-utils](packages/dev-utils) - a utils package for use as a dev dependency -- [docs](packages/docs) - technical documentation for the Celo project ([live](https://docs.celo.org/)) -- [faucet](packages/faucet) - faucet deployment configuration ([live](https://celo.org/build/faucet)) -- [helm-charts](packages/helm-charts) - templatized deployments of entire environments to Kubernetes clusters -- [mobile](packages/mobile) - Android wallet app for the Celo platform ([docs](https://docs.celo.org/getting-started/using-the-mobile-wallet), [live](https://play.google.com/store/apps/details?id=org.celo.mobile.alfajores)) -- [notification-service](packages/notification-service) - service for managing push notifications for Celo Wallet -- [protocol](packages/protocol) - identity, stability and other smart contracts for the Celo protocol ([docs](https://docs.celo.org/celo-codebase/protocol)) -- [react-components](packages/react-components) - generalized react native components -- [reserve-site](packages/reserve-site) - website for ([Celo Reserve.org](https://celoreserve.org/)) -- [terraform-modules](packages/terraform-modules) - templatized deployments of entire VM-based testnets for Google Cloud Platform -- [typescript](packages/typescript) - no README available (improve?) -- [utils](packages/utils) - no README available (improve?) - -Code owners for each package can be found in [.github/CODEOWNERS](.github/CODEOWNERS). - -## ✍️ Contributing - -Feel free to jump on the Celo 🚂🚋🚋🚋. Improvements and contributions are highly encouraged! 🙏👊 - -See the [contributing guide](https://docs.celo.org/community/contributing) for details on how to participate. -[![GitHub issues by-label](https://img.shields.io/github/issues/celo-org/celo-monorepo/1%20hour%20tasks)](https://github.com/celo-org/celo-monorepo/issues?q=is%3Aopen+is%3Aissue+label%3A%221+hour+tasks%22) - -All communication and contributions to the Celo project are subject to the [Celo Code of Conduct](https://celo.org/code-of-conduct). - -Not yet ready to contribute but do like the project? Support Celo with a ⭐ or share the love in a [![Twitter URL](https://img.shields.io/twitter/url?style=social&url=https%3A%2F%2Fcelo.org%2F)](https://twitter.com/intent/tweet?url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DkKggE5OvyhE&via=celohq&text=Checkout%20celo%21%20Love%20what%20they%20are%20building.&hashtags=celo) - - - -## 💬 Ask Questions, Find Answers, Get in Touch - -- [Website](https://celo.org/) -- [Docs](https://docs.celo.org/) -- [Blog](https://medium.com/celohq) -- [YouTube](https://www.youtube.com/channel/UCCZgos_YAJSXm5QX5D5Wkcw/videos?view=0&sort=p&flow=grid) -- [Forum](https://forum.celo.org) -- [Discord](https://discord.gg/vRbExjv) -- [Twitter](https://twitter.com/CeloDevs) -- [Reddit](https://www.reddit.com/r/CeloHQ/) -- [Community Events](https://celo.org/community) - -## 📜 License - -All packages are licensed under the terms of the [Apache 2.0 License](LICENSE) unless otherwise specified in the LICENSE file at package's root. diff --git a/packages/docs/developer-resources/transactions-uri/reference/SUMMARY.md b/packages/docs/developer-resources/transactions-uri/reference/SUMMARY.md deleted file mode 100644 index 703059999be..00000000000 --- a/packages/docs/developer-resources/transactions-uri/reference/SUMMARY.md +++ /dev/null @@ -1,5 +0,0 @@ -* [Globals](globals.md) -* [Modules]() - * [test-utils/setup.global](modules/_test_utils_setup_global_.md) - * [test-utils/teardown.global](modules/_test_utils_teardown_global_.md) - * [tx-uri](modules/_tx_uri_.md) \ No newline at end of file diff --git a/packages/docs/developer-resources/transactions-uri/reference/globals.md b/packages/docs/developer-resources/transactions-uri/reference/globals.md deleted file mode 100644 index 45b246d9256..00000000000 --- a/packages/docs/developer-resources/transactions-uri/reference/globals.md +++ /dev/null @@ -1,9 +0,0 @@ -# @celo/transactions-uri - -## Index - -### Modules - -* ["test-utils/setup.global"](modules/_test_utils_setup_global_.md) -* ["test-utils/teardown.global"](modules/_test_utils_teardown_global_.md) -* ["tx-uri"](modules/_tx_uri_.md) diff --git a/packages/docs/developer-resources/transactions-uri/reference/modules/_test_utils_setup_global_.md b/packages/docs/developer-resources/transactions-uri/reference/modules/_test_utils_setup_global_.md deleted file mode 100644 index d51fa412c46..00000000000 --- a/packages/docs/developer-resources/transactions-uri/reference/modules/_test_utils_setup_global_.md +++ /dev/null @@ -1,17 +0,0 @@ -# Module: "test-utils/setup.global" - -## Index - -### Functions - -* [globalSetup](_test_utils_setup_global_.md#globalsetup) - -## Functions - -### globalSetup - -▸ **globalSetup**(): *Promise‹void›* - -*Defined in [test-utils/setup.global.ts:12](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/transactions-uri/src/test-utils/setup.global.ts#L12)* - -**Returns:** *Promise‹void›* diff --git a/packages/docs/developer-resources/transactions-uri/reference/modules/_test_utils_teardown_global_.md b/packages/docs/developer-resources/transactions-uri/reference/modules/_test_utils_teardown_global_.md deleted file mode 100644 index ac0f7a2aa69..00000000000 --- a/packages/docs/developer-resources/transactions-uri/reference/modules/_test_utils_teardown_global_.md +++ /dev/null @@ -1,17 +0,0 @@ -# Module: "test-utils/teardown.global" - -## Index - -### Functions - -* [globalTeardown](_test_utils_teardown_global_.md#globalteardown) - -## Functions - -### globalTeardown - -▸ **globalTeardown**(): *Promise‹void›* - -*Defined in [test-utils/teardown.global.ts:5](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/transactions-uri/src/test-utils/teardown.global.ts#L5)* - -**Returns:** *Promise‹void›* diff --git a/packages/docs/developer-resources/transactions-uri/reference/modules/_tx_uri_.md b/packages/docs/developer-resources/transactions-uri/reference/modules/_tx_uri_.md deleted file mode 100644 index 377be007c2b..00000000000 --- a/packages/docs/developer-resources/transactions-uri/reference/modules/_tx_uri_.md +++ /dev/null @@ -1,60 +0,0 @@ -# Module: "tx-uri" - -## Index - -### Functions - -* [QrFromUri](_tx_uri_.md#qrfromuri) -* [buildUri](_tx_uri_.md#builduri) -* [parseUri](_tx_uri_.md#parseuri) - -## Functions - -### QrFromUri - -▸ **QrFromUri**(`uri`: string, `type`: "svg" | "terminal" | "utf8"): *Promise‹string›* - -*Defined in [tx-uri.ts:114](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/transactions-uri/src/tx-uri.ts#L114)* - -**Parameters:** - -Name | Type | ------- | ------ | -`uri` | string | -`type` | "svg" | "terminal" | "utf8" | - -**Returns:** *Promise‹string›* - -___ - -### buildUri - -▸ **buildUri**(`tx`: CeloTx, `functionName?`: undefined | string, `abiTypes`: string[]): *string* - -*Defined in [tx-uri.ts:65](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/transactions-uri/src/tx-uri.ts#L65)* - -**Parameters:** - -Name | Type | Default | ------- | ------ | ------ | -`tx` | CeloTx | - | -`functionName?` | undefined | string | - | -`abiTypes` | string[] | [] | - -**Returns:** *string* - -___ - -### parseUri - -▸ **parseUri**(`uri`: string): *CeloTx* - -*Defined in [tx-uri.ts:26](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/transactions-uri/src/tx-uri.ts#L26)* - -**Parameters:** - -Name | Type | ------- | ------ | -`uri` | string | - -**Returns:** *CeloTx* diff --git a/packages/docs/developer-resources/utils/reference/README.md b/packages/docs/developer-resources/utils/reference/README.md deleted file mode 100644 index 9f354f1be80..00000000000 --- a/packages/docs/developer-resources/utils/reference/README.md +++ /dev/null @@ -1,162 +0,0 @@ -# @celo/utils - -

- - celo logo - -

- -**Celo Monorepo - Official repository for core projects comprising the Celo platform** - -This repository contains the source code for the Celo core projects including the [smart contracts](https://github.com/celo-org/celo-monorepo/tree/master/packages/protocol), [wallet app](https://github.com/celo-org/celo-monorepo/tree/master/packages/mobile), -and other packages. The source code for the Celo Blockchain which operates a node on the Celo Network is kept in a separate repo [here](https://github.com/celo-org/celo-blockchain). - - - -[![CircleCI](https://img.shields.io/circleci/build/github/celo-org/celo-monorepo/master)](https://circleci.com/gh/celo-org/celo-monorepo/tree/master) -[![Codecov](https://img.shields.io/codecov/c/github/celo-org/celo-monorepo)](https://codecov.io/gh/celo-org/celo-monorepo) -[![GitHub contributors](https://img.shields.io/github/contributors/celo-org/celo-monorepo)](https://github.com/celo-org/celo-monorepo/graphs/contributors) -[![GitHub commit activity](https://img.shields.io/github/commit-activity/w/celo-org/celo-monorepo)](https://github.com/celo-org/celo-monorepo/graphs/contributors) -[![GitHub Stars](https://img.shields.io/github/stars/celo-org/celo-monorepo.svg)](https://github.com/celo-org/celo-monorepo/stargazers) -![GitHub repo size](https://img.shields.io/github/repo-size/celo-org/celo-monorepo) -[![GitHub](https://img.shields.io/github/license/celo-org/celo-monorepo?color=blue)](https://github.com/celo-org/celo-monorepo/blob/master/LICENSE) - - - -[![Website celo.org](https://img.shields.io/website-up-down-green-red/https/celo.org.svg)](https://celo.org) -[![Blog](https://img.shields.io/badge/blog-up-green)](https://medium.com/celoorg) -[![docs](https://img.shields.io/badge/docs-up-green)](https://docs.celo.org/) -[![Youtube](https://img.shields.io/badge/YouTube%20channel-up-green)](https://www.youtube.com/channel/UCCZgos_YAJSXm5QX5D5Wkcw/videos?view=0&sort=p&flow=grid) -[![forum](https://img.shields.io/badge/forum-up-green)](https://forum.celo.org) -[![Discord](https://img.shields.io/discord/600834479145353243.svg)](https://discord.gg/RfHQKtY) -[![Twitter CeloDevs](https://img.shields.io/twitter/follow/celodevs?style=social)](https://twitter.com/celodevs) -[![Twitter CeloOrg](https://img.shields.io/twitter/follow/celoorg?style=social)](https://twitter.com/CeloOrg) -[![Subreddit subscribers](https://img.shields.io/reddit/subreddit-subscribers/CeloHQ?style=social)](https://www.reddit.com/r/CeloHQ/) - - - -[![GitHub pull requests by-label](https://img.shields.io/github/issues-pr-raw/celo-org/celo-monorepo)](https://github.com/celo-org/celo-monorepo/pulls) -[![GitHub Issues](https://img.shields.io/github/issues-raw/celo-org/celo-monorepo.svg)](https://github.com/celo-org/celo-monorepo/issues) -[![GitHub issues by-label](https://img.shields.io/github/issues/celo-org/celo-monorepo/1%20hour%20tasks)](https://github.com/celo-org/celo-monorepo/issues?q=is%3Aopen+is%3Aissue+label%3A%221+hour+tasks%22) -[![GitHub issues by-label](https://img.shields.io/github/issues/celo-org/celo-monorepo/betanet-phase-2)](https://github.com/celo-org/celo-monorepo/issues?q=is%3Aopen+is%3Aissue+label%3Abetanet-phase-2) -[![GitHub issues by-label](https://img.shields.io/github/issues/celo-org/celo-monorepo/betanet-phase-3)](https://github.com/celo-org/celo-monorepo/issues?q=is%3Aopen+is%3Aissue+label%3Abetanet-phase-3) - -Contents: - - - -- [Celo's Mission - Prosperity for All](#mission) -- [The Celo Stack](#stack) -- [Documentation](#docs) -- [Issues](#issues) -- [Repo Structure](#repo) -- [Contributing](#contributing) -- [Ask Questions, Find Answers, Get in Touch](#ask) -- [License](#license) - - -## 🥅 Celo's Mission - Prosperity for All - -Celo, pronounced /ˈtselo/, means ‘purpose’ in Esperanto. In a similar spirit, we are aiming to create a new platform to connect people globally and bring financial stability to those who need it most. We believe blockchain technology is one of the most exciting innovations in recent history and as a community we look to push the boundaries of what is possible with it today. More importantly, we are driven by purpose -- to solve real-world problems such as lack of access to sound currency, or friction for cash-transfer programs aimed to alleviate poverty. Our mission is to build a monetary system that creates the conditions for prosperity for all. - - -

- - Play on Youtube - What if money were beautiful - -
- What if money were beautiful? -

- -## 🧱 The Celo Stack - -Celo is oriented around providing the simplest possible experience for end users, who may have no familiarity with cryptocurrencies, and may be using low cost devices with limited connectivity. To achieve this, the project takes a full-stack approach, where each layer of the stack is designed with the end user in mind whilst considering other stakeholders \(e.g. operators of nodes in the network\) involved in enabling the end user experience. - -The Celo stack is structured into the following logical layers: - - -

- Celo protocol -
- The Celo Blockchain and Celo Core Contracts together comprise the Celo Protocol -

- -- **Celo Blockchain**: An open cryptographic protocol that allows applications to make transactions with and run smart contracts in a secure and decentralized fashion. The Celo Blockchain has shared ancestry with [Ethereum](https://www.ethereum.org), and maintains full EVM compatibility for smart contracts. However it uses a [Byzantine Fault Tolerant](http://pmg.csail.mit.edu/papers/osdi99.pdf) \(BFT\) consensus mechanism rather than Proof of Work, and has different block format, transaction format, client synchronization protocols, and gas payment and pricing mechanisms. The network’s native asset is Celo Gold, exposed via an ERC-20 interface. - -- **Celo Core Contracts**: A set of smart contracts running on the Celo Blockchain that comprise much of the logic of the platform features including ERC-20 stable currencies, identity attestations, Proof of Stake and governance. These smart contracts are upgradeable and managed by the decentralized governance process. - - -

- Celo network -
- Topology of a Celo Network -

- -- **Applications:** Applications for end users built on the Celo platform. The Celo Wallet app, the first of an ecosystem of applications, allows end users to manage accounts and make payments securely and simply by taking advantage of the innovations in the Celo protocol. Applications take the form of external mobile or backend software: they interact with the Celo Blockchain to issue transactions and invoke code that forms the Celo Core Contracts’ API. Third parties can also deploy custom smart contracts that their own applications can invoke, which in turn can leverage Celo Core Contracts. Applications may use centralized cloud services to provide some of their functionality: in the case of the Celo Wallet, push notifications and a transaction activity feed. - -## 📚 Documentation - -Follow the instructions in [SETUP.md](SETUP.md) to get a development environment set up. - -See [Developer's Guide](https://docs.celo.org/) for full details about the design of the Celo protocol and other information about running these projects. - -## 🙋 Issues - -See the [issue backlog](https://github.com/celo-org/celo-monorepo/issues) for a list of active or proposed tasks. Feel free to create new issues to report bugs and/or request features. - -## 📂 Repo Structure - -The repository has the following packages (sub projects): - -- [attestation-service](packages/attestation-service) - service run by validators on the Celo network to send SMS messages, enabling attestations of user phone numbers and their accounts on the Celo network -- [blockchain-api](packages/blockchain-api) - service that uses Blockscout to present view of transactions by account for Celo Wallet activity feed -- [celotool](packages/celotool) - scripts for deploying and managing testnets -- [cli](packages/cli) - tool that uses ContractKit to interact with the Celo protocol ([docs](https://docs.celo.org/getting-started/using-the-cli)) -- [contractkit](packages/contractkit) - library to help developers and validators interact with the protocol and it's smart contracts ([docs](https://docs.celo.org/celo-sdk/contractkit)) -- [dappkit](packages/dappkit) - set of functions for mobile DApps to work with the wallet app (ex. sign transactions and access the user's account) ([docs](https://docs.celo.org/celo-sdk/dappkit)) -- [dev-utils](packages/dev-utils) - a utils package for use as a dev dependency -- [docs](packages/docs) - technical documentation for the Celo project ([live](https://docs.celo.org/)) -- [faucet](packages/faucet) - faucet deployment configuration ([live](https://celo.org/build/faucet)) -- [helm-charts](packages/helm-charts) - templatized deployments of entire environments to Kubernetes clusters -- [mobile](packages/mobile) - Android wallet app for the Celo platform ([docs](https://docs.celo.org/getting-started/using-the-mobile-wallet), [live](https://play.google.com/store/apps/details?id=org.celo.mobile.alfajores)) -- [notification-service](packages/notification-service) - service for managing push notifications for Celo Wallet -- [protocol](packages/protocol) - identity, stability and other smart contracts for the Celo protocol ([docs](https://docs.celo.org/celo-codebase/protocol)) -- [react-components](packages/react-components) - generalized react native components -- [reserve-site](packages/reserve-site) - website for ([Celo Reserve.org](https://celoreserve.org/)) -- [terraform-modules](packages/terraform-modules) - templatized deployments of entire VM-based testnets for Google Cloud Platform -- [typescript](packages/typescript) - no README available (improve?) -- [utils](packages/utils) - no README available (improve?) - -Code owners for each package can be found in [.github/CODEOWNERS](.github/CODEOWNERS). - -## ✍️ Contributing - -Feel free to jump on the Celo 🚂🚋🚋🚋. Improvements and contributions are highly encouraged! 🙏👊 - -See the [contributing guide](https://docs.celo.org/community/contributing) for details on how to participate. -[![GitHub issues by-label](https://img.shields.io/github/issues/celo-org/celo-monorepo/1%20hour%20tasks)](https://github.com/celo-org/celo-monorepo/issues?q=is%3Aopen+is%3Aissue+label%3A%221+hour+tasks%22) - -All communication and contributions to the Celo project are subject to the [Celo Code of Conduct](https://celo.org/code-of-conduct). - -Not yet ready to contribute but do like the project? Support Celo with a ⭐ or share the love in a [![Twitter URL](https://img.shields.io/twitter/url?style=social&url=https%3A%2F%2Fcelo.org%2F)](https://twitter.com/intent/tweet?url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DkKggE5OvyhE&via=celohq&text=Checkout%20celo%21%20Love%20what%20they%20are%20building.&hashtags=celo) - - - -## 💬 Ask Questions, Find Answers, Get in Touch - -- [Website](https://celo.org/) -- [Docs](https://docs.celo.org/) -- [Blog](https://medium.com/celohq) -- [YouTube](https://www.youtube.com/channel/UCCZgos_YAJSXm5QX5D5Wkcw/videos?view=0&sort=p&flow=grid) -- [Forum](https://forum.celo.org) -- [Discord](https://discord.gg/vRbExjv) -- [Twitter](https://twitter.com/CeloDevs) -- [Reddit](https://www.reddit.com/r/CeloHQ/) -- [Community Events](https://celo.org/community) - -## 📜 License - -All packages are licensed under the terms of the [Apache 2.0 License](LICENSE) unless otherwise specified in the LICENSE file at package's root. diff --git a/packages/docs/developer-resources/utils/reference/SUMMARY.md b/packages/docs/developer-resources/utils/reference/SUMMARY.md deleted file mode 100644 index cdc501934dd..00000000000 --- a/packages/docs/developer-resources/utils/reference/SUMMARY.md +++ /dev/null @@ -1,97 +0,0 @@ -* [Globals](globals.md) -* [Modules]() - * [node_modules/bls12377js/src/bls](modules/_node_modules_bls12377js_src_bls_.md) - * [node_modules/bls12377js/src/defs](modules/_node_modules_bls12377js_src_defs_.md) - * [FieldSpec](interfaces/_node_modules_bls12377js_src_defs_.fieldspec.md) - * [GroupSpec](interfaces/_node_modules_bls12377js_src_defs_.groupspec.md) - * [node_modules/bls12377js/src/f](modules/_node_modules_bls12377js_src_f_.md) - * [F](classes/_node_modules_bls12377js_src_f_.f.md) - * [node_modules/bls12377js/src/f2](modules/_node_modules_bls12377js_src_f2_.md) - * [F2](classes/_node_modules_bls12377js_src_f2_.f2.md) - * [node_modules/bls12377js/src/g1](modules/_node_modules_bls12377js_src_g1_.md) - * [G1](classes/_node_modules_bls12377js_src_g1_.g1.md) - * [node_modules/bls12377js/src/g2](modules/_node_modules_bls12377js_src_g2_.md) - * [G2](classes/_node_modules_bls12377js_src_g2_.g2.md) - * [node_modules/bls12377js/src/group](modules/_node_modules_bls12377js_src_group_.md) - * [Group](classes/_node_modules_bls12377js_src_group_.group.md) - * [packages/sdk/utils/src/account](modules/_packages_sdk_utils_src_account_.md) - * [packages/sdk/utils/src/address](modules/_packages_sdk_utils_src_address_.md) - * [packages/sdk/utils/src/async](modules/_packages_sdk_utils_src_async_.md) - * [packages/sdk/utils/src/attestations](modules/_packages_sdk_utils_src_attestations_.md) - * [packages/sdk/utils/src/bls](modules/_packages_sdk_utils_src_bls_.md) - * [packages/sdk/utils/src/bn](modules/_packages_sdk_utils_src_bn_.md) - * [packages/sdk/utils/src/celoHistory](modules/_packages_sdk_utils_src_celohistory_.md) - * [packages/sdk/utils/src/collections](modules/_packages_sdk_utils_src_collections_.md) - * [packages/sdk/utils/src/commentEncryption](modules/_packages_sdk_utils_src_commentencryption_.md) - * [EncryptionStatus](interfaces/_packages_sdk_utils_src_commentencryption_.encryptionstatus.md) - * [packages/sdk/utils/src/contacts](modules/_packages_sdk_utils_src_contacts_.md) - * [packages/sdk/utils/src/countries](modules/_packages_sdk_utils_src_countries_.md) - * [Countries](classes/_packages_sdk_utils_src_countries_.countries.md) - * [LocalizedCountry](interfaces/_packages_sdk_utils_src_countries_.localizedcountry.md) - * [packages/sdk/utils/src/currencies](modules/_packages_sdk_utils_src_currencies_.md) - * [packages/sdk/utils/src/dappkit](modules/_packages_sdk_utils_src_dappkit_.md) - * [DappKitRequestTypes](enums/_packages_sdk_utils_src_dappkit_.dappkitrequesttypes.md) - * [DappKitResponseStatus](enums/_packages_sdk_utils_src_dappkit_.dappkitresponsestatus.md) - * [AccountAuthRequest](interfaces/_packages_sdk_utils_src_dappkit_.accountauthrequest.md) - * [AccountAuthResponseFailure](interfaces/_packages_sdk_utils_src_dappkit_.accountauthresponsefailure.md) - * [AccountAuthResponseSuccess](interfaces/_packages_sdk_utils_src_dappkit_.accountauthresponsesuccess.md) - * [DappKitRequestBase](interfaces/_packages_sdk_utils_src_dappkit_.dappkitrequestbase.md) - * [DappKitRequestMeta](interfaces/_packages_sdk_utils_src_dappkit_.dappkitrequestmeta.md) - * [SignTxRequest](interfaces/_packages_sdk_utils_src_dappkit_.signtxrequest.md) - * [SignTxResponseFailure](interfaces/_packages_sdk_utils_src_dappkit_.signtxresponsefailure.md) - * [SignTxResponseSuccess](interfaces/_packages_sdk_utils_src_dappkit_.signtxresponsesuccess.md) - * [TxToSignParam](interfaces/_packages_sdk_utils_src_dappkit_.txtosignparam.md) - * [packages/sdk/utils/src/dataEncryptionKey](modules/_packages_sdk_utils_src_dataencryptionkey_.md) - * [packages/sdk/utils/src/displayFormatting](modules/_packages_sdk_utils_src_displayformatting_.md) - * [packages/sdk/utils/src/ecdh](modules/_packages_sdk_utils_src_ecdh_.md) - * [packages/sdk/utils/src/ecies](modules/_packages_sdk_utils_src_ecies_.md) - * [packages/sdk/utils/src/fixidity](modules/_packages_sdk_utils_src_fixidity_.md) - * [packages/sdk/utils/src/future](modules/_packages_sdk_utils_src_future_.md) - * [packages/sdk/utils/src/inputValidation](modules/_packages_sdk_utils_src_inputvalidation_.md) - * [packages/sdk/utils/src/io](modules/_packages_sdk_utils_src_io_.md) - * [packages/sdk/utils/src/istanbul](modules/_packages_sdk_utils_src_istanbul_.md) - * [IstanbulExtra](interfaces/_packages_sdk_utils_src_istanbul_.istanbulextra.md) - * [Seal](interfaces/_packages_sdk_utils_src_istanbul_.seal.md) - * [packages/sdk/utils/src/logger](modules/_packages_sdk_utils_src_logger_.md) - * [packages/sdk/utils/src/parsing](modules/_packages_sdk_utils_src_parsing_.md) - * [packages/sdk/utils/src/phoneNumbers](modules/_packages_sdk_utils_src_phonenumbers_.md) - * [packages/sdk/utils/src/sign-typed-data-utils](modules/_packages_sdk_utils_src_sign_typed_data_utils_.md) - * [EIP712Object](interfaces/_packages_sdk_utils_src_sign_typed_data_utils_.eip712object.md) - * [EIP712Parameter](interfaces/_packages_sdk_utils_src_sign_typed_data_utils_.eip712parameter.md) - * [EIP712TypedData](interfaces/_packages_sdk_utils_src_sign_typed_data_utils_.eip712typeddata.md) - * [EIP712Types](interfaces/_packages_sdk_utils_src_sign_typed_data_utils_.eip712types.md) - * [packages/sdk/utils/src/signatureUtils](modules/_packages_sdk_utils_src_signatureutils_.md) - * [packages/sdk/utils/src/solidity](modules/_packages_sdk_utils_src_solidity_.md) - * [packages/sdk/utils/src/string](modules/_packages_sdk_utils_src_string_.md) - * [packages/sdk/utils/src/task](modules/_packages_sdk_utils_src_task_.md) - * [packages/sdk/utils/src/typed-data-constructors](modules/_packages_sdk_utils_src_typed_data_constructors_.md) -* [Classes]() - * [F](classes/_node_modules_bls12377js_src_f_.f.md) - * [F2](classes/_node_modules_bls12377js_src_f2_.f2.md) - * [G1](classes/_node_modules_bls12377js_src_g1_.g1.md) - * [G2](classes/_node_modules_bls12377js_src_g2_.g2.md) - * [Group](classes/_node_modules_bls12377js_src_group_.group.md) - * [Countries](classes/_packages_sdk_utils_src_countries_.countries.md) -* [Enums]() - * [DappKitRequestTypes](enums/_packages_sdk_utils_src_dappkit_.dappkitrequesttypes.md) - * [DappKitResponseStatus](enums/_packages_sdk_utils_src_dappkit_.dappkitresponsestatus.md) -* [Interfaces]() - * [FieldSpec](interfaces/_node_modules_bls12377js_src_defs_.fieldspec.md) - * [GroupSpec](interfaces/_node_modules_bls12377js_src_defs_.groupspec.md) - * [EncryptionStatus](interfaces/_packages_sdk_utils_src_commentencryption_.encryptionstatus.md) - * [LocalizedCountry](interfaces/_packages_sdk_utils_src_countries_.localizedcountry.md) - * [AccountAuthRequest](interfaces/_packages_sdk_utils_src_dappkit_.accountauthrequest.md) - * [AccountAuthResponseFailure](interfaces/_packages_sdk_utils_src_dappkit_.accountauthresponsefailure.md) - * [AccountAuthResponseSuccess](interfaces/_packages_sdk_utils_src_dappkit_.accountauthresponsesuccess.md) - * [DappKitRequestBase](interfaces/_packages_sdk_utils_src_dappkit_.dappkitrequestbase.md) - * [DappKitRequestMeta](interfaces/_packages_sdk_utils_src_dappkit_.dappkitrequestmeta.md) - * [SignTxRequest](interfaces/_packages_sdk_utils_src_dappkit_.signtxrequest.md) - * [SignTxResponseFailure](interfaces/_packages_sdk_utils_src_dappkit_.signtxresponsefailure.md) - * [SignTxResponseSuccess](interfaces/_packages_sdk_utils_src_dappkit_.signtxresponsesuccess.md) - * [TxToSignParam](interfaces/_packages_sdk_utils_src_dappkit_.txtosignparam.md) - * [IstanbulExtra](interfaces/_packages_sdk_utils_src_istanbul_.istanbulextra.md) - * [Seal](interfaces/_packages_sdk_utils_src_istanbul_.seal.md) - * [EIP712Object](interfaces/_packages_sdk_utils_src_sign_typed_data_utils_.eip712object.md) - * [EIP712Parameter](interfaces/_packages_sdk_utils_src_sign_typed_data_utils_.eip712parameter.md) - * [EIP712TypedData](interfaces/_packages_sdk_utils_src_sign_typed_data_utils_.eip712typeddata.md) - * [EIP712Types](interfaces/_packages_sdk_utils_src_sign_typed_data_utils_.eip712types.md) \ No newline at end of file diff --git a/packages/docs/developer-resources/utils/reference/classes/_node_modules_bls12377js_src_f2_.f2.md b/packages/docs/developer-resources/utils/reference/classes/_node_modules_bls12377js_src_f2_.f2.md deleted file mode 100644 index da07484b2f8..00000000000 --- a/packages/docs/developer-resources/utils/reference/classes/_node_modules_bls12377js_src_f2_.f2.md +++ /dev/null @@ -1,223 +0,0 @@ -# Class: F2 - -## Hierarchy - -* **F2** - -## Implements - -* [FieldSpec](../interfaces/_node_modules_bls12377js_src_defs_.fieldspec.md)‹[F2](_node_modules_bls12377js_src_f2_.f2.md)› - -## Index - -### Methods - -* [add](_node_modules_bls12377js_src_f2_.f2.md#add) -* [clone](_node_modules_bls12377js_src_f2_.f2.md#clone) -* [equals](_node_modules_bls12377js_src_f2_.f2.md#equals) -* [inverse](_node_modules_bls12377js_src_f2_.f2.md#inverse) -* [multiply](_node_modules_bls12377js_src_f2_.f2.md#multiply) -* [negate](_node_modules_bls12377js_src_f2_.f2.md#negate) -* [power](_node_modules_bls12377js_src_f2_.f2.md#power) -* [sqrt](_node_modules_bls12377js_src_f2_.f2.md#sqrt) -* [subtract](_node_modules_bls12377js_src_f2_.f2.md#subtract) -* [toFs](_node_modules_bls12377js_src_f2_.f2.md#tofs) -* [toString](_node_modules_bls12377js_src_f2_.f2.md#tostring) -* [fromElements](_node_modules_bls12377js_src_f2_.f2.md#static-fromelements) -* [one](_node_modules_bls12377js_src_f2_.f2.md#static-one) -* [zero](_node_modules_bls12377js_src_f2_.f2.md#static-zero) - -## Methods - -### add - -▸ **add**(`b`: [F2](_node_modules_bls12377js_src_f2_.f2.md)): *[F2](_node_modules_bls12377js_src_f2_.f2.md)* - -Defined in node_modules/bls12377js/src/f2.ts:25 - -**Parameters:** - -Name | Type | ------- | ------ | -`b` | [F2](_node_modules_bls12377js_src_f2_.f2.md) | - -**Returns:** *[F2](_node_modules_bls12377js_src_f2_.f2.md)* - -___ - -### clone - -▸ **clone**(): *[F2](_node_modules_bls12377js_src_f2_.f2.md)* - -*Implementation of [FieldSpec](../interfaces/_node_modules_bls12377js_src_defs_.fieldspec.md)* - -Defined in node_modules/bls12377js/src/f2.ts:110 - -**Returns:** *[F2](_node_modules_bls12377js_src_f2_.f2.md)* - -___ - -### equals - -▸ **equals**(`b`: [F2](_node_modules_bls12377js_src_f2_.f2.md)): *boolean* - -Defined in node_modules/bls12377js/src/f2.ts:21 - -**Parameters:** - -Name | Type | ------- | ------ | -`b` | [F2](_node_modules_bls12377js_src_f2_.f2.md) | - -**Returns:** *boolean* - -___ - -### inverse - -▸ **inverse**(): *[F2](_node_modules_bls12377js_src_f2_.f2.md)* - -*Implementation of [FieldSpec](../interfaces/_node_modules_bls12377js_src_defs_.fieldspec.md)* - -Defined in node_modules/bls12377js/src/f2.ts:117 - -**Returns:** *[F2](_node_modules_bls12377js_src_f2_.f2.md)* - -___ - -### multiply - -▸ **multiply**(`b`: [F2](_node_modules_bls12377js_src_f2_.f2.md)): *[F2](_node_modules_bls12377js_src_f2_.f2.md)* - -Defined in node_modules/bls12377js/src/f2.ts:61 - -**Parameters:** - -Name | Type | ------- | ------ | -`b` | [F2](_node_modules_bls12377js_src_f2_.f2.md) | - -**Returns:** *[F2](_node_modules_bls12377js_src_f2_.f2.md)* - -___ - -### negate - -▸ **negate**(): *[F2](_node_modules_bls12377js_src_f2_.f2.md)* - -*Implementation of [FieldSpec](../interfaces/_node_modules_bls12377js_src_defs_.fieldspec.md)* - -Defined in node_modules/bls12377js/src/f2.ts:121 - -**Returns:** *[F2](_node_modules_bls12377js_src_f2_.f2.md)* - -___ - -### power - -▸ **power**(`e`: BigInteger): *[F2](_node_modules_bls12377js_src_f2_.f2.md)* - -*Implementation of [FieldSpec](../interfaces/_node_modules_bls12377js_src_defs_.fieldspec.md)* - -Defined in node_modules/bls12377js/src/f2.ts:39 - -**Parameters:** - -Name | Type | ------- | ------ | -`e` | BigInteger | - -**Returns:** *[F2](_node_modules_bls12377js_src_f2_.f2.md)* - -___ - -### sqrt - -▸ **sqrt**(): *[F2](_node_modules_bls12377js_src_f2_.f2.md)* - -*Implementation of [FieldSpec](../interfaces/_node_modules_bls12377js_src_defs_.fieldspec.md)* - -Defined in node_modules/bls12377js/src/f2.ts:68 - -**Returns:** *[F2](_node_modules_bls12377js_src_f2_.f2.md)* - -___ - -### subtract - -▸ **subtract**(`b`: [F2](_node_modules_bls12377js_src_f2_.f2.md)): *[F2](_node_modules_bls12377js_src_f2_.f2.md)* - -Defined in node_modules/bls12377js/src/f2.ts:32 - -**Parameters:** - -Name | Type | ------- | ------ | -`b` | [F2](_node_modules_bls12377js_src_f2_.f2.md) | - -**Returns:** *[F2](_node_modules_bls12377js_src_f2_.f2.md)* - -___ - -### toFs - -▸ **toFs**(): *[F](_node_modules_bls12377js_src_f_.f.md)[]* - -Defined in node_modules/bls12377js/src/f2.ts:128 - -**Returns:** *[F](_node_modules_bls12377js_src_f_.f.md)[]* - -___ - -### toString - -▸ **toString**(`base?`: undefined | number): *string* - -*Implementation of [FieldSpec](../interfaces/_node_modules_bls12377js_src_defs_.fieldspec.md)* - -Defined in node_modules/bls12377js/src/f2.ts:132 - -**Parameters:** - -Name | Type | ------- | ------ | -`base?` | undefined | number | - -**Returns:** *string* - -___ - -### `Static` fromElements - -▸ **fromElements**(`c0`: [F](_node_modules_bls12377js_src_f_.f.md), `c1`: [F](_node_modules_bls12377js_src_f_.f.md)): *[F2](_node_modules_bls12377js_src_f2_.f2.md)* - -Defined in node_modules/bls12377js/src/f2.ts:13 - -**Parameters:** - -Name | Type | ------- | ------ | -`c0` | [F](_node_modules_bls12377js_src_f_.f.md) | -`c1` | [F](_node_modules_bls12377js_src_f_.f.md) | - -**Returns:** *[F2](_node_modules_bls12377js_src_f2_.f2.md)* - -___ - -### `Static` one - -▸ **one**(): *[F2](_node_modules_bls12377js_src_f2_.f2.md)* - -Defined in node_modules/bls12377js/src/f2.ts:96 - -**Returns:** *[F2](_node_modules_bls12377js_src_f2_.f2.md)* - -___ - -### `Static` zero - -▸ **zero**(): *[F2](_node_modules_bls12377js_src_f2_.f2.md)* - -Defined in node_modules/bls12377js/src/f2.ts:103 - -**Returns:** *[F2](_node_modules_bls12377js_src_f2_.f2.md)* diff --git a/packages/docs/developer-resources/utils/reference/classes/_node_modules_bls12377js_src_f_.f.md b/packages/docs/developer-resources/utils/reference/classes/_node_modules_bls12377js_src_f_.f.md deleted file mode 100644 index 5f508e3775a..00000000000 --- a/packages/docs/developer-resources/utils/reference/classes/_node_modules_bls12377js_src_f_.f.md +++ /dev/null @@ -1,240 +0,0 @@ -# Class: F - -## Hierarchy - -* **F** - -## Implements - -* [FieldSpec](../interfaces/_node_modules_bls12377js_src_defs_.fieldspec.md)‹[F](_node_modules_bls12377js_src_f_.f.md)› - -## Index - -### Methods - -* [add](_node_modules_bls12377js_src_f_.f.md#add) -* [clone](_node_modules_bls12377js_src_f_.f.md#clone) -* [equals](_node_modules_bls12377js_src_f_.f.md#equals) -* [inverse](_node_modules_bls12377js_src_f_.f.md#inverse) -* [multiply](_node_modules_bls12377js_src_f_.f.md#multiply) -* [negate](_node_modules_bls12377js_src_f_.f.md#negate) -* [power](_node_modules_bls12377js_src_f_.f.md#power) -* [sqrt](_node_modules_bls12377js_src_f_.f.md#sqrt) -* [subtract](_node_modules_bls12377js_src_f_.f.md#subtract) -* [toBig](_node_modules_bls12377js_src_f_.f.md#tobig) -* [toString](_node_modules_bls12377js_src_f_.f.md#tostring) -* [fromBig](_node_modules_bls12377js_src_f_.f.md#static-frombig) -* [fromString](_node_modules_bls12377js_src_f_.f.md#static-fromstring) -* [one](_node_modules_bls12377js_src_f_.f.md#static-one) -* [zero](_node_modules_bls12377js_src_f_.f.md#static-zero) - -## Methods - -### add - -▸ **add**(`b`: [F](_node_modules_bls12377js_src_f_.f.md)): *[F](_node_modules_bls12377js_src_f_.f.md)* - -Defined in node_modules/bls12377js/src/f.ts:34 - -**Parameters:** - -Name | Type | ------- | ------ | -`b` | [F](_node_modules_bls12377js_src_f_.f.md) | - -**Returns:** *[F](_node_modules_bls12377js_src_f_.f.md)* - -___ - -### clone - -▸ **clone**(): *[F](_node_modules_bls12377js_src_f_.f.md)* - -*Implementation of [FieldSpec](../interfaces/_node_modules_bls12377js_src_defs_.fieldspec.md)* - -Defined in node_modules/bls12377js/src/f.ts:128 - -**Returns:** *[F](_node_modules_bls12377js_src_f_.f.md)* - -___ - -### equals - -▸ **equals**(`b`: [F](_node_modules_bls12377js_src_f_.f.md)): *boolean* - -Defined in node_modules/bls12377js/src/f.ts:30 - -**Parameters:** - -Name | Type | ------- | ------ | -`b` | [F](_node_modules_bls12377js_src_f_.f.md) | - -**Returns:** *boolean* - -___ - -### inverse - -▸ **inverse**(): *[F](_node_modules_bls12377js_src_f_.f.md)* - -*Implementation of [FieldSpec](../interfaces/_node_modules_bls12377js_src_defs_.fieldspec.md)* - -Defined in node_modules/bls12377js/src/f.ts:112 - -**Returns:** *[F](_node_modules_bls12377js_src_f_.f.md)* - -___ - -### multiply - -▸ **multiply**(`b`: [F](_node_modules_bls12377js_src_f_.f.md)): *[F](_node_modules_bls12377js_src_f_.f.md)* - -Defined in node_modules/bls12377js/src/f.ts:42 - -**Parameters:** - -Name | Type | ------- | ------ | -`b` | [F](_node_modules_bls12377js_src_f_.f.md) | - -**Returns:** *[F](_node_modules_bls12377js_src_f_.f.md)* - -___ - -### negate - -▸ **negate**(): *[F](_node_modules_bls12377js_src_f_.f.md)* - -*Implementation of [FieldSpec](../interfaces/_node_modules_bls12377js_src_defs_.fieldspec.md)* - -Defined in node_modules/bls12377js/src/f.ts:116 - -**Returns:** *[F](_node_modules_bls12377js_src_f_.f.md)* - -___ - -### power - -▸ **power**(`e`: BigInteger): *[F](_node_modules_bls12377js_src_f_.f.md)* - -*Implementation of [FieldSpec](../interfaces/_node_modules_bls12377js_src_defs_.fieldspec.md)* - -Defined in node_modules/bls12377js/src/f.ts:46 - -**Parameters:** - -Name | Type | ------- | ------ | -`e` | BigInteger | - -**Returns:** *[F](_node_modules_bls12377js_src_f_.f.md)* - -___ - -### sqrt - -▸ **sqrt**(): *[F](_node_modules_bls12377js_src_f_.f.md)* - -*Implementation of [FieldSpec](../interfaces/_node_modules_bls12377js_src_defs_.fieldspec.md)* - -Defined in node_modules/bls12377js/src/f.ts:65 - -**Returns:** *[F](_node_modules_bls12377js_src_f_.f.md)* - -___ - -### subtract - -▸ **subtract**(`b`: [F](_node_modules_bls12377js_src_f_.f.md)): *[F](_node_modules_bls12377js_src_f_.f.md)* - -Defined in node_modules/bls12377js/src/f.ts:38 - -**Parameters:** - -Name | Type | ------- | ------ | -`b` | [F](_node_modules_bls12377js_src_f_.f.md) | - -**Returns:** *[F](_node_modules_bls12377js_src_f_.f.md)* - -___ - -### toBig - -▸ **toBig**(): *BigInteger* - -Defined in node_modules/bls12377js/src/f.ts:61 - -**Returns:** *BigInteger* - -___ - -### toString - -▸ **toString**(`base?`: undefined | number): *string* - -*Implementation of [FieldSpec](../interfaces/_node_modules_bls12377js_src_defs_.fieldspec.md)* - -Defined in node_modules/bls12377js/src/f.ts:132 - -**Parameters:** - -Name | Type | ------- | ------ | -`base?` | undefined | number | - -**Returns:** *string* - -___ - -### `Static` fromBig - -▸ **fromBig**(`num`: BigInteger): *[F](_node_modules_bls12377js_src_f_.f.md)* - -Defined in node_modules/bls12377js/src/f.ts:20 - -**Parameters:** - -Name | Type | ------- | ------ | -`num` | BigInteger | - -**Returns:** *[F](_node_modules_bls12377js_src_f_.f.md)* - -___ - -### `Static` fromString - -▸ **fromString**(`num`: string, `base?`: undefined | number): *[F](_node_modules_bls12377js_src_f_.f.md)* - -Defined in node_modules/bls12377js/src/f.ts:10 - -**Parameters:** - -Name | Type | ------- | ------ | -`num` | string | -`base?` | undefined | number | - -**Returns:** *[F](_node_modules_bls12377js_src_f_.f.md)* - -___ - -### `Static` one - -▸ **one**(): *[F](_node_modules_bls12377js_src_f_.f.md)* - -Defined in node_modules/bls12377js/src/f.ts:120 - -**Returns:** *[F](_node_modules_bls12377js_src_f_.f.md)* - -___ - -### `Static` zero - -▸ **zero**(): *[F](_node_modules_bls12377js_src_f_.f.md)* - -Defined in node_modules/bls12377js/src/f.ts:124 - -**Returns:** *[F](_node_modules_bls12377js_src_f_.f.md)* diff --git a/packages/docs/developer-resources/utils/reference/classes/_node_modules_bls12377js_src_g1_.g1.md b/packages/docs/developer-resources/utils/reference/classes/_node_modules_bls12377js_src_g1_.g1.md deleted file mode 100644 index ef414a19d18..00000000000 --- a/packages/docs/developer-resources/utils/reference/classes/_node_modules_bls12377js_src_g1_.g1.md +++ /dev/null @@ -1,180 +0,0 @@ -# Class: G1 - -## Hierarchy - -* **G1** - -## Implements - -* [GroupSpec](../interfaces/_node_modules_bls12377js_src_defs_.groupspec.md)‹[F](_node_modules_bls12377js_src_f_.f.md), [G1](_node_modules_bls12377js_src_g1_.g1.md)› - -## Index - -### Methods - -* [add](_node_modules_bls12377js_src_g1_.g1.md#add) -* [dbl](_node_modules_bls12377js_src_g1_.g1.md#dbl) -* [equals](_node_modules_bls12377js_src_g1_.g1.md#equals) -* [negate](_node_modules_bls12377js_src_g1_.g1.md#negate) -* [scalarMult](_node_modules_bls12377js_src_g1_.g1.md#scalarmult) -* [toAffine](_node_modules_bls12377js_src_g1_.g1.md#toaffine) -* [toString](_node_modules_bls12377js_src_g1_.g1.md#tostring) -* [x](_node_modules_bls12377js_src_g1_.g1.md#x) -* [y](_node_modules_bls12377js_src_g1_.g1.md#y) -* [z](_node_modules_bls12377js_src_g1_.g1.md#z) -* [fromElements](_node_modules_bls12377js_src_g1_.g1.md#static-fromelements) - -## Methods - -### add - -▸ **add**(`p2`: [G1](_node_modules_bls12377js_src_g1_.g1.md)): *[G1](_node_modules_bls12377js_src_g1_.g1.md)* - -Defined in node_modules/bls12377js/src/g1.ts:22 - -**Parameters:** - -Name | Type | ------- | ------ | -`p2` | [G1](_node_modules_bls12377js_src_g1_.g1.md) | - -**Returns:** *[G1](_node_modules_bls12377js_src_g1_.g1.md)* - -___ - -### dbl - -▸ **dbl**(): *[G1](_node_modules_bls12377js_src_g1_.g1.md)* - -*Implementation of [GroupSpec](../interfaces/_node_modules_bls12377js_src_defs_.groupspec.md)* - -Defined in node_modules/bls12377js/src/g1.ts:29 - -**Returns:** *[G1](_node_modules_bls12377js_src_g1_.g1.md)* - -___ - -### equals - -▸ **equals**(`p2`: [G1](_node_modules_bls12377js_src_g1_.g1.md)): *boolean* - -Defined in node_modules/bls12377js/src/g1.ts:44 - -**Parameters:** - -Name | Type | ------- | ------ | -`p2` | [G1](_node_modules_bls12377js_src_g1_.g1.md) | - -**Returns:** *boolean* - -___ - -### negate - -▸ **negate**(): *[G1](_node_modules_bls12377js_src_g1_.g1.md)* - -Defined in node_modules/bls12377js/src/g1.ts:48 - -**Returns:** *[G1](_node_modules_bls12377js_src_g1_.g1.md)* - -___ - -### scalarMult - -▸ **scalarMult**(`s`: BigInteger): *[G1](_node_modules_bls12377js_src_g1_.g1.md)* - -*Implementation of [GroupSpec](../interfaces/_node_modules_bls12377js_src_defs_.groupspec.md)* - -Defined in node_modules/bls12377js/src/g1.ts:36 - -**Parameters:** - -Name | Type | ------- | ------ | -`s` | BigInteger | - -**Returns:** *[G1](_node_modules_bls12377js_src_g1_.g1.md)* - -___ - -### toAffine - -▸ **toAffine**(): *[G1](_node_modules_bls12377js_src_g1_.g1.md)* - -*Implementation of [GroupSpec](../interfaces/_node_modules_bls12377js_src_defs_.groupspec.md)* - -Defined in node_modules/bls12377js/src/g1.ts:56 - -**Returns:** *[G1](_node_modules_bls12377js_src_g1_.g1.md)* - -___ - -### toString - -▸ **toString**(`base?`: undefined | number): *string* - -*Implementation of [GroupSpec](../interfaces/_node_modules_bls12377js_src_defs_.groupspec.md)* - -Defined in node_modules/bls12377js/src/g1.ts:74 - -**Parameters:** - -Name | Type | ------- | ------ | -`base?` | undefined | number | - -**Returns:** *string* - -___ - -### x - -▸ **x**(): *[F](_node_modules_bls12377js_src_f_.f.md)* - -*Implementation of [GroupSpec](../interfaces/_node_modules_bls12377js_src_defs_.groupspec.md)* - -Defined in node_modules/bls12377js/src/g1.ts:62 - -**Returns:** *[F](_node_modules_bls12377js_src_f_.f.md)* - -___ - -### y - -▸ **y**(): *[F](_node_modules_bls12377js_src_f_.f.md)* - -*Implementation of [GroupSpec](../interfaces/_node_modules_bls12377js_src_defs_.groupspec.md)* - -Defined in node_modules/bls12377js/src/g1.ts:66 - -**Returns:** *[F](_node_modules_bls12377js_src_f_.f.md)* - -___ - -### z - -▸ **z**(): *[F](_node_modules_bls12377js_src_f_.f.md)* - -*Implementation of [GroupSpec](../interfaces/_node_modules_bls12377js_src_defs_.groupspec.md)* - -Defined in node_modules/bls12377js/src/g1.ts:70 - -**Returns:** *[F](_node_modules_bls12377js_src_f_.f.md)* - -___ - -### `Static` fromElements - -▸ **fromElements**(`x`: [F](_node_modules_bls12377js_src_f_.f.md), `y`: [F](_node_modules_bls12377js_src_f_.f.md)): *[G1](_node_modules_bls12377js_src_g1_.g1.md)* - -Defined in node_modules/bls12377js/src/g1.ts:16 - -**Parameters:** - -Name | Type | ------- | ------ | -`x` | [F](_node_modules_bls12377js_src_f_.f.md) | -`y` | [F](_node_modules_bls12377js_src_f_.f.md) | - -**Returns:** *[G1](_node_modules_bls12377js_src_g1_.g1.md)* diff --git a/packages/docs/developer-resources/utils/reference/classes/_node_modules_bls12377js_src_g2_.g2.md b/packages/docs/developer-resources/utils/reference/classes/_node_modules_bls12377js_src_g2_.g2.md deleted file mode 100644 index 048bbdfa312..00000000000 --- a/packages/docs/developer-resources/utils/reference/classes/_node_modules_bls12377js_src_g2_.g2.md +++ /dev/null @@ -1,180 +0,0 @@ -# Class: G2 - -## Hierarchy - -* **G2** - -## Implements - -* [GroupSpec](../interfaces/_node_modules_bls12377js_src_defs_.groupspec.md)‹[F2](_node_modules_bls12377js_src_f2_.f2.md), [G2](_node_modules_bls12377js_src_g2_.g2.md)› - -## Index - -### Methods - -* [add](_node_modules_bls12377js_src_g2_.g2.md#add) -* [dbl](_node_modules_bls12377js_src_g2_.g2.md#dbl) -* [equals](_node_modules_bls12377js_src_g2_.g2.md#equals) -* [negate](_node_modules_bls12377js_src_g2_.g2.md#negate) -* [scalarMult](_node_modules_bls12377js_src_g2_.g2.md#scalarmult) -* [toAffine](_node_modules_bls12377js_src_g2_.g2.md#toaffine) -* [toString](_node_modules_bls12377js_src_g2_.g2.md#tostring) -* [x](_node_modules_bls12377js_src_g2_.g2.md#x) -* [y](_node_modules_bls12377js_src_g2_.g2.md#y) -* [z](_node_modules_bls12377js_src_g2_.g2.md#z) -* [fromElements](_node_modules_bls12377js_src_g2_.g2.md#static-fromelements) - -## Methods - -### add - -▸ **add**(`p2`: [G2](_node_modules_bls12377js_src_g2_.g2.md)): *[G2](_node_modules_bls12377js_src_g2_.g2.md)* - -Defined in node_modules/bls12377js/src/g2.ts:26 - -**Parameters:** - -Name | Type | ------- | ------ | -`p2` | [G2](_node_modules_bls12377js_src_g2_.g2.md) | - -**Returns:** *[G2](_node_modules_bls12377js_src_g2_.g2.md)* - -___ - -### dbl - -▸ **dbl**(): *[G2](_node_modules_bls12377js_src_g2_.g2.md)* - -*Implementation of [GroupSpec](../interfaces/_node_modules_bls12377js_src_defs_.groupspec.md)* - -Defined in node_modules/bls12377js/src/g2.ts:33 - -**Returns:** *[G2](_node_modules_bls12377js_src_g2_.g2.md)* - -___ - -### equals - -▸ **equals**(`p2`: [G2](_node_modules_bls12377js_src_g2_.g2.md)): *boolean* - -Defined in node_modules/bls12377js/src/g2.ts:56 - -**Parameters:** - -Name | Type | ------- | ------ | -`p2` | [G2](_node_modules_bls12377js_src_g2_.g2.md) | - -**Returns:** *boolean* - -___ - -### negate - -▸ **negate**(): *[G2](_node_modules_bls12377js_src_g2_.g2.md)* - -Defined in node_modules/bls12377js/src/g2.ts:48 - -**Returns:** *[G2](_node_modules_bls12377js_src_g2_.g2.md)* - -___ - -### scalarMult - -▸ **scalarMult**(`s`: BigInteger): *[G2](_node_modules_bls12377js_src_g2_.g2.md)* - -*Implementation of [GroupSpec](../interfaces/_node_modules_bls12377js_src_defs_.groupspec.md)* - -Defined in node_modules/bls12377js/src/g2.ts:40 - -**Parameters:** - -Name | Type | ------- | ------ | -`s` | BigInteger | - -**Returns:** *[G2](_node_modules_bls12377js_src_g2_.g2.md)* - -___ - -### toAffine - -▸ **toAffine**(): *[G2](_node_modules_bls12377js_src_g2_.g2.md)* - -*Implementation of [GroupSpec](../interfaces/_node_modules_bls12377js_src_defs_.groupspec.md)* - -Defined in node_modules/bls12377js/src/g2.ts:60 - -**Returns:** *[G2](_node_modules_bls12377js_src_g2_.g2.md)* - -___ - -### toString - -▸ **toString**(`base?`: undefined | number): *string* - -*Implementation of [GroupSpec](../interfaces/_node_modules_bls12377js_src_defs_.groupspec.md)* - -Defined in node_modules/bls12377js/src/g2.ts:78 - -**Parameters:** - -Name | Type | ------- | ------ | -`base?` | undefined | number | - -**Returns:** *string* - -___ - -### x - -▸ **x**(): *[F2](_node_modules_bls12377js_src_f2_.f2.md)* - -*Implementation of [GroupSpec](../interfaces/_node_modules_bls12377js_src_defs_.groupspec.md)* - -Defined in node_modules/bls12377js/src/g2.ts:66 - -**Returns:** *[F2](_node_modules_bls12377js_src_f2_.f2.md)* - -___ - -### y - -▸ **y**(): *[F2](_node_modules_bls12377js_src_f2_.f2.md)* - -*Implementation of [GroupSpec](../interfaces/_node_modules_bls12377js_src_defs_.groupspec.md)* - -Defined in node_modules/bls12377js/src/g2.ts:70 - -**Returns:** *[F2](_node_modules_bls12377js_src_f2_.f2.md)* - -___ - -### z - -▸ **z**(): *[F2](_node_modules_bls12377js_src_f2_.f2.md)* - -*Implementation of [GroupSpec](../interfaces/_node_modules_bls12377js_src_defs_.groupspec.md)* - -Defined in node_modules/bls12377js/src/g2.ts:74 - -**Returns:** *[F2](_node_modules_bls12377js_src_f2_.f2.md)* - -___ - -### `Static` fromElements - -▸ **fromElements**(`x`: [F2](_node_modules_bls12377js_src_f2_.f2.md), `y`: [F2](_node_modules_bls12377js_src_f2_.f2.md)): *[G2](_node_modules_bls12377js_src_g2_.g2.md)* - -Defined in node_modules/bls12377js/src/g2.ts:20 - -**Parameters:** - -Name | Type | ------- | ------ | -`x` | [F2](_node_modules_bls12377js_src_f2_.f2.md) | -`y` | [F2](_node_modules_bls12377js_src_f2_.f2.md) | - -**Returns:** *[G2](_node_modules_bls12377js_src_g2_.g2.md)* diff --git a/packages/docs/developer-resources/utils/reference/classes/_node_modules_bls12377js_src_group_.group.md b/packages/docs/developer-resources/utils/reference/classes/_node_modules_bls12377js_src_group_.group.md deleted file mode 100644 index 77dd6d55245..00000000000 --- a/packages/docs/developer-resources/utils/reference/classes/_node_modules_bls12377js_src_group_.group.md +++ /dev/null @@ -1,224 +0,0 @@ -# Class: Group <**T**> - -## Type parameters - -▪ **T**: *[FieldSpec](../interfaces/_node_modules_bls12377js_src_defs_.fieldspec.md)‹T›* - -## Hierarchy - -* **Group** - -## Index - -### Methods - -* [_add](_node_modules_bls12377js_src_group_.group.md#_add) -* [_double](_node_modules_bls12377js_src_group_.group.md#_double) -* [_scalarMult](_node_modules_bls12377js_src_group_.group.md#_scalarmult) -* [clone](_node_modules_bls12377js_src_group_.group.md#clone) -* [equals](_node_modules_bls12377js_src_group_.group.md#equals) -* [equalsProjective](_node_modules_bls12377js_src_group_.group.md#equalsprojective) -* [isInfinity](_node_modules_bls12377js_src_group_.group.md#isinfinity) -* [toAffine](_node_modules_bls12377js_src_group_.group.md#toaffine) -* [toString](_node_modules_bls12377js_src_group_.group.md#tostring) -* [x](_node_modules_bls12377js_src_group_.group.md#x) -* [y](_node_modules_bls12377js_src_group_.group.md#y) -* [z](_node_modules_bls12377js_src_group_.group.md#z) -* [fromElements](_node_modules_bls12377js_src_group_.group.md#static-fromelements) - -## Methods - -### _add - -▸ **_add**(`b`: T, `zero`: T, `one`: T, `p2`: [Group](_node_modules_bls12377js_src_group_.group.md)‹T›): *[Group](_node_modules_bls12377js_src_group_.group.md)‹T›* - -Defined in node_modules/bls12377js/src/group.ts:40 - -**Parameters:** - -Name | Type | ------- | ------ | -`b` | T | -`zero` | T | -`one` | T | -`p2` | [Group](_node_modules_bls12377js_src_group_.group.md)‹T› | - -**Returns:** *[Group](_node_modules_bls12377js_src_group_.group.md)‹T›* - -___ - -### _double - -▸ **_double**(`_`: T, `zero`: T, `one`: T): *[Group](_node_modules_bls12377js_src_group_.group.md)‹T›* - -Defined in node_modules/bls12377js/src/group.ts:70 - -**Parameters:** - -Name | Type | ------- | ------ | -`_` | T | -`zero` | T | -`one` | T | - -**Returns:** *[Group](_node_modules_bls12377js_src_group_.group.md)‹T›* - -___ - -### _scalarMult - -▸ **_scalarMult**(`b`: T, `infinity`: [Group](_node_modules_bls12377js_src_group_.group.md)‹T›, `zero`: T, `one`: T, `s`: BigInteger): *[Group](_node_modules_bls12377js_src_group_.group.md)‹T›* - -Defined in node_modules/bls12377js/src/group.ts:97 - -**Parameters:** - -Name | Type | ------- | ------ | -`b` | T | -`infinity` | [Group](_node_modules_bls12377js_src_group_.group.md)‹T› | -`zero` | T | -`one` | T | -`s` | BigInteger | - -**Returns:** *[Group](_node_modules_bls12377js_src_group_.group.md)‹T›* - -___ - -### clone - -▸ **clone**(): *[Group](_node_modules_bls12377js_src_group_.group.md)‹T›* - -Defined in node_modules/bls12377js/src/group.ts:141 - -**Returns:** *[Group](_node_modules_bls12377js_src_group_.group.md)‹T›* - -___ - -### equals - -▸ **equals**(`p2`: [Group](_node_modules_bls12377js_src_group_.group.md)‹T›): *boolean* - -Defined in node_modules/bls12377js/src/group.ts:128 - -**Parameters:** - -Name | Type | ------- | ------ | -`p2` | [Group](_node_modules_bls12377js_src_group_.group.md)‹T› | - -**Returns:** *boolean* - -___ - -### equalsProjective - -▸ **equalsProjective**(`p2`: [Group](_node_modules_bls12377js_src_group_.group.md)‹T›): *boolean* - -Defined in node_modules/bls12377js/src/group.ts:133 - -**Parameters:** - -Name | Type | ------- | ------ | -`p2` | [Group](_node_modules_bls12377js_src_group_.group.md)‹T› | - -**Returns:** *boolean* - -___ - -### isInfinity - -▸ **isInfinity**(`zero`: T, `one`: T): *boolean* - -Defined in node_modules/bls12377js/src/group.ts:137 - -**Parameters:** - -Name | Type | ------- | ------ | -`zero` | T | -`one` | T | - -**Returns:** *boolean* - -___ - -### toAffine - -▸ **toAffine**(): *[Group](_node_modules_bls12377js_src_group_.group.md)‹T›* - -Defined in node_modules/bls12377js/src/group.ts:118 - -**Returns:** *[Group](_node_modules_bls12377js_src_group_.group.md)‹T›* - -___ - -### toString - -▸ **toString**(`base?`: undefined | number): *string* - -Defined in node_modules/bls12377js/src/group.ts:150 - -**Parameters:** - -Name | Type | ------- | ------ | -`base?` | undefined | number | - -**Returns:** *string* - -___ - -### x - -▸ **x**(): *T* - -Defined in node_modules/bls12377js/src/group.ts:28 - -**Returns:** *T* - -___ - -### y - -▸ **y**(): *T* - -Defined in node_modules/bls12377js/src/group.ts:32 - -**Returns:** *T* - -___ - -### z - -▸ **z**(): *T* - -Defined in node_modules/bls12377js/src/group.ts:36 - -**Returns:** *T* - -___ - -### `Static` fromElements - -▸ **fromElements**<**T**>(`b`: T, `zero`: T, `one`: T, `x`: T, `y`: T, `z`: T): *[Group](_node_modules_bls12377js_src_group_.group.md)‹T›* - -Defined in node_modules/bls12377js/src/group.ts:14 - -**Type parameters:** - -▪ **T**: *[FieldSpec](../interfaces/_node_modules_bls12377js_src_defs_.fieldspec.md)‹T›* - -**Parameters:** - -Name | Type | ------- | ------ | -`b` | T | -`zero` | T | -`one` | T | -`x` | T | -`y` | T | -`z` | T | - -**Returns:** *[Group](_node_modules_bls12377js_src_group_.group.md)‹T›* diff --git a/packages/docs/developer-resources/utils/reference/classes/_packages_sdk_utils_src_countries_.countries.md b/packages/docs/developer-resources/utils/reference/classes/_packages_sdk_utils_src_countries_.countries.md deleted file mode 100644 index a501e30eccc..00000000000 --- a/packages/docs/developer-resources/utils/reference/classes/_packages_sdk_utils_src_countries_.countries.md +++ /dev/null @@ -1,111 +0,0 @@ -# Class: Countries - -## Hierarchy - -* **Countries** - -## Index - -### Constructors - -* [constructor](_packages_sdk_utils_src_countries_.countries.md#constructor) - -### Properties - -* [countryMap](_packages_sdk_utils_src_countries_.countries.md#countrymap) -* [language](_packages_sdk_utils_src_countries_.countries.md#language) -* [localizedCountries](_packages_sdk_utils_src_countries_.countries.md#localizedcountries) - -### Methods - -* [getCountry](_packages_sdk_utils_src_countries_.countries.md#getcountry) -* [getCountryByCodeAlpha2](_packages_sdk_utils_src_countries_.countries.md#getcountrybycodealpha2) -* [getFilteredCountries](_packages_sdk_utils_src_countries_.countries.md#getfilteredcountries) - -## Constructors - -### constructor - -\+ **new Countries**(`language?`: undefined | string): *[Countries](_packages_sdk_utils_src_countries_.countries.md)* - -*Defined in [packages/sdk/utils/src/countries.ts:39](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/countries.ts#L39)* - -**Parameters:** - -Name | Type | ------- | ------ | -`language?` | undefined | string | - -**Returns:** *[Countries](_packages_sdk_utils_src_countries_.countries.md)* - -## Properties - -### countryMap - -• **countryMap**: *Map‹string, [LocalizedCountry](../interfaces/_packages_sdk_utils_src_countries_.localizedcountry.md)›* - -*Defined in [packages/sdk/utils/src/countries.ts:38](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/countries.ts#L38)* - -___ - -### language - -• **language**: *string* - -*Defined in [packages/sdk/utils/src/countries.ts:37](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/countries.ts#L37)* - -___ - -### localizedCountries - -• **localizedCountries**: *[LocalizedCountry](../interfaces/_packages_sdk_utils_src_countries_.localizedcountry.md)[]* - -*Defined in [packages/sdk/utils/src/countries.ts:39](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/countries.ts#L39)* - -## Methods - -### getCountry - -▸ **getCountry**(`countryName?`: string | null): *[LocalizedCountry](../interfaces/_packages_sdk_utils_src_countries_.localizedcountry.md) | undefined* - -*Defined in [packages/sdk/utils/src/countries.ts:49](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/countries.ts#L49)* - -**Parameters:** - -Name | Type | ------- | ------ | -`countryName?` | string | null | - -**Returns:** *[LocalizedCountry](../interfaces/_packages_sdk_utils_src_countries_.localizedcountry.md) | undefined* - -___ - -### getCountryByCodeAlpha2 - -▸ **getCountryByCodeAlpha2**(`countryCode`: string): *[LocalizedCountry](../interfaces/_packages_sdk_utils_src_countries_.localizedcountry.md) | undefined* - -*Defined in [packages/sdk/utils/src/countries.ts:59](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/countries.ts#L59)* - -**Parameters:** - -Name | Type | ------- | ------ | -`countryCode` | string | - -**Returns:** *[LocalizedCountry](../interfaces/_packages_sdk_utils_src_countries_.localizedcountry.md) | undefined* - -___ - -### getFilteredCountries - -▸ **getFilteredCountries**(`query`: string): *[LocalizedCountry](../interfaces/_packages_sdk_utils_src_countries_.localizedcountry.md)[]* - -*Defined in [packages/sdk/utils/src/countries.ts:63](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/countries.ts#L63)* - -**Parameters:** - -Name | Type | ------- | ------ | -`query` | string | - -**Returns:** *[LocalizedCountry](../interfaces/_packages_sdk_utils_src_countries_.localizedcountry.md)[]* diff --git a/packages/docs/developer-resources/utils/reference/enums/_packages_sdk_utils_src_dappkit_.dappkitrequesttypes.md b/packages/docs/developer-resources/utils/reference/enums/_packages_sdk_utils_src_dappkit_.dappkitrequesttypes.md deleted file mode 100644 index 765bccc3288..00000000000 --- a/packages/docs/developer-resources/utils/reference/enums/_packages_sdk_utils_src_dappkit_.dappkitrequesttypes.md +++ /dev/null @@ -1,24 +0,0 @@ -# Enumeration: DappKitRequestTypes - -## Index - -### Enumeration members - -* [ACCOUNT_ADDRESS](_packages_sdk_utils_src_dappkit_.dappkitrequesttypes.md#account_address) -* [SIGN_TX](_packages_sdk_utils_src_dappkit_.dappkitrequesttypes.md#sign_tx) - -## Enumeration members - -### ACCOUNT_ADDRESS - -• **ACCOUNT_ADDRESS**: = "account_address" - -*Defined in [packages/sdk/utils/src/dappkit.ts:6](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/dappkit.ts#L6)* - -___ - -### SIGN_TX - -• **SIGN_TX**: = "sign_tx" - -*Defined in [packages/sdk/utils/src/dappkit.ts:7](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/dappkit.ts#L7)* diff --git a/packages/docs/developer-resources/utils/reference/enums/_packages_sdk_utils_src_dappkit_.dappkitresponsestatus.md b/packages/docs/developer-resources/utils/reference/enums/_packages_sdk_utils_src_dappkit_.dappkitresponsestatus.md deleted file mode 100644 index 512890aae60..00000000000 --- a/packages/docs/developer-resources/utils/reference/enums/_packages_sdk_utils_src_dappkit_.dappkitresponsestatus.md +++ /dev/null @@ -1,24 +0,0 @@ -# Enumeration: DappKitResponseStatus - -## Index - -### Enumeration members - -* [SUCCESS](_packages_sdk_utils_src_dappkit_.dappkitresponsestatus.md#success) -* [UNAUTHORIZED](_packages_sdk_utils_src_dappkit_.dappkitresponsestatus.md#unauthorized) - -## Enumeration members - -### SUCCESS - -• **SUCCESS**: = "200" - -*Defined in [packages/sdk/utils/src/dappkit.ts:11](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/dappkit.ts#L11)* - -___ - -### UNAUTHORIZED - -• **UNAUTHORIZED**: = "401" - -*Defined in [packages/sdk/utils/src/dappkit.ts:12](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/dappkit.ts#L12)* diff --git a/packages/docs/developer-resources/utils/reference/globals.md b/packages/docs/developer-resources/utils/reference/globals.md deleted file mode 100644 index 8749e6b4fb7..00000000000 --- a/packages/docs/developer-resources/utils/reference/globals.md +++ /dev/null @@ -1,44 +0,0 @@ -# @celo/utils - -## Index - -### Modules - -* ["node_modules/bls12377js/src/bls"](modules/_node_modules_bls12377js_src_bls_.md) -* ["node_modules/bls12377js/src/defs"](modules/_node_modules_bls12377js_src_defs_.md) -* ["node_modules/bls12377js/src/f"](modules/_node_modules_bls12377js_src_f_.md) -* ["node_modules/bls12377js/src/f2"](modules/_node_modules_bls12377js_src_f2_.md) -* ["node_modules/bls12377js/src/g1"](modules/_node_modules_bls12377js_src_g1_.md) -* ["node_modules/bls12377js/src/g2"](modules/_node_modules_bls12377js_src_g2_.md) -* ["node_modules/bls12377js/src/group"](modules/_node_modules_bls12377js_src_group_.md) -* ["packages/sdk/utils/src/account"](modules/_packages_sdk_utils_src_account_.md) -* ["packages/sdk/utils/src/address"](modules/_packages_sdk_utils_src_address_.md) -* ["packages/sdk/utils/src/async"](modules/_packages_sdk_utils_src_async_.md) -* ["packages/sdk/utils/src/attestations"](modules/_packages_sdk_utils_src_attestations_.md) -* ["packages/sdk/utils/src/bls"](modules/_packages_sdk_utils_src_bls_.md) -* ["packages/sdk/utils/src/bn"](modules/_packages_sdk_utils_src_bn_.md) -* ["packages/sdk/utils/src/celoHistory"](modules/_packages_sdk_utils_src_celohistory_.md) -* ["packages/sdk/utils/src/collections"](modules/_packages_sdk_utils_src_collections_.md) -* ["packages/sdk/utils/src/commentEncryption"](modules/_packages_sdk_utils_src_commentencryption_.md) -* ["packages/sdk/utils/src/contacts"](modules/_packages_sdk_utils_src_contacts_.md) -* ["packages/sdk/utils/src/countries"](modules/_packages_sdk_utils_src_countries_.md) -* ["packages/sdk/utils/src/currencies"](modules/_packages_sdk_utils_src_currencies_.md) -* ["packages/sdk/utils/src/dappkit"](modules/_packages_sdk_utils_src_dappkit_.md) -* ["packages/sdk/utils/src/dataEncryptionKey"](modules/_packages_sdk_utils_src_dataencryptionkey_.md) -* ["packages/sdk/utils/src/displayFormatting"](modules/_packages_sdk_utils_src_displayformatting_.md) -* ["packages/sdk/utils/src/ecdh"](modules/_packages_sdk_utils_src_ecdh_.md) -* ["packages/sdk/utils/src/ecies"](modules/_packages_sdk_utils_src_ecies_.md) -* ["packages/sdk/utils/src/fixidity"](modules/_packages_sdk_utils_src_fixidity_.md) -* ["packages/sdk/utils/src/future"](modules/_packages_sdk_utils_src_future_.md) -* ["packages/sdk/utils/src/inputValidation"](modules/_packages_sdk_utils_src_inputvalidation_.md) -* ["packages/sdk/utils/src/io"](modules/_packages_sdk_utils_src_io_.md) -* ["packages/sdk/utils/src/istanbul"](modules/_packages_sdk_utils_src_istanbul_.md) -* ["packages/sdk/utils/src/logger"](modules/_packages_sdk_utils_src_logger_.md) -* ["packages/sdk/utils/src/parsing"](modules/_packages_sdk_utils_src_parsing_.md) -* ["packages/sdk/utils/src/phoneNumbers"](modules/_packages_sdk_utils_src_phonenumbers_.md) -* ["packages/sdk/utils/src/sign-typed-data-utils"](modules/_packages_sdk_utils_src_sign_typed_data_utils_.md) -* ["packages/sdk/utils/src/signatureUtils"](modules/_packages_sdk_utils_src_signatureutils_.md) -* ["packages/sdk/utils/src/solidity"](modules/_packages_sdk_utils_src_solidity_.md) -* ["packages/sdk/utils/src/string"](modules/_packages_sdk_utils_src_string_.md) -* ["packages/sdk/utils/src/task"](modules/_packages_sdk_utils_src_task_.md) -* ["packages/sdk/utils/src/typed-data-constructors"](modules/_packages_sdk_utils_src_typed_data_constructors_.md) diff --git a/packages/docs/developer-resources/utils/reference/interfaces/_node_modules_bls12377js_src_defs_.fieldspec.md b/packages/docs/developer-resources/utils/reference/interfaces/_node_modules_bls12377js_src_defs_.fieldspec.md deleted file mode 100644 index c4d3a480029..00000000000 --- a/packages/docs/developer-resources/utils/reference/interfaces/_node_modules_bls12377js_src_defs_.fieldspec.md +++ /dev/null @@ -1,165 +0,0 @@ -# Interface: FieldSpec <**T**> - -## Type parameters - -▪ **T** - -## Hierarchy - -* **FieldSpec** - -## Implemented by - -* [F](../classes/_node_modules_bls12377js_src_f_.f.md) -* [F2](../classes/_node_modules_bls12377js_src_f2_.f2.md) - -## Index - -### Methods - -* [add](_node_modules_bls12377js_src_defs_.fieldspec.md#add) -* [clone](_node_modules_bls12377js_src_defs_.fieldspec.md#clone) -* [equals](_node_modules_bls12377js_src_defs_.fieldspec.md#equals) -* [inverse](_node_modules_bls12377js_src_defs_.fieldspec.md#inverse) -* [multiply](_node_modules_bls12377js_src_defs_.fieldspec.md#multiply) -* [negate](_node_modules_bls12377js_src_defs_.fieldspec.md#negate) -* [power](_node_modules_bls12377js_src_defs_.fieldspec.md#power) -* [sqrt](_node_modules_bls12377js_src_defs_.fieldspec.md#sqrt) -* [subtract](_node_modules_bls12377js_src_defs_.fieldspec.md#subtract) -* [toString](_node_modules_bls12377js_src_defs_.fieldspec.md#tostring) - -## Methods - -### add - -▸ **add**(`b`: T): *T* - -Defined in node_modules/bls12377js/src/defs.ts:37 - -**Parameters:** - -Name | Type | ------- | ------ | -`b` | T | - -**Returns:** *T* - -___ - -### clone - -▸ **clone**(): *T* - -Defined in node_modules/bls12377js/src/defs.ts:44 - -**Returns:** *T* - -___ - -### equals - -▸ **equals**(`b`: T): *boolean* - -Defined in node_modules/bls12377js/src/defs.ts:36 - -**Parameters:** - -Name | Type | ------- | ------ | -`b` | T | - -**Returns:** *boolean* - -___ - -### inverse - -▸ **inverse**(): *T* - -Defined in node_modules/bls12377js/src/defs.ts:42 - -**Returns:** *T* - -___ - -### multiply - -▸ **multiply**(`b`: T): *T* - -Defined in node_modules/bls12377js/src/defs.ts:39 - -**Parameters:** - -Name | Type | ------- | ------ | -`b` | T | - -**Returns:** *T* - -___ - -### negate - -▸ **negate**(): *T* - -Defined in node_modules/bls12377js/src/defs.ts:43 - -**Returns:** *T* - -___ - -### power - -▸ **power**(`e`: BigInteger): *T* - -Defined in node_modules/bls12377js/src/defs.ts:40 - -**Parameters:** - -Name | Type | ------- | ------ | -`e` | BigInteger | - -**Returns:** *T* - -___ - -### sqrt - -▸ **sqrt**(): *T* - -Defined in node_modules/bls12377js/src/defs.ts:41 - -**Returns:** *T* - -___ - -### subtract - -▸ **subtract**(`b`: T): *T* - -Defined in node_modules/bls12377js/src/defs.ts:38 - -**Parameters:** - -Name | Type | ------- | ------ | -`b` | T | - -**Returns:** *T* - -___ - -### toString - -▸ **toString**(`base?`: undefined | number): *string* - -Defined in node_modules/bls12377js/src/defs.ts:45 - -**Parameters:** - -Name | Type | ------- | ------ | -`base?` | undefined | number | - -**Returns:** *string* diff --git a/packages/docs/developer-resources/utils/reference/interfaces/_node_modules_bls12377js_src_defs_.groupspec.md b/packages/docs/developer-resources/utils/reference/interfaces/_node_modules_bls12377js_src_defs_.groupspec.md deleted file mode 100644 index 5477971dad8..00000000000 --- a/packages/docs/developer-resources/utils/reference/interfaces/_node_modules_bls12377js_src_defs_.groupspec.md +++ /dev/null @@ -1,144 +0,0 @@ -# Interface: GroupSpec <**T, G**> - -## Type parameters - -▪ **T** - -▪ **G** - -## Hierarchy - -* **GroupSpec** - -## Implemented by - -* [G1](../classes/_node_modules_bls12377js_src_g1_.g1.md) -* [G2](../classes/_node_modules_bls12377js_src_g2_.g2.md) - -## Index - -### Methods - -* [add](_node_modules_bls12377js_src_defs_.groupspec.md#add) -* [dbl](_node_modules_bls12377js_src_defs_.groupspec.md#dbl) -* [equals](_node_modules_bls12377js_src_defs_.groupspec.md#equals) -* [scalarMult](_node_modules_bls12377js_src_defs_.groupspec.md#scalarmult) -* [toAffine](_node_modules_bls12377js_src_defs_.groupspec.md#toaffine) -* [toString](_node_modules_bls12377js_src_defs_.groupspec.md#tostring) -* [x](_node_modules_bls12377js_src_defs_.groupspec.md#x) -* [y](_node_modules_bls12377js_src_defs_.groupspec.md#y) -* [z](_node_modules_bls12377js_src_defs_.groupspec.md#z) - -## Methods - -### add - -▸ **add**(`p2`: G): *G* - -Defined in node_modules/bls12377js/src/defs.ts:49 - -**Parameters:** - -Name | Type | ------- | ------ | -`p2` | G | - -**Returns:** *G* - -___ - -### dbl - -▸ **dbl**(): *G* - -Defined in node_modules/bls12377js/src/defs.ts:50 - -**Returns:** *G* - -___ - -### equals - -▸ **equals**(`p2`: G): *boolean* - -Defined in node_modules/bls12377js/src/defs.ts:52 - -**Parameters:** - -Name | Type | ------- | ------ | -`p2` | G | - -**Returns:** *boolean* - -___ - -### scalarMult - -▸ **scalarMult**(`s`: BigInteger): *G* - -Defined in node_modules/bls12377js/src/defs.ts:51 - -**Parameters:** - -Name | Type | ------- | ------ | -`s` | BigInteger | - -**Returns:** *G* - -___ - -### toAffine - -▸ **toAffine**(): *G* - -Defined in node_modules/bls12377js/src/defs.ts:53 - -**Returns:** *G* - -___ - -### toString - -▸ **toString**(`base?`: undefined | number): *string* - -Defined in node_modules/bls12377js/src/defs.ts:57 - -**Parameters:** - -Name | Type | ------- | ------ | -`base?` | undefined | number | - -**Returns:** *string* - -___ - -### x - -▸ **x**(): *T* - -Defined in node_modules/bls12377js/src/defs.ts:54 - -**Returns:** *T* - -___ - -### y - -▸ **y**(): *T* - -Defined in node_modules/bls12377js/src/defs.ts:55 - -**Returns:** *T* - -___ - -### z - -▸ **z**(): *T* - -Defined in node_modules/bls12377js/src/defs.ts:56 - -**Returns:** *T* diff --git a/packages/docs/developer-resources/utils/reference/interfaces/_packages_sdk_utils_src_commentencryption_.encryptionstatus.md b/packages/docs/developer-resources/utils/reference/interfaces/_packages_sdk_utils_src_commentencryption_.encryptionstatus.md deleted file mode 100644 index 1bfe69a4dc7..00000000000 --- a/packages/docs/developer-resources/utils/reference/interfaces/_packages_sdk_utils_src_commentencryption_.encryptionstatus.md +++ /dev/null @@ -1,28 +0,0 @@ -# Interface: EncryptionStatus - -## Hierarchy - -* **EncryptionStatus** - -## Index - -### Properties - -* [comment](_packages_sdk_utils_src_commentencryption_.encryptionstatus.md#comment) -* [success](_packages_sdk_utils_src_commentencryption_.encryptionstatus.md#success) - -## Properties - -### comment - -• **comment**: *string* - -*Defined in [packages/sdk/utils/src/commentEncryption.ts:16](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/commentEncryption.ts#L16)* - -___ - -### success - -• **success**: *boolean* - -*Defined in [packages/sdk/utils/src/commentEncryption.ts:15](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/commentEncryption.ts#L15)* diff --git a/packages/docs/developer-resources/utils/reference/interfaces/_packages_sdk_utils_src_countries_.localizedcountry.md b/packages/docs/developer-resources/utils/reference/interfaces/_packages_sdk_utils_src_countries_.localizedcountry.md deleted file mode 100644 index 06c03f883ba..00000000000 --- a/packages/docs/developer-resources/utils/reference/interfaces/_packages_sdk_utils_src_countries_.localizedcountry.md +++ /dev/null @@ -1,63 +0,0 @@ -# Interface: LocalizedCountry - -## Hierarchy - -* object - - ↳ **LocalizedCountry** - -## Index - -### Properties - -* [countryCallingCode](_packages_sdk_utils_src_countries_.localizedcountry.md#countrycallingcode) -* [countryPhonePlaceholder](_packages_sdk_utils_src_countries_.localizedcountry.md#countryphoneplaceholder) -* [displayName](_packages_sdk_utils_src_countries_.localizedcountry.md#displayname) -* [displayNameNoDiacritics](_packages_sdk_utils_src_countries_.localizedcountry.md#displaynamenodiacritics) -* [names](_packages_sdk_utils_src_countries_.localizedcountry.md#names) - -## Properties - -### countryCallingCode - -• **countryCallingCode**: *string* - -*Defined in [packages/sdk/utils/src/countries.ts:17](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/countries.ts#L17)* - -___ - -### countryPhonePlaceholder - -• **countryPhonePlaceholder**: *object* - -*Defined in [packages/sdk/utils/src/countries.ts:13](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/countries.ts#L13)* - -#### Type declaration: - -* **international**? : *string | undefined* - -* **national**? : *string | undefined* - -___ - -### displayName - -• **displayName**: *string* - -*Defined in [packages/sdk/utils/src/countries.ts:10](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/countries.ts#L10)* - -___ - -### displayNameNoDiacritics - -• **displayNameNoDiacritics**: *string* - -*Defined in [packages/sdk/utils/src/countries.ts:11](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/countries.ts#L11)* - -___ - -### names - -• **names**: *CountryNames* - -*Defined in [packages/sdk/utils/src/countries.ts:12](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/countries.ts#L12)* diff --git a/packages/docs/developer-resources/utils/reference/interfaces/_packages_sdk_utils_src_dappkit_.accountauthrequest.md b/packages/docs/developer-resources/utils/reference/interfaces/_packages_sdk_utils_src_dappkit_.accountauthrequest.md deleted file mode 100644 index bd9f1878fec..00000000000 --- a/packages/docs/developer-resources/utils/reference/interfaces/_packages_sdk_utils_src_dappkit_.accountauthrequest.md +++ /dev/null @@ -1,56 +0,0 @@ -# Interface: AccountAuthRequest - -## Hierarchy - -* [DappKitRequestBase](_packages_sdk_utils_src_dappkit_.dappkitrequestbase.md) - - ↳ **AccountAuthRequest** - -## Index - -### Properties - -* [callback](_packages_sdk_utils_src_dappkit_.accountauthrequest.md#callback) -* [dappName](_packages_sdk_utils_src_dappkit_.accountauthrequest.md#dappname) -* [requestId](_packages_sdk_utils_src_dappkit_.accountauthrequest.md#requestid) -* [type](_packages_sdk_utils_src_dappkit_.accountauthrequest.md#type) - -## Properties - -### callback - -• **callback**: *string* - -*Inherited from [DappKitRequestBase](_packages_sdk_utils_src_dappkit_.dappkitrequestbase.md).[callback](_packages_sdk_utils_src_dappkit_.dappkitrequestbase.md#callback)* - -*Defined in [packages/sdk/utils/src/dappkit.ts:17](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/dappkit.ts#L17)* - -___ - -### dappName - -• **dappName**: *string* - -*Inherited from [DappKitRequestBase](_packages_sdk_utils_src_dappkit_.dappkitrequestbase.md).[dappName](_packages_sdk_utils_src_dappkit_.dappkitrequestbase.md#dappname)* - -*Defined in [packages/sdk/utils/src/dappkit.ts:19](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/dappkit.ts#L19)* - -___ - -### requestId - -• **requestId**: *string* - -*Inherited from [DappKitRequestBase](_packages_sdk_utils_src_dappkit_.dappkitrequestbase.md).[requestId](_packages_sdk_utils_src_dappkit_.dappkitrequestbase.md#requestid)* - -*Defined in [packages/sdk/utils/src/dappkit.ts:18](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/dappkit.ts#L18)* - -___ - -### type - -• **type**: *[ACCOUNT_ADDRESS](../enums/_packages_sdk_utils_src_dappkit_.dappkitrequesttypes.md#account_address)* - -*Overrides [DappKitRequestBase](_packages_sdk_utils_src_dappkit_.dappkitrequestbase.md).[type](_packages_sdk_utils_src_dappkit_.dappkitrequestbase.md#type)* - -*Defined in [packages/sdk/utils/src/dappkit.ts:29](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/dappkit.ts#L29)* diff --git a/packages/docs/developer-resources/utils/reference/interfaces/_packages_sdk_utils_src_dappkit_.accountauthresponsefailure.md b/packages/docs/developer-resources/utils/reference/interfaces/_packages_sdk_utils_src_dappkit_.accountauthresponsefailure.md deleted file mode 100644 index e7aad80fe41..00000000000 --- a/packages/docs/developer-resources/utils/reference/interfaces/_packages_sdk_utils_src_dappkit_.accountauthresponsefailure.md +++ /dev/null @@ -1,28 +0,0 @@ -# Interface: AccountAuthResponseFailure - -## Hierarchy - -* **AccountAuthResponseFailure** - -## Index - -### Properties - -* [status](_packages_sdk_utils_src_dappkit_.accountauthresponsefailure.md#status) -* [type](_packages_sdk_utils_src_dappkit_.accountauthresponsefailure.md#type) - -## Properties - -### status - -• **status**: *[UNAUTHORIZED](../enums/_packages_sdk_utils_src_dappkit_.dappkitresponsestatus.md#unauthorized)* - -*Defined in [packages/sdk/utils/src/dappkit.ts:56](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/dappkit.ts#L56)* - -___ - -### type - -• **type**: *[ACCOUNT_ADDRESS](../enums/_packages_sdk_utils_src_dappkit_.dappkitrequesttypes.md#account_address)* - -*Defined in [packages/sdk/utils/src/dappkit.ts:55](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/dappkit.ts#L55)* diff --git a/packages/docs/developer-resources/utils/reference/interfaces/_packages_sdk_utils_src_dappkit_.accountauthresponsesuccess.md b/packages/docs/developer-resources/utils/reference/interfaces/_packages_sdk_utils_src_dappkit_.accountauthresponsesuccess.md deleted file mode 100644 index dd9a2428999..00000000000 --- a/packages/docs/developer-resources/utils/reference/interfaces/_packages_sdk_utils_src_dappkit_.accountauthresponsesuccess.md +++ /dev/null @@ -1,46 +0,0 @@ -# Interface: AccountAuthResponseSuccess - -## Hierarchy - -* **AccountAuthResponseSuccess** - -## Index - -### Properties - -* [address](_packages_sdk_utils_src_dappkit_.accountauthresponsesuccess.md#address) -* [phoneNumber](_packages_sdk_utils_src_dappkit_.accountauthresponsesuccess.md#phonenumber) -* [status](_packages_sdk_utils_src_dappkit_.accountauthresponsesuccess.md#status) -* [type](_packages_sdk_utils_src_dappkit_.accountauthresponsesuccess.md#type) - -## Properties - -### address - -• **address**: *string* - -*Defined in [packages/sdk/utils/src/dappkit.ts:40](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/dappkit.ts#L40)* - -___ - -### phoneNumber - -• **phoneNumber**: *string* - -*Defined in [packages/sdk/utils/src/dappkit.ts:41](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/dappkit.ts#L41)* - -___ - -### status - -• **status**: *[SUCCESS](../enums/_packages_sdk_utils_src_dappkit_.dappkitresponsestatus.md#success)* - -*Defined in [packages/sdk/utils/src/dappkit.ts:39](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/dappkit.ts#L39)* - -___ - -### type - -• **type**: *[ACCOUNT_ADDRESS](../enums/_packages_sdk_utils_src_dappkit_.dappkitrequesttypes.md#account_address)* - -*Defined in [packages/sdk/utils/src/dappkit.ts:38](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/dappkit.ts#L38)* diff --git a/packages/docs/developer-resources/utils/reference/interfaces/_packages_sdk_utils_src_dappkit_.dappkitrequestbase.md b/packages/docs/developer-resources/utils/reference/interfaces/_packages_sdk_utils_src_dappkit_.dappkitrequestbase.md deleted file mode 100644 index 5c192db68a4..00000000000 --- a/packages/docs/developer-resources/utils/reference/interfaces/_packages_sdk_utils_src_dappkit_.dappkitrequestbase.md +++ /dev/null @@ -1,50 +0,0 @@ -# Interface: DappKitRequestBase - -## Hierarchy - -* **DappKitRequestBase** - - ↳ [AccountAuthRequest](_packages_sdk_utils_src_dappkit_.accountauthrequest.md) - - ↳ [SignTxRequest](_packages_sdk_utils_src_dappkit_.signtxrequest.md) - -## Index - -### Properties - -* [callback](_packages_sdk_utils_src_dappkit_.dappkitrequestbase.md#callback) -* [dappName](_packages_sdk_utils_src_dappkit_.dappkitrequestbase.md#dappname) -* [requestId](_packages_sdk_utils_src_dappkit_.dappkitrequestbase.md#requestid) -* [type](_packages_sdk_utils_src_dappkit_.dappkitrequestbase.md#type) - -## Properties - -### callback - -• **callback**: *string* - -*Defined in [packages/sdk/utils/src/dappkit.ts:17](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/dappkit.ts#L17)* - -___ - -### dappName - -• **dappName**: *string* - -*Defined in [packages/sdk/utils/src/dappkit.ts:19](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/dappkit.ts#L19)* - -___ - -### requestId - -• **requestId**: *string* - -*Defined in [packages/sdk/utils/src/dappkit.ts:18](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/dappkit.ts#L18)* - -___ - -### type - -• **type**: *[DappKitRequestTypes](../enums/_packages_sdk_utils_src_dappkit_.dappkitrequesttypes.md)* - -*Defined in [packages/sdk/utils/src/dappkit.ts:16](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/dappkit.ts#L16)* diff --git a/packages/docs/developer-resources/utils/reference/interfaces/_packages_sdk_utils_src_dappkit_.dappkitrequestmeta.md b/packages/docs/developer-resources/utils/reference/interfaces/_packages_sdk_utils_src_dappkit_.dappkitrequestmeta.md deleted file mode 100644 index a98c1f21717..00000000000 --- a/packages/docs/developer-resources/utils/reference/interfaces/_packages_sdk_utils_src_dappkit_.dappkitrequestmeta.md +++ /dev/null @@ -1,37 +0,0 @@ -# Interface: DappKitRequestMeta - -## Hierarchy - -* **DappKitRequestMeta** - -## Index - -### Properties - -* [callback](_packages_sdk_utils_src_dappkit_.dappkitrequestmeta.md#callback) -* [dappName](_packages_sdk_utils_src_dappkit_.dappkitrequestmeta.md#dappname) -* [requestId](_packages_sdk_utils_src_dappkit_.dappkitrequestmeta.md#requestid) - -## Properties - -### callback - -• **callback**: *string* - -*Defined in [packages/sdk/utils/src/dappkit.ts:23](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/dappkit.ts#L23)* - -___ - -### dappName - -• **dappName**: *string* - -*Defined in [packages/sdk/utils/src/dappkit.ts:25](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/dappkit.ts#L25)* - -___ - -### requestId - -• **requestId**: *string* - -*Defined in [packages/sdk/utils/src/dappkit.ts:24](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/dappkit.ts#L24)* diff --git a/packages/docs/developer-resources/utils/reference/interfaces/_packages_sdk_utils_src_dappkit_.signtxrequest.md b/packages/docs/developer-resources/utils/reference/interfaces/_packages_sdk_utils_src_dappkit_.signtxrequest.md deleted file mode 100644 index f7495b99026..00000000000 --- a/packages/docs/developer-resources/utils/reference/interfaces/_packages_sdk_utils_src_dappkit_.signtxrequest.md +++ /dev/null @@ -1,65 +0,0 @@ -# Interface: SignTxRequest - -## Hierarchy - -* [DappKitRequestBase](_packages_sdk_utils_src_dappkit_.dappkitrequestbase.md) - - ↳ **SignTxRequest** - -## Index - -### Properties - -* [callback](_packages_sdk_utils_src_dappkit_.signtxrequest.md#callback) -* [dappName](_packages_sdk_utils_src_dappkit_.signtxrequest.md#dappname) -* [requestId](_packages_sdk_utils_src_dappkit_.signtxrequest.md#requestid) -* [txs](_packages_sdk_utils_src_dappkit_.signtxrequest.md#txs) -* [type](_packages_sdk_utils_src_dappkit_.signtxrequest.md#type) - -## Properties - -### callback - -• **callback**: *string* - -*Inherited from [DappKitRequestBase](_packages_sdk_utils_src_dappkit_.dappkitrequestbase.md).[callback](_packages_sdk_utils_src_dappkit_.dappkitrequestbase.md#callback)* - -*Defined in [packages/sdk/utils/src/dappkit.ts:17](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/dappkit.ts#L17)* - -___ - -### dappName - -• **dappName**: *string* - -*Inherited from [DappKitRequestBase](_packages_sdk_utils_src_dappkit_.dappkitrequestbase.md).[dappName](_packages_sdk_utils_src_dappkit_.dappkitrequestbase.md#dappname)* - -*Defined in [packages/sdk/utils/src/dappkit.ts:19](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/dappkit.ts#L19)* - -___ - -### requestId - -• **requestId**: *string* - -*Inherited from [DappKitRequestBase](_packages_sdk_utils_src_dappkit_.dappkitrequestbase.md).[requestId](_packages_sdk_utils_src_dappkit_.dappkitrequestbase.md#requestid)* - -*Defined in [packages/sdk/utils/src/dappkit.ts:18](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/dappkit.ts#L18)* - -___ - -### txs - -• **txs**: *[TxToSignParam](_packages_sdk_utils_src_dappkit_.txtosignparam.md)[]* - -*Defined in [packages/sdk/utils/src/dappkit.ts:114](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/dappkit.ts#L114)* - -___ - -### type - -• **type**: *[SIGN_TX](../enums/_packages_sdk_utils_src_dappkit_.dappkitrequesttypes.md#sign_tx)* - -*Overrides [DappKitRequestBase](_packages_sdk_utils_src_dappkit_.dappkitrequestbase.md).[type](_packages_sdk_utils_src_dappkit_.dappkitrequestbase.md#type)* - -*Defined in [packages/sdk/utils/src/dappkit.ts:113](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/dappkit.ts#L113)* diff --git a/packages/docs/developer-resources/utils/reference/interfaces/_packages_sdk_utils_src_dappkit_.signtxresponsefailure.md b/packages/docs/developer-resources/utils/reference/interfaces/_packages_sdk_utils_src_dappkit_.signtxresponsefailure.md deleted file mode 100644 index 606828067e3..00000000000 --- a/packages/docs/developer-resources/utils/reference/interfaces/_packages_sdk_utils_src_dappkit_.signtxresponsefailure.md +++ /dev/null @@ -1,28 +0,0 @@ -# Interface: SignTxResponseFailure - -## Hierarchy - -* **SignTxResponseFailure** - -## Index - -### Properties - -* [status](_packages_sdk_utils_src_dappkit_.signtxresponsefailure.md#status) -* [type](_packages_sdk_utils_src_dappkit_.signtxresponsefailure.md#type) - -## Properties - -### status - -• **status**: *[UNAUTHORIZED](../enums/_packages_sdk_utils_src_dappkit_.dappkitresponsestatus.md#unauthorized)* - -*Defined in [packages/sdk/utils/src/dappkit.ts:75](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/dappkit.ts#L75)* - -___ - -### type - -• **type**: *[SIGN_TX](../enums/_packages_sdk_utils_src_dappkit_.dappkitrequesttypes.md#sign_tx)* - -*Defined in [packages/sdk/utils/src/dappkit.ts:74](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/dappkit.ts#L74)* diff --git a/packages/docs/developer-resources/utils/reference/interfaces/_packages_sdk_utils_src_dappkit_.signtxresponsesuccess.md b/packages/docs/developer-resources/utils/reference/interfaces/_packages_sdk_utils_src_dappkit_.signtxresponsesuccess.md deleted file mode 100644 index 89e6604f1ae..00000000000 --- a/packages/docs/developer-resources/utils/reference/interfaces/_packages_sdk_utils_src_dappkit_.signtxresponsesuccess.md +++ /dev/null @@ -1,37 +0,0 @@ -# Interface: SignTxResponseSuccess - -## Hierarchy - -* **SignTxResponseSuccess** - -## Index - -### Properties - -* [rawTxs](_packages_sdk_utils_src_dappkit_.signtxresponsesuccess.md#rawtxs) -* [status](_packages_sdk_utils_src_dappkit_.signtxresponsesuccess.md#status) -* [type](_packages_sdk_utils_src_dappkit_.signtxresponsesuccess.md#type) - -## Properties - -### rawTxs - -• **rawTxs**: *string[]* - -*Defined in [packages/sdk/utils/src/dappkit.ts:64](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/dappkit.ts#L64)* - -___ - -### status - -• **status**: *[SUCCESS](../enums/_packages_sdk_utils_src_dappkit_.dappkitresponsestatus.md#success)* - -*Defined in [packages/sdk/utils/src/dappkit.ts:63](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/dappkit.ts#L63)* - -___ - -### type - -• **type**: *[SIGN_TX](../enums/_packages_sdk_utils_src_dappkit_.dappkitrequesttypes.md#sign_tx)* - -*Defined in [packages/sdk/utils/src/dappkit.ts:62](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/dappkit.ts#L62)* diff --git a/packages/docs/developer-resources/utils/reference/interfaces/_packages_sdk_utils_src_dappkit_.txtosignparam.md b/packages/docs/developer-resources/utils/reference/interfaces/_packages_sdk_utils_src_dappkit_.txtosignparam.md deleted file mode 100644 index 170ec7782c0..00000000000 --- a/packages/docs/developer-resources/utils/reference/interfaces/_packages_sdk_utils_src_dappkit_.txtosignparam.md +++ /dev/null @@ -1,73 +0,0 @@ -# Interface: TxToSignParam - -## Hierarchy - -* **TxToSignParam** - -## Index - -### Properties - -* [estimatedGas](_packages_sdk_utils_src_dappkit_.txtosignparam.md#estimatedgas) -* [feeCurrencyAddress](_packages_sdk_utils_src_dappkit_.txtosignparam.md#feecurrencyaddress) -* [from](_packages_sdk_utils_src_dappkit_.txtosignparam.md#from) -* [nonce](_packages_sdk_utils_src_dappkit_.txtosignparam.md#nonce) -* [to](_packages_sdk_utils_src_dappkit_.txtosignparam.md#optional-to) -* [txData](_packages_sdk_utils_src_dappkit_.txtosignparam.md#txdata) -* [value](_packages_sdk_utils_src_dappkit_.txtosignparam.md#value) - -## Properties - -### estimatedGas - -• **estimatedGas**: *number* - -*Defined in [packages/sdk/utils/src/dappkit.ts:104](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/dappkit.ts#L104)* - -___ - -### feeCurrencyAddress - -• **feeCurrencyAddress**: *string* - -*Defined in [packages/sdk/utils/src/dappkit.ts:108](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/dappkit.ts#L108)* - -___ - -### from - -• **from**: *string* - -*Defined in [packages/sdk/utils/src/dappkit.ts:105](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/dappkit.ts#L105)* - -___ - -### nonce - -• **nonce**: *number* - -*Defined in [packages/sdk/utils/src/dappkit.ts:107](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/dappkit.ts#L107)* - -___ - -### `Optional` to - -• **to**? : *undefined | string* - -*Defined in [packages/sdk/utils/src/dappkit.ts:106](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/dappkit.ts#L106)* - -___ - -### txData - -• **txData**: *string* - -*Defined in [packages/sdk/utils/src/dappkit.ts:103](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/dappkit.ts#L103)* - -___ - -### value - -• **value**: *string* - -*Defined in [packages/sdk/utils/src/dappkit.ts:109](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/dappkit.ts#L109)* diff --git a/packages/docs/developer-resources/utils/reference/interfaces/_packages_sdk_utils_src_istanbul_.istanbulextra.md b/packages/docs/developer-resources/utils/reference/interfaces/_packages_sdk_utils_src_istanbul_.istanbulextra.md deleted file mode 100644 index e9b3a849cca..00000000000 --- a/packages/docs/developer-resources/utils/reference/interfaces/_packages_sdk_utils_src_istanbul_.istanbulextra.md +++ /dev/null @@ -1,64 +0,0 @@ -# Interface: IstanbulExtra - -## Hierarchy - -* **IstanbulExtra** - -## Index - -### Properties - -* [addedValidators](_packages_sdk_utils_src_istanbul_.istanbulextra.md#addedvalidators) -* [addedValidatorsPublicKeys](_packages_sdk_utils_src_istanbul_.istanbulextra.md#addedvalidatorspublickeys) -* [aggregatedSeal](_packages_sdk_utils_src_istanbul_.istanbulextra.md#aggregatedseal) -* [parentAggregatedSeal](_packages_sdk_utils_src_istanbul_.istanbulextra.md#parentaggregatedseal) -* [removedValidators](_packages_sdk_utils_src_istanbul_.istanbulextra.md#removedvalidators) -* [seal](_packages_sdk_utils_src_istanbul_.istanbulextra.md#seal) - -## Properties - -### addedValidators - -• **addedValidators**: *[Address](../modules/_packages_sdk_utils_src_address_.md#address)[]* - -*Defined in [packages/sdk/utils/src/istanbul.ts:22](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/istanbul.ts#L22)* - -___ - -### addedValidatorsPublicKeys - -• **addedValidatorsPublicKeys**: *string[]* - -*Defined in [packages/sdk/utils/src/istanbul.ts:23](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/istanbul.ts#L23)* - -___ - -### aggregatedSeal - -• **aggregatedSeal**: *[Seal](_packages_sdk_utils_src_istanbul_.seal.md)* - -*Defined in [packages/sdk/utils/src/istanbul.ts:26](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/istanbul.ts#L26)* - -___ - -### parentAggregatedSeal - -• **parentAggregatedSeal**: *[Seal](_packages_sdk_utils_src_istanbul_.seal.md)* - -*Defined in [packages/sdk/utils/src/istanbul.ts:27](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/istanbul.ts#L27)* - -___ - -### removedValidators - -• **removedValidators**: *[Bitmap](../modules/_packages_sdk_utils_src_istanbul_.md#bitmap)* - -*Defined in [packages/sdk/utils/src/istanbul.ts:24](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/istanbul.ts#L24)* - -___ - -### seal - -• **seal**: *string* - -*Defined in [packages/sdk/utils/src/istanbul.ts:25](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/istanbul.ts#L25)* diff --git a/packages/docs/developer-resources/utils/reference/interfaces/_packages_sdk_utils_src_istanbul_.seal.md b/packages/docs/developer-resources/utils/reference/interfaces/_packages_sdk_utils_src_istanbul_.seal.md deleted file mode 100644 index 78befd6bdab..00000000000 --- a/packages/docs/developer-resources/utils/reference/interfaces/_packages_sdk_utils_src_istanbul_.seal.md +++ /dev/null @@ -1,37 +0,0 @@ -# Interface: Seal - -## Hierarchy - -* **Seal** - -## Index - -### Properties - -* [bitmap](_packages_sdk_utils_src_istanbul_.seal.md#bitmap) -* [round](_packages_sdk_utils_src_istanbul_.seal.md#round) -* [signature](_packages_sdk_utils_src_istanbul_.seal.md#signature) - -## Properties - -### bitmap - -• **bitmap**: *[Bitmap](../modules/_packages_sdk_utils_src_istanbul_.md#bitmap)* - -*Defined in [packages/sdk/utils/src/istanbul.ts:15](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/istanbul.ts#L15)* - -___ - -### round - -• **round**: *BigNumber* - -*Defined in [packages/sdk/utils/src/istanbul.ts:17](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/istanbul.ts#L17)* - -___ - -### signature - -• **signature**: *string* - -*Defined in [packages/sdk/utils/src/istanbul.ts:16](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/istanbul.ts#L16)* diff --git a/packages/docs/developer-resources/utils/reference/interfaces/_packages_sdk_utils_src_sign_typed_data_utils_.eip712object.md b/packages/docs/developer-resources/utils/reference/interfaces/_packages_sdk_utils_src_sign_typed_data_utils_.eip712object.md deleted file mode 100644 index d830428b4eb..00000000000 --- a/packages/docs/developer-resources/utils/reference/interfaces/_packages_sdk_utils_src_sign_typed_data_utils_.eip712object.md +++ /dev/null @@ -1,9 +0,0 @@ -# Interface: EIP712Object - -## Hierarchy - -* **EIP712Object** - -## Indexable - -* \[ **key**: *string*\]: [EIP712ObjectValue](../modules/_packages_sdk_utils_src_sign_typed_data_utils_.md#eip712objectvalue) diff --git a/packages/docs/developer-resources/utils/reference/interfaces/_packages_sdk_utils_src_sign_typed_data_utils_.eip712parameter.md b/packages/docs/developer-resources/utils/reference/interfaces/_packages_sdk_utils_src_sign_typed_data_utils_.eip712parameter.md deleted file mode 100644 index 67d590743f3..00000000000 --- a/packages/docs/developer-resources/utils/reference/interfaces/_packages_sdk_utils_src_sign_typed_data_utils_.eip712parameter.md +++ /dev/null @@ -1,28 +0,0 @@ -# Interface: EIP712Parameter - -## Hierarchy - -* **EIP712Parameter** - -## Index - -### Properties - -* [name](_packages_sdk_utils_src_sign_typed_data_utils_.eip712parameter.md#name) -* [type](_packages_sdk_utils_src_sign_typed_data_utils_.eip712parameter.md#type) - -## Properties - -### name - -• **name**: *string* - -*Defined in [packages/sdk/utils/src/sign-typed-data-utils.ts:6](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/sign-typed-data-utils.ts#L6)* - -___ - -### type - -• **type**: *string* - -*Defined in [packages/sdk/utils/src/sign-typed-data-utils.ts:7](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/sign-typed-data-utils.ts#L7)* diff --git a/packages/docs/developer-resources/utils/reference/interfaces/_packages_sdk_utils_src_sign_typed_data_utils_.eip712typeddata.md b/packages/docs/developer-resources/utils/reference/interfaces/_packages_sdk_utils_src_sign_typed_data_utils_.eip712typeddata.md deleted file mode 100644 index 3774c7cc09e..00000000000 --- a/packages/docs/developer-resources/utils/reference/interfaces/_packages_sdk_utils_src_sign_typed_data_utils_.eip712typeddata.md +++ /dev/null @@ -1,46 +0,0 @@ -# Interface: EIP712TypedData - -## Hierarchy - -* **EIP712TypedData** - -## Index - -### Properties - -* [domain](_packages_sdk_utils_src_sign_typed_data_utils_.eip712typeddata.md#domain) -* [message](_packages_sdk_utils_src_sign_typed_data_utils_.eip712typeddata.md#message) -* [primaryType](_packages_sdk_utils_src_sign_typed_data_utils_.eip712typeddata.md#primarytype) -* [types](_packages_sdk_utils_src_sign_typed_data_utils_.eip712typeddata.md#types) - -## Properties - -### domain - -• **domain**: *[EIP712Object](_packages_sdk_utils_src_sign_typed_data_utils_.eip712object.md)* - -*Defined in [packages/sdk/utils/src/sign-typed-data-utils.ts:22](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/sign-typed-data-utils.ts#L22)* - -___ - -### message - -• **message**: *[EIP712Object](_packages_sdk_utils_src_sign_typed_data_utils_.eip712object.md)* - -*Defined in [packages/sdk/utils/src/sign-typed-data-utils.ts:23](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/sign-typed-data-utils.ts#L23)* - -___ - -### primaryType - -• **primaryType**: *string* - -*Defined in [packages/sdk/utils/src/sign-typed-data-utils.ts:24](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/sign-typed-data-utils.ts#L24)* - -___ - -### types - -• **types**: *[EIP712Types](_packages_sdk_utils_src_sign_typed_data_utils_.eip712types.md)* - -*Defined in [packages/sdk/utils/src/sign-typed-data-utils.ts:21](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/sign-typed-data-utils.ts#L21)* diff --git a/packages/docs/developer-resources/utils/reference/interfaces/_packages_sdk_utils_src_sign_typed_data_utils_.eip712types.md b/packages/docs/developer-resources/utils/reference/interfaces/_packages_sdk_utils_src_sign_typed_data_utils_.eip712types.md deleted file mode 100644 index 6096db6b9fd..00000000000 --- a/packages/docs/developer-resources/utils/reference/interfaces/_packages_sdk_utils_src_sign_typed_data_utils_.eip712types.md +++ /dev/null @@ -1,9 +0,0 @@ -# Interface: EIP712Types - -## Hierarchy - -* **EIP712Types** - -## Indexable - -* \[ **key**: *string*\]: [EIP712Parameter](_packages_sdk_utils_src_sign_typed_data_utils_.eip712parameter.md)[] diff --git a/packages/docs/developer-resources/utils/reference/modules/_node_modules_bls12377js_src_bls_.md b/packages/docs/developer-resources/utils/reference/modules/_node_modules_bls12377js_src_bls_.md deleted file mode 100644 index 1fd737cd3cb..00000000000 --- a/packages/docs/developer-resources/utils/reference/modules/_node_modules_bls12377js_src_bls_.md +++ /dev/null @@ -1,280 +0,0 @@ -# Module: "node_modules/bls12377js/src/bls" - -## Index - -### Functions - -* [arrayToBuffer](_node_modules_bls12377js_src_bls_.md#arraytobuffer) -* [bigToBuffer](_node_modules_bls12377js_src_bls_.md#bigtobuffer) -* [bufferToArray](_node_modules_bls12377js_src_bls_.md#buffertoarray) -* [bufferToBig](_node_modules_bls12377js_src_bls_.md#buffertobig) -* [compressG1](_node_modules_bls12377js_src_bls_.md#compressg1) -* [compressG2](_node_modules_bls12377js_src_bls_.md#compressg2) -* [decompressG1](_node_modules_bls12377js_src_bls_.md#decompressg1) -* [decompressG2](_node_modules_bls12377js_src_bls_.md#decompressg2) -* [g1Generator](_node_modules_bls12377js_src_bls_.md#g1generator) -* [g2Generator](_node_modules_bls12377js_src_bls_.md#g2generator) -* [getMiddlePoint](_node_modules_bls12377js_src_bls_.md#getmiddlepoint) -* [padBytes](_node_modules_bls12377js_src_bls_.md#padbytes) -* [privateToPublicBytes](_node_modules_bls12377js_src_bls_.md#privatetopublicbytes) -* [reverse](_node_modules_bls12377js_src_bls_.md#reverse) -* [signPoP](_node_modules_bls12377js_src_bls_.md#signpop) -* [tryAndIncrement](_node_modules_bls12377js_src_bls_.md#tryandincrement) -* [uint8ArrayToBuffer](_node_modules_bls12377js_src_bls_.md#uint8arraytobuffer) - -## Functions - -### arrayToBuffer - -▸ **arrayToBuffer**(`arr`: number[]): *Buffer* - -Defined in node_modules/bls12377js/src/bls.ts:34 - -**Parameters:** - -Name | Type | ------- | ------ | -`arr` | number[] | - -**Returns:** *Buffer* - -___ - -### bigToBuffer - -▸ **bigToBuffer**(`num`: BigInteger): *Buffer* - -Defined in node_modules/bls12377js/src/bls.ts:43 - -**Parameters:** - -Name | Type | ------- | ------ | -`num` | BigInteger | - -**Returns:** *Buffer* - -___ - -### bufferToArray - -▸ **bufferToArray**(`buf`: Buffer): *number[]* - -Defined in node_modules/bls12377js/src/bls.ts:30 - -**Parameters:** - -Name | Type | ------- | ------ | -`buf` | Buffer | - -**Returns:** *number[]* - -___ - -### bufferToBig - -▸ **bufferToBig**(`buf`: Buffer): *BigInteger* - -Defined in node_modules/bls12377js/src/bls.ts:38 - -**Parameters:** - -Name | Type | ------- | ------ | -`buf` | Buffer | - -**Returns:** *BigInteger* - -___ - -### compressG1 - -▸ **compressG1**(`g`: [G1](../classes/_node_modules_bls12377js_src_g1_.g1.md)): *Buffer* - -Defined in node_modules/bls12377js/src/bls.ts:53 - -**Parameters:** - -Name | Type | ------- | ------ | -`g` | [G1](../classes/_node_modules_bls12377js_src_g1_.g1.md) | - -**Returns:** *Buffer* - -___ - -### compressG2 - -▸ **compressG2**(`g`: [G2](../classes/_node_modules_bls12377js_src_g2_.g2.md)): *Buffer* - -Defined in node_modules/bls12377js/src/bls.ts:90 - -**Parameters:** - -Name | Type | ------- | ------ | -`g` | [G2](../classes/_node_modules_bls12377js_src_g2_.g2.md) | - -**Returns:** *Buffer* - -___ - -### decompressG1 - -▸ **decompressG1**(`bytes`: Buffer): *[G1](../classes/_node_modules_bls12377js_src_g1_.g1.md)* - -Defined in node_modules/bls12377js/src/bls.ts:63 - -**Parameters:** - -Name | Type | ------- | ------ | -`bytes` | Buffer | - -**Returns:** *[G1](../classes/_node_modules_bls12377js_src_g1_.g1.md)* - -___ - -### decompressG2 - -▸ **decompressG2**(`bytes`: Buffer): *[G2](../classes/_node_modules_bls12377js_src_g2_.g2.md)* - -Defined in node_modules/bls12377js/src/bls.ts:111 - -**Parameters:** - -Name | Type | ------- | ------ | -`bytes` | Buffer | - -**Returns:** *[G2](../classes/_node_modules_bls12377js_src_g2_.g2.md)* - -___ - -### g1Generator - -▸ **g1Generator**(): *[G1](../classes/_node_modules_bls12377js_src_g1_.g1.md)* - -Defined in node_modules/bls12377js/src/bls.ts:155 - -**Returns:** *[G1](../classes/_node_modules_bls12377js_src_g1_.g1.md)* - -___ - -### g2Generator - -▸ **g2Generator**(): *[G2](../classes/_node_modules_bls12377js_src_g2_.g2.md)* - -Defined in node_modules/bls12377js/src/bls.ts:162 - -**Returns:** *[G2](../classes/_node_modules_bls12377js_src_g2_.g2.md)* - -___ - -### getMiddlePoint - -▸ **getMiddlePoint**(): *BigInteger* - -Defined in node_modules/bls12377js/src/bls.ts:48 - -**Returns:** *BigInteger* - -___ - -### padBytes - -▸ **padBytes**(`buf`: Buffer, `expectedLength`: number): *Buffer* - -Defined in node_modules/bls12377js/src/bls.ts:175 - -**Parameters:** - -Name | Type | ------- | ------ | -`buf` | Buffer | -`expectedLength` | number | - -**Returns:** *Buffer* - -___ - -### privateToPublicBytes - -▸ **privateToPublicBytes**(`privateKey`: Buffer): *Buffer* - -Defined in node_modules/bls12377js/src/bls.ts:186 - -**Parameters:** - -Name | Type | ------- | ------ | -`privateKey` | Buffer | - -**Returns:** *Buffer* - -___ - -### reverse - -▸ **reverse**(`src`: Buffer): *Buffer‹›* - -Defined in node_modules/bls12377js/src/bls.ts:10 - -**Parameters:** - -Name | Type | ------- | ------ | -`src` | Buffer | - -**Returns:** *Buffer‹›* - -___ - -### signPoP - -▸ **signPoP**(`privateKey`: Buffer, `address`: Buffer): *Buffer* - -Defined in node_modules/bls12377js/src/bls.ts:192 - -**Parameters:** - -Name | Type | ------- | ------ | -`privateKey` | Buffer | -`address` | Buffer | - -**Returns:** *Buffer* - -___ - -### tryAndIncrement - -▸ **tryAndIncrement**(`domain`: Buffer, `message`: Buffer): *[G1](../classes/_node_modules_bls12377js_src_g1_.g1.md)* - -Defined in node_modules/bls12377js/src/bls.ts:204 - -**Parameters:** - -Name | Type | ------- | ------ | -`domain` | Buffer | -`message` | Buffer | - -**Returns:** *[G1](../classes/_node_modules_bls12377js_src_g1_.g1.md)* - -___ - -### uint8ArrayToBuffer - -▸ **uint8ArrayToBuffer**(`src`: Uint8Array): *Buffer* - -Defined in node_modules/bls12377js/src/bls.ts:21 - -**Parameters:** - -Name | Type | ------- | ------ | -`src` | Uint8Array | - -**Returns:** *Buffer* diff --git a/packages/docs/developer-resources/utils/reference/modules/_node_modules_bls12377js_src_defs_.md b/packages/docs/developer-resources/utils/reference/modules/_node_modules_bls12377js_src_defs_.md deleted file mode 100644 index aef1d414fe4..00000000000 --- a/packages/docs/developer-resources/utils/reference/modules/_node_modules_bls12377js_src_defs_.md +++ /dev/null @@ -1,104 +0,0 @@ -# Module: "node_modules/bls12377js/src/defs" - -## Index - -### Interfaces - -* [FieldSpec](../interfaces/_node_modules_bls12377js_src_defs_.fieldspec.md) -* [GroupSpec](../interfaces/_node_modules_bls12377js_src_defs_.groupspec.md) - -### Object literals - -* [Defs](_node_modules_bls12377js_src_defs_.md#const-defs) - -## Object literals - -### `Const` Defs - -### ▪ **Defs**: *object* - -Defined in node_modules/bls12377js/src/defs.ts:3 - -### b - -• **b**: *BigInteger* = bigInt(1) - -Defined in node_modules/bls12377js/src/defs.ts:11 - -### bTwist - -• **bTwist**: *BigInteger[]* = [ - bigInt(0), - bigInt('155198655607781456406391640216936120121836107652948796323930557600032281009004493664981332883744016074664192874906'), - ] - -Defined in node_modules/bls12377js/src/defs.ts:12 - -### blsX - -• **blsX**: *BigInteger* = bigInt('8508c00000000001', 16) - -Defined in node_modules/bls12377js/src/defs.ts:32 - -### fByteSize - -• **fByteSize**: *number* = 48 - -Defined in node_modules/bls12377js/src/defs.ts:10 - -### g1Cofactor - -• **g1Cofactor**: *BigInteger* = bigInt('30631250834960419227450344600217059328') - -Defined in node_modules/bls12377js/src/defs.ts:30 - -### g1Generator - -• **g1Generator**: *BigInteger[]* = [ - bigInt('81937999373150964239938255573465948239988671502647976594219695644855304257327692006745978603320413799295628339695'), - bigInt('241266749859715473739788878240585681733927191168601896383759122102112907357779751001206799952863815012735208165030'), - ] - -Defined in node_modules/bls12377js/src/defs.ts:16 - -### g2Cofactor - -• **g2Cofactor**: *BigInteger* = bigInt('7923214915284317143930293550643874566881017850177945424769256759165301436616933228209277966774092486467289478618404761412630691835764674559376407658497') - -Defined in node_modules/bls12377js/src/defs.ts:31 - -### g2Generator - -• **g2Generator**: *BigInteger[][]* = [ - [ - bigInt('233578398248691099356572568220835526895379068987715365179118596935057653620464273615301663571204657964920925606294'), - bigInt('140913150380207355837477652521042157274541796891053068589147167627541651775299824604154852141315666357241556069118'), - ], - [ - bigInt('63160294768292073209381361943935198908131692476676907196754037919244929611450776219210369229519898517858833747423'), - bigInt('149157405641012693445398062341192467754805999074082136895788947234480009303640899064710353187729182149407503257491'), - ], - ] - -Defined in node_modules/bls12377js/src/defs.ts:20 - -### modulus - -• **modulus**: *BigInteger* = bigInt('258664426012969094010652733694893533536393512754914660539884262666720468348340822774968888139573360124440321458177') - -Defined in node_modules/bls12377js/src/defs.ts:4 - -### nonresidue - -• **nonresidue**: *BigInteger* = bigInt('-5') - -Defined in node_modules/bls12377js/src/defs.ts:5 - -### quadraticNonresidue - -• **quadraticNonresidue**: *BigInteger[]* = [ - bigInt(0), - bigInt(1), - ] - -Defined in node_modules/bls12377js/src/defs.ts:6 diff --git a/packages/docs/developer-resources/utils/reference/modules/_node_modules_bls12377js_src_f2_.md b/packages/docs/developer-resources/utils/reference/modules/_node_modules_bls12377js_src_f2_.md deleted file mode 100644 index e4d6ea8b440..00000000000 --- a/packages/docs/developer-resources/utils/reference/modules/_node_modules_bls12377js_src_f2_.md +++ /dev/null @@ -1,7 +0,0 @@ -# Module: "node_modules/bls12377js/src/f2" - -## Index - -### Classes - -* [F2](../classes/_node_modules_bls12377js_src_f2_.f2.md) diff --git a/packages/docs/developer-resources/utils/reference/modules/_node_modules_bls12377js_src_f_.md b/packages/docs/developer-resources/utils/reference/modules/_node_modules_bls12377js_src_f_.md deleted file mode 100644 index 5e09124b2ca..00000000000 --- a/packages/docs/developer-resources/utils/reference/modules/_node_modules_bls12377js_src_f_.md +++ /dev/null @@ -1,7 +0,0 @@ -# Module: "node_modules/bls12377js/src/f" - -## Index - -### Classes - -* [F](../classes/_node_modules_bls12377js_src_f_.f.md) diff --git a/packages/docs/developer-resources/utils/reference/modules/_node_modules_bls12377js_src_g1_.md b/packages/docs/developer-resources/utils/reference/modules/_node_modules_bls12377js_src_g1_.md deleted file mode 100644 index ca8d0d12e3d..00000000000 --- a/packages/docs/developer-resources/utils/reference/modules/_node_modules_bls12377js_src_g1_.md +++ /dev/null @@ -1,7 +0,0 @@ -# Module: "node_modules/bls12377js/src/g1" - -## Index - -### Classes - -* [G1](../classes/_node_modules_bls12377js_src_g1_.g1.md) diff --git a/packages/docs/developer-resources/utils/reference/modules/_node_modules_bls12377js_src_g2_.md b/packages/docs/developer-resources/utils/reference/modules/_node_modules_bls12377js_src_g2_.md deleted file mode 100644 index 59f02fca329..00000000000 --- a/packages/docs/developer-resources/utils/reference/modules/_node_modules_bls12377js_src_g2_.md +++ /dev/null @@ -1,7 +0,0 @@ -# Module: "node_modules/bls12377js/src/g2" - -## Index - -### Classes - -* [G2](../classes/_node_modules_bls12377js_src_g2_.g2.md) diff --git a/packages/docs/developer-resources/utils/reference/modules/_node_modules_bls12377js_src_group_.md b/packages/docs/developer-resources/utils/reference/modules/_node_modules_bls12377js_src_group_.md deleted file mode 100644 index a9d2c91c2be..00000000000 --- a/packages/docs/developer-resources/utils/reference/modules/_node_modules_bls12377js_src_group_.md +++ /dev/null @@ -1,7 +0,0 @@ -# Module: "node_modules/bls12377js/src/group" - -## Index - -### Classes - -* [Group](../classes/_node_modules_bls12377js_src_group_.group.md) diff --git a/packages/docs/developer-resources/utils/reference/modules/_packages_sdk_utils_src_account_.md b/packages/docs/developer-resources/utils/reference/modules/_packages_sdk_utils_src_account_.md deleted file mode 100644 index c9b8e0cba38..00000000000 --- a/packages/docs/developer-resources/utils/reference/modules/_packages_sdk_utils_src_account_.md +++ /dev/null @@ -1,233 +0,0 @@ -# Module: "packages/sdk/utils/src/account" - -## Index - -### References - -* [Bip39](_packages_sdk_utils_src_account_.md#bip39) -* [CELO_DERIVATION_PATH_BASE](_packages_sdk_utils_src_account_.md#celo_derivation_path_base) -* [MnemonicLanguages](_packages_sdk_utils_src_account_.md#mnemoniclanguages) -* [MnemonicStrength](_packages_sdk_utils_src_account_.md#mnemonicstrength) -* [RandomNumberGenerator](_packages_sdk_utils_src_account_.md#randomnumbergenerator) - -### Functions - -* [formatNonAccentedCharacters](_packages_sdk_utils_src_account_.md#formatnonaccentedcharacters) -* [generateDeterministicInviteCode](_packages_sdk_utils_src_account_.md#generatedeterministicinvitecode) -* [generateKeys](_packages_sdk_utils_src_account_.md#generatekeys) -* [generateKeysFromSeed](_packages_sdk_utils_src_account_.md#generatekeysfromseed) -* [generateMnemonic](_packages_sdk_utils_src_account_.md#generatemnemonic) -* [generateSeed](_packages_sdk_utils_src_account_.md#generateseed) -* [validateMnemonic](_packages_sdk_utils_src_account_.md#validatemnemonic) - -### Object literals - -* [AccountUtils](_packages_sdk_utils_src_account_.md#const-accountutils) - -## References - -### Bip39 - -• **Bip39**: - -___ - -### CELO_DERIVATION_PATH_BASE - -• **CELO_DERIVATION_PATH_BASE**: - -___ - -### MnemonicLanguages - -• **MnemonicLanguages**: - -___ - -### MnemonicStrength - -• **MnemonicStrength**: - -___ - -### RandomNumberGenerator - -• **RandomNumberGenerator**: - -## Functions - -### formatNonAccentedCharacters - -▸ **formatNonAccentedCharacters**(`mnemonic`: string): *string* - -*Defined in [packages/sdk/utils/src/account.ts:69](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/account.ts#L69)* - -**Parameters:** - -Name | Type | ------- | ------ | -`mnemonic` | string | - -**Returns:** *string* - -___ - -### generateDeterministicInviteCode - -▸ **generateDeterministicInviteCode**(`recipientPhoneHash`: string, `recipientPepper`: string, `addressIndex`: number, `changeIndex`: number, `derivationPath`: string): *object* - -*Defined in [packages/sdk/utils/src/account.ts:139](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/account.ts#L139)* - -**Parameters:** - -Name | Type | Default | ------- | ------ | ------ | -`recipientPhoneHash` | string | - | -`recipientPepper` | string | - | -`addressIndex` | number | 0 | -`changeIndex` | number | 0 | -`derivationPath` | string | CELO_DERIVATION_PATH_BASE | - -**Returns:** *object* - -* **privateKey**: *string* - -* **publicKey**: *string* - -___ - -### generateKeys - -▸ **generateKeys**(`mnemonic`: string, `password?`: undefined | string, `changeIndex`: number, `addressIndex`: number, `bip39ToUse`: Bip39, `derivationPath`: string): *Promise‹object›* - -*Defined in [packages/sdk/utils/src/account.ts:127](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/account.ts#L127)* - -**Parameters:** - -Name | Type | Default | ------- | ------ | ------ | -`mnemonic` | string | - | -`password?` | undefined | string | - | -`changeIndex` | number | 0 | -`addressIndex` | number | 0 | -`bip39ToUse` | Bip39 | bip39Wrapper | -`derivationPath` | string | CELO_DERIVATION_PATH_BASE | - -**Returns:** *Promise‹object›* - -___ - -### generateKeysFromSeed - -▸ **generateKeysFromSeed**(`seed`: Buffer, `changeIndex`: number, `addressIndex`: number, `derivationPath`: string): *object* - -*Defined in [packages/sdk/utils/src/account.ts:167](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/account.ts#L167)* - -**Parameters:** - -Name | Type | Default | ------- | ------ | ------ | -`seed` | Buffer | - | -`changeIndex` | number | 0 | -`addressIndex` | number | 0 | -`derivationPath` | string | CELO_DERIVATION_PATH_BASE | - -**Returns:** *object* - -* **address**: *string* - -* **privateKey**: *string* - -* **publicKey**: *string* - -___ - -### generateMnemonic - -▸ **generateMnemonic**(`strength`: [MnemonicStrength](_packages_sdk_utils_src_account_.md#mnemonicstrength), `language?`: [MnemonicLanguages](_packages_sdk_utils_src_account_.md#mnemoniclanguages), `bip39ToUse`: Bip39): *Promise‹string›* - -*Defined in [packages/sdk/utils/src/account.ts:50](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/account.ts#L50)* - -**Parameters:** - -Name | Type | Default | ------- | ------ | ------ | -`strength` | [MnemonicStrength](_packages_sdk_utils_src_account_.md#mnemonicstrength) | MnemonicStrength.s256_24words | -`language?` | [MnemonicLanguages](_packages_sdk_utils_src_account_.md#mnemoniclanguages) | - | -`bip39ToUse` | Bip39 | bip39Wrapper | - -**Returns:** *Promise‹string›* - -___ - -### generateSeed - -▸ **generateSeed**(`mnemonic`: string, `password?`: undefined | string, `bip39ToUse`: Bip39, `keyByteLength`: number): *Promise‹Buffer›* - -*Defined in [packages/sdk/utils/src/account.ts:152](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/account.ts#L152)* - -**Parameters:** - -Name | Type | Default | ------- | ------ | ------ | -`mnemonic` | string | - | -`password?` | undefined | string | - | -`bip39ToUse` | Bip39 | bip39Wrapper | -`keyByteLength` | number | 64 | - -**Returns:** *Promise‹Buffer›* - -___ - -### validateMnemonic - -▸ **validateMnemonic**(`mnemonic`: string, `bip39ToUse`: Bip39): *boolean* - -*Defined in [packages/sdk/utils/src/account.ts:58](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/account.ts#L58)* - -**Parameters:** - -Name | Type | Default | ------- | ------ | ------ | -`mnemonic` | string | - | -`bip39ToUse` | Bip39 | bip39Wrapper | - -**Returns:** *boolean* - -## Object literals - -### `Const` AccountUtils - -### ▪ **AccountUtils**: *object* - -*Defined in [packages/sdk/utils/src/account.ts:235](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/account.ts#L235)* - -### generateKeys - -• **generateKeys**: *[generateKeys](_packages_sdk_utils_src_account_.md#generatekeys)* - -*Defined in [packages/sdk/utils/src/account.ts:238](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/account.ts#L238)* - -### generateKeysFromSeed - -• **generateKeysFromSeed**: *[generateKeysFromSeed](_packages_sdk_utils_src_account_.md#generatekeysfromseed)* - -*Defined in [packages/sdk/utils/src/account.ts:240](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/account.ts#L240)* - -### generateMnemonic - -• **generateMnemonic**: *[generateMnemonic](_packages_sdk_utils_src_account_.md#generatemnemonic)* - -*Defined in [packages/sdk/utils/src/account.ts:236](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/account.ts#L236)* - -### generateSeed - -• **generateSeed**: *[generateSeed](_packages_sdk_utils_src_account_.md#generateseed)* - -*Defined in [packages/sdk/utils/src/account.ts:239](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/account.ts#L239)* - -### validateMnemonic - -• **validateMnemonic**: *[validateMnemonic](_packages_sdk_utils_src_account_.md#validatemnemonic)* - -*Defined in [packages/sdk/utils/src/account.ts:237](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/account.ts#L237)* diff --git a/packages/docs/developer-resources/utils/reference/modules/_packages_sdk_utils_src_address_.md b/packages/docs/developer-resources/utils/reference/modules/_packages_sdk_utils_src_address_.md deleted file mode 100644 index 49b9fdbbc7e..00000000000 --- a/packages/docs/developer-resources/utils/reference/modules/_packages_sdk_utils_src_address_.md +++ /dev/null @@ -1,206 +0,0 @@ -# Module: "packages/sdk/utils/src/address" - -## Index - -### References - -* [Address](_packages_sdk_utils_src_address_.md#address) -* [NULL_ADDRESS](_packages_sdk_utils_src_address_.md#null_address) -* [bufferToHex](_packages_sdk_utils_src_address_.md#buffertohex) -* [ensureLeading0x](_packages_sdk_utils_src_address_.md#ensureleading0x) -* [eqAddress](_packages_sdk_utils_src_address_.md#eqaddress) -* [findAddressIndex](_packages_sdk_utils_src_address_.md#findaddressindex) -* [getAddressChunks](_packages_sdk_utils_src_address_.md#getaddresschunks) -* [hexToBuffer](_packages_sdk_utils_src_address_.md#hextobuffer) -* [isHexString](_packages_sdk_utils_src_address_.md#ishexstring) -* [isValidChecksumAddress](_packages_sdk_utils_src_address_.md#isvalidchecksumaddress) -* [mapAddressListDataOnto](_packages_sdk_utils_src_address_.md#mapaddresslistdataonto) -* [mapAddressListOnto](_packages_sdk_utils_src_address_.md#mapaddresslistonto) -* [normalizeAddress](_packages_sdk_utils_src_address_.md#normalizeaddress) -* [normalizeAddressWith0x](_packages_sdk_utils_src_address_.md#normalizeaddresswith0x) -* [toChecksumAddress](_packages_sdk_utils_src_address_.md#tochecksumaddress) -* [trimLeading0x](_packages_sdk_utils_src_address_.md#trimleading0x) - -### Functions - -* [isValidAddress](_packages_sdk_utils_src_address_.md#const-isvalidaddress) -* [isValidPrivateKey](_packages_sdk_utils_src_address_.md#const-isvalidprivatekey) -* [privateKeyToAddress](_packages_sdk_utils_src_address_.md#const-privatekeytoaddress) -* [privateKeyToPublicKey](_packages_sdk_utils_src_address_.md#const-privatekeytopublickey) -* [publicKeyToAddress](_packages_sdk_utils_src_address_.md#const-publickeytoaddress) - -## References - -### Address - -• **Address**: - -___ - -### NULL_ADDRESS - -• **NULL_ADDRESS**: - -___ - -### bufferToHex - -• **bufferToHex**: - -___ - -### ensureLeading0x - -• **ensureLeading0x**: - -___ - -### eqAddress - -• **eqAddress**: - -___ - -### findAddressIndex - -• **findAddressIndex**: - -___ - -### getAddressChunks - -• **getAddressChunks**: - -___ - -### hexToBuffer - -• **hexToBuffer**: - -___ - -### isHexString - -• **isHexString**: - -___ - -### isValidChecksumAddress - -• **isValidChecksumAddress**: - -___ - -### mapAddressListDataOnto - -• **mapAddressListDataOnto**: - -___ - -### mapAddressListOnto - -• **mapAddressListOnto**: - -___ - -### normalizeAddress - -• **normalizeAddress**: - -___ - -### normalizeAddressWith0x - -• **normalizeAddressWith0x**: - -___ - -### toChecksumAddress - -• **toChecksumAddress**: - -___ - -### trimLeading0x - -• **trimLeading0x**: - -## Functions - -### `Const` isValidAddress - -▸ **isValidAddress**(`input`: string): *boolean* - -*Defined in [packages/sdk/utils/src/address.ts:46](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/address.ts#L46)* - -**Parameters:** - -Name | Type | ------- | ------ | -`input` | string | - -**Returns:** *boolean* - -___ - -### `Const` isValidPrivateKey - -▸ **isValidPrivateKey**(`privateKey`: string): *boolean* - -*Defined in [packages/sdk/utils/src/address.ts:43](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/address.ts#L43)* - -**Parameters:** - -Name | Type | ------- | ------ | -`privateKey` | string | - -**Returns:** *boolean* - -___ - -### `Const` privateKeyToAddress - -▸ **privateKeyToAddress**(`privateKey`: string): *string* - -*Defined in [packages/sdk/utils/src/address.ts:32](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/address.ts#L32)* - -**Parameters:** - -Name | Type | ------- | ------ | -`privateKey` | string | - -**Returns:** *string* - -___ - -### `Const` privateKeyToPublicKey - -▸ **privateKeyToPublicKey**(`privateKey`: string): *string* - -*Defined in [packages/sdk/utils/src/address.ts:35](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/address.ts#L35)* - -**Parameters:** - -Name | Type | ------- | ------ | -`privateKey` | string | - -**Returns:** *string* - -___ - -### `Const` publicKeyToAddress - -▸ **publicKeyToAddress**(`publicKey`: string): *string* - -*Defined in [packages/sdk/utils/src/address.ts:38](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/address.ts#L38)* - -**Parameters:** - -Name | Type | ------- | ------ | -`publicKey` | string | - -**Returns:** *string* diff --git a/packages/docs/developer-resources/utils/reference/modules/_packages_sdk_utils_src_async_.md b/packages/docs/developer-resources/utils/reference/modules/_packages_sdk_utils_src_async_.md deleted file mode 100644 index 63572c15a91..00000000000 --- a/packages/docs/developer-resources/utils/reference/modules/_packages_sdk_utils_src_async_.md +++ /dev/null @@ -1,48 +0,0 @@ -# Module: "packages/sdk/utils/src/async" - -## Index - -### References - -* [concurrentMap](_packages_sdk_utils_src_async_.md#concurrentmap) -* [concurrentValuesMap](_packages_sdk_utils_src_async_.md#concurrentvaluesmap) -* [retryAsync](_packages_sdk_utils_src_async_.md#retryasync) -* [retryAsyncWithBackOff](_packages_sdk_utils_src_async_.md#retryasyncwithbackoff) -* [selectiveRetryAsyncWithBackOff](_packages_sdk_utils_src_async_.md#selectiveretryasyncwithbackoff) -* [sleep](_packages_sdk_utils_src_async_.md#sleep) - -## References - -### concurrentMap - -• **concurrentMap**: - -___ - -### concurrentValuesMap - -• **concurrentValuesMap**: - -___ - -### retryAsync - -• **retryAsync**: - -___ - -### retryAsyncWithBackOff - -• **retryAsyncWithBackOff**: - -___ - -### selectiveRetryAsyncWithBackOff - -• **selectiveRetryAsyncWithBackOff**: - -___ - -### sleep - -• **sleep**: diff --git a/packages/docs/developer-resources/utils/reference/modules/_packages_sdk_utils_src_attestations_.md b/packages/docs/developer-resources/utils/reference/modules/_packages_sdk_utils_src_attestations_.md deleted file mode 100644 index 639a10e2c0d..00000000000 --- a/packages/docs/developer-resources/utils/reference/modules/_packages_sdk_utils_src_attestations_.md +++ /dev/null @@ -1,241 +0,0 @@ -# Module: "packages/sdk/utils/src/attestations" - -## Index - -### References - -* [AttestationsStatus](_packages_sdk_utils_src_attestations_.md#attestationsstatus) -* [IdentifierType](_packages_sdk_utils_src_attestations_.md#identifiertype) -* [base64ToHex](_packages_sdk_utils_src_attestations_.md#base64tohex) -* [extractAttestationCodeFromMessage](_packages_sdk_utils_src_attestations_.md#extractattestationcodefrommessage) -* [getIdentifierPrefix](_packages_sdk_utils_src_attestations_.md#getidentifierprefix) -* [isAccountConsideredVerified](_packages_sdk_utils_src_attestations_.md#isaccountconsideredverified) -* [messageContainsAttestationCode](_packages_sdk_utils_src_attestations_.md#messagecontainsattestationcode) -* [sanitizeMessageBase64](_packages_sdk_utils_src_attestations_.md#sanitizemessagebase64) - -### Functions - -* [attestToIdentifier](_packages_sdk_utils_src_attestations_.md#attesttoidentifier) -* [extractSecurityCodeWithPrefix](_packages_sdk_utils_src_attestations_.md#extractsecuritycodewithprefix) -* [getAttestationMessageToSignFromIdentifier](_packages_sdk_utils_src_attestations_.md#getattestationmessagetosignfromidentifier) -* [getAttestationMessageToSignFromPhoneNumber](_packages_sdk_utils_src_attestations_.md#getattestationmessagetosignfromphonenumber) -* [hashIdentifier](_packages_sdk_utils_src_attestations_.md#hashidentifier) - -### Object literals - -* [AttestationUtils](_packages_sdk_utils_src_attestations_.md#const-attestationutils) - -## References - -### AttestationsStatus - -• **AttestationsStatus**: - -___ - -### IdentifierType - -• **IdentifierType**: - -___ - -### base64ToHex - -• **base64ToHex**: - -___ - -### extractAttestationCodeFromMessage - -• **extractAttestationCodeFromMessage**: - -___ - -### getIdentifierPrefix - -• **getIdentifierPrefix**: - -___ - -### isAccountConsideredVerified - -• **isAccountConsideredVerified**: - -___ - -### messageContainsAttestationCode - -• **messageContainsAttestationCode**: - -___ - -### sanitizeMessageBase64 - -• **sanitizeMessageBase64**: - -## Functions - -### attestToIdentifier - -▸ **attestToIdentifier**(`identifier`: string, `account`: string, `privateKey`: string): *Signature* - -*Defined in [packages/sdk/utils/src/attestations.ts:52](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/attestations.ts#L52)* - -**Parameters:** - -Name | Type | ------- | ------ | -`identifier` | string | -`account` | string | -`privateKey` | string | - -**Returns:** *Signature* - -___ - -### extractSecurityCodeWithPrefix - -▸ **extractSecurityCodeWithPrefix**(`message`: string): *null | string* - -*Defined in [packages/sdk/utils/src/attestations.ts:66](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/attestations.ts#L66)* - -**Parameters:** - -Name | Type | ------- | ------ | -`message` | string | - -**Returns:** *null | string* - -___ - -### getAttestationMessageToSignFromIdentifier - -▸ **getAttestationMessageToSignFromIdentifier**(`identifier`: string, `account`: string): *string* - -*Defined in [packages/sdk/utils/src/attestations.ts:33](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/attestations.ts#L33)* - -**Parameters:** - -Name | Type | ------- | ------ | -`identifier` | string | -`account` | string | - -**Returns:** *string* - -___ - -### getAttestationMessageToSignFromPhoneNumber - -▸ **getAttestationMessageToSignFromPhoneNumber**(`phoneNumber`: string, `account`: string, `phoneSalt?`: undefined | string): *string* - -*Defined in [packages/sdk/utils/src/attestations.ts:41](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/attestations.ts#L41)* - -**Parameters:** - -Name | Type | ------- | ------ | -`phoneNumber` | string | -`account` | string | -`phoneSalt?` | undefined | string | - -**Returns:** *string* - -___ - -### hashIdentifier - -▸ **hashIdentifier**(`identifier`: string, `type`: [IdentifierType](_packages_sdk_utils_src_attestations_.md#identifiertype), `salt?`: undefined | string): *string* - -*Defined in [packages/sdk/utils/src/attestations.ts:29](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/attestations.ts#L29)* - -**Parameters:** - -Name | Type | ------- | ------ | -`identifier` | string | -`type` | [IdentifierType](_packages_sdk_utils_src_attestations_.md#identifiertype) | -`salt?` | undefined | string | - -**Returns:** *string* - -## Object literals - -### `Const` AttestationUtils - -### ▪ **AttestationUtils**: *object* - -*Defined in [packages/sdk/utils/src/attestations.ts:74](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/attestations.ts#L74)* - -### IdentifierType - -• **IdentifierType**: *IdentifierType* - -*Defined in [packages/sdk/utils/src/attestations.ts:75](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/attestations.ts#L75)* - -### attestToIdentifier - -• **attestToIdentifier**: *[attestToIdentifier](_packages_sdk_utils_src_attestations_.md#attesttoidentifier)* - -*Defined in [packages/sdk/utils/src/attestations.ts:81](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/attestations.ts#L81)* - -### base64ToHex - -• **base64ToHex**: *base64ToHex* - -*Defined in [packages/sdk/utils/src/attestations.ts:80](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/attestations.ts#L80)* - -### extractAttestationCodeFromMessage - -• **extractAttestationCodeFromMessage**: *extractAttestationCodeFromMessage* - -*Defined in [packages/sdk/utils/src/attestations.ts:84](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/attestations.ts#L84)* - -### extractSecurityCodeWithPrefix - -• **extractSecurityCodeWithPrefix**: *[extractSecurityCodeWithPrefix](_packages_sdk_utils_src_attestations_.md#extractsecuritycodewithprefix)* - -*Defined in [packages/sdk/utils/src/attestations.ts:86](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/attestations.ts#L86)* - -### getAttestationMessageToSignFromIdentifier - -• **getAttestationMessageToSignFromIdentifier**: *[getAttestationMessageToSignFromIdentifier](_packages_sdk_utils_src_attestations_.md#getattestationmessagetosignfromidentifier)* - -*Defined in [packages/sdk/utils/src/attestations.ts:78](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/attestations.ts#L78)* - -### getAttestationMessageToSignFromPhoneNumber - -• **getAttestationMessageToSignFromPhoneNumber**: *[getAttestationMessageToSignFromPhoneNumber](_packages_sdk_utils_src_attestations_.md#getattestationmessagetosignfromphonenumber)* - -*Defined in [packages/sdk/utils/src/attestations.ts:79](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/attestations.ts#L79)* - -### getIdentifierPrefix - -• **getIdentifierPrefix**: *getIdentifierPrefix* - -*Defined in [packages/sdk/utils/src/attestations.ts:76](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/attestations.ts#L76)* - -### hashIdentifier - -• **hashIdentifier**: *[hashIdentifier](_packages_sdk_utils_src_attestations_.md#hashidentifier)* - -*Defined in [packages/sdk/utils/src/attestations.ts:77](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/attestations.ts#L77)* - -### isAccountConsideredVerified - -• **isAccountConsideredVerified**: *isAccountConsideredVerified* - -*Defined in [packages/sdk/utils/src/attestations.ts:85](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/attestations.ts#L85)* - -### messageContainsAttestationCode - -• **messageContainsAttestationCode**: *messageContainsAttestationCode* - -*Defined in [packages/sdk/utils/src/attestations.ts:83](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/attestations.ts#L83)* - -### sanitizeMessageBase64 - -• **sanitizeMessageBase64**: *sanitizeMessageBase64* - -*Defined in [packages/sdk/utils/src/attestations.ts:82](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/attestations.ts#L82)* diff --git a/packages/docs/developer-resources/utils/reference/modules/_packages_sdk_utils_src_bls_.md b/packages/docs/developer-resources/utils/reference/modules/_packages_sdk_utils_src_bls_.md deleted file mode 100644 index d3ed45a6b51..00000000000 --- a/packages/docs/developer-resources/utils/reference/modules/_packages_sdk_utils_src_bls_.md +++ /dev/null @@ -1,79 +0,0 @@ -# Module: "packages/sdk/utils/src/bls" - -## Index - -### Variables - -* [BLS_POP_SIZE](_packages_sdk_utils_src_bls_.md#const-bls_pop_size) -* [BLS_PUBLIC_KEY_SIZE](_packages_sdk_utils_src_bls_.md#const-bls_public_key_size) - -### Functions - -* [blsPrivateKeyToProcessedPrivateKey](_packages_sdk_utils_src_bls_.md#const-blsprivatekeytoprocessedprivatekey) -* [getBlsPoP](_packages_sdk_utils_src_bls_.md#const-getblspop) -* [getBlsPublicKey](_packages_sdk_utils_src_bls_.md#const-getblspublickey) - -## Variables - -### `Const` BLS_POP_SIZE - -• **BLS_POP_SIZE**: *48* = 48 - -*Defined in [packages/sdk/utils/src/bls.ts:12](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/bls.ts#L12)* - -___ - -### `Const` BLS_PUBLIC_KEY_SIZE - -• **BLS_PUBLIC_KEY_SIZE**: *96* = 96 - -*Defined in [packages/sdk/utils/src/bls.ts:11](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/bls.ts#L11)* - -## Functions - -### `Const` blsPrivateKeyToProcessedPrivateKey - -▸ **blsPrivateKeyToProcessedPrivateKey**(`privateKeyHex`: string): *any* - -*Defined in [packages/sdk/utils/src/bls.ts:14](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/bls.ts#L14)* - -**Parameters:** - -Name | Type | ------- | ------ | -`privateKeyHex` | string | - -**Returns:** *any* - -___ - -### `Const` getBlsPoP - -▸ **getBlsPoP**(`address`: string, `privateKeyHex`: string): *string* - -*Defined in [packages/sdk/utils/src/bls.ts:53](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/bls.ts#L53)* - -**Parameters:** - -Name | Type | ------- | ------ | -`address` | string | -`privateKeyHex` | string | - -**Returns:** *string* - -___ - -### `Const` getBlsPublicKey - -▸ **getBlsPublicKey**(`privateKeyHex`: string): *string* - -*Defined in [packages/sdk/utils/src/bls.ts:48](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/bls.ts#L48)* - -**Parameters:** - -Name | Type | ------- | ------ | -`privateKeyHex` | string | - -**Returns:** *string* diff --git a/packages/docs/developer-resources/utils/reference/modules/_packages_sdk_utils_src_bn_.md b/packages/docs/developer-resources/utils/reference/modules/_packages_sdk_utils_src_bn_.md deleted file mode 100644 index 5bf47c1f53a..00000000000 --- a/packages/docs/developer-resources/utils/reference/modules/_packages_sdk_utils_src_bn_.md +++ /dev/null @@ -1,24 +0,0 @@ -# Module: "packages/sdk/utils/src/bn" - -## Index - -### Functions - -* [compareBN](_packages_sdk_utils_src_bn_.md#comparebn) - -## Functions - -### compareBN - -▸ **compareBN**(`a`: BN, `b`: BN): *1 | 0 | -1* - -*Defined in [packages/sdk/utils/src/bn.ts:3](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/bn.ts#L3)* - -**Parameters:** - -Name | Type | ------- | ------ | -`a` | BN | -`b` | BN | - -**Returns:** *1 | 0 | -1* diff --git a/packages/docs/developer-resources/utils/reference/modules/_packages_sdk_utils_src_celohistory_.md b/packages/docs/developer-resources/utils/reference/modules/_packages_sdk_utils_src_celohistory_.md deleted file mode 100644 index a5a76501674..00000000000 --- a/packages/docs/developer-resources/utils/reference/modules/_packages_sdk_utils_src_celohistory_.md +++ /dev/null @@ -1,24 +0,0 @@ -# Module: "packages/sdk/utils/src/celoHistory" - -## Index - -### Variables - -* [CELO_AMOUNT_FOR_ESTIMATE](_packages_sdk_utils_src_celohistory_.md#const-celo_amount_for_estimate) -* [DOLLAR_AMOUNT_FOR_ESTIMATE](_packages_sdk_utils_src_celohistory_.md#const-dollar_amount_for_estimate) - -## Variables - -### `Const` CELO_AMOUNT_FOR_ESTIMATE - -• **CELO_AMOUNT_FOR_ESTIMATE**: *BigNumber‹›* = new BigNumber(0.01 * WEI_PER_UNIT) - -*Defined in [packages/sdk/utils/src/celoHistory.ts:7](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/celoHistory.ts#L7)* - -___ - -### `Const` DOLLAR_AMOUNT_FOR_ESTIMATE - -• **DOLLAR_AMOUNT_FOR_ESTIMATE**: *BigNumber‹›* = new BigNumber(0.01 * WEI_PER_UNIT) - -*Defined in [packages/sdk/utils/src/celoHistory.ts:6](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/celoHistory.ts#L6)* diff --git a/packages/docs/developer-resources/utils/reference/modules/_packages_sdk_utils_src_collections_.md b/packages/docs/developer-resources/utils/reference/modules/_packages_sdk_utils_src_collections_.md deleted file mode 100644 index 74226b18b3c..00000000000 --- a/packages/docs/developer-resources/utils/reference/modules/_packages_sdk_utils_src_collections_.md +++ /dev/null @@ -1,104 +0,0 @@ -# Module: "packages/sdk/utils/src/collections" - -## Index - -### References - -* [intersection](_packages_sdk_utils_src_collections_.md#intersection) -* [notEmpty](_packages_sdk_utils_src_collections_.md#notempty) -* [zeroRange](_packages_sdk_utils_src_collections_.md#zerorange) -* [zip](_packages_sdk_utils_src_collections_.md#zip) -* [zip3](_packages_sdk_utils_src_collections_.md#zip3) - -### Type aliases - -* [AddressListItem](_packages_sdk_utils_src_collections_.md#addresslistitem) - -### Functions - -* [linkedListChange](_packages_sdk_utils_src_collections_.md#linkedlistchange) -* [linkedListChanges](_packages_sdk_utils_src_collections_.md#linkedlistchanges) - -## References - -### intersection - -• **intersection**: - -___ - -### notEmpty - -• **notEmpty**: - -___ - -### zeroRange - -• **zeroRange**: - -___ - -### zip - -• **zip**: - -___ - -### zip3 - -• **zip3**: - -## Type aliases - -### AddressListItem - -Ƭ **AddressListItem**: *AddressListItem‹BigNumber›* - -*Defined in [packages/sdk/utils/src/collections.ts:7](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/collections.ts#L7)* - -## Functions - -### linkedListChange - -▸ **linkedListChange**(`sortedList`: AddressListItem[], `change`: AddressListItem): *object* - -*Defined in [packages/sdk/utils/src/collections.ts:12](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/collections.ts#L12)* - -**Parameters:** - -Name | Type | ------- | ------ | -`sortedList` | AddressListItem[] | -`change` | AddressListItem | - -**Returns:** *object* - -* **greater**: *string* - -* **lesser**: *string* - -* **list**: *AddressListItem[]* - -___ - -### linkedListChanges - -▸ **linkedListChanges**(`sortedList`: AddressListItem[], `changeList`: AddressListItem[]): *object* - -*Defined in [packages/sdk/utils/src/collections.ts:19](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/collections.ts#L19)* - -**Parameters:** - -Name | Type | ------- | ------ | -`sortedList` | AddressListItem[] | -`changeList` | AddressListItem[] | - -**Returns:** *object* - -* **greaters**: *string[]* - -* **lessers**: *string[]* - -* **list**: *AddressListItem[]* diff --git a/packages/docs/developer-resources/utils/reference/modules/_packages_sdk_utils_src_commentencryption_.md b/packages/docs/developer-resources/utils/reference/modules/_packages_sdk_utils_src_commentencryption_.md deleted file mode 100644 index 38f71254898..00000000000 --- a/packages/docs/developer-resources/utils/reference/modules/_packages_sdk_utils_src_commentencryption_.md +++ /dev/null @@ -1,129 +0,0 @@ -# Module: "packages/sdk/utils/src/commentEncryption" - -## Index - -### Interfaces - -* [EncryptionStatus](../interfaces/_packages_sdk_utils_src_commentencryption_.encryptionstatus.md) - -### Functions - -* [decryptComment](_packages_sdk_utils_src_commentencryption_.md#decryptcomment) -* [decryptData](_packages_sdk_utils_src_commentencryption_.md#decryptdata) -* [encryptComment](_packages_sdk_utils_src_commentencryption_.md#encryptcomment) -* [encryptData](_packages_sdk_utils_src_commentencryption_.md#encryptdata) - -### Object literals - -* [CommentEncryptionUtils](_packages_sdk_utils_src_commentencryption_.md#const-commentencryptionutils) - -## Functions - -### decryptComment - -▸ **decryptComment**(`comment`: string, `key`: Buffer, `sender`: boolean): *[EncryptionStatus](../interfaces/_packages_sdk_utils_src_commentencryption_.encryptionstatus.md)* - -*Defined in [packages/sdk/utils/src/commentEncryption.ts:104](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/commentEncryption.ts#L104)* - -Decrypts a comments encrypted by encryptComment. If it cannot decrypt the comment (i.e. comment was -never encrypted in the first place), it returns the comments without any changes. - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`comment` | string | Comment to decrypt. If encrypted, base64 encoded. May be plaintext. | -`key` | Buffer | Private key to decrypt the message with. | -`sender` | boolean | If the decryptor is the sender of the message. | - -**Returns:** *[EncryptionStatus](../interfaces/_packages_sdk_utils_src_commentencryption_.encryptionstatus.md)* - -Decrypted comment if can decrypt, otherwise comment. - -___ - -### decryptData - -▸ **decryptData**(`data`: Buffer, `key`: Buffer, `sender`: boolean): *Buffer* - -*Defined in [packages/sdk/utils/src/commentEncryption.ts:45](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/commentEncryption.ts#L45)* - -Decrypts raw data that was encrypted by encryptData. Throws on error. - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`data` | Buffer | Data to decrypt. | -`key` | Buffer | Private key to decrypt the message with. | -`sender` | boolean | If the decryptor is the sender of the message. | - -**Returns:** *Buffer* - -Decrypted data. - -___ - -### encryptComment - -▸ **encryptComment**(`comment`: string, `pubKeyRecipient`: Buffer, `pubKeySelf`: Buffer): *[EncryptionStatus](../interfaces/_packages_sdk_utils_src_commentencryption_.encryptionstatus.md)* - -*Defined in [packages/sdk/utils/src/commentEncryption.ts:69](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/commentEncryption.ts#L69)* - -Encrypts a comment. If it can encrypt, it returns a base64 string with the following: - ECIES(session key to other) + ECIES(session key to self) + AES(comment) -If it fails to encrypt, it returns the comment without any changes. - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`comment` | string | Comment to encrypt. | -`pubKeyRecipient` | Buffer | Public key of the recipient. May be compressed. | -`pubKeySelf` | Buffer | Public key of the sender. May be compressed. | - -**Returns:** *[EncryptionStatus](../interfaces/_packages_sdk_utils_src_commentencryption_.encryptionstatus.md)* - -base64 string of encrypted comment if can encrypt, otherwise comment. - -___ - -### encryptData - -▸ **encryptData**(`data`: Buffer, `pubKeyRecipient`: Buffer, `pubKeySelf`: Buffer): *Buffer* - -*Defined in [packages/sdk/utils/src/commentEncryption.ts:27](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/commentEncryption.ts#L27)* - -Encrypts a buffer to two recipients. Throws on error. - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`data` | Buffer | Data to encrypt | -`pubKeyRecipient` | Buffer | Public key of the recipient. Uncompressed without leading 0x04. | -`pubKeySelf` | Buffer | Public key of the sender. Uncompressed without leading 0x04. | - -**Returns:** *Buffer* - -Encrypted data to sender and recipient. - -## Object literals - -### `Const` CommentEncryptionUtils - -### ▪ **CommentEncryptionUtils**: *object* - -*Defined in [packages/sdk/utils/src/commentEncryption.ts:115](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/commentEncryption.ts#L115)* - -### decryptComment - -• **decryptComment**: *[decryptComment](_packages_sdk_utils_src_commentencryption_.md#decryptcomment)* - -*Defined in [packages/sdk/utils/src/commentEncryption.ts:117](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/commentEncryption.ts#L117)* - -### encryptComment - -• **encryptComment**: *[encryptComment](_packages_sdk_utils_src_commentencryption_.md#encryptcomment)* - -*Defined in [packages/sdk/utils/src/commentEncryption.ts:116](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/commentEncryption.ts#L116)* diff --git a/packages/docs/developer-resources/utils/reference/modules/_packages_sdk_utils_src_contacts_.md b/packages/docs/developer-resources/utils/reference/modules/_packages_sdk_utils_src_contacts_.md deleted file mode 100644 index cf83e69ae10..00000000000 --- a/packages/docs/developer-resources/utils/reference/modules/_packages_sdk_utils_src_contacts_.md +++ /dev/null @@ -1,54 +0,0 @@ -# Module: "packages/sdk/utils/src/contacts" - -## Index - -### References - -* [ContactPhoneNumber](_packages_sdk_utils_src_contacts_.md#contactphonenumber) -* [MinimalContact](_packages_sdk_utils_src_contacts_.md#minimalcontact) -* [getContactPhoneNumber](_packages_sdk_utils_src_contacts_.md#getcontactphonenumber) -* [isContact](_packages_sdk_utils_src_contacts_.md#iscontact) - -### Functions - -* [getContactNameHash](_packages_sdk_utils_src_contacts_.md#const-getcontactnamehash) - -## References - -### ContactPhoneNumber - -• **ContactPhoneNumber**: - -___ - -### MinimalContact - -• **MinimalContact**: - -___ - -### getContactPhoneNumber - -• **getContactPhoneNumber**: - -___ - -### isContact - -• **isContact**: - -## Functions - -### `Const` getContactNameHash - -▸ **getContactNameHash**(`contact`: MinimalContact): *string* - -*Defined in [packages/sdk/utils/src/contacts.ts:13](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/contacts.ts#L13)* - -**Parameters:** - -Name | Type | ------- | ------ | -`contact` | MinimalContact | - -**Returns:** *string* diff --git a/packages/docs/developer-resources/utils/reference/modules/_packages_sdk_utils_src_countries_.md b/packages/docs/developer-resources/utils/reference/modules/_packages_sdk_utils_src_countries_.md deleted file mode 100644 index 2fc94e3aee3..00000000000 --- a/packages/docs/developer-resources/utils/reference/modules/_packages_sdk_utils_src_countries_.md +++ /dev/null @@ -1,11 +0,0 @@ -# Module: "packages/sdk/utils/src/countries" - -## Index - -### Classes - -* [Countries](../classes/_packages_sdk_utils_src_countries_.countries.md) - -### Interfaces - -* [LocalizedCountry](../interfaces/_packages_sdk_utils_src_countries_.localizedcountry.md) diff --git a/packages/docs/developer-resources/utils/reference/modules/_packages_sdk_utils_src_currencies_.md b/packages/docs/developer-resources/utils/reference/modules/_packages_sdk_utils_src_currencies_.md deleted file mode 100644 index dd6dc3da9e9..00000000000 --- a/packages/docs/developer-resources/utils/reference/modules/_packages_sdk_utils_src_currencies_.md +++ /dev/null @@ -1,41 +0,0 @@ -# Module: "packages/sdk/utils/src/currencies" - -## Index - -### References - -* [CURRENCIES](_packages_sdk_utils_src_currencies_.md#currencies) -* [CURRENCY_ENUM](_packages_sdk_utils_src_currencies_.md#currency_enum) -* [SHORT_CURRENCIES](_packages_sdk_utils_src_currencies_.md#short_currencies) -* [currencyToShortMap](_packages_sdk_utils_src_currencies_.md#currencytoshortmap) -* [resolveCurrency](_packages_sdk_utils_src_currencies_.md#resolvecurrency) - -## References - -### CURRENCIES - -• **CURRENCIES**: - -___ - -### CURRENCY_ENUM - -• **CURRENCY_ENUM**: - -___ - -### SHORT_CURRENCIES - -• **SHORT_CURRENCIES**: - -___ - -### currencyToShortMap - -• **currencyToShortMap**: - -___ - -### resolveCurrency - -• **resolveCurrency**: diff --git a/packages/docs/developer-resources/utils/reference/modules/_packages_sdk_utils_src_dappkit_.md b/packages/docs/developer-resources/utils/reference/modules/_packages_sdk_utils_src_dappkit_.md deleted file mode 100644 index 8c85a27eaa2..00000000000 --- a/packages/docs/developer-resources/utils/reference/modules/_packages_sdk_utils_src_dappkit_.md +++ /dev/null @@ -1,213 +0,0 @@ -# Module: "packages/sdk/utils/src/dappkit" - -## Index - -### Enumerations - -* [DappKitRequestTypes](../enums/_packages_sdk_utils_src_dappkit_.dappkitrequesttypes.md) -* [DappKitResponseStatus](../enums/_packages_sdk_utils_src_dappkit_.dappkitresponsestatus.md) - -### Interfaces - -* [AccountAuthRequest](../interfaces/_packages_sdk_utils_src_dappkit_.accountauthrequest.md) -* [AccountAuthResponseFailure](../interfaces/_packages_sdk_utils_src_dappkit_.accountauthresponsefailure.md) -* [AccountAuthResponseSuccess](../interfaces/_packages_sdk_utils_src_dappkit_.accountauthresponsesuccess.md) -* [DappKitRequestBase](../interfaces/_packages_sdk_utils_src_dappkit_.dappkitrequestbase.md) -* [DappKitRequestMeta](../interfaces/_packages_sdk_utils_src_dappkit_.dappkitrequestmeta.md) -* [SignTxRequest](../interfaces/_packages_sdk_utils_src_dappkit_.signtxrequest.md) -* [SignTxResponseFailure](../interfaces/_packages_sdk_utils_src_dappkit_.signtxresponsefailure.md) -* [SignTxResponseSuccess](../interfaces/_packages_sdk_utils_src_dappkit_.signtxresponsesuccess.md) -* [TxToSignParam](../interfaces/_packages_sdk_utils_src_dappkit_.txtosignparam.md) - -### Type aliases - -* [AccountAuthResponse](_packages_sdk_utils_src_dappkit_.md#accountauthresponse) -* [DappKitRequest](_packages_sdk_utils_src_dappkit_.md#dappkitrequest) -* [DappKitResponse](_packages_sdk_utils_src_dappkit_.md#dappkitresponse) -* [SignTxResponse](_packages_sdk_utils_src_dappkit_.md#signtxresponse) - -### Variables - -* [DAPPKIT_BASE_HOST](_packages_sdk_utils_src_dappkit_.md#const-dappkit_base_host) - -### Functions - -* [AccountAuthRequest](_packages_sdk_utils_src_dappkit_.md#const-accountauthrequest) -* [AccountAuthResponseSuccess](_packages_sdk_utils_src_dappkit_.md#const-accountauthresponsesuccess) -* [SignTxRequest](_packages_sdk_utils_src_dappkit_.md#const-signtxrequest) -* [SignTxResponseSuccess](_packages_sdk_utils_src_dappkit_.md#const-signtxresponsesuccess) -* [parseDappKitRequestDeeplink](_packages_sdk_utils_src_dappkit_.md#parsedappkitrequestdeeplink) -* [parseDappkitResponseDeeplink](_packages_sdk_utils_src_dappkit_.md#parsedappkitresponsedeeplink) -* [produceResponseDeeplink](_packages_sdk_utils_src_dappkit_.md#produceresponsedeeplink) -* [serializeDappKitRequestDeeplink](_packages_sdk_utils_src_dappkit_.md#serializedappkitrequestdeeplink) - -## Type aliases - -### AccountAuthResponse - -Ƭ **AccountAuthResponse**: *[AccountAuthResponseSuccess](../interfaces/_packages_sdk_utils_src_dappkit_.accountauthresponsesuccess.md) | [AccountAuthResponseFailure](../interfaces/_packages_sdk_utils_src_dappkit_.accountauthresponsefailure.md)* - -*Defined in [packages/sdk/utils/src/dappkit.ts:59](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/dappkit.ts#L59)* - -___ - -### DappKitRequest - -Ƭ **DappKitRequest**: *[AccountAuthRequest](../interfaces/_packages_sdk_utils_src_dappkit_.accountauthrequest.md) | [SignTxRequest](../interfaces/_packages_sdk_utils_src_dappkit_.signtxrequest.md)* - -*Defined in [packages/sdk/utils/src/dappkit.ts:131](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/dappkit.ts#L131)* - -___ - -### DappKitResponse - -Ƭ **DappKitResponse**: *[AccountAuthResponse](_packages_sdk_utils_src_dappkit_.md#accountauthresponse) | [SignTxResponse](_packages_sdk_utils_src_dappkit_.md#signtxresponse)* - -*Defined in [packages/sdk/utils/src/dappkit.ts:80](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/dappkit.ts#L80)* - -___ - -### SignTxResponse - -Ƭ **SignTxResponse**: *[SignTxResponseSuccess](../interfaces/_packages_sdk_utils_src_dappkit_.signtxresponsesuccess.md) | [SignTxResponseFailure](../interfaces/_packages_sdk_utils_src_dappkit_.signtxresponsefailure.md)* - -*Defined in [packages/sdk/utils/src/dappkit.ts:78](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/dappkit.ts#L78)* - -## Variables - -### `Const` DAPPKIT_BASE_HOST - -• **DAPPKIT_BASE_HOST**: *"celo://wallet/dappkit"* = "celo://wallet/dappkit" - -*Defined in [packages/sdk/utils/src/dappkit.ts:4](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/dappkit.ts#L4)* - -## Functions - -### `Const` AccountAuthRequest - -▸ **AccountAuthRequest**(`meta`: [DappKitRequestMeta](../interfaces/_packages_sdk_utils_src_dappkit_.dappkitrequestmeta.md)): *[AccountAuthRequest](../interfaces/_packages_sdk_utils_src_dappkit_.accountauthrequest.md)* - -*Defined in [packages/sdk/utils/src/dappkit.ts:32](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/dappkit.ts#L32)* - -**Parameters:** - -Name | Type | ------- | ------ | -`meta` | [DappKitRequestMeta](../interfaces/_packages_sdk_utils_src_dappkit_.dappkitrequestmeta.md) | - -**Returns:** *[AccountAuthRequest](../interfaces/_packages_sdk_utils_src_dappkit_.accountauthrequest.md)* - -___ - -### `Const` AccountAuthResponseSuccess - -▸ **AccountAuthResponseSuccess**(`address`: string, `phoneNumber`: string): *[AccountAuthResponseSuccess](../interfaces/_packages_sdk_utils_src_dappkit_.accountauthresponsesuccess.md)* - -*Defined in [packages/sdk/utils/src/dappkit.ts:44](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/dappkit.ts#L44)* - -**Parameters:** - -Name | Type | ------- | ------ | -`address` | string | -`phoneNumber` | string | - -**Returns:** *[AccountAuthResponseSuccess](../interfaces/_packages_sdk_utils_src_dappkit_.accountauthresponsesuccess.md)* - -___ - -### `Const` SignTxRequest - -▸ **SignTxRequest**(`txs`: [TxToSignParam](../interfaces/_packages_sdk_utils_src_dappkit_.txtosignparam.md)[], `meta`: [DappKitRequestMeta](../interfaces/_packages_sdk_utils_src_dappkit_.dappkitrequestmeta.md)): *[SignTxRequest](../interfaces/_packages_sdk_utils_src_dappkit_.signtxrequest.md)* - -*Defined in [packages/sdk/utils/src/dappkit.ts:117](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/dappkit.ts#L117)* - -**Parameters:** - -Name | Type | ------- | ------ | -`txs` | [TxToSignParam](../interfaces/_packages_sdk_utils_src_dappkit_.txtosignparam.md)[] | -`meta` | [DappKitRequestMeta](../interfaces/_packages_sdk_utils_src_dappkit_.dappkitrequestmeta.md) | - -**Returns:** *[SignTxRequest](../interfaces/_packages_sdk_utils_src_dappkit_.signtxrequest.md)* - -___ - -### `Const` SignTxResponseSuccess - -▸ **SignTxResponseSuccess**(`rawTxs`: string[]): *[SignTxResponseSuccess](../interfaces/_packages_sdk_utils_src_dappkit_.signtxresponsesuccess.md)* - -*Defined in [packages/sdk/utils/src/dappkit.ts:67](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/dappkit.ts#L67)* - -**Parameters:** - -Name | Type | ------- | ------ | -`rawTxs` | string[] | - -**Returns:** *[SignTxResponseSuccess](../interfaces/_packages_sdk_utils_src_dappkit_.signtxresponsesuccess.md)* - -___ - -### parseDappKitRequestDeeplink - -▸ **parseDappKitRequestDeeplink**(`url`: string): *[DappKitRequest](_packages_sdk_utils_src_dappkit_.md#dappkitrequest)* - -*Defined in [packages/sdk/utils/src/dappkit.ts:233](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/dappkit.ts#L233)* - -**Parameters:** - -Name | Type | ------- | ------ | -`url` | string | - -**Returns:** *[DappKitRequest](_packages_sdk_utils_src_dappkit_.md#dappkitrequest)* - -___ - -### parseDappkitResponseDeeplink - -▸ **parseDappkitResponseDeeplink**(`url`: string): *[DappKitResponse](_packages_sdk_utils_src_dappkit_.md#dappkitresponse) & object* - -*Defined in [packages/sdk/utils/src/dappkit.ts:176](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/dappkit.ts#L176)* - -**Parameters:** - -Name | Type | ------- | ------ | -`url` | string | - -**Returns:** *[DappKitResponse](_packages_sdk_utils_src_dappkit_.md#dappkitresponse) & object* - -___ - -### produceResponseDeeplink - -▸ **produceResponseDeeplink**(`request`: [DappKitRequest](_packages_sdk_utils_src_dappkit_.md#dappkitrequest), `response`: [DappKitResponse](_packages_sdk_utils_src_dappkit_.md#dappkitresponse)): *string* - -*Defined in [packages/sdk/utils/src/dappkit.ts:82](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/dappkit.ts#L82)* - -**Parameters:** - -Name | Type | ------- | ------ | -`request` | [DappKitRequest](_packages_sdk_utils_src_dappkit_.md#dappkitrequest) | -`response` | [DappKitResponse](_packages_sdk_utils_src_dappkit_.md#dappkitresponse) | - -**Returns:** *string* - -___ - -### serializeDappKitRequestDeeplink - -▸ **serializeDappKitRequestDeeplink**(`request`: [DappKitRequest](_packages_sdk_utils_src_dappkit_.md#dappkitrequest)): *string* - -*Defined in [packages/sdk/utils/src/dappkit.ts:145](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/dappkit.ts#L145)* - -**Parameters:** - -Name | Type | ------- | ------ | -`request` | [DappKitRequest](_packages_sdk_utils_src_dappkit_.md#dappkitrequest) | - -**Returns:** *string* diff --git a/packages/docs/developer-resources/utils/reference/modules/_packages_sdk_utils_src_dataencryptionkey_.md b/packages/docs/developer-resources/utils/reference/modules/_packages_sdk_utils_src_dataencryptionkey_.md deleted file mode 100644 index 5e266902c11..00000000000 --- a/packages/docs/developer-resources/utils/reference/modules/_packages_sdk_utils_src_dataencryptionkey_.md +++ /dev/null @@ -1,101 +0,0 @@ -# Module: "packages/sdk/utils/src/dataEncryptionKey" - -## Index - -### Functions - -* [compressedPubKey](_packages_sdk_utils_src_dataencryptionkey_.md#compressedpubkey) -* [decompressPublicKey](_packages_sdk_utils_src_dataencryptionkey_.md#decompresspublickey) -* [deriveDek](_packages_sdk_utils_src_dataencryptionkey_.md#derivedek) - -### Object literals - -* [DataEncryptionKeyUtils](_packages_sdk_utils_src_dataencryptionkey_.md#const-dataencryptionkeyutils) - -## Functions - -### compressedPubKey - -▸ **compressedPubKey**(`privateKey`: Buffer): *string* - -*Defined in [packages/sdk/utils/src/dataEncryptionKey.ts:13](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/dataEncryptionKey.ts#L13)* - -Turns a private key to a compressed public key (hex string with hex leader). - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`privateKey` | Buffer | Private key. | - -**Returns:** *string* - -Corresponding compessed public key in hex encoding with '0x' leader. - -___ - -### decompressPublicKey - -▸ **decompressPublicKey**(`publicKey`: Buffer): *Buffer* - -*Defined in [packages/sdk/utils/src/dataEncryptionKey.ts:25](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/dataEncryptionKey.ts#L25)* - -Decompresses a public key and strips out the '0x04' leading constant. This makes -any public key suitable to be used with this ECIES implementation. - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`publicKey` | Buffer | Public key in standard form (with 0x02, 0x03, or 0x04 prefix) | - -**Returns:** *Buffer* - -Decompresssed public key without prefix. - -___ - -### deriveDek - -▸ **deriveDek**(`mnemonic`: string, `bip39ToUse?`: [Bip39](_packages_sdk_utils_src_account_.md#bip39)): *Promise‹object›* - -*Defined in [packages/sdk/utils/src/dataEncryptionKey.ts:35](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/dataEncryptionKey.ts#L35)* - -Derives a data encryption key from the mnemonic - -**Parameters:** - -Name | Type | ------- | ------ | -`mnemonic` | string | -`bip39ToUse?` | [Bip39](_packages_sdk_utils_src_account_.md#bip39) | - -**Returns:** *Promise‹object›* - -Comment Encryption Private key. - -## Object literals - -### `Const` DataEncryptionKeyUtils - -### ▪ **DataEncryptionKeyUtils**: *object* - -*Defined in [packages/sdk/utils/src/dataEncryptionKey.ts:49](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/dataEncryptionKey.ts#L49)* - -### compressedPubKey - -• **compressedPubKey**: *[compressedPubKey](_packages_sdk_utils_src_dataencryptionkey_.md#compressedpubkey)* - -*Defined in [packages/sdk/utils/src/dataEncryptionKey.ts:50](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/dataEncryptionKey.ts#L50)* - -### decompressPublicKey - -• **decompressPublicKey**: *[decompressPublicKey](_packages_sdk_utils_src_dataencryptionkey_.md#decompresspublickey)* - -*Defined in [packages/sdk/utils/src/dataEncryptionKey.ts:51](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/dataEncryptionKey.ts#L51)* - -### deriveDek - -• **deriveDek**: *[deriveDek](_packages_sdk_utils_src_dataencryptionkey_.md#derivedek)* - -*Defined in [packages/sdk/utils/src/dataEncryptionKey.ts:52](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/dataEncryptionKey.ts#L52)* diff --git a/packages/docs/developer-resources/utils/reference/modules/_packages_sdk_utils_src_displayformatting_.md b/packages/docs/developer-resources/utils/reference/modules/_packages_sdk_utils_src_displayformatting_.md deleted file mode 100644 index 83e2ebe4dfc..00000000000 --- a/packages/docs/developer-resources/utils/reference/modules/_packages_sdk_utils_src_displayformatting_.md +++ /dev/null @@ -1,13 +0,0 @@ -# Module: "packages/sdk/utils/src/displayFormatting" - -## Index - -### References - -* [getErrorMessage](_packages_sdk_utils_src_displayformatting_.md#geterrormessage) - -## References - -### getErrorMessage - -• **getErrorMessage**: diff --git a/packages/docs/developer-resources/utils/reference/modules/_packages_sdk_utils_src_ecdh_.md b/packages/docs/developer-resources/utils/reference/modules/_packages_sdk_utils_src_ecdh_.md deleted file mode 100644 index 98eca717aa4..00000000000 --- a/packages/docs/developer-resources/utils/reference/modules/_packages_sdk_utils_src_ecdh_.md +++ /dev/null @@ -1,92 +0,0 @@ -# Module: "packages/sdk/utils/src/ecdh" - -## Index - -### Functions - -* [computeSharedSecret](_packages_sdk_utils_src_ecdh_.md#computesharedsecret) -* [ensureCompressed](_packages_sdk_utils_src_ecdh_.md#ensurecompressed) -* [ensureUncompressed](_packages_sdk_utils_src_ecdh_.md#ensureuncompressed) -* [isCompressed](_packages_sdk_utils_src_ecdh_.md#iscompressed) -* [trimUncompressedPrefix](_packages_sdk_utils_src_ecdh_.md#trimuncompressedprefix) - -## Functions - -### computeSharedSecret - -▸ **computeSharedSecret**(`privateKey`: string, `publicKey`: string): *Buffer* - -*Defined in [packages/sdk/utils/src/ecdh.ts:7](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/ecdh.ts#L7)* - -**Parameters:** - -Name | Type | ------- | ------ | -`privateKey` | string | -`publicKey` | string | - -**Returns:** *Buffer* - -___ - -### ensureCompressed - -▸ **ensureCompressed**(`publicKey`: string): *string* - -*Defined in [packages/sdk/utils/src/ecdh.ts:21](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/ecdh.ts#L21)* - -**Parameters:** - -Name | Type | ------- | ------ | -`publicKey` | string | - -**Returns:** *string* - -___ - -### ensureUncompressed - -▸ **ensureUncompressed**(`publicKey`: string): *string* - -*Defined in [packages/sdk/utils/src/ecdh.ts:25](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/ecdh.ts#L25)* - -**Parameters:** - -Name | Type | ------- | ------ | -`publicKey` | string | - -**Returns:** *string* - -___ - -### isCompressed - -▸ **isCompressed**(`publicKey`: string): *boolean* - -*Defined in [packages/sdk/utils/src/ecdh.ts:13](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/ecdh.ts#L13)* - -**Parameters:** - -Name | Type | ------- | ------ | -`publicKey` | string | - -**Returns:** *boolean* - -___ - -### trimUncompressedPrefix - -▸ **trimUncompressedPrefix**(`publicKey`: string): *string* - -*Defined in [packages/sdk/utils/src/ecdh.ts:33](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/ecdh.ts#L33)* - -**Parameters:** - -Name | Type | ------- | ------ | -`publicKey` | string | - -**Returns:** *string* diff --git a/packages/docs/developer-resources/utils/reference/modules/_packages_sdk_utils_src_ecies_.md b/packages/docs/developer-resources/utils/reference/modules/_packages_sdk_utils_src_ecies_.md deleted file mode 100644 index b7098fd6431..00000000000 --- a/packages/docs/developer-resources/utils/reference/modules/_packages_sdk_utils_src_ecies_.md +++ /dev/null @@ -1,190 +0,0 @@ -# Module: "packages/sdk/utils/src/ecies" - -## Index - -### Variables - -* [IV_LENGTH](_packages_sdk_utils_src_ecies_.md#const-iv_length) - -### Functions - -* [AES128Decrypt](_packages_sdk_utils_src_ecies_.md#aes128decrypt) -* [AES128DecryptAndHMAC](_packages_sdk_utils_src_ecies_.md#aes128decryptandhmac) -* [AES128Encrypt](_packages_sdk_utils_src_ecies_.md#aes128encrypt) -* [AES128EncryptAndHMAC](_packages_sdk_utils_src_ecies_.md#aes128encryptandhmac) -* [Decrypt](_packages_sdk_utils_src_ecies_.md#decrypt) -* [Encrypt](_packages_sdk_utils_src_ecies_.md#encrypt) - -### Object literals - -* [ECIES](_packages_sdk_utils_src_ecies_.md#const-ecies) - -## Variables - -### `Const` IV_LENGTH - -• **IV_LENGTH**: *16* = 16 - -*Defined in [packages/sdk/utils/src/ecies.ts:13](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/ecies.ts#L13)* - -## Functions - -### AES128Decrypt - -▸ **AES128Decrypt**(`encryptionKey`: Buffer, `iv`: Buffer, `ciphertext`: Buffer): *Buffer‹›* - -*Defined in [packages/sdk/utils/src/ecies.ts:100](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/ecies.ts#L100)* - -AES-128 CTR decrypt - -**Parameters:** - -Name | Type | ------- | ------ | -`encryptionKey` | Buffer | -`iv` | Buffer | -`ciphertext` | Buffer | - -**Returns:** *Buffer‹›* - -plaintext - -___ - -### AES128DecryptAndHMAC - -▸ **AES128DecryptAndHMAC**(`encryptionKey`: Buffer, `macKey`: Buffer, `ciphertext`: Buffer): *Buffer* - -*Defined in [packages/sdk/utils/src/ecies.ts:115](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/ecies.ts#L115)* - -AES-128 CTR decrypt with message authentication - -**Parameters:** - -Name | Type | ------- | ------ | -`encryptionKey` | Buffer | -`macKey` | Buffer | -`ciphertext` | Buffer | - -**Returns:** *Buffer* - -plaintext - -___ - -### AES128Encrypt - -▸ **AES128Encrypt**(`encryptionKey`: Buffer, `iv`: Buffer, `plaintext`: Buffer): *Buffer‹›* - -*Defined in [packages/sdk/utils/src/ecies.ts:65](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/ecies.ts#L65)* - -AES-128 CTR encrypt - -**Parameters:** - -Name | Type | ------- | ------ | -`encryptionKey` | Buffer | -`iv` | Buffer | -`plaintext` | Buffer | - -**Returns:** *Buffer‹›* - -ciphertext - -___ - -### AES128EncryptAndHMAC - -▸ **AES128EncryptAndHMAC**(`encryptionKey`: Buffer, `macKey`: Buffer, `plaintext`: Buffer): *Buffer* - -*Defined in [packages/sdk/utils/src/ecies.ts:79](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/ecies.ts#L79)* - -AES-128 CTR encrypt with message authentication - -**Parameters:** - -Name | Type | ------- | ------ | -`encryptionKey` | Buffer | -`macKey` | Buffer | -`plaintext` | Buffer | - -**Returns:** *Buffer* - -ciphertext - -___ - -### Decrypt - -▸ **Decrypt**(`privKey`: Buffer, `encrypted`: Buffer): *Buffer‹›* - -*Defined in [packages/sdk/utils/src/ecies.ts:166](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/ecies.ts#L166)* - -ECIES decrypt - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`privKey` | Buffer | Ethereum private key, 32 bytes. | -`encrypted` | Buffer | Encrypted message, serialized, 113+ bytes | - -**Returns:** *Buffer‹›* - -plaintext - -___ - -### Encrypt - -▸ **Encrypt**(`pubKeyTo`: Buffer, `plaintext`: Buffer): *Buffer‹›* - -*Defined in [packages/sdk/utils/src/ecies.ts:140](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/ecies.ts#L140)* - -ECIES encrypt - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`pubKeyTo` | Buffer | Ethereum pub key, 64 bytes. | -`plaintext` | Buffer | Plaintext to be encrypted. | - -**Returns:** *Buffer‹›* - -Encrypted message, serialized, 113+ bytes - -## Object literals - -### `Const` ECIES - -### ▪ **ECIES**: *object* - -*Defined in [packages/sdk/utils/src/ecies.ts:183](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/ecies.ts#L183)* - -### AES128DecryptAndHMAC - -• **AES128DecryptAndHMAC**: *[AES128DecryptAndHMAC](_packages_sdk_utils_src_ecies_.md#aes128decryptandhmac)* - -*Defined in [packages/sdk/utils/src/ecies.ts:187](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/ecies.ts#L187)* - -### AES128EncryptAndHMAC - -• **AES128EncryptAndHMAC**: *[AES128EncryptAndHMAC](_packages_sdk_utils_src_ecies_.md#aes128encryptandhmac)* - -*Defined in [packages/sdk/utils/src/ecies.ts:186](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/ecies.ts#L186)* - -### Decrypt - -• **Decrypt**: *[Decrypt](_packages_sdk_utils_src_ecies_.md#decrypt)* - -*Defined in [packages/sdk/utils/src/ecies.ts:185](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/ecies.ts#L185)* - -### Encrypt - -• **Encrypt**: *[Encrypt](_packages_sdk_utils_src_ecies_.md#encrypt)* - -*Defined in [packages/sdk/utils/src/ecies.ts:184](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/ecies.ts#L184)* diff --git a/packages/docs/developer-resources/utils/reference/modules/_packages_sdk_utils_src_fixidity_.md b/packages/docs/developer-resources/utils/reference/modules/_packages_sdk_utils_src_fixidity_.md deleted file mode 100644 index 7e0976c726c..00000000000 --- a/packages/docs/developer-resources/utils/reference/modules/_packages_sdk_utils_src_fixidity_.md +++ /dev/null @@ -1,96 +0,0 @@ -# Module: "packages/sdk/utils/src/fixidity" - -## Index - -### Variables - -* [digits](_packages_sdk_utils_src_fixidity_.md#const-digits) -* [fixed1](_packages_sdk_utils_src_fixidity_.md#const-fixed1) - -### Functions - -* [fixedToInt](_packages_sdk_utils_src_fixidity_.md#const-fixedtoint) -* [fromFixed](_packages_sdk_utils_src_fixidity_.md#const-fromfixed) -* [multiply](_packages_sdk_utils_src_fixidity_.md#const-multiply) -* [toFixed](_packages_sdk_utils_src_fixidity_.md#const-tofixed) - -## Variables - -### `Const` digits - -• **digits**: *BigNumber‹›* = new BigNumber('24') - -*Defined in [packages/sdk/utils/src/fixidity.ts:3](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/fixidity.ts#L3)* - -___ - -### `Const` fixed1 - -• **fixed1**: *BigNumber‹›* = new BigNumber('1000000000000000000000000') - -*Defined in [packages/sdk/utils/src/fixidity.ts:4](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/fixidity.ts#L4)* - -## Functions - -### `Const` fixedToInt - -▸ **fixedToInt**(`f`: BigNumber): *BigNumber‹›* - -*Defined in [packages/sdk/utils/src/fixidity.ts:16](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/fixidity.ts#L16)* - -**Parameters:** - -Name | Type | ------- | ------ | -`f` | BigNumber | - -**Returns:** *BigNumber‹›* - -___ - -### `Const` fromFixed - -▸ **fromFixed**(`f`: BigNumber): *BigNumber‹›* - -*Defined in [packages/sdk/utils/src/fixidity.ts:11](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/fixidity.ts#L11)* - -**Parameters:** - -Name | Type | ------- | ------ | -`f` | BigNumber | - -**Returns:** *BigNumber‹›* - -___ - -### `Const` multiply - -▸ **multiply**(`a`: BigNumber, `b`: BigNumber): *BigNumber‹›* - -*Defined in [packages/sdk/utils/src/fixidity.ts:20](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/fixidity.ts#L20)* - -**Parameters:** - -Name | Type | ------- | ------ | -`a` | BigNumber | -`b` | BigNumber | - -**Returns:** *BigNumber‹›* - -___ - -### `Const` toFixed - -▸ **toFixed**(`n`: number | BigNumber): *BigNumber‹›* - -*Defined in [packages/sdk/utils/src/fixidity.ts:6](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/fixidity.ts#L6)* - -**Parameters:** - -Name | Type | ------- | ------ | -`n` | number | BigNumber | - -**Returns:** *BigNumber‹›* diff --git a/packages/docs/developer-resources/utils/reference/modules/_packages_sdk_utils_src_future_.md b/packages/docs/developer-resources/utils/reference/modules/_packages_sdk_utils_src_future_.md deleted file mode 100644 index c9afebc8d95..00000000000 --- a/packages/docs/developer-resources/utils/reference/modules/_packages_sdk_utils_src_future_.md +++ /dev/null @@ -1,27 +0,0 @@ -# Module: "packages/sdk/utils/src/future" - -## Index - -### References - -* [Future](_packages_sdk_utils_src_future_.md#future) -* [pipeToFuture](_packages_sdk_utils_src_future_.md#pipetofuture) -* [toFuture](_packages_sdk_utils_src_future_.md#tofuture) - -## References - -### Future - -• **Future**: - -___ - -### pipeToFuture - -• **pipeToFuture**: - -___ - -### toFuture - -• **toFuture**: diff --git a/packages/docs/developer-resources/utils/reference/modules/_packages_sdk_utils_src_inputvalidation_.md b/packages/docs/developer-resources/utils/reference/modules/_packages_sdk_utils_src_inputvalidation_.md deleted file mode 100644 index 914313a3a32..00000000000 --- a/packages/docs/developer-resources/utils/reference/modules/_packages_sdk_utils_src_inputvalidation_.md +++ /dev/null @@ -1,73 +0,0 @@ -# Module: "packages/sdk/utils/src/inputValidation" - -## Index - -### References - -* [BaseProps](_packages_sdk_utils_src_inputvalidation_.md#baseprops) -* [ValidatorKind](_packages_sdk_utils_src_inputvalidation_.md#validatorkind) -* [validateDecimal](_packages_sdk_utils_src_inputvalidation_.md#validatedecimal) -* [validateInteger](_packages_sdk_utils_src_inputvalidation_.md#validateinteger) - -### Functions - -* [validateInput](_packages_sdk_utils_src_inputvalidation_.md#validateinput) -* [validatePhone](_packages_sdk_utils_src_inputvalidation_.md#validatephone) - -## References - -### BaseProps - -• **BaseProps**: - -___ - -### ValidatorKind - -• **ValidatorKind**: - -___ - -### validateDecimal - -• **validateDecimal**: - -___ - -### validateInteger - -• **validateInteger**: - -## Functions - -### validateInput - -▸ **validateInput**(`input`: string, `props`: BaseProps): *string* - -*Defined in [packages/sdk/utils/src/inputValidation.ts:29](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/inputValidation.ts#L29)* - -**Parameters:** - -Name | Type | ------- | ------ | -`input` | string | -`props` | BaseProps | - -**Returns:** *string* - -___ - -### validatePhone - -▸ **validatePhone**(`input`: string, `countryCallingCode?`: undefined | string): *string* - -*Defined in [packages/sdk/utils/src/inputValidation.ts:13](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/inputValidation.ts#L13)* - -**Parameters:** - -Name | Type | ------- | ------ | -`input` | string | -`countryCallingCode?` | undefined | string | - -**Returns:** *string* diff --git a/packages/docs/developer-resources/utils/reference/modules/_packages_sdk_utils_src_io_.md b/packages/docs/developer-resources/utils/reference/modules/_packages_sdk_utils_src_io_.md deleted file mode 100644 index 6b2688929f5..00000000000 --- a/packages/docs/developer-resources/utils/reference/modules/_packages_sdk_utils_src_io_.md +++ /dev/null @@ -1,314 +0,0 @@ -# Module: "packages/sdk/utils/src/io" - -## Index - -### References - -* [URL_REGEX](_packages_sdk_utils_src_io_.md#url_regex) -* [isValidUrl](_packages_sdk_utils_src_io_.md#isvalidurl) - -### Type aliases - -* [Address](_packages_sdk_utils_src_io_.md#address) -* [AttestationRequest](_packages_sdk_utils_src_io_.md#attestationrequest) -* [AttestationResponse](_packages_sdk_utils_src_io_.md#attestationresponse) -* [AttestationServiceTestRequest](_packages_sdk_utils_src_io_.md#attestationservicetestrequest) -* [E164Number](_packages_sdk_utils_src_io_.md#e164number) -* [GetAttestationRequest](_packages_sdk_utils_src_io_.md#getattestationrequest) -* [Signature](_packages_sdk_utils_src_io_.md#signature) - -### Variables - -* [AddressType](_packages_sdk_utils_src_io_.md#const-addresstype) -* [AttestationRequestType](_packages_sdk_utils_src_io_.md#const-attestationrequesttype) -* [AttestationResponseType](_packages_sdk_utils_src_io_.md#const-attestationresponsetype) -* [AttestationServiceStatusResponseType](_packages_sdk_utils_src_io_.md#const-attestationservicestatusresponsetype) -* [AttestationServiceTestRequestType](_packages_sdk_utils_src_io_.md#const-attestationservicetestrequesttype) -* [E164PhoneNumberType](_packages_sdk_utils_src_io_.md#const-e164phonenumbertype) -* [GetAttestationRequestType](_packages_sdk_utils_src_io_.md#const-getattestationrequesttype) -* [JSONStringType](_packages_sdk_utils_src_io_.md#const-jsonstringtype) -* [PublicKeyType](_packages_sdk_utils_src_io_.md#const-publickeytype) -* [SaltType](_packages_sdk_utils_src_io_.md#const-salttype) -* [SignatureType](_packages_sdk_utils_src_io_.md#const-signaturetype) -* [UrlType](_packages_sdk_utils_src_io_.md#const-urltype) - -## References - -### URL_REGEX - -• **URL_REGEX**: - -___ - -### isValidUrl - -• **isValidUrl**: - -## Type aliases - -### Address - -Ƭ **Address**: *t.TypeOf‹typeof AddressType›* - -*Defined in [packages/sdk/utils/src/io.ts:101](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/io.ts#L101)* - -___ - -### AttestationRequest - -Ƭ **AttestationRequest**: *t.TypeOf‹typeof AttestationRequestType›* - -*Defined in [packages/sdk/utils/src/io.ts:116](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/io.ts#L116)* - -___ - -### AttestationResponse - -Ƭ **AttestationResponse**: *t.TypeOf‹typeof AttestationResponseType›* - -*Defined in [packages/sdk/utils/src/io.ts:162](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/io.ts#L162)* - -___ - -### AttestationServiceTestRequest - -Ƭ **AttestationServiceTestRequest**: *t.TypeOf‹typeof AttestationServiceTestRequestType›* - -*Defined in [packages/sdk/utils/src/io.ts:98](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/io.ts#L98)* - -___ - -### E164Number - -Ƭ **E164Number**: *t.TypeOf‹typeof E164PhoneNumberType›* - -*Defined in [packages/sdk/utils/src/io.ts:102](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/io.ts#L102)* - -___ - -### GetAttestationRequest - -Ƭ **GetAttestationRequest**: *t.TypeOf‹typeof GetAttestationRequestType›* - -*Defined in [packages/sdk/utils/src/io.ts:128](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/io.ts#L128)* - -___ - -### Signature - -Ƭ **Signature**: *t.TypeOf‹typeof SignatureType›* - -*Defined in [packages/sdk/utils/src/io.ts:100](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/io.ts#L100)* - -## Variables - -### `Const` AddressType - -• **AddressType**: *Type‹string, string, unknown›* = new t.Type( - 'Address', - t.string.is, - (input, context) => - either.chain(t.string.validate(input, context), (stringValue) => - isValidAddress(stringValue) - ? t.success(toChecksumAddress(stringValue)) - : t.failure(stringValue, context, 'is not a valid address') - ), - String -) - -*Defined in [packages/sdk/utils/src/io.ts:51](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/io.ts#L51)* - -___ - -### `Const` AttestationRequestType - -• **AttestationRequestType**: *TypeC‹object›* = t.type({ - phoneNumber: E164PhoneNumberType, - account: AddressType, - issuer: AddressType, - // io-ts way of defining optional key-value pair - salt: t.union([t.undefined, SaltType]), - smsRetrieverAppSig: t.union([t.undefined, t.string]), - // if specified, the message sent will be short random number prefixed by this string - securityCodePrefix: t.union([t.undefined, t.string]), - language: t.union([t.undefined, t.string]), -}) - -*Defined in [packages/sdk/utils/src/io.ts:104](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/io.ts#L104)* - -___ - -### `Const` AttestationResponseType - -• **AttestationResponseType**: *TypeC‹object›* = t.type({ - // Always returned in 1.0.x - success: t.boolean, - - // Returned for errors in 1.0.x - error: t.union([t.undefined, t.string]), - - // Stringifyed JSON dict of dicts, mapping attempt to error info. - errors: t.union([t.undefined, t.string]), - - // Returned for successful send in 1.0.x - provider: t.union([t.undefined, t.string]), - - // New fields - identifier: t.union([t.undefined, t.string]), - account: t.union([t.undefined, AddressType]), - issuer: t.union([t.undefined, AddressType]), - status: t.union([t.undefined, t.string]), - attempt: t.union([t.undefined, t.number]), - countryCode: t.union([t.undefined, t.string]), - - // Time to receive eventual delivery/failure (inc retries) - duration: t.union([t.undefined, t.number]), - - // Only used by test endpoint to return randomly generated salt. - // Never return a user-supplied salt. - salt: t.union([t.undefined, t.string]), - - // only returned if the request supplied the correct security code - attestationCode: t.union([t.undefined, t.string]), -}) - -*Defined in [packages/sdk/utils/src/io.ts:130](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/io.ts#L130)* - -___ - -### `Const` AttestationServiceStatusResponseType - -• **AttestationServiceStatusResponseType**: *TypeC‹object›* = t.type({ - status: t.literal('ok'), - smsProviders: t.array(t.string), - blacklistedRegionCodes: t.union([t.array(t.string), t.undefined]), - accountAddress: AddressType, - signature: t.union([SignatureType, t.undefined]), - version: t.string, - latestBlock: t.number, - ageOfLatestBlock: t.number, - isNodeSyncing: t.boolean, - appSignature: t.string, -}) - -*Defined in [packages/sdk/utils/src/io.ts:79](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/io.ts#L79)* - -___ - -### `Const` AttestationServiceTestRequestType - -• **AttestationServiceTestRequestType**: *TypeC‹object›* = t.type({ - phoneNumber: E164PhoneNumberType, - message: t.string, - signature: SignatureType, - provider: t.union([t.string, t.undefined]), -}) - -*Defined in [packages/sdk/utils/src/io.ts:92](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/io.ts#L92)* - -___ - -### `Const` E164PhoneNumberType - -• **E164PhoneNumberType**: *Type‹string, string, unknown›* = new t.Type( - 'E164Number', - t.string.is, - (input, context) => - either.chain(t.string.validate(input, context), (stringValue) => - isE164NumberStrict(stringValue) - ? t.success(stringValue) - : t.failure(stringValue, context, 'is not a valid e164 number') - ), - String -) - -*Defined in [packages/sdk/utils/src/io.ts:39](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/io.ts#L39)* - -___ - -### `Const` GetAttestationRequestType - -• **GetAttestationRequestType**: *TypeC‹object›* = t.type({ - phoneNumber: E164PhoneNumberType, - account: AddressType, - issuer: AddressType, - // io-ts way of defining optional key-value pair - salt: t.union([t.undefined, SaltType]), - // if the value supplied matches the stored security code, the response will include the complete message - securityCode: t.union([t.undefined, t.string]), -}) - -*Defined in [packages/sdk/utils/src/io.ts:118](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/io.ts#L118)* - -___ - -### `Const` JSONStringType - -• **JSONStringType**: *Type‹string, string, unknown›* = new t.Type( - 'JSONString', - t.string.is, - (input, context) => - either.chain(t.string.validate(input, context), (stringValue) => { - try { - JSON.parse(stringValue) - return t.success(stringValue) - } catch (error) { - return t.failure(stringValue, context, 'can not be parsed as JSON') - } - }), - String -) - -*Defined in [packages/sdk/utils/src/io.ts:24](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/io.ts#L24)* - -___ - -### `Const` PublicKeyType - -• **PublicKeyType**: *Type‹string, string, unknown›* = new t.Type( - 'Public Key', - t.string.is, - (input, context) => - either.chain(t.string.validate(input, context), (stringValue) => - stringValue.startsWith('0x') && isValidPublic(Buffer.from(stringValue.slice(2), 'hex'), true) - ? t.success(toChecksumAddress(stringValue)) - : t.failure(stringValue, context, 'is not a valid public key') - ), - String -) - -*Defined in [packages/sdk/utils/src/io.ts:63](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/io.ts#L63)* - -___ - -### `Const` SaltType - -• **SaltType**: *StringC‹›* = t.string - -*Defined in [packages/sdk/utils/src/io.ts:77](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/io.ts#L77)* - -___ - -### `Const` SignatureType - -• **SignatureType**: *StringC‹›* = t.string - -*Defined in [packages/sdk/utils/src/io.ts:75](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/io.ts#L75)* - -___ - -### `Const` UrlType - -• **UrlType**: *Type‹string, string, unknown›* = new t.Type( - 'Url', - t.string.is, - (input, context) => - either.chain(t.string.validate(input, context), (stringValue) => - URL_REGEX.test(stringValue) - ? t.success(stringValue) - : t.failure(stringValue, context, 'is not a valid url') - ), - String -) - -*Defined in [packages/sdk/utils/src/io.ts:12](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/io.ts#L12)* diff --git a/packages/docs/developer-resources/utils/reference/modules/_packages_sdk_utils_src_istanbul_.md b/packages/docs/developer-resources/utils/reference/modules/_packages_sdk_utils_src_istanbul_.md deleted file mode 100644 index aa40164acce..00000000000 --- a/packages/docs/developer-resources/utils/reference/modules/_packages_sdk_utils_src_istanbul_.md +++ /dev/null @@ -1,82 +0,0 @@ -# Module: "packages/sdk/utils/src/istanbul" - -## Index - -### Interfaces - -* [IstanbulExtra](../interfaces/_packages_sdk_utils_src_istanbul_.istanbulextra.md) -* [Seal](../interfaces/_packages_sdk_utils_src_istanbul_.seal.md) - -### Type aliases - -* [Bitmap](_packages_sdk_utils_src_istanbul_.md#bitmap) - -### Functions - -* [bitIsSet](_packages_sdk_utils_src_istanbul_.md#bitisset) -* [parseBlockExtraData](_packages_sdk_utils_src_istanbul_.md#parseblockextradata) - -### Object literals - -* [IstanbulUtils](_packages_sdk_utils_src_istanbul_.md#const-istanbulutils) - -## Type aliases - -### Bitmap - -Ƭ **Bitmap**: *BigNumber* - -*Defined in [packages/sdk/utils/src/istanbul.ts:11](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/istanbul.ts#L11)* - -## Functions - -### bitIsSet - -▸ **bitIsSet**(`bitmap`: [Bitmap](_packages_sdk_utils_src_istanbul_.md#bitmap), `index`: number): *boolean* - -*Defined in [packages/sdk/utils/src/istanbul.ts:56](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/istanbul.ts#L56)* - -**Parameters:** - -Name | Type | ------- | ------ | -`bitmap` | [Bitmap](_packages_sdk_utils_src_istanbul_.md#bitmap) | -`index` | number | - -**Returns:** *boolean* - -___ - -### parseBlockExtraData - -▸ **parseBlockExtraData**(`data`: string): *[IstanbulExtra](../interfaces/_packages_sdk_utils_src_istanbul_.istanbulextra.md)* - -*Defined in [packages/sdk/utils/src/istanbul.ts:43](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/istanbul.ts#L43)* - -**Parameters:** - -Name | Type | ------- | ------ | -`data` | string | - -**Returns:** *[IstanbulExtra](../interfaces/_packages_sdk_utils_src_istanbul_.istanbulextra.md)* - -## Object literals - -### `Const` IstanbulUtils - -### ▪ **IstanbulUtils**: *object* - -*Defined in [packages/sdk/utils/src/istanbul.ts:66](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/istanbul.ts#L66)* - -### bitIsSet - -• **bitIsSet**: *[bitIsSet](_packages_sdk_utils_src_istanbul_.md#bitisset)* - -*Defined in [packages/sdk/utils/src/istanbul.ts:68](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/istanbul.ts#L68)* - -### parseBlockExtraData - -• **parseBlockExtraData**: *[parseBlockExtraData](_packages_sdk_utils_src_istanbul_.md#parseblockextradata)* - -*Defined in [packages/sdk/utils/src/istanbul.ts:67](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/istanbul.ts#L67)* diff --git a/packages/docs/developer-resources/utils/reference/modules/_packages_sdk_utils_src_logger_.md b/packages/docs/developer-resources/utils/reference/modules/_packages_sdk_utils_src_logger_.md deleted file mode 100644 index 1a152fd06c1..00000000000 --- a/packages/docs/developer-resources/utils/reference/modules/_packages_sdk_utils_src_logger_.md +++ /dev/null @@ -1,34 +0,0 @@ -# Module: "packages/sdk/utils/src/logger" - -## Index - -### References - -* [Logger](_packages_sdk_utils_src_logger_.md#logger) -* [consoleLogger](_packages_sdk_utils_src_logger_.md#consolelogger) -* [noopLogger](_packages_sdk_utils_src_logger_.md#nooplogger) -* [prefixLogger](_packages_sdk_utils_src_logger_.md#prefixlogger) - -## References - -### Logger - -• **Logger**: - -___ - -### consoleLogger - -• **consoleLogger**: - -___ - -### noopLogger - -• **noopLogger**: - -___ - -### prefixLogger - -• **prefixLogger**: diff --git a/packages/docs/developer-resources/utils/reference/modules/_packages_sdk_utils_src_parsing_.md b/packages/docs/developer-resources/utils/reference/modules/_packages_sdk_utils_src_parsing_.md deleted file mode 100644 index 9b7431772c8..00000000000 --- a/packages/docs/developer-resources/utils/reference/modules/_packages_sdk_utils_src_parsing_.md +++ /dev/null @@ -1,41 +0,0 @@ -# Module: "packages/sdk/utils/src/parsing" - -## Index - -### References - -* [parseSolidityStringArray](_packages_sdk_utils_src_parsing_.md#parsesoliditystringarray) -* [stringToBoolean](_packages_sdk_utils_src_parsing_.md#stringtoboolean) - -### Functions - -* [parseInputAmount](_packages_sdk_utils_src_parsing_.md#const-parseinputamount) - -## References - -### parseSolidityStringArray - -• **parseSolidityStringArray**: - -___ - -### stringToBoolean - -• **stringToBoolean**: - -## Functions - -### `Const` parseInputAmount - -▸ **parseInputAmount**(`inputString`: string, `decimalSeparator`: string): *BigNumber* - -*Defined in [packages/sdk/utils/src/parsing.ts:7](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/parsing.ts#L7)* - -**Parameters:** - -Name | Type | Default | ------- | ------ | ------ | -`inputString` | string | - | -`decimalSeparator` | string | "." | - -**Returns:** *BigNumber* diff --git a/packages/docs/developer-resources/utils/reference/modules/_packages_sdk_utils_src_phonenumbers_.md b/packages/docs/developer-resources/utils/reference/modules/_packages_sdk_utils_src_phonenumbers_.md deleted file mode 100644 index f7b047c6d08..00000000000 --- a/packages/docs/developer-resources/utils/reference/modules/_packages_sdk_utils_src_phonenumbers_.md +++ /dev/null @@ -1,296 +0,0 @@ -# Module: "packages/sdk/utils/src/phoneNumbers" - -## Index - -### References - -* [ParsedPhoneNumber](_packages_sdk_utils_src_phonenumbers_.md#parsedphonenumber) -* [anonymizedPhone](_packages_sdk_utils_src_phonenumbers_.md#anonymizedphone) -* [isE164Number](_packages_sdk_utils_src_phonenumbers_.md#ise164number) - -### Functions - -* [getCountryCode](_packages_sdk_utils_src_phonenumbers_.md#getcountrycode) -* [getCountryEmoji](_packages_sdk_utils_src_phonenumbers_.md#getcountryemoji) -* [getDisplayNumberInternational](_packages_sdk_utils_src_phonenumbers_.md#getdisplaynumberinternational) -* [getDisplayPhoneNumber](_packages_sdk_utils_src_phonenumbers_.md#getdisplayphonenumber) -* [getE164DisplayNumber](_packages_sdk_utils_src_phonenumbers_.md#gete164displaynumber) -* [getE164Number](_packages_sdk_utils_src_phonenumbers_.md#gete164number) -* [getExampleNumber](_packages_sdk_utils_src_phonenumbers_.md#getexamplenumber) -* [getPhoneHash](_packages_sdk_utils_src_phonenumbers_.md#const-getphonehash) -* [getRegionCode](_packages_sdk_utils_src_phonenumbers_.md#getregioncode) -* [getRegionCodeFromCountryCode](_packages_sdk_utils_src_phonenumbers_.md#getregioncodefromcountrycode) -* [isE164NumberStrict](_packages_sdk_utils_src_phonenumbers_.md#ise164numberstrict) -* [parsePhoneNumber](_packages_sdk_utils_src_phonenumbers_.md#parsephonenumber) - -### Object literals - -* [PhoneNumberUtils](_packages_sdk_utils_src_phonenumbers_.md#const-phonenumberutils) - -## References - -### ParsedPhoneNumber - -• **ParsedPhoneNumber**: - -___ - -### anonymizedPhone - -• **anonymizedPhone**: - -___ - -### isE164Number - -• **isE164Number**: - -## Functions - -### getCountryCode - -▸ **getCountryCode**(`e164PhoneNumber`: string): *undefined | null | number* - -*Defined in [packages/sdk/utils/src/phoneNumbers.ts:48](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/phoneNumbers.ts#L48)* - -**Parameters:** - -Name | Type | ------- | ------ | -`e164PhoneNumber` | string | - -**Returns:** *undefined | null | number* - -___ - -### getCountryEmoji - -▸ **getCountryEmoji**(`e164PhoneNumber`: string, `countryCodePossible?`: undefined | number, `regionCodePossible?`: undefined | string): *string* - -*Defined in [packages/sdk/utils/src/phoneNumbers.ts:27](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/phoneNumbers.ts#L27)* - -**Parameters:** - -Name | Type | ------- | ------ | -`e164PhoneNumber` | string | -`countryCodePossible?` | undefined | number | -`regionCodePossible?` | undefined | string | - -**Returns:** *string* - -___ - -### getDisplayNumberInternational - -▸ **getDisplayNumberInternational**(`e164PhoneNumber`: string): *string* - -*Defined in [packages/sdk/utils/src/phoneNumbers.ts:94](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/phoneNumbers.ts#L94)* - -**Parameters:** - -Name | Type | ------- | ------ | -`e164PhoneNumber` | string | - -**Returns:** *string* - -___ - -### getDisplayPhoneNumber - -▸ **getDisplayPhoneNumber**(`phoneNumber`: string, `defaultCountryCode`: string): *string* - -*Defined in [packages/sdk/utils/src/phoneNumbers.ts:84](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/phoneNumbers.ts#L84)* - -**Parameters:** - -Name | Type | ------- | ------ | -`phoneNumber` | string | -`defaultCountryCode` | string | - -**Returns:** *string* - -___ - -### getE164DisplayNumber - -▸ **getE164DisplayNumber**(`e164PhoneNumber`: string): *string* - -*Defined in [packages/sdk/utils/src/phoneNumbers.ts:105](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/phoneNumbers.ts#L105)* - -**Parameters:** - -Name | Type | ------- | ------ | -`e164PhoneNumber` | string | - -**Returns:** *string* - -___ - -### getE164Number - -▸ **getE164Number**(`phoneNumber`: string, `defaultCountryCode`: string): *null | string* - -*Defined in [packages/sdk/utils/src/phoneNumbers.ts:110](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/phoneNumbers.ts#L110)* - -**Parameters:** - -Name | Type | ------- | ------ | -`phoneNumber` | string | -`defaultCountryCode` | string | - -**Returns:** *null | string* - -___ - -### getExampleNumber - -▸ **getExampleNumber**(`regionCode`: string, `useOnlyZeroes`: boolean, `isInternational`: boolean): *undefined | string* - -*Defined in [packages/sdk/utils/src/phoneNumbers.ts:247](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/phoneNumbers.ts#L247)* - -**Parameters:** - -Name | Type | Default | ------- | ------ | ------ | -`regionCode` | string | - | -`useOnlyZeroes` | boolean | true | -`isInternational` | boolean | false | - -**Returns:** *undefined | string* - -___ - -### `Const` getPhoneHash - -▸ **getPhoneHash**(`phoneNumber`: string, `salt?`: undefined | string): *string* - -*Defined in [packages/sdk/utils/src/phoneNumbers.ts:20](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/phoneNumbers.ts#L20)* - -**Parameters:** - -Name | Type | ------- | ------ | -`phoneNumber` | string | -`salt?` | undefined | string | - -**Returns:** *string* - -___ - -### getRegionCode - -▸ **getRegionCode**(`e164PhoneNumber`: string): *undefined | null | string* - -*Defined in [packages/sdk/utils/src/phoneNumbers.ts:60](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/phoneNumbers.ts#L60)* - -**Parameters:** - -Name | Type | ------- | ------ | -`e164PhoneNumber` | string | - -**Returns:** *undefined | null | string* - -___ - -### getRegionCodeFromCountryCode - -▸ **getRegionCodeFromCountryCode**(`countryCode`: string): *null | string* - -*Defined in [packages/sdk/utils/src/phoneNumbers.ts:72](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/phoneNumbers.ts#L72)* - -**Parameters:** - -Name | Type | ------- | ------ | -`countryCode` | string | - -**Returns:** *null | string* - -___ - -### isE164NumberStrict - -▸ **isE164NumberStrict**(`phoneNumber`: string): *boolean* - -*Defined in [packages/sdk/utils/src/phoneNumbers.ts:120](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/phoneNumbers.ts#L120)* - -**Parameters:** - -Name | Type | ------- | ------ | -`phoneNumber` | string | - -**Returns:** *boolean* - -___ - -### parsePhoneNumber - -▸ **parsePhoneNumber**(`phoneNumberRaw`: string, `defaultCountryCode?`: undefined | string): *ParsedPhoneNumber | null* - -*Defined in [packages/sdk/utils/src/phoneNumbers.ts:132](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/phoneNumbers.ts#L132)* - -**Parameters:** - -Name | Type | ------- | ------ | -`phoneNumberRaw` | string | -`defaultCountryCode?` | undefined | string | - -**Returns:** *ParsedPhoneNumber | null* - -## Object literals - -### `Const` PhoneNumberUtils - -### ▪ **PhoneNumberUtils**: *object* - -*Defined in [packages/sdk/utils/src/phoneNumbers.ts:275](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/phoneNumbers.ts#L275)* - -### getCountryCode - -• **getCountryCode**: *[getCountryCode](_packages_sdk_utils_src_phonenumbers_.md#getcountrycode)* - -*Defined in [packages/sdk/utils/src/phoneNumbers.ts:277](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/phoneNumbers.ts#L277)* - -### getDisplayPhoneNumber - -• **getDisplayPhoneNumber**: *[getDisplayPhoneNumber](_packages_sdk_utils_src_phonenumbers_.md#getdisplayphonenumber)* - -*Defined in [packages/sdk/utils/src/phoneNumbers.ts:279](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/phoneNumbers.ts#L279)* - -### getE164Number - -• **getE164Number**: *[getE164Number](_packages_sdk_utils_src_phonenumbers_.md#gete164number)* - -*Defined in [packages/sdk/utils/src/phoneNumbers.ts:280](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/phoneNumbers.ts#L280)* - -### getPhoneHash - -• **getPhoneHash**: *getPhoneHash* - -*Defined in [packages/sdk/utils/src/phoneNumbers.ts:276](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/phoneNumbers.ts#L276)* - -### getRegionCode - -• **getRegionCode**: *[getRegionCode](_packages_sdk_utils_src_phonenumbers_.md#getregioncode)* - -*Defined in [packages/sdk/utils/src/phoneNumbers.ts:278](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/phoneNumbers.ts#L278)* - -### isE164Number - -• **isE164Number**: *isE164Number* - -*Defined in [packages/sdk/utils/src/phoneNumbers.ts:281](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/phoneNumbers.ts#L281)* - -### parsePhoneNumber - -• **parsePhoneNumber**: *[parsePhoneNumber](_packages_sdk_utils_src_phonenumbers_.md#parsephonenumber)* - -*Defined in [packages/sdk/utils/src/phoneNumbers.ts:282](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/phoneNumbers.ts#L282)* diff --git a/packages/docs/developer-resources/utils/reference/modules/_packages_sdk_utils_src_sign_typed_data_utils_.md b/packages/docs/developer-resources/utils/reference/modules/_packages_sdk_utils_src_sign_typed_data_utils_.md deleted file mode 100644 index 34c910e7f76..00000000000 --- a/packages/docs/developer-resources/utils/reference/modules/_packages_sdk_utils_src_sign_typed_data_utils_.md +++ /dev/null @@ -1,65 +0,0 @@ -# Module: "packages/sdk/utils/src/sign-typed-data-utils" - -## Index - -### Interfaces - -* [EIP712Object](../interfaces/_packages_sdk_utils_src_sign_typed_data_utils_.eip712object.md) -* [EIP712Parameter](../interfaces/_packages_sdk_utils_src_sign_typed_data_utils_.eip712parameter.md) -* [EIP712TypedData](../interfaces/_packages_sdk_utils_src_sign_typed_data_utils_.eip712typeddata.md) -* [EIP712Types](../interfaces/_packages_sdk_utils_src_sign_typed_data_utils_.eip712types.md) - -### Type aliases - -* [EIP712ObjectValue](_packages_sdk_utils_src_sign_typed_data_utils_.md#eip712objectvalue) - -### Functions - -* [generateTypedDataHash](_packages_sdk_utils_src_sign_typed_data_utils_.md#generatetypeddatahash) -* [structHash](_packages_sdk_utils_src_sign_typed_data_utils_.md#structhash) - -## Type aliases - -### EIP712ObjectValue - -Ƭ **EIP712ObjectValue**: *string | number | [EIP712Object](../interfaces/_packages_sdk_utils_src_sign_typed_data_utils_.eip712object.md)* - -*Defined in [packages/sdk/utils/src/sign-typed-data-utils.ts:14](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/sign-typed-data-utils.ts#L14)* - -## Functions - -### generateTypedDataHash - -▸ **generateTypedDataHash**(`typedData`: [EIP712TypedData](../interfaces/_packages_sdk_utils_src_sign_typed_data_utils_.eip712typeddata.md)): *Buffer* - -*Defined in [packages/sdk/utils/src/sign-typed-data-utils.ts:32](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/sign-typed-data-utils.ts#L32)* - -Generates the EIP712 Typed Data hash for signing - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`typedData` | [EIP712TypedData](../interfaces/_packages_sdk_utils_src_sign_typed_data_utils_.eip712typeddata.md) | An object that conforms to the EIP712TypedData interface | - -**Returns:** *Buffer* - -A Buffer containing the hash of the typed data. - -___ - -### structHash - -▸ **structHash**(`primaryType`: string, `data`: [EIP712Object](../interfaces/_packages_sdk_utils_src_sign_typed_data_utils_.eip712object.md), `types`: [EIP712Types](../interfaces/_packages_sdk_utils_src_sign_typed_data_utils_.eip712types.md)): *Buffer* - -*Defined in [packages/sdk/utils/src/sign-typed-data-utils.ts:107](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/sign-typed-data-utils.ts#L107)* - -**Parameters:** - -Name | Type | ------- | ------ | -`primaryType` | string | -`data` | [EIP712Object](../interfaces/_packages_sdk_utils_src_sign_typed_data_utils_.eip712object.md) | -`types` | [EIP712Types](../interfaces/_packages_sdk_utils_src_sign_typed_data_utils_.eip712types.md) | - -**Returns:** *Buffer* diff --git a/packages/docs/developer-resources/utils/reference/modules/_packages_sdk_utils_src_signatureutils_.md b/packages/docs/developer-resources/utils/reference/modules/_packages_sdk_utils_src_signatureutils_.md deleted file mode 100644 index 7a3db8d9bb7..00000000000 --- a/packages/docs/developer-resources/utils/reference/modules/_packages_sdk_utils_src_signatureutils_.md +++ /dev/null @@ -1,381 +0,0 @@ -# Module: "packages/sdk/utils/src/signatureUtils" - -## Index - -### References - -* [NativeSigner](_packages_sdk_utils_src_signatureutils_.md#nativesigner) -* [POP_SIZE](_packages_sdk_utils_src_signatureutils_.md#pop_size) -* [Signature](_packages_sdk_utils_src_signatureutils_.md#signature) -* [Signer](_packages_sdk_utils_src_signatureutils_.md#signer) -* [serializeSignature](_packages_sdk_utils_src_signatureutils_.md#serializesignature) - -### Functions - -* [LocalSigner](_packages_sdk_utils_src_signatureutils_.md#localsigner) -* [addressToPublicKey](_packages_sdk_utils_src_signatureutils_.md#addresstopublickey) -* [guessSigner](_packages_sdk_utils_src_signatureutils_.md#guesssigner) -* [hashMessage](_packages_sdk_utils_src_signatureutils_.md#hashmessage) -* [hashMessageWithPrefix](_packages_sdk_utils_src_signatureutils_.md#hashmessagewithprefix) -* [parseSignature](_packages_sdk_utils_src_signatureutils_.md#parsesignature) -* [parseSignatureWithoutPrefix](_packages_sdk_utils_src_signatureutils_.md#parsesignaturewithoutprefix) -* [recoverEIP712TypedDataSigner](_packages_sdk_utils_src_signatureutils_.md#recovereip712typeddatasigner) -* [signMessage](_packages_sdk_utils_src_signatureutils_.md#signmessage) -* [signMessageWithoutPrefix](_packages_sdk_utils_src_signatureutils_.md#signmessagewithoutprefix) -* [signedMessageToPublicKey](_packages_sdk_utils_src_signatureutils_.md#signedmessagetopublickey) -* [verifyEIP712TypedDataSigner](_packages_sdk_utils_src_signatureutils_.md#verifyeip712typeddatasigner) -* [verifySignature](_packages_sdk_utils_src_signatureutils_.md#verifysignature) - -### Object literals - -* [SignatureUtils](_packages_sdk_utils_src_signatureutils_.md#const-signatureutils) - -## References - -### NativeSigner - -• **NativeSigner**: - -___ - -### POP_SIZE - -• **POP_SIZE**: - -___ - -### Signature - -• **Signature**: - -___ - -### Signer - -• **Signer**: - -___ - -### serializeSignature - -• **serializeSignature**: - -## Functions - -### LocalSigner - -▸ **LocalSigner**(`privateKey`: string): *Signer* - -*Defined in [packages/sdk/utils/src/signatureUtils.ts:61](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/signatureUtils.ts#L61)* - -**Parameters:** - -Name | Type | ------- | ------ | -`privateKey` | string | - -**Returns:** *Signer* - -___ - -### addressToPublicKey - -▸ **addressToPublicKey**(`signer`: string, `signFn`: function): *Promise‹string›* - -*Defined in [packages/sdk/utils/src/signatureUtils.ts:35](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/signatureUtils.ts#L35)* - -**Parameters:** - -▪ **signer**: *string* - -▪ **signFn**: *function* - -▸ (`message`: string, `signer`: string): *Promise‹string›* - -**Parameters:** - -Name | Type | ------- | ------ | -`message` | string | -`signer` | string | - -**Returns:** *Promise‹string›* - -___ - -### guessSigner - -▸ **guessSigner**(`message`: string, `signature`: string): *string* - -*Defined in [packages/sdk/utils/src/signatureUtils.ts:166](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/signatureUtils.ts#L166)* - -**Parameters:** - -Name | Type | ------- | ------ | -`message` | string | -`signature` | string | - -**Returns:** *string* - -___ - -### hashMessage - -▸ **hashMessage**(`message`: string): *string* - -*Defined in [packages/sdk/utils/src/signatureUtils.ts:31](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/signatureUtils.ts#L31)* - -**Parameters:** - -Name | Type | ------- | ------ | -`message` | string | - -**Returns:** *string* - -___ - -### hashMessageWithPrefix - -▸ **hashMessageWithPrefix**(`message`: string): *string* - -*Defined in [packages/sdk/utils/src/signatureUtils.ts:26](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/signatureUtils.ts#L26)* - -**Parameters:** - -Name | Type | ------- | ------ | -`message` | string | - -**Returns:** *string* - -___ - -### parseSignature - -▸ **parseSignature**(`message`: string, `signature`: string, `signer`: string): *object* - -*Defined in [packages/sdk/utils/src/signatureUtils.ts:111](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/signatureUtils.ts#L111)* - -**Parameters:** - -Name | Type | ------- | ------ | -`message` | string | -`signature` | string | -`signer` | string | - -**Returns:** *object* - -* **r**: *string* - -* **s**: *string* - -* **v**: *number* - -___ - -### parseSignatureWithoutPrefix - -▸ **parseSignatureWithoutPrefix**(`messageHash`: string, `signature`: string, `signer`: string): *object* - -*Defined in [packages/sdk/utils/src/signatureUtils.ts:115](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/signatureUtils.ts#L115)* - -**Parameters:** - -Name | Type | ------- | ------ | -`messageHash` | string | -`signature` | string | -`signer` | string | - -**Returns:** *object* - -* **r**: *string* - -* **s**: *string* - -* **v**: *number* - -___ - -### recoverEIP712TypedDataSigner - -▸ **recoverEIP712TypedDataSigner**(`typedData`: [EIP712TypedData](../interfaces/_packages_sdk_utils_src_sign_typed_data_utils_.eip712typeddata.md), `signature`: string): *string* - -*Defined in [packages/sdk/utils/src/signatureUtils.ts:133](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/signatureUtils.ts#L133)* - -**Parameters:** - -Name | Type | ------- | ------ | -`typedData` | [EIP712TypedData](../interfaces/_packages_sdk_utils_src_sign_typed_data_utils_.eip712typeddata.md) | -`signature` | string | - -**Returns:** *string* - -___ - -### signMessage - -▸ **signMessage**(`message`: string, `privateKey`: string, `address`: string): *object* - -*Defined in [packages/sdk/utils/src/signatureUtils.ts:80](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/signatureUtils.ts#L80)* - -**Parameters:** - -Name | Type | ------- | ------ | -`message` | string | -`privateKey` | string | -`address` | string | - -**Returns:** *object* - -* **r**: *any* = ethjsutil.bufferToHex(r) - -* **s**: *any* = ethjsutil.bufferToHex(s) - -* **v**: *any* - -___ - -### signMessageWithoutPrefix - -▸ **signMessageWithoutPrefix**(`messageHash`: string, `privateKey`: string, `address`: string): *object* - -*Defined in [packages/sdk/utils/src/signatureUtils.ts:84](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/signatureUtils.ts#L84)* - -**Parameters:** - -Name | Type | ------- | ------ | -`messageHash` | string | -`privateKey` | string | -`address` | string | - -**Returns:** *object* - -* **r**: *any* = ethjsutil.bufferToHex(r) - -* **s**: *any* = ethjsutil.bufferToHex(s) - -* **v**: *any* - -___ - -### signedMessageToPublicKey - -▸ **signedMessageToPublicKey**(`message`: string, `v`: number, `r`: string, `s`: string): *string* - -*Defined in [packages/sdk/utils/src/signatureUtils.ts:70](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/signatureUtils.ts#L70)* - -**Parameters:** - -Name | Type | ------- | ------ | -`message` | string | -`v` | number | -`r` | string | -`s` | string | - -**Returns:** *string* - -___ - -### verifyEIP712TypedDataSigner - -▸ **verifyEIP712TypedDataSigner**(`typedData`: [EIP712TypedData](../interfaces/_packages_sdk_utils_src_sign_typed_data_utils_.eip712typeddata.md), `signature`: string, `signer`: string): *boolean* - -*Defined in [packages/sdk/utils/src/signatureUtils.ts:157](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/signatureUtils.ts#L157)* - -**Parameters:** - -Name | Type | ------- | ------ | -`typedData` | [EIP712TypedData](../interfaces/_packages_sdk_utils_src_sign_typed_data_utils_.eip712typeddata.md) | -`signature` | string | -`signer` | string | - -**Returns:** *boolean* - -___ - -### verifySignature - -▸ **verifySignature**(`message`: string, `signature`: string, `signer`: string): *boolean* - -*Defined in [packages/sdk/utils/src/signatureUtils.ts:102](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/signatureUtils.ts#L102)* - -**Parameters:** - -Name | Type | ------- | ------ | -`message` | string | -`signature` | string | -`signer` | string | - -**Returns:** *boolean* - -## Object literals - -### `Const` SignatureUtils - -### ▪ **SignatureUtils**: *object* - -*Defined in [packages/sdk/utils/src/signatureUtils.ts:213](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/signatureUtils.ts#L213)* - -### LocalSigner - -• **LocalSigner**: *[LocalSigner](_packages_sdk_utils_src_signatureutils_.md#localsigner)* - -*Defined in [packages/sdk/utils/src/signatureUtils.ts:215](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/signatureUtils.ts#L215)* - -### NativeSigner - -• **NativeSigner**: *NativeSigner* - -*Defined in [packages/sdk/utils/src/signatureUtils.ts:214](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/signatureUtils.ts#L214)* - -### parseSignature - -• **parseSignature**: *[parseSignature](_packages_sdk_utils_src_signatureutils_.md#parsesignature)* - -*Defined in [packages/sdk/utils/src/signatureUtils.ts:218](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/signatureUtils.ts#L218)* - -### parseSignatureWithoutPrefix - -• **parseSignatureWithoutPrefix**: *[parseSignatureWithoutPrefix](_packages_sdk_utils_src_signatureutils_.md#parsesignaturewithoutprefix)* - -*Defined in [packages/sdk/utils/src/signatureUtils.ts:219](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/signatureUtils.ts#L219)* - -### recoverEIP712TypedDataSigner - -• **recoverEIP712TypedDataSigner**: *[recoverEIP712TypedDataSigner](_packages_sdk_utils_src_signatureutils_.md#recovereip712typeddatasigner)* - -*Defined in [packages/sdk/utils/src/signatureUtils.ts:221](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/signatureUtils.ts#L221)* - -### serializeSignature - -• **serializeSignature**: *serializeSignature* - -*Defined in [packages/sdk/utils/src/signatureUtils.ts:220](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/signatureUtils.ts#L220)* - -### signMessage - -• **signMessage**: *[signMessage](_packages_sdk_utils_src_signatureutils_.md#signmessage)* - -*Defined in [packages/sdk/utils/src/signatureUtils.ts:216](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/signatureUtils.ts#L216)* - -### signMessageWithoutPrefix - -• **signMessageWithoutPrefix**: *[signMessageWithoutPrefix](_packages_sdk_utils_src_signatureutils_.md#signmessagewithoutprefix)* - -*Defined in [packages/sdk/utils/src/signatureUtils.ts:217](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/signatureUtils.ts#L217)* - -### verifyEIP712TypedDataSigner - -• **verifyEIP712TypedDataSigner**: *[verifyEIP712TypedDataSigner](_packages_sdk_utils_src_signatureutils_.md#verifyeip712typeddatasigner)* - -*Defined in [packages/sdk/utils/src/signatureUtils.ts:222](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/signatureUtils.ts#L222)* diff --git a/packages/docs/developer-resources/utils/reference/modules/_packages_sdk_utils_src_solidity_.md b/packages/docs/developer-resources/utils/reference/modules/_packages_sdk_utils_src_solidity_.md deleted file mode 100644 index 40d8284f475..00000000000 --- a/packages/docs/developer-resources/utils/reference/modules/_packages_sdk_utils_src_solidity_.md +++ /dev/null @@ -1,27 +0,0 @@ -# Module: "packages/sdk/utils/src/solidity" - -## Index - -### References - -* [sha3](_packages_sdk_utils_src_solidity_.md#sha3) -* [soliditySha3](_packages_sdk_utils_src_solidity_.md#soliditysha3) -* [soliditySha3Raw](_packages_sdk_utils_src_solidity_.md#soliditysha3raw) - -## References - -### sha3 - -• **sha3**: - -___ - -### soliditySha3 - -• **soliditySha3**: - -___ - -### soliditySha3Raw - -• **soliditySha3Raw**: diff --git a/packages/docs/developer-resources/utils/reference/modules/_packages_sdk_utils_src_string_.md b/packages/docs/developer-resources/utils/reference/modules/_packages_sdk_utils_src_string_.md deleted file mode 100644 index c67e0efd084..00000000000 --- a/packages/docs/developer-resources/utils/reference/modules/_packages_sdk_utils_src_string_.md +++ /dev/null @@ -1,44 +0,0 @@ -# Module: "packages/sdk/utils/src/string" - -## Index - -### References - -* [appendPath](_packages_sdk_utils_src_string_.md#appendpath) -* [normalizeAccents](_packages_sdk_utils_src_string_.md#normalizeaccents) - -### Object literals - -* [StringUtils](_packages_sdk_utils_src_string_.md#const-stringutils) - -## References - -### appendPath - -• **appendPath**: - -___ - -### normalizeAccents - -• **normalizeAccents**: - -## Object literals - -### `Const` StringUtils - -### ▪ **StringUtils**: *object* - -*Defined in [packages/sdk/utils/src/string.ts:5](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/string.ts#L5)* - -### appendPath - -• **appendPath**: *appendPath* - -*Defined in [packages/sdk/utils/src/string.ts:6](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/string.ts#L6)* - -### normalizeAccents - -• **normalizeAccents**: *normalizeAccents* - -*Defined in [packages/sdk/utils/src/string.ts:7](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/string.ts#L7)* diff --git a/packages/docs/developer-resources/utils/reference/modules/_packages_sdk_utils_src_task_.md b/packages/docs/developer-resources/utils/reference/modules/_packages_sdk_utils_src_task_.md deleted file mode 100644 index ce012b5783b..00000000000 --- a/packages/docs/developer-resources/utils/reference/modules/_packages_sdk_utils_src_task_.md +++ /dev/null @@ -1,62 +0,0 @@ -# Module: "packages/sdk/utils/src/task" - -## Index - -### References - -* [RepeatTaskContext](_packages_sdk_utils_src_task_.md#repeattaskcontext) -* [RetryTaskOptions](_packages_sdk_utils_src_task_.md#retrytaskoptions) -* [RunningTask](_packages_sdk_utils_src_task_.md#runningtask) -* [RunningTaskWithValue](_packages_sdk_utils_src_task_.md#runningtaskwithvalue) -* [TaskOptions](_packages_sdk_utils_src_task_.md#taskoptions) -* [conditionWatcher](_packages_sdk_utils_src_task_.md#conditionwatcher) -* [repeatTask](_packages_sdk_utils_src_task_.md#repeattask) -* [tryObtainValueWithRetries](_packages_sdk_utils_src_task_.md#tryobtainvaluewithretries) - -## References - -### RepeatTaskContext - -• **RepeatTaskContext**: - -___ - -### RetryTaskOptions - -• **RetryTaskOptions**: - -___ - -### RunningTask - -• **RunningTask**: - -___ - -### RunningTaskWithValue - -• **RunningTaskWithValue**: - -___ - -### TaskOptions - -• **TaskOptions**: - -___ - -### conditionWatcher - -• **conditionWatcher**: - -___ - -### repeatTask - -• **repeatTask**: - -___ - -### tryObtainValueWithRetries - -• **tryObtainValueWithRetries**: diff --git a/packages/docs/developer-resources/utils/reference/modules/_packages_sdk_utils_src_typed_data_constructors_.md b/packages/docs/developer-resources/utils/reference/modules/_packages_sdk_utils_src_typed_data_constructors_.md deleted file mode 100644 index fdcc3041592..00000000000 --- a/packages/docs/developer-resources/utils/reference/modules/_packages_sdk_utils_src_typed_data_constructors_.md +++ /dev/null @@ -1,23 +0,0 @@ -# Module: "packages/sdk/utils/src/typed-data-constructors" - -## Index - -### Functions - -* [attestationSecurityCode](_packages_sdk_utils_src_typed_data_constructors_.md#attestationsecuritycode) - -## Functions - -### attestationSecurityCode - -▸ **attestationSecurityCode**(`code`: string): *[EIP712TypedData](../interfaces/_packages_sdk_utils_src_sign_typed_data_utils_.eip712typeddata.md)* - -*Defined in [packages/sdk/utils/src/typed-data-constructors.ts:3](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/utils/src/typed-data-constructors.ts#L3)* - -**Parameters:** - -Name | Type | ------- | ------ | -`code` | string | - -**Returns:** *[EIP712TypedData](../interfaces/_packages_sdk_utils_src_sign_typed_data_utils_.eip712typeddata.md)* diff --git a/packages/docs/developer-resources/walkthroughs/README.md b/packages/docs/developer-resources/walkthroughs/README.md deleted file mode 100644 index 799c1152d89..00000000000 --- a/packages/docs/developer-resources/walkthroughs/README.md +++ /dev/null @@ -1 +0,0 @@ -# Celo Walkthroughs diff --git a/packages/docs/developer-resources/walkthroughs/development-chain.md b/packages/docs/developer-resources/walkthroughs/development-chain.md deleted file mode 100644 index 87bba3d2bca..00000000000 --- a/packages/docs/developer-resources/walkthroughs/development-chain.md +++ /dev/null @@ -1,88 +0,0 @@ -# Development Chain w/ Protocol Contracts - -In this tutorial, we will go over how to set up a Celo development blockchain that includes all of the [core protocol contracts](https://github.com/celo-org/celo-monorepo/tree/master/packages/protocol), including identity and stability contracts. - -At the end of this tutorial, you will have a local Celo development blockchain running exposed at [http://localhost:8545](http://localhost:8545) and will be able to connect to it like any other local node. We will also go over how to inspect the development blockchain using the [Celo CLI tool](https://docs.celo.org/command-line-interface/introduction) and the [ContractKit](https://docs.celo.org/developer-guide/overview/introduction/contractkit). - -Running the development Celo blockchain is helpful because it greatly speeds up development time. You will start with 10 accounts pre-funded with cGLD and cUSD and all transactions on the network are virtually instant. - -### **Download the Celo monorepo** - -To start, download the Celo monorepo [here](https://github.com/celo-org/celo-monorepo) or with the following command. - -```text -git clone https://github.com/celo-org/celo-monorepo.git -``` - -See [this page](https://github.com/celo-org/celo-monorepo/blob/master/SETUP.md#building-celo-monorepo) for instructions on how to build the monorepo. - -Once the monorepo is built, move into the `contractkit` directory. - -``` -cd packages/sdk/contractkit -``` - -From the `contractkit` directory, run - -``` -yarn test:reset && yarn test:livechain -``` - -This will start the development Celo blockchain. It will take at least a few minutes to start. The contract migrations will be printed in the terminal as they are deployed. - -The process will finish and print `Ganache started`. Leave this terminal window open to leave the development chain running. - -### **Inspecting the chain** - -Now that we have a Celo development chain running, we probably want to know what accounts we have access to, how much cGLD and cUSD they have as well as the addresses of the deployed protocol contracts. - -We can use the [Celo CLI tool](https://docs.celo.org/command-line-interface/introduction) for this, or we can use the [contractkit](https://docs.celo.org/developer-guide/overview/introduction/contractkit) npm package in a node script. - -### **Celo CLI** - -You can install the CLI using npm by running `npm install -g @celo/celocli`. You can see the [package details here](https://www.npmjs.com/package/@celo/celocli). Once it is installed, you should be able to access the tool from the terminal by running `$ celocli`. Try `$ celocli help`. - -The CLI will connect to the node at [http://localhost:8545](http://localhost:8545) by default. You can check this by running `$ celocli node:get`. - -You can see the accounts available on the Celo development chain by running`$ celocli account:list`. You should see something like: - -```text -[ '0x5409ED021D9299bf6814279A6A1411A7e866A631', - '0x6Ecbe1DB9EF729CBe972C83Fb886247691Fb6beb', - '0xE36Ea790bc9d7AB70C55260C66D52b1eca985f84', - '0xE834EC434DABA538cd1b9Fe1582052B880BD7e63', - '0x78dc5D2D739606d31509C31d654056A45185ECb6', - '0xA8dDa8d7F5310E4A9E24F8eBA77E091Ac264f872', - '0x06cEf8E666768cC40Cc78CF93d9611019dDcB628', - '0x4404ac8bd8F9618D27Ad2f1485AA1B2cFD82482D', - '0x7457d5E02197480Db681D3fdF256c7acA21bDc12', - '0x91c987bf62D25945dB517BDAa840A6c661374402' ] -``` - -If you try to check the balance of the first account with `$ celocli account:balance 0x5409ED021D9299bf6814279A6A1411A7e866A631` you might encounter an error saying that the node is not currently synced. You can silence this by adding this environment variable to the terminal `$ export NO_SYNCCHECK=true`. Running the command again will print: - -```text -All balances expressed in units of 10^-18. -gold: 9.9999999693185872e+25 -lockedGold: 0 -usd: 5e+22 -total: 1.00004973043691287703791575e+26 -pending: 0 -``` - -### ContractKit + Node.js - -You can also use the [contractkit](https://docs.celo.org/developer-guide/overview/introduction/contractkit) to access the local node in a node.js script. - -As an example, try running [this script](https://gist.github.com/critesjosh/35ba7b1c2fe41934308cb243b003001c) in an npm project with contractkit installed. - -The linked gist is called getInfo.js. Run it with `$ node getInfo.js` This will print some of the Celo blockchain information. - -You are now prepared to start developing, transacting and deploying contracts on your own Celo development blockchain! - -### Using Ethereum developers tools with Celo - -You can connect the development chain to a tool like [Truffle](https://www.trufflesuite.com/docs/truffle/overview) or [Remix](https://remix.ethereum.org/) to begin interacting with it. Keep in mind that these tools are built primarily for Ethereum development and are compatible with Celo because Celo is similar to Ethereum. The two blockchains have similar block architectures and both run the Ethereum Virtual Machine \(EVM\) for executing smart contracts. - -The main difference between Celo and Ethereum that dapp developers need to keep in mind is that Celo has a slightly different transaction object than Ethereum. Celo requires 3 additional fields in a transaction object, a `feeCurrency`, a `gatewayFee` and a `gatewayFeeRecipient`. When Truffle and Remix are connected to a locally running Celo node, the local node will fill these fields with default values \(if the fields are empty\). The node will sign the Celo transaction and broadcast it to the network. Trying to send signed Ethereum transactions to a Celo network will not work. - diff --git a/packages/docs/developer-resources/walkthroughs/hello-contract-remote-node.md b/packages/docs/developer-resources/walkthroughs/hello-contract-remote-node.md deleted file mode 100644 index 5d3bf9c6b39..00000000000 --- a/packages/docs/developer-resources/walkthroughs/hello-contract-remote-node.md +++ /dev/null @@ -1,310 +0,0 @@ ---- -description: >- - This page is similar to the Hello Contracts page, but this one - will connect to a remote node (Forno) and do key management in the Truffle project. ---- - -# Hello Contract \(Truffle + Remote Node\) - -This guide walks you through the basics of how to deploy your own smart contracts on Celo networks. As Celo is fully EVM compatible, we inherit the rich developer ecosystem and tooling of the Ethereum community. You will be deploying a typical hello world smart contract onto the Alfajores testnet with typical Ethereum tools like Truffle and Ganache. - -## Setup - -This guide assumes that you have a basic Node/[NPM](https://www.npmjs.com/get-npm) setup. If so, you can install truffle with: - -```text -npm install -g truffle -``` - -{% hint style="info" %} -[Learn more about the Truffle development framework here.](https://www.trufflesuite.com/docs/truffle/overview) -{% endhint %} - -As you may know, Truffle is built for Ethereum developers. Because Celo has a similar network architecture and runs the Ethereum Virtual Machine, Celo developers are able to leverage many Ethereum developer tools. But it is important to keep in mind the differences. If you haven't already, please review the Celo overview. - -{% page-ref page="../../overview.md" %} - -[Clone this Truffle project from GitHub to get started](https://github.com/critesjosh/hello_contract-truffle). - -``` -git clone https://github.com/critesjosh/hello_contract-truffle.git -``` - -This is a basic truffle project, with some additional files to help us with account management and deploying to a remote Celo test net node. Run `npm install` to install of the project dependencies. - -## Hello World! - -Add a contract with the command - -```text -truffle create contract HelloWorld -``` - -We will not go into the details of how to write Solidity in this exercise, but you can learn more at the [Solidity documentation page](https://solidity.readthedocs.io/en/latest/). - -The contract will just store a name for now: - -```text - -pragma solidity >=0.5.0 <0.8.0; - -contract HelloWorld { - string name = 'Celo'; - - function getName() public view returns (string memory) { - return name; - } - - function setName(string calldata newName) external { - name = newName; - } -} -``` - -## Prepare Deployment - -### Compile the contract - -Before you deploy the contract, you need to compile the Solidity code into Ethereum bytecode. The following truffle command will look in the `./contracts` directory and compile any new or updated Solidity (`.sol`) contracts. - -``` -truffle compile -``` - -After compiling the contract, you need to create a migration to deploy the contract. For that, create a file in the `./migrations/` folder named `2_deploy_helloworld.js`: - -{% hint style="info" %} -[Learn more about Truffle migrations here.](https://www.trufflesuite.com/docs/truffle/getting-started/running-migrations) -{% endhint %} - -```javascript -var HelloWorld = artifacts.require('HelloWorld') - -module.exports = function (deployer) { - deployer.deploy(HelloWorld) -} -``` - -{% hint style="info" %} -You can [learn more about Truffle configuration options here.](https://www.trufflesuite.com/docs/truffle/reference/configuration) -{% endhint %} - -## Deploy to Alfajores \(Remotely\) - -When you deploy contracts to the Celo network with a remote node, you have to sign the contract deployment transaction locally before sending it to the remote node to be broadcast to the network. This presents some unique challenges when using Ethereum development tools \(like Truffle\) because Celo transaction objects are slightly different than Ethereum transaction objects. - -When you are ready to deploy your contract to Alfajores, you'll need a Celo client connected to the testnet. In this exercise you will connect to a remote node to read and write to the public testnet (Alfajores), but you could also run a testnet node locally to perform the same actions. - -Here are the steps to go through to deploy the contract to the Alfajores testnet. - -1. Connect to Forno \(a remote Celo node service provider\) -2. Get personal account information \(generate a private key if required, stored in `./.secret`\) -3. Get your personal account address and fund it via the [faucet](https://celo.org/build/faucet) -4. Get the compiled contract bytecode -5. Create and sign the contract deployment transaction -6. Send transaction to the network - -Make sure the dependencies are installed with: - -```text -npm install -``` - -Run the provided script with: - -```text -node celo_deploy.js -``` - -```javascript -// celo_deploy.js - -const Web3 = require('web3') -const ContractKit = require('@celo/contractkit') -const web3 = new Web3('https://alfajores-forno.celo-testnet.org') -const kit = ContractKit.newKitFromWeb3(web3) -const getAccount = require('./getAccount').getAccount - -async function awaitWrapper(){ - let account = await getAccount() - - // This account must have a CELO balance to pay tx fees - // get some testnet funds at https://celo.org/build/faucet - console.log(account.address) - - //... -} - -awaitWrapper() -``` - -The provided code will import the contract kit and connect to the remote node. It will look for a private key in the `./.secret` file, and if it doesn't find one, it will generate a new one. Once it gets the key, it will print the associated account. This is the account that we will fund with the faucet. - -If you go to the [Alfajores Faucet Page](https://celo.org/build/faucet), you can faucet your account some CELO and see your balance increase. - -Then add your account to the `kit` with the private key: - -```javascript - kit.connection.addAccount(account.privateKey) // this account must have a CELO balance to pay transaction fees -``` - -### Deploy the contract - -#### Truffle Deployment - -Before you can use truffle for the migration, you need to set up the proper configuration in `./truffle-config.js`. At the top of `./truffle-config.js`, set up the `kit` by connecting to the test network and adding the account you just funded. - -```javascript -const Web3 = require('web3') -const ContractKit = require('@celo/contractkit') -const web3 = new Web3('https://alfajores-forno.celo-testnet.org') -const kit = ContractKit.newKitFromWeb3(web3) -const getAccount = require('./getAccount').getAccount - -async function awaitWrapper(){ - let account = await getAccount() - kit.connection.addAccount(account.privateKey) -} -awaitWrapper() -``` - -Then, in the `networks` object, you can add the initialized `kit`provider to an `alfajores` property. - -```javascript - networks: { - test: { - host: "127.0.0.1", - port: 7545, - network_id: "*" - }, - alfajores: { - provider: kit.connection.web3.currentProvider, // CeloProvider - network_id: 44787 // Alfajores network id - } - } -``` - -Now, deploy the contracts to Alfajores with this command: - -```javascript -truffle migrate --network alfajores -``` - -#### Custom Node.js Deployment - -In this section, you will deploy a contract using a simple Node.js script to show how you can do it without using Truffle. - -You need to compile the `HelloWorld.sol` contract using \(if it isn't already\): - -```javascript -truffle compile -``` - -This command will generate a `HelloWorld.json` file in the `./build/contracts/` directory. `HelloWorld.json` contains a lot of data about the contract, compiler and low level details. Import this file into the deployment script `celo_deploy.js` with: - -```javascript -const HelloWorld = require('./build/contracts/HelloWorld.json') -``` - -You are finally ready to deploy the contract. Use the `kit`to create a custom transaction that includes the contract bytecode. - -```javascript - let tx = await kit.connection.sendTransaction({ - from: account.address, - data: HelloWorld.bytecode // from ./build/contracts/HelloWorld.json - }) -``` - -{% hint style="info" %} -To deploy a contract on Celo, use the `kit.connection.sendTransaction()` function with no `to:` field and the contract bytecode in the `data` field. The account that you are sending the transaction from must have enough CELO to pay the transaction fee, unless you specify another currency as the `feeCurrency`, then you need enough of that currency to pay the transaction fee. -{% endhint %} - -The entire deployment script is less than 20 lines of code. - -```javascript -const Web3 = require('web3') -const ContractKit = require('@celo/contractkit') -const web3 = new Web3('https://alfajores-forno.celo-testnet.org') -const kit = ContractKit.newKitFromWeb3(web3) -const getAccount = require('./getAccount').getAccount -const HelloWorld = require('./build/contracts/HelloWorld.json') - -async function awaitWrapper(){ - let account = await getAccount() - console.log(account.address) - kit.connection.addAccount(account.privateKey) // this account must have a CELO balance to pay transaction fees - - let tx = await kit.connection.sendTransaction({ - from: account.address, - data: HelloWorld.bytecode - }) - - const receipt = await tx.waitReceipt() - console.log(receipt) -} - -awaitWrapper() -``` - -Congratulations! You have deployed your first contract onto Celo! You can verify your contract deployment on [Blockscout](https://alfajores-blockscout.celo-testnet.org/). You can get the transaction hash from the receipt and look it up on the block explorer. - -### Interacting with Custom Contracts - -Now HelloWorld.sol is deployed onto the Alfajores testnet. How can you interact with the deployed contract using ContractKit? `helloWorld.js` includes some example code that shows how you can do this. - -There are 3 functions defined in `helloWorld.js` that accomplish this. - -The first function, `initContract()`, reads the deployed contract information from the Truffle artifact at `HelloWorld.json`. With this information, you can create a new web3.js Contract instance: - -```javascript -async function initContract(){ - // Check the Celo network ID - const networkId = await web3.eth.net.getId() - - // Get the contract associated with the current network - const deployedNetwork = HelloWorld.networks[networkId] - - // Create a new contract instance with the HelloWorld contract info - let instance = new kit.web3.eth.Contract( - HelloWorld.abi, - deployedNetwork && deployedNetwork.address - ) - - getName(instance) - setName(instance, "hello world!") -} -``` - -After creating the contract instance, the `initContract()` function calls `getName()` and `setName()`. - -The `getName()` function will call, return and print the `getName()` function of the provided instance of the HelloWorld contract. - -```javascript -async function getName(instance){ - let name = await instance.methods.getName().call() - console.log(name) -} -``` - -The `setName()` function is a bit more involved. First, it gets the account key from the provided `./secret` file, just like in `celo_deploy.js`. Then it creates a `txObject` that encodes a smart contract transaction call to `setName()` with the provided `newName` to the provided instance of the HelloWorld contract. Then the function sends the encoded transaction object to the network, waits for a reciept and prints it to the console. - -```javascript -async function setName(instance, newName){ - let account = await getAccount() - - // Add your account to ContractKit to sign transactions - // This account must have a CELO balance to pay tx fees, get some https://celo.org/build/faucet - kit.connection.addAccount(account.privateKey) - const txObject = await instance.methods.setName(newName) - let tx = await kit.sendTransactionObject(txObject, { from: account.address }) - - let receipt = await tx.waitReceipt() - console.log(receipt) -} -``` - -The above method shows a more detail about how to create custom deployment transactions and scripts than the previous method. - -As you can see, all the goodies from Ethereum apply to Celo, so virtually all tutorials and other content should be easily translatable to Celo. - -Check out [https://celo.org/build](https://celo.org/build) for more resources! diff --git a/packages/docs/developer-resources/walkthroughs/hello-mobile-dapp.md b/packages/docs/developer-resources/walkthroughs/hello-mobile-dapp.md deleted file mode 100644 index 585162180fc..00000000000 --- a/packages/docs/developer-resources/walkthroughs/hello-mobile-dapp.md +++ /dev/null @@ -1,162 +0,0 @@ -# Hello Mobile Dapp - -This tutorial includes a walk through of a truffle box to get you started with developing React Native dapps on Celo. We will touch on several key concepts in Celo dapp development including: - - Creating accounts (private keys) - - Basic smart contract development in Solidity - - Sending transactions to a Celo network - - View transactions with a block explorer - - Mobile development using React Native and Expo - -**Mandatory:** Make sure that you have the [Yarn package manager](https://yarnpkg.com/), [Truffle](https://www.trufflesuite.com/truffle) installed and **are using Node.js v12.x**, then `$ truffle unbox critesjosh/celo-dappkit` in your new project directory. This will download the code from [this GitHub repo](https://github.com/critesjosh/celo-dappkit) to get you started. - -Use this [Truffle Box](https://www.trufflesuite.com/boxes) to get started building a mobile dapp using Celo and React Native in Javascript. We will build a simple React Native application that we can use to read and update a contract on the Alfajores test network. - -Once you download the box, run `$ yarn` to install the necessary smart contract development dependencies. Navigate to the client directory and run `$ yarn` again to install the client application dependencies. - -This Truffle box uses React Native and Expo for developing a mobile first Celo blockchain experience. You will also need Expo installed globally on your machine. Install it with: - -``` -$ npm install expo-cli --global -``` - -## Smart contract development - -The project comes with a Hello World example contract in the root contracts directory. The box is also configured to deploy Solidity smart contracts to the Alfajores test network, but you will need test network funds to pay for the deployment costs. - -Run -``` -$ npm run account -``` -to create a new account for development. The new account address will be printed in the console. This script will generate a private key for you and store it in `/.secret`. If you need to print the account info again, run `$ npm run account` again, it will not create a new account, it will read the saved private key and print the corresponding account address. - -Truffle will read this private key for contract deployments. - -Copy your account address and paste it in to the [Alfajores faucet](https://celo.org/developers/faucet) to fund your account. - -You can migrate the `HelloWorld.sol` contract to the alfajores test network with -```bash -$ truffle migrate --network alfajores -``` -To run a local development Celo blockchain, use the Celo fork of `ganache-cli`. You can find the package details and install instructions [here.](https://www.npmjs.com/package/@celo/ganache-cli) - -You should deploy the `HelloWorld.sol` contract to work through the exercise. You can deploy it using the remote node specified in `truffle-config.js`. You may get an error about connecting to a running RPC client. If you run into the error, trying running `truffle migrate --network alfajores` again. A successful deployment should print something like the following: - -``` -Joshs-MacBook-Pro-2:untitled folder joshcrites$ truffle migrate --network alfajores - -Compiling your contracts... -=========================== -> Everything is up to date, there is nothing to compile. - - -Starting migrations... -====================== -> Network name: 'alfajores' -> Network id: 44787 -> Block gas limit: 0x1312d00 - - -1_initial_migration.js -====================== - - Deploying 'Migrations' - ---------------------- - > transaction hash: 0x8a7d5f323ef9e356407566ded4d191e3b68b0ba579c5a7b920e5dea3936bb101 - > Blocks: 0 Seconds: 4 - > contract address: 0x6363f95B5dDe5bbb1A73dbdc752036e105769207 - > block number: 587188 - > block timestamp: 1583779418 - > account: 0x0ac6eDb733EAB57f8fa6c0F8678de0b9ef950bc6 - > balance: 4.98552399999999992 - > gas used: 188419 - > gas price: 20 gwei - > value sent: 0 ETH - > total cost: 0.00376838 ETH - - - > Saving migration to chain. - > Saving artifacts - ------------------------------------- - > Total cost: 0.00376838 ETH - - -2_deploy_contracts.js -===================== - - Deploying 'HelloWorld' - ---------------------- - > transaction hash: 0xb48d8f2da01f49b6ebe3dd2391b289c735afd2ec1b57902a5bd3958c4b5773b3 - > Blocks: 1 Seconds: 4 - > contract address: 0xD9BBC1c3C76bd285C33de5Df4b987369EC66DC56 - > block number: 587190 - > block timestamp: 1583779428 - > account: 0x0ac6eDb733EAB57f8fa6c0F8678de0b9ef950bc6 - > balance: 4.979126059999999888 - > gas used: 277896 - > gas price: 20 gwei - > value sent: 0 ETH - > total cost: 0.00555792 ETH - - - > Saving migration to chain. - > Saving artifacts - ------------------------------------- - > Total cost: 0.00555792 ETH - - -Summary -======= -> Total deployments: 2 -> Final cost: 0.0093263 ETH -``` -Since we are developing this on the public Alfajores test network, we can view all the accounts, contracts and transactions on the [public block explorer](https://alfajores-blockscout.celo-testnet.org/). - -You can look up the contract deployment transaction on the Alfajores block explorer via the transaction hash, [https://alfajores-blockscout.celo-testnet.org/tx/0xb48d8f2da01f49b6ebe3dd2391b289c735afd2ec1b57902a5bd3958c4b5773b3](https://alfajores-blockscout.celo-testnet.org/tx/0xb48d8f2da01f49b6ebe3dd2391b289c735afd2ec1b57902a5bd3958c4b5773b3) in this case. - -Truffle will save the deployment information to the Truffle artifact located at `client/contracts/HelloWorld.json`. You will use this deployment information to connect your React Native application to the correct contract. - -## Developing the mobile application - -Keep in mind that you will need a version of the Celo Wallet installed on the mobile device with which you are developing the application. The Celo Wallet is the private key management software used to sign transactions for the user. - -You can build a the latest version of the Celo Wallet and find instructions on running a development build [here.](https://github.com/celo-org/celo-monorepo/tree/master/packages/mobile) Once you have a device with the Celo wallet installed, you can start working on your application. - -For the purposes of introduction, we have added some code to you get you started located in App.js in the `client` directory. - -### Application development with Expo - -In this project, the React Native application lives in the `client` directory. `cd` into the client directory and run `$ yarn` to install the dependencies. - -[Expo](https://expo.io/) is a tool that makes developing React Native applications much easier. We will be using Expo for easy setup. - -Install it with: -``` -$ npm install expo-cli --global -``` - -You can start the application with -``` -$ expo start -``` - -You can use your physical mobile device or an emulator to develop apps with Expo. If you want to use your physical device, you will have to [install the Expo app on your device.](https://expo.io/learn) - -### Using an emulator - -You can find more information about running and Android emulator [here.](https://developer.android.com/studio/run/emulator-commandline) - -## Celo Dapp Examples - -[Celo Savings Circle](https://github.com/celo-org/savings-circle-demo) - -## Wrapping up - -You should now have the necessary skills to get started with developing mobile applications on Celo. In this tutorial we covered: - - Creating accounts (private keys) - - Basic smart contract development in Solidity - - Sending transactions to a Celo network - - View transactions with a block explorer - - Mobile development using React Native and Expo - -This is not a comprehensive tutorial for Celo's features and capabilities, keep exploring the docs to learn more and please [connect with us on Discord](https://chat.celo.org) if you need any help (or just want to chat)! - diff --git a/packages/docs/developer-resources/walkthroughs/hellocelo.md b/packages/docs/developer-resources/walkthroughs/hellocelo.md deleted file mode 100644 index b0b157d79fe..00000000000 --- a/packages/docs/developer-resources/walkthroughs/hellocelo.md +++ /dev/null @@ -1,307 +0,0 @@ ---- -description: >- - In this guide we are going to learn how to connect to the Celo test network and tranfer tokens - using ContractKit. ---- - -# Hello Celo: sending value with Celo - -In this guide we are going to write a Node.js script to introduce some of the basic concepts that are important to understand how Celo works. This will get us started with connecting to the Celo network and learning how to develop more advanced applications. - -{% hint style="info" %} -We assume you already have Node.js and NPM installed on your computer. -{% endhint %} - -## Learning Objectives - -At the end of this guide, you will be able to: - -* Connect to the Celo test network, called Alfajores -* Get test CELO and Celo Dollars (cUSD) from the faucet -* Read account and contract information from the test network -* Transferring CELO and cUSD on the test network - -## Getting Started - -To start, [clone this GitHub repo](https://github.com/critesjosh/helloCelo). This is a Node.js application. - -``` -git clone https://github.com/critesjosh/helloCelo.git -``` - -We will be using the Celo ContractKit SDK to interact with the Celo test network (Alfajores). Let's install it. It is already defined in the package.json, so we can get it with - -``` -cd helloCelo -npm install -``` - -## Importing ContractKit - -We will be writing our Node.js app in the `helloCelo.js` file. - -Import the contract kit into our script with - -```javascript -// 1. Import web3 and contractkit -const Web3 = require("web3") -const ContractKit = require('@celo/contractkit') -``` - -Now we can use the ContractKit to connect to the test network. - -```javascript -// 2. Init a new kit, connected to the alfajores testnet -const web3 = new Web3('https://alfajores-forno.celo-testnet.org') -const kit = ContractKit.newKitFromWeb3(web3) -``` - -{% hint style="info" %} -At any point in the file you can `console.log()` variables to print their output when you run the script. -{% endhint %} - -## Reading Alfajores - -ContractKit contains a `contracts` property that we can use to access certain information about deployed Celo contracts. - -{% hint style="info" %} -The Celo blockchain has two native assets, CELO \(CELO\) and the Celo Dollar \(cUSD\). Both of these assets implement the [ERC20 token standard](https://eips.ethereum.org/EIPS/eip-20) from Ethereum. The CELO asset is managed by the CELO smart contract and Celo Dollars is managed by the cUSD contract. We can access the CELO contract via the SDK with `kit.contracts.getGoldToken()` and the cUSD contract with `kit.contracts.getStableToken()`. These functions return promises, so we have to wait for them to resolve before we can interact with the token contracts. If you are unfamiliar with Promises in Javascript, [check out this documentation.](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) Promises are a common tool in blockchain development. In this guide, we use the [async/await syntax for promises](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/await). -{% endhint %} - -Let's read some token balances from the blockchain. Add the following line in the `readAccount()` function. - -```javascript -// 3. Get the token contract wrappers -let goldtoken = await kit.contracts.getGoldToken() -let stabletoken = await kit.contracts.getStableToken() -``` - -We can get the CELO balance of an account using the token wrappers like `goldtoken.balanceOf(address)`. Let's check the balance of this address `'0xD86518b29BB52a5DAC5991eACf09481CE4B0710d'`. - -```javascript -// 4. Address to look up -let anAddress = '0xD86518b29BB52a5DAC5991eACf09481CE4B0710d' - -// 5. Get token balances -let celoBalance = await goldtoken.balanceOf(anAddress) -let cUSDBalance = await stabletoken.balanceOf(anAddress) - -// Print balances -console.log(`${anAddress} CELO balance: ${celoBalance.toString()}`) -console.log(`${anAddress} cUSD balance: ${cUSDBalance.toString()}`) -``` - -The `balanceOf(address)` function also returns a Promise, so we wait for the promise to resolve then we print the result. - -To view the balances, run the script from the termainal with - -``` -node helloCelo.js -``` - -{% hint style="info" %} -Note that the `balanceOf()` function returns objects with type [BigNumber](https://github.com/MikeMcl/bignumber.js/) because balances are represented in Celo as a 256 bit unsigned integer, and JavaScript's number type cannot safely handle numbers of that size. Note also that the balance values are reported in units of CELO Wei, where one CELO = 10\*\*18 CELO Wei. -{% endhint %} - -Reading all account balances is a powerful feature of blockchains. Next, let's see how we can send value to each other on the testnet. - -In order to do transfers (aka [transactions](https://docs.celo.org/getting-started/glossary#transaction)), we need to: - -1. Create an [account](https://docs.celo.org/getting-started/glossary#account) \(by creating a private key\) -2. Fund it with test CELO and cUSDs -3. Sign and send transactions to the network - -## Accounts - -We are accessing the Celo network via a remote [node](https://docs.celo.org/getting-started/glossary#node) via HTTP requests at `'https://alfajores-forno.celo-testnet.org'`. - -{% hint style="info" %} -Don't worry about what this means right now, just understand that it is easier to get started using Celo by accessing remote nodes, rather than running them locally on your machine. You can [read more about the details of the Celo network here.](https://github.com/critesjosh/celo-monorepo/tree/8542c1bc3ad32bc48eed33073f4d34a36fd91fae/packages/docs/celo-sdk/walkthroughs/overview.md#topology-of-a-celo-network) -{% endhint %} - -Because we are accessing the network remotely, we need to generate an account to sign transactions and fund that account with test CELO. - -There is a short script in `getAccount.js` to either get a Celo account from a mnemonic in the `.secret` file, or create a random account if the file is empty. In the script, we use`web3.js` to create a new private key/account pair. [Web3.js](https://web3js.readthedocs.io/) is a popular javascript library for handling Ethereum related functionality. Celo is a cousin of Ethereum, so this library works well for generating Celo accounts. - -{% hint style="danger" %} -This is not the standard way of managing Celo accounts. In a production environment, the [Celo Wallet](../../celo-codebase/wallet/) will manage accounts for you. Accessing accounts from the Celo Wallet will be discussed in future guides. -{% endhint %} - -We can now use this `account` to get account information \(ie the private key and account address\) and to send transactions from `account.address`. Add the following code to read the account balance. Continue adding to `helloCelo.js`. - -```javascript -// -// Create an Account -// - -// 6. Import the getAccount function -const getAccount = require('./getAccount').getAccount - -async function createAccount(){ - // 7. Get your account - let account = await getAccount() - - // 8. Get the token contract wrappers - let goldtoken = await kit.contracts.getGoldToken() - let stabletoken = await kit.contracts.getStableToken() - - // 9. Get your token balances - let celoBalance = await goldtoken.balanceOf(account.address) - let cUSDBalance = await stabletoken.balanceOf(account.address) - - // Print your account info - console.log(`Your account address: ${account.address}`) - console.log(`Your account CELO balance: ${celoBalance.toString()}`) - console.log(`Your account cUSD balance: ${cUSDBalance.toString()}`) -} -``` - -Run this script again with `node helloCelo.js`. This will print `0`, as we have not funded the associated account yet. - -## Using the faucet - -We can get free test CELO and cUSDs on the test network for development via [the Celo Alfajores faucet](https://celo.org/build/faucet). - -Copy your randomly generated account address from the console output mentioned above, and paste it into the faucet. - -Once your account has been funded, run `$ node helloCelo.js` again to see your updated balance. - -## Sending Value - -We have an account with CELO and cUSD in it, now how do we send tokens to another account? Remember the token wrappers we used to read account balances earlier? We can use the same wrappers to send tokens, you just need to add the private key associated with your account to ContractKit \(see line 10\). - -The token wrappers have a method called `transfer(address, amount)` that allows you to send value to the specified address \(line 14\). - -You need to `send()` the transaction to the network after you construct it. The `send()` methods accepts an option that allows you to specify the `feeCurrency`, which allows the sender to pay transaction fees in CELO or cUSD. The default `feeCurrency` is CELO. In the following example, let's pay transaction fees in CELO when we transfer CELO and pay with cUSD when we transfer cUSD. - -The `send()` method returns a transaction object. We will wait for the transaction receipt \(which will be returned when the transaction has been included in the blockchain\) and print it when we get it. This receipt contains information about the transaction. - -After we read the receipt, we check the balance of our account again, using the `balanceOf()` function. The logs print our updated balance! - -You may notice that the account balance is a bit smaller than the amount of tokens that we sent. This is because you have to pay for every update to the network. - -Add the following code to the `send()` function in `helloCelo.js` to send a transaction. - -```javascript -async function send(){ - // 10. Get your account - let account = await getAccount() - - // 11. Add your account to ContractKit to sign transactions - kit.connection.addAccount(account.privateKey) - - // 12. Specify recipient Address - let anAddress = '0xD86518b29BB52a5DAC5991eACf09481CE4B0710d' - - // 13. Specify an amount to send - let amount = 100000 - - // 14. Get the token contract wrappers - let goldtoken = await kit.contracts.getGoldToken() - let stabletoken = await kit.contracts.getStableToken() - - // 15. Transfer CELO and cUSD from your account to anAddress - // Specify cUSD as the feeCurrency when sending cUSD - let celotx = await goldtoken.transfer(anAddress, amount).send({from: account.address}) - let cUSDtx = await stabletoken.transfer(anAddress, amount).send({from: account.address, feeCurrency: stabletoken.address}) - - // 16. Wait for the transactions to be processed - let celoReceipt = await celotx.waitReceipt() - let cUSDReceipt = await cUSDtx.waitReceipt() - - // 17. Print receipts - console.log('CELO Transaction receipt: %o', celoReceipt) - console.log('cUSD Transaction receipt: %o', cUSDReceipt) - - // 18. Get your new balances - let celoBalance = await goldtoken.balanceOf(account.address) - let cUSDBalance = await stabletoken.balanceOf(account.address) - - // 19. Print new balance - console.log(`Your new account CELO balance: ${celoBalance.toString()}`) - console.log(`Your new account cUSD balance: ${cUSDBalance.toString()}`) -} -``` - -Run `$ node helloCelo.js` again to send the transactions and see the printed output in the console. - -## Connecting to a Ledger Device from a Web Application - -The above instructions apply to building NodeJS applications. If you want to build an integration with a web application, you can still use the ContractKit by following slightly modified instructions. - -The following code examples are typescript so should be stored in a `.tsc` file, you will also need to install typescript and then compile your typescript to javascript with `npx tsc` before you can run the code with node. - -``` -npm install --save-dev typescript -npm install web3 @celo/contractkit @celo/wallet-ledger @ledgerhq/hw-app-eth @ledgerhq/hw-transport-u2f @ledgerhq/hw-transport-webusb -``` - -Then, you can create a new instance of the ContractKit with the following code: - -```javascript -import { ContractKit, newKitFromWeb3 } from "@celo/contractkit"; -import { newLedgerWalletWithSetup } from "@celo/wallet-ledger"; -import Eth from "@ledgerhq/hw-app-eth"; -import TransportU2F from "@ledgerhq/hw-transport-u2f"; -import TransportUSB from "@ledgerhq/hw-transport-webusb"; -import Web3 from "web3"; - -// Handle getting the Celo Ledger transport. -const getCeloLedgerTransport = () => { - if (window.USB) { - return TransportUSB.create(); - } else if (window.u2f) { - return TransportU2F.create(); - } - - throw new Error("Ledger Transport not support, please use Chrome, Firefox, Brave, Opera or Edge."); -}; - -// Handle creating a new Celo ContractKit -const getContractKit = async () => { - // Create a Web3 provider by passing in the testnet/mainnet URL - const web3 = new Web3("https://alfajores-forno.celo-testnet.org"); - - // Get the appropriate Ledger Transport - const transport = await getCeloLedgerTransport(); - - // Create a new instance of the ETH Ledger Wallet library - const eth = new Eth(transport); - - // Use the Celo Ledger Wallet setup util - const wallet = await newLedgerWalletWithSetup(eth.transport); - - // Instantiate the ContractKit - const kit: ContractKit = newKitFromWeb3(web3, wallet); - - return kit; -}; -``` - -Once you have successfully created the ContractKit, you can use the various Celo contracts to sign transactions with a connected Ledger device. For example, here's how to transfer gold tokens (just like above in the NodeJS example): - -```javascript -// Use the gold token contract to transfer tokens -const transfer = async (from, to, amount) => { - const goldTokenContract = await kit.contracts.getGoldToken(); - const tx = await goldTokenContract.transfer(to, amount).send({ from }); - const receipt = await tx.waitReceipt(); - console.log("Transaction Receipt: ", receipt); -}; -``` - -This is the basic setup to integrate the Celo Ledger App with a web application. You can also view the [Celo Ledger App example codebase](https://github.com/celo-org/celo-ledger-web-app) for some other examples of connecting to a Ledger Device from a web application. - -## Wrapping Up - -Congratulations! You have accomplished a lot in this short introduction to developing on Celo. - -We covered: - -* Installing and setting up ContractKit -* Connecting to the Celo Alfajores network -* Getting the CELO contract wrapper -* Reading account balances using the CELO wrapper -* Generating a new account in Celo -* Funding an account using the Celo Alfajores Faucet -* Sending CELO diff --git a/packages/docs/developer-resources/walkthroughs/hellocontracts.md b/packages/docs/developer-resources/walkthroughs/hellocontracts.md deleted file mode 100644 index c649737f9d2..00000000000 --- a/packages/docs/developer-resources/walkthroughs/hellocontracts.md +++ /dev/null @@ -1,197 +0,0 @@ -# Hello Contracts: writing and deploying Celo contracts - -This guide walks you through the basics of how to deploy your own smart contracts on Celo networks. As Celo is fully EVM compliant, we inherit the rich developer ecosystem and tooling of the Ethereum community. We will be deploying a typical hello world smart contract onto the Alfajores testnet with typical Ethereum tools like Truffle and Ganache. - -## Setup - -This guide assumes that you have a basic Node/[NPM](https://www.npmjs.com/get-npm) setup. If so, you can install truffle with: - -``` -npm install -g truffle -``` - -In your desired project folder, intiialize a new truffle project: - -``` -truffle init -``` - -## Hello World! - -Let's add a contract with - -``` -truffle create contract HelloWorld -``` - -Our contract will just store a name for now: - -```solidity -pragma solidity >=0.5.0 <0.7.0; - -contract HelloWorld { - string name = 'Celo'; - - function getName() public view returns (string memory) { - return name; - } - - function setName(string calldata newName) external { - name = newName; - } -} -``` - -## Deploy locally - -Let's create a migration to deploy the contract. For that, we need to create a file in the `migrations` folder named `2_deploy_helloworld.js`: - -```javascript -var HelloWorld = artifacts.require('HelloWorld') - -module.exports = function (deployer) { - deployer.deploy(HelloWorld) -} -``` - -To be able to actually deploy it though, we need a blockchain. For local development and testing, you can use our fork of ganache: - -``` -npm install -g @celo/ganache-cli -``` - -And then start ganache with: - -``` -ganache-cli --port 7545 -``` - -In your `truffle-config.js`, you'll want to add your local test network under networks: - -``` - networks: { - test: { - host: "127.0.0.1", - port: 7545, - network_id: "*" - } - } -``` - -Then you can deploy your contract to your local network first: - -``` -truffle migrate --network test -``` - -You can interact with your contract by running the truffle console: - -``` -truffle console --network test -truffle(test)> contract = await HelloWorld.deployed() -undefined -truffle(test)> contract.getName() -'Celo' -truffle(test)> contract.setName('MyName') -{ tx: -... -truffle(test)> contract.getName() -'MyName' -``` - -## Deploy to Alfajores - -When you are ready to deploy your contract to Alfajores, you'll need a Celo client connected to the testnet. We'll run a node somewhat similarly to the [Instructions of running a full node on Baklava](/getting-started/baklava-testnet/running-a-full-node): - -```bash -export CELO_IMAGE=us.gcr.io/celo-org/geth:alfajores -``` - -### Pull the Celo Docker image - -We're going to use a Docker image containing the Celo node software in this tutorial. - -If you are re-running these instructions, the Celo Docker image may have been updated, and it's important to get the latest version. - -```bash -docker pull $CELO_IMAGE -``` - -### Set up a data directory - -First, create the directory that will store your node's configuration and its copy of the blockchain. This directory can be named anything you'd like, but here's a default you can use. The commands below create a directory and then navigate into it. The rest of the steps assume you are running the commands from inside this directory. - -```bash -mkdir celo-data-dir -cd celo-data-dir -``` - -### Create an account and get its address - -In this step, you'll create an account on the network. If you've already done this and have an account address, you can skip this and move on to configuring your node. - -Run the command to create a new account: - -```bash -docker run -v $PWD:/root/.celo --rm -it $CELO_IMAGE account new -``` - -It will prompt you for a passphrase, ask you to confirm it, and then will output your account address: `Address: {` - -Save this address to an environment variables, so that you can reference it below (don't include the braces): - -```bash -export CELO_ACCOUNT_ADDRESS= -``` - -_Note: this environment variable will only persist while you have this terminal window open. If you want this environment variable to be available in the future, you can add it to your `~/.bash_profile_ - -### Start the node - -This command specifies the settings needed to run the node, and gets it started. - -```bash -docker run --name celo-ultralight-node -d --restart unless-stopped -p 127.0.0.1:8545:8545 -v $PWD:/root/.celo $CELO_IMAGE --verbosity 3 --syncmode lightest --rpc --rpcaddr 0.0.0.0 --rpcapi eth,net,web3,debug,admin,personal --etherbase $CELO_ACCOUNT_ADDRESS --alfajores --datadir=/root/.celo --allow-insecure-unlock -``` - -You can follow the logs with - -```bash -docker logs -f celo-ultralight-node -``` - -After a few seconds of syncing (with [Celo's ultralight sync](../../celo-codebase/protocol/consensus/ultralight-sync.md)), you should be able to query the balance of your account: - -```bash -docker exec celo-ultralight-node geth attach --exec 'eth.getBalance("")' -``` - -If you go to our [Alfajores Faucet Page](https://celo.org/build/faucet), you should be able to faucet your account some CELO and see your balance increase with the above command. - -### Deploy the contract - -We are finally ready to deploy the contract. First let's unlock the account: - -```bash -docker exec celo-ultralight-node geth attach --exec 'personal.unlockAccount("", "")' -``` - -In your `truffle-config.js` reference your node: - -``` -alfajores: { - host: "127.0.0.1", - port: 8545, - network_id: 44787 -} -``` - -Then you should be able to deploy your contract with: - -``` -truffle migrate --network alfajores -``` - -You can verify your contract deployment on [Blockscout](https://alfajores-blockscout.celo-testnet.org/), as well as interact with your new contract with the `truffle console --network alfajores`. Congratulations! - -As you can see, all the goodies from Ethereum apply to Celo, so virtually all tutorials and other content should be easily translatable to Celo. Check out [https://celo.org/build](https://celo.org/build) for more resources! diff --git a/packages/docs/developer-resources/walkthroughs/hellodapp.md b/packages/docs/developer-resources/walkthroughs/hellodapp.md deleted file mode 100644 index 8a2c4e204ad..00000000000 --- a/packages/docs/developer-resources/walkthroughs/hellodapp.md +++ /dev/null @@ -1,3 +0,0 @@ -# Building a dApp on Celo - -Coming Soon! diff --git a/packages/docs/developer-resources/walkthroughs/hellodeploy.md b/packages/docs/developer-resources/walkthroughs/hellodeploy.md deleted file mode 100644 index add19563df2..00000000000 --- a/packages/docs/developer-resources/walkthroughs/hellodeploy.md +++ /dev/null @@ -1,3 +0,0 @@ -# Deploying an Ethereum project to Celo - -Coming Soon! diff --git a/packages/docs/developer-resources/walkthroughs/using-js-keystores.md b/packages/docs/developer-resources/walkthroughs/using-js-keystores.md deleted file mode 100644 index 1e679f6e10c..00000000000 --- a/packages/docs/developer-resources/walkthroughs/using-js-keystores.md +++ /dev/null @@ -1,138 +0,0 @@ -# Keystores Library - -## Overview - -This is a JavaScript library that provides functions for creating and interacting with encrypted keystores for private key management. To do this, this library wraps the existing [`ethereumjs-wallet` library](https://github.com/ethereumjs/ethereumjs-wallet), which is a standard library for managing keystores according to the [Web3 Secret Storage Definition](https://github.com/ethereum/wiki/wiki/Web3-Secret-Storage-Definition). As specified, secrets are encrypted using the Scrypt KDF (Key Derivation Function); in this case, the private key is encrypted with a passphrase (that should be kept secret) and can be decrypted later by the same phrase. Note that a keystore generated for the same (private key, passphrase) multiple times will not yield the same output due to how the KDF works. Keystore files generated by a geth node can be decrypted and accessed with this library, and vice versa. - -**Note that keystore files generated by this library do not contain BLS public keys, meaning that these should not be used for validator signer keys used in consensus.** - -The components of the library are roughly as follows: - -- `KeystoreBase` which wraps the functionality of `ethereumjs-wallet` and exposes functions to: - - import PKs (into encrypted keystores) - - decrypt and get a PK from an encrypted keystore - - change the passphrase on a keystore -- `FileKeystore`, `InMemoryKeystore` which specifiy the IO in addition to the above base class -- `KeystoreWalletWrapper`: (not stable; likely to structurally change) a very simple wrapper for a `Keystore` and `LocalWallet`, which allows a user to decrypt a keystore and pass the key to the `LocalWallet` in order to sign transactions. - -## Usage - -> ⚠️ **Warning** -> -> For accounts containing significant funds or otherwise requiring a high degree of security, we **do not** recommend this keystore library! This is only for managing keys for low-risk hot wallets and signers. - -For more stringent security requirements, check out the guide to [Choosing a Wallet](../../getting-started/wallets.md). - -Depending on your use case, you can either interact directly with the `FileKeystore` (purely for creating and interacting with keystore files, importing or accessing private keys) or else use the `KeystoreWalletWrapper` (combines the keystore functionality with convenient access to the `LocalWallet` for signing tranactions). - -### Using the FileKeystore - -#### Create new keystore and import private key - -This snippet will create a `keystore` directory in the `parentDirectory` and create an encrypted file in the `keystore` directory containing the private key. Note that you can only create a new encrypted file for a private key if there is not already an existing file for that private key. If it already exists, you can change the passphrase (see below), but you may not have multiple files for the same private key in the same `keystore` directory. - -```js -import * as readline from 'readline' -import { FileKeystore } from '@celo/keystores' - -// This is the directory that will contain a "keystore" directory -const parentDirectory = '' -// This creates a "keystore" directory if one does not already exist in the parentDirectory -const keystore = new FileKeystore(parentDirectory) - -// Prompt to enter private key and passphrase on the command line -let rl = readline.createInterface({ - input: process.stdin, - output: process.stdout, -}) -const privateKey: string = await new Promise((resolve) => - rl.question('Enter private key:', (answer) => { - resolve(answer) - }) -) -const passphrase: string = await new Promise((resolve) => - rl.question('Enter secret passphrase:', (answer) => { - rl.close() - resolve(answer) - }) -) -// Import private key into the keystore, which is then stored as an encrypted file -// Should create a file with a name like `UTC--` -await keystore.importPrivateKey(privateKey, passphrase) -// Retrieve all addresses contained in the keystore -console.log('Addresses in keystore: ', await keystore.listKeystoreAddresses()) -``` - -#### Accessing an existing keystore file - -```js -// Keystore already exists -const parentDirectory = '' -const keystore = new FileKeystore(parentDirectory) -const address = '' -const oldPassphrase = '' - -// Decrypt file and retrieve private key -await keystore.getPrivateKey(address, oldPassphrase) - -// Change the passphrase encrypting the file -const newPassphrase = '' -await.keystore.changeKeystorePassphrase(address, oldPassphrase, newPassphrase) - -// Decrypt file and retrieve private key using new passphrase -console.log(await keystore.getPrivateKey(address, newPassphrase)) -``` - -#### Remove (delete) a keystore file for a particular address - -```js -const parentDirectory = '' -const keystore = new FileKeystore(parentDirectory) -const address = '' - -// When you know the address -// Get the filename (keystore name) -const keystoreName = await keystore.getKeystoreName(address) -await keystore.removeKeystore(keystoreName) - -// Alternatively, you can do this by passing in the filename directly -keystore.removeKeystore('') -``` - -### Using the KeystoreWalletWrapper - -This example will instantiate a `KeystoreWalletWrapper`, import a private key, and use the inner `LocalWallet` within the wrapper to sign and send a transaction with `ContractKit`. - -```js -import { newKit } from '@celo/contractkit' -import { FileKeystore, KeystoreWalletWrapper } from '@celo/keystores' - -// This is the directory that will contain a "keystore" directory -const parentDirectory = - '/Users/eelanagaraj/celo/celo-monorepo/packages/sdk/wallets/wallet-keystore/test-keystore-dir' -// Instantiate a KeystoreWalletWrapper using a FileKeystore -const keystoreWalletWrapper = new KeystoreWalletWrapper(new FileKeystore(parentDirectory)) -// Make sure to not commit this if using real funds! -// You can also get this as input on the command-line using `readline` -// as in the example above for FileKeystore -const privateKey = 'YOUR_TEST_PRIVATE_KEY' -const passphrase = 'test-passphrase1! ' - -// Import private key or unlock account -await keystoreWalletWrapper.importPrivateKey(privateKey, passphrase) -// If the keystore file already exists for an address, simply unlock: -// const address = 'YOUR_TEST_ADDRESS' -// await keystoreWalletWrapper.unlockAccount(address, passphrase) - -// Get the wrapper's `LocalWallet` instance and pass this into ContractKit -const wallet = keystoreWalletWrapper.getLocalWallet() -const kit = newKit('https://alfajores-forno.celo-testnet.org', wallet) -const [from] = wallet.getAccounts() - -// Send a test transaction -const gold = await kit.contracts.getGoldToken() -await gold - .transfer('0x22579ca45ee22e2e16ddf72d955d6cf4c767b0ef', '1') - .sendAndWaitForReceipt({ from }) -console.log('Transaction sent!') -``` diff --git a/packages/docs/developer-resources/walkthroughs/wallet-connect.md b/packages/docs/developer-resources/walkthroughs/wallet-connect.md deleted file mode 100644 index b727a718876..00000000000 --- a/packages/docs/developer-resources/walkthroughs/wallet-connect.md +++ /dev/null @@ -1,136 +0,0 @@ -# Integrating WalletConnect into your DApp - -This tutorial will be a basic guide on integrating [WalletConnect V2](https://walletconnect.org/) support into your decentralised application (DApp). Integrating WalletConnect support means users with Valora, [Celo Wallet](https://celowallet.app) and other WalletConnect compatible wallets can interact with your DApp. - -{% hint style="info" %} -If you'd prefer a more managed and opinionated flow for connecting wallets to your DApp, checkout the [use-contractkit](https://github.com/celo-tools/use-contractkit) library. It handles connecting to a variety of wallets (WalletConnect, Ledger, Metamask and more) and is a higher level abstraction than the library we'll be using in this tutorial. -{% endhint %} - -This tutorial is platform independent and using TypeScript, so you may need to sort out a Webpack (or similar bundling tool) build pipeline before usage in your environment of choice. - -## Getting started - -Step one of creating our WalletConnect compatible application is installing the [@celo/wallet-walletconnect](https://www.npmjs.com/package/@celo/wallet-walletconnect) library. - -```bash -yarn add @celo/wallet-walletconnect -``` - -`@celo/wallet-walletconnect` is an abstraction we've built around the base [@walletconnect/client](https://www.npmjs.com/package/@walletconnect/client) library that conforms to the `Wallet` interface commonly used in the Celo ecosystem. The `Wallet` interface has a standardised and convenient API with operations like `sendTransaction`, `signTypedData` that you can use once the wallet has been initialised. - -## Initialise the client - -There's a few properties the `WalletConnectWallet` needs when instantiated, these properties will be shown to your users on their wallet of choice so it's important you specify them. - -```javascript -import { WalletConnectWallet } from '@celo/wallet-walletconnect' - -const wallet = new WalletConnectWallet({ - connect: { - metadata: { - name: 'The name of your awesome DApp', - description: 'Your DApp description', - url: 'https://example.com', - icons: ['https://example.com/favicon.ico'], - }, - }, -}) -``` - -## Establish the connection - -```javascript -import { WalletConnectWallet } from '@celo/wallet-walletconnect' - -async function connect() { - const wallet = new WalletConnectWallet({ - connect: { - metadata: { - name: 'The name of your awesome DApp', - description: 'Your DApp description', - url: 'https://example.com', - icons: ['https://example.com/favicon.ico'], - }, - }, - }) - - const uri = await wallet.getUri() - // display this uri as a QR code to the user - await wallet.init() -} - -connect() -``` - -In this code snippet we're calling the `getUri` function on our `WalletConnectWallet`. This needs to be communicated "out-of-band", or via a QR code, to your user so they can scan it with their wallet. If you're developing a React.js based application, the [react-qr-code](https://www.npmjs.com/package/react-qr-code) library could be a nice option for you here. - -After the wallet has scanned the QR code it should handle establishing a connection and the `await wallet.init()` promise will resolve. - -## Get connected accounts - -After the `WalletConnectWallet` has been initialised you can read the accounts that have been loaded as signers into the wallet. Any account here will be able to sign payloads or send transaction in your DApp. - -```javascript -import { WalletConnectWallet } from '@celo/wallet-walletconnect' - -async function connect() { - const wallet = new WalletConnectWallet({ - connect: { - metadata: { - name: 'The name of your awesome DApp', - description: 'Your DApp description', - url: 'https://example.com', - icons: ['https://example.com/favicon.ico'], - }, - }, - }) - - const uri = await wallet.getUri() - // display this uri as a QR code to the user - await wallet.init() - - // an array of addresses you can use to sign and - // send transactions - const accounts = await wallet.getAccounts() -} - -connect() -``` - -## Initialise ContractKit - -As a final step, `WalletConnectWallet` (and any library that implements the `Wallet` interface we mentioned earlier) integrates natively with [@celo/contractkit](https://docs.celo.org/developer-guide/contractkit). This means you can start sending various transactions as soon as the wallet is initialised. Here's a full example displaying the end-to-end flow of connecting and sending transferring some CELO. - -```javascript -import { newKit } from '@celo/contractkit' -import { WalletConnectWallet } from '@celo/wallet-walletconnect' - -async function connect() { - const wallet = new WalletConnectWallet({ - connect: { - metadata: { - name: 'The name of your awesome DApp', - description: 'Your DApp description', - url: 'https://example.com', - icons: ['https://example.com/favicon.ico'], - }, - }, - }) - - const uri = await wallet.getUri() - // display this uri as a QR code to the user - await wallet.init() - - const [from] = await wallet.getAccounts() - const kit = newKit('https://alfajores-forno.celo-testnet.org', wallet) - - const gold = await kit.contracts.getGoldToken() - await gold.transfer('0x...', '1').sendAndWaitForReceipt({ from }) -} - -connect() -``` - -## Wrapping up - -Hopefully you now have an understanding of how to build WalletConnect compatible DApps, keep exploring the [docs](https://docs.celo.org) to learn more and please [connect with us on Discord](https://chat.celo.org) if you need any help (or just want to chat)! diff --git a/packages/docs/developer-resources/walkthroughs/web-dapp.md b/packages/docs/developer-resources/walkthroughs/web-dapp.md deleted file mode 100644 index 72717c69345..00000000000 --- a/packages/docs/developer-resources/walkthroughs/web-dapp.md +++ /dev/null @@ -1,295 +0,0 @@ -# Building a simple DApp with React - -This tutorial will be a basic guide on developing a decentralised application (DApp) on top of Celo. We'll be developing against one of the core Celo contracts, [Governance.sol](https://github.com/celo-org/celo-monorepo/blob/master/packages/protocol/contracts/governance/Governance.sol), and allowing users of our DApp to vote on active [Celo Governance proposals](https://docs.celo.org/celo-owner-guide/voting-governance). - -## Foreword - -This guide requires an understanding of a few popular web technologies. Our application will be written in [React](https://reactjs.org/), utilising [hooks](https://reactjs.org/docs/hooks-intro.html) for state management and built with [Next.js](https://nextjs.org/), a popular static site generation framework. - -If you find this tutorial lacking in any way or want to dive into the code more thoroughly, checkout the [Celo Tools](https://github.com/alexbharley/celo-tools) GitHub repository where much of this tutorial has been ported from. - -## Getting started - -Step one of developing our application is scaffolding it out with `create-next-app` and adding TypeScript compilation so we can develop more confidently. - -```bash -yarn create next-app voting-dapp -cd voting-dapp -touch tsconfig.json -yarn add --dev typescript @types/react @types/node -``` - -Now running `yarn dev` should open up our new Next.js website on `localhost:3000`. - -Next we'll need to add a few Celo specific dependencies so we can work with our core contracts. - -```bash -yarn add @celo/contractkit @celo-tools/use-contractkit bignumber.js -``` - -Here's what we'll be using each of these packages for: - -- [@celo/contractkit](https://github.com/celo-org/celo-monorepo/tree/master/packages/sdk/contractkit) is a lightweight wrapper around the [Web3](https://web3js.readthedocs.io/) object you may already be familiar with. It contains typed interfaces for the core contracts (generated from the Contract ABIs) and helper functions to make common operations on Celo easier -- [@celo-tools/use-contractkit](https://github.com/celo-tools/use-contractkit) is a community provided library to ease establishing the connection with a user's wallet, whether that is a hardware, mobile, or web wallet. When developing with this library, your users can hold Celo via [Valora](https://valoraapp.com), a Ledger, Metamask and more -- [bignumber.js](https://github.com/MikeMcl/bignumber.js/) is a library for expressing large numbers in JavaScript. When interacting with a blockchain we often need to handle arbitrary-precision decimal and non-decimal arithmetic. - -## Developing the application - -After all our boilerplate has been setup, we're ready to start developing our application. - -### Connecting to the user's wallet - -When a user wants to interact with your DApp we need to somehow allow them to connect their wallet. Interaction with on chain smart contracts is impossible without this step. - -Leveraging our previously added [@celo-tools/use-contractkit](https://github.com/celo-tools/use-contractkit) library we can provide a button that prompts the user to connect their wallet. - -```javascript -import React from 'react' -import { useContractKit } from '@celo-tools/use-contractkit' - -function App() { - const { address, connect } = useContractKit() - - return ( -
-

Celo Voting DApp

- - -
- ) -} -``` - -Clicking this button will show the `use-contractkit` modal and allow the user to connect with their wallet of choice. Once the modal has been dismissed, the `address` property exposed by `use-contractkit` will be filled with the users primary account. - -### Accessing contracts - -After that we've connected to the user's wallet we can show interesting information based on their address. In the context of a governance voting DApp it may make sense to show past proposals they've voted on. If we were creating a simple banking interface, we could imagine wanting to show transfers into and out of the users account. - -{% hint style="info" %} -On the Celo blockchain, only queued and dequeued proposals are kept in the Governance state. That means to access old proposals we'd need to access an indexed history of the blockchain. This is out of scope for our tutorial however there's many resources online you can find that will help you accessing indexed blockchain state. - -For a comprehensive look at how to interpret this on chain state, take a look at the implementation for the [celocli governance:list](https://github.com/celo-org/celo-monorepo/blob/master/packages/cli/src/commands/governance/list.ts) command. - -For the purposes of this tutorial, we'll only be looking at dequeued proposals, or proposals we can currently vote on. -{% endhint %} - -Here's how it looks using a combination of the `useEffect` and `useCallback` hooks to request and display all dequeued proposals from the blockchain. - -```javascript -import React, { useCallback, useEffect } from 'react' -import { useContractKit } from '@celo-tools/use-contractkit' - -function App() { - const { address, connect, kit, getConnectedKit } = useContractKit() - const [proposals, setProposals] = useState([]) - - const fetchProposals = useCallback(async () => { - const governance = await kit.contracts.getGovernance() - const dequeue = await governance.getDequeue() - - const fetchedProposals = await Promise.all( - dequeue.map(async (id) => ({ id, ...(await governance.getProposalRecord(id)) })) - ) - setProposals(fetchedProposals) - }, [kit]) - - useEffect(() => { - fetchProposals() - }, [fetchProposals]) - - return ( - - - - - - - - - - {proposals.map((proposal) => ( - - - - - - ))} - -
IDStatusDescription URL
{proposal.id.toString()}{proposal.passed ? 'Passed' : proposal.approved ? 'Approved' : 'Not approved'} - - Description link - -
- ) -} -``` - -This works pretty well however it makes sense to additionally show whether the user has voted on any given dequeued governance proposal. To show that information, we can amend our `fetchProposals` function as follows - -```javascript -const fetchProposals = useCallback(async () => { - if (!address) { - return - } - - const governance = await kit.contracts.getGovernance() - const dequeue = await governance.getDequeue() - - const fetchedProposals = await Promise.all( - dequeue.map(async (id) => { - const [record, voteRecord] = await Promise.all([ - governance.getProposalRecord(id), - governance.getVoteRecord(address, id), - ]) - - return { - id, - ...record, - vote: voteRecord ? voteRecord.value : undefined, - } - }) - ) - setProposals(fetchedProposals) -}, [kit, address]) -``` - -Now we have access to whether the user voted on this proposal, we can render that information in our table. - -```javascript -return ( - - - - - - - - - - - {proposals.map((proposal) => ( - - - - - - - ))} - -
IDStatusDescription URLVoted
{proposal.id.toString()}{proposal.passed ? 'Passed' : proposal.approved ? 'Approved' : 'Not approved'} - - Description link - - {proposal.vote ?? 'No vote yet'}
-) -``` - -### Locking Celo (optional) - -A prerequisite to [voting on Celo governance proposals](../../celo-holder-guide/voting-governance.md) is having locked Celo to vote with. We won't cover the various flows for locking, unlocking and relocking Celo in this tutorial but you can check the implementation in [Celo Tools](https://github.com/alexbharley/celo-tools) or take inspiration from the following script: - -```javascript -const lockValue = new BigNumber(res.flags.value) - -const lockedGold = await this.kit.contracts.getLockedGold() -const pendingWithdrawalsValue = await lockedGold.getPendingWithdrawalsTotalValue(address) -const relockValue = BigNumber.minimum(pendingWithdrawalsValue, value) -const lockValue = value.minus(relockValue) - -const txos = await lockedGold.relock(address, relockValue) -for (const txo of txos) { - await kit.sendAndWaitForReceipt({ from: address }) -} -``` - -All you need to take care of in your React application is handling user input to select the amount to lock and handling errors in case the user tries to lock more CELO than they hold. - -It's also possible that users of your DApp already have locked CELO, so you might not need to worry about the complexity of permitting that operation. - -### Voting on a proposal - -To actually vote on a proposal we need to again interact with the [Governance.sol](https://github.com/celo-org/celo-monorepo/blob/master/packages/protocol/contracts/governance/Governance.sol) smart contract. Our logic for handling a vote looks as follows: - -```typescript -const vote = useCallback( - async (id: string, value: VoteValue) => { - const kit = await getConnectedKit() - const governance = await kit.contracts.getGovernance() - await (await governance.vote(id, value)).sendAndWaitForReceipt() - fetchProposals() - }, - [kit, fetchProposals] -) -``` - -How you handle calling that function is up to you. With [Celo Tools](https://github.com/alexbharley/celo-tools) we opted for simple upwards and downwards facing arrows to handle voting on proposals, however the data can be rendered however you'd prefer. - -Here's a simple example showing buttons for `Yes` or `No` votes when no vote has been cast. - -```javascript -import { VoteValue } from '@celo/contractkit/lib/wrappers/Governance' - -return ( - - {proposal.id.toString()} - {proposal.passed ? 'Passed' : proposal.approved ? 'Approved' : 'Not approved'} - - - Description link - - - - {proposal.vote ? ( - {proposal.vote} - ) : ( -
- - -
- )} - - -) -``` - -## Best practices - -We've compiled a short list on best practices to follow when developing DApps. Following these will improve the end user experience and keep them more engaged with the Celo ecosystem. If you have any questions around these, feel free to [reach out on Discord](https://chat.celo.org), we're always there and happy to chat. - -### Last used address - -[@celo-tools/use-contractkit](https://github.com/celo-tools/use-contractkit) will remember the address a user last logged in with (via [browser LocalStorage](https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage)). Use this to your advantage and allow your DApp to display the same data whether or not the user has connected their wallet. A good test is to refresh your DApp after connecting and see if anything changes. At the very most, buttons for interaction could be disabled, however it's preferable to prompt to connect the wallet on button click. - -Keeping the UI consistent by using the last connected address is a quick win we can have with DApps that make the experience using them closer to Web2, an experience more users will be familiar with. - -### Loading states - -Loading times are often the give away that an application is a Web3 DApp. Be liberal with loading screens and prioritise making animations smooth. - -Nothing is worse than a perpetually hanging screen that takes multiple seconds to become interactive. By showing a spinner it communicates to the user that things are happening, however slow they may be. - -This is often offset by the ability to index a blockchain and provide the data in a more accessible format (maybe a SQL database or behind a GraphQL API). As mentioned earlier we haven't covered that in this tutorial, however there's a lot of content on the web around DApp optimisation through prior state indexing. - -### Prerender what you can - -With modern static site generators we have amazing leverage over what gets computed server side and what the browser has to request and compute before rendering. If you're unable to index the blockchain before a client requests access to a page, consider loading the relevant data server side with a cache invalidated every hour or so. - -Next.js [getStaticProps](https://nextjs.org/docs/basic-features/data-fetching#getstaticprops-static-generation) comes to mind here as a great way to offload heavy computation to the server. - -### Showing numbers in wei vs. Celo vs. local currency - -Take this advice with a grain of salt as it really depends on how familiar with cryptocurrencies and blockchain your users are. At some point in most DApp users are going to need to deal with large numbers. It's up to you whether you display these in wei (1e18) CELO or converted to a currency the user prefers (BTC, USD or EUR for example). - -The sweeping generalisation would be to allow entering values in CELO or their preferred currency and never expose the raw wei amounts to end users. - -## Wrapping up - -Hopefully you have a better grasp on developing DApps against the Celo core contracts now. In this tutorial we covered: - -- Connecting to user wallets ([use-contractkit](https://github.com/celo-tools/use-contractkit)) -- Fetching on-chain data -- Calling simple functions on the core contracts -- A brief word on best practices with regard to DApp development. - -This is not a comprehensive tutorial for Celo's features and capabilities, keep exploring the docs to learn more and please [connect with us on Discord](https://chat.celo.org) if you need any help (or just want to chat)! diff --git a/packages/docs/developer-resources/wallet-base/reference/README.md b/packages/docs/developer-resources/wallet-base/reference/README.md deleted file mode 100644 index a6816478dfa..00000000000 --- a/packages/docs/developer-resources/wallet-base/reference/README.md +++ /dev/null @@ -1,162 +0,0 @@ -# @celo/wallet-base - -

- - celo logo - -

- -**Celo Monorepo - Official repository for core projects comprising the Celo platform** - -This repository contains the source code for the Celo core projects including the [smart contracts](https://github.com/celo-org/celo-monorepo/tree/master/packages/protocol), [wallet app](https://github.com/celo-org/celo-monorepo/tree/master/packages/mobile), -and other packages. The source code for the Celo Blockchain which operates a node on the Celo Network is kept in a separate repo [here](https://github.com/celo-org/celo-blockchain). - - - -[![CircleCI](https://img.shields.io/circleci/build/github/celo-org/celo-monorepo/master)](https://circleci.com/gh/celo-org/celo-monorepo/tree/master) -[![Codecov](https://img.shields.io/codecov/c/github/celo-org/celo-monorepo)](https://codecov.io/gh/celo-org/celo-monorepo) -[![GitHub contributors](https://img.shields.io/github/contributors/celo-org/celo-monorepo)](https://github.com/celo-org/celo-monorepo/graphs/contributors) -[![GitHub commit activity](https://img.shields.io/github/commit-activity/w/celo-org/celo-monorepo)](https://github.com/celo-org/celo-monorepo/graphs/contributors) -[![GitHub Stars](https://img.shields.io/github/stars/celo-org/celo-monorepo.svg)](https://github.com/celo-org/celo-monorepo/stargazers) -![GitHub repo size](https://img.shields.io/github/repo-size/celo-org/celo-monorepo) -[![GitHub](https://img.shields.io/github/license/celo-org/celo-monorepo?color=blue)](https://github.com/celo-org/celo-monorepo/blob/master/LICENSE) - - - -[![Website celo.org](https://img.shields.io/website-up-down-green-red/https/celo.org.svg)](https://celo.org) -[![Blog](https://img.shields.io/badge/blog-up-green)](https://medium.com/celoorg) -[![docs](https://img.shields.io/badge/docs-up-green)](https://docs.celo.org/) -[![Youtube](https://img.shields.io/badge/YouTube%20channel-up-green)](https://www.youtube.com/channel/UCCZgos_YAJSXm5QX5D5Wkcw/videos?view=0&sort=p&flow=grid) -[![forum](https://img.shields.io/badge/forum-up-green)](https://forum.celo.org) -[![Discord](https://img.shields.io/discord/600834479145353243.svg)](https://discord.gg/RfHQKtY) -[![Twitter CeloDevs](https://img.shields.io/twitter/follow/celodevs?style=social)](https://twitter.com/celodevs) -[![Twitter CeloOrg](https://img.shields.io/twitter/follow/celoorg?style=social)](https://twitter.com/CeloOrg) -[![Subreddit subscribers](https://img.shields.io/reddit/subreddit-subscribers/CeloHQ?style=social)](https://www.reddit.com/r/CeloHQ/) - - - -[![GitHub pull requests by-label](https://img.shields.io/github/issues-pr-raw/celo-org/celo-monorepo)](https://github.com/celo-org/celo-monorepo/pulls) -[![GitHub Issues](https://img.shields.io/github/issues-raw/celo-org/celo-monorepo.svg)](https://github.com/celo-org/celo-monorepo/issues) -[![GitHub issues by-label](https://img.shields.io/github/issues/celo-org/celo-monorepo/1%20hour%20tasks)](https://github.com/celo-org/celo-monorepo/issues?q=is%3Aopen+is%3Aissue+label%3A%221+hour+tasks%22) -[![GitHub issues by-label](https://img.shields.io/github/issues/celo-org/celo-monorepo/betanet-phase-2)](https://github.com/celo-org/celo-monorepo/issues?q=is%3Aopen+is%3Aissue+label%3Abetanet-phase-2) -[![GitHub issues by-label](https://img.shields.io/github/issues/celo-org/celo-monorepo/betanet-phase-3)](https://github.com/celo-org/celo-monorepo/issues?q=is%3Aopen+is%3Aissue+label%3Abetanet-phase-3) - -Contents: - - - -- [Celo's Mission - Prosperity for All](#mission) -- [The Celo Stack](#stack) -- [Documentation](#docs) -- [Issues](#issues) -- [Repo Structure](#repo) -- [Contributing](#contributing) -- [Ask Questions, Find Answers, Get in Touch](#ask) -- [License](#license) - - -## 🥅 Celo's Mission - Prosperity for All - -Celo, pronounced /ˈtselo/, means ‘purpose’ in Esperanto. In a similar spirit, we are aiming to create a new platform to connect people globally and bring financial stability to those who need it most. We believe blockchain technology is one of the most exciting innovations in recent history and as a community we look to push the boundaries of what is possible with it today. More importantly, we are driven by purpose -- to solve real-world problems such as lack of access to sound currency, or friction for cash-transfer programs aimed to alleviate poverty. Our mission is to build a monetary system that creates the conditions for prosperity for all. - - -

- - Play on Youtube - What if money were beautiful - -
- What if money were beautiful? -

- -## 🧱 The Celo Stack - -Celo is oriented around providing the simplest possible experience for end users, who may have no familiarity with cryptocurrencies, and may be using low cost devices with limited connectivity. To achieve this, the project takes a full-stack approach, where each layer of the stack is designed with the end user in mind whilst considering other stakeholders \(e.g. operators of nodes in the network\) involved in enabling the end user experience. - -The Celo stack is structured into the following logical layers: - - -

- Celo protocol -
- The Celo Blockchain and Celo Core Contracts together comprise the Celo Protocol -

- -- **Celo Blockchain**: An open cryptographic protocol that allows applications to make transactions with and run smart contracts in a secure and decentralized fashion. The Celo Blockchain has shared ancestry with [Ethereum](https://www.ethereum.org), and maintains full EVM compatibility for smart contracts. However it uses a [Byzantine Fault Tolerant](http://pmg.csail.mit.edu/papers/osdi99.pdf) \(BFT\) consensus mechanism rather than Proof of Work, and has different block format, transaction format, client synchronization protocols, and gas payment and pricing mechanisms. The network’s native asset is Celo Gold, exposed via an ERC-20 interface. - -- **Celo Core Contracts**: A set of smart contracts running on the Celo Blockchain that comprise much of the logic of the platform features including ERC-20 stable currencies, identity attestations, Proof of Stake and governance. These smart contracts are upgradeable and managed by the decentralized governance process. - - -

- Celo network -
- Topology of a Celo Network -

- -- **Applications:** Applications for end users built on the Celo platform. The Celo Wallet app, the first of an ecosystem of applications, allows end users to manage accounts and make payments securely and simply by taking advantage of the innovations in the Celo protocol. Applications take the form of external mobile or backend software: they interact with the Celo Blockchain to issue transactions and invoke code that forms the Celo Core Contracts’ API. Third parties can also deploy custom smart contracts that their own applications can invoke, which in turn can leverage Celo Core Contracts. Applications may use centralized cloud services to provide some of their functionality: in the case of the Celo Wallet, push notifications and a transaction activity feed. - -## 📚 Documentation - -Follow the instructions in [SETUP.md](SETUP.md) to get a development environment set up. - -See [Developer's Guide](https://docs.celo.org/) for full details about the design of the Celo protocol and other information about running these projects. - -## 🙋 Issues - -See the [issue backlog](https://github.com/celo-org/celo-monorepo/issues) for a list of active or proposed tasks. Feel free to create new issues to report bugs and/or request features. - -## 📂 Repo Structure - -The repository has the following packages (sub projects): - -- [attestation-service](packages/attestation-service) - service run by validators on the Celo network to send SMS messages, enabling attestations of user phone numbers and their accounts on the Celo network -- [blockchain-api](packages/blockchain-api) - service that uses Blockscout to present view of transactions by account for Celo Wallet activity feed -- [celotool](packages/celotool) - scripts for deploying and managing testnets -- [cli](packages/cli) - tool that uses ContractKit to interact with the Celo protocol ([docs](https://docs.celo.org/getting-started/using-the-cli)) -- [contractkit](packages/contractkit) - library to help developers and validators interact with the protocol and it's smart contracts ([docs](https://docs.celo.org/celo-sdk/contractkit)) -- [dappkit](packages/dappkit) - set of functions for mobile DApps to work with the wallet app (ex. sign transactions and access the user's account) ([docs](https://docs.celo.org/celo-sdk/dappkit)) -- [dev-utils](packages/dev-utils) - a utils package for use as a dev dependency -- [docs](packages/docs) - technical documentation for the Celo project ([live](https://docs.celo.org/)) -- [faucet](packages/faucet) - faucet deployment configuration ([live](https://celo.org/build/faucet)) -- [helm-charts](packages/helm-charts) - templatized deployments of entire environments to Kubernetes clusters -- [mobile](packages/mobile) - Android wallet app for the Celo platform ([docs](https://docs.celo.org/getting-started/using-the-mobile-wallet), [live](https://play.google.com/store/apps/details?id=org.celo.mobile.alfajores)) -- [notification-service](packages/notification-service) - service for managing push notifications for Celo Wallet -- [protocol](packages/protocol) - identity, stability and other smart contracts for the Celo protocol ([docs](https://docs.celo.org/celo-codebase/protocol)) -- [react-components](packages/react-components) - generalized react native components -- [reserve-site](packages/reserve-site) - website for ([Celo Reserve.org](https://celoreserve.org/)) -- [terraform-modules](packages/terraform-modules) - templatized deployments of entire VM-based testnets for Google Cloud Platform -- [typescript](packages/typescript) - no README available (improve?) -- [utils](packages/utils) - no README available (improve?) - -Code owners for each package can be found in [.github/CODEOWNERS](.github/CODEOWNERS). - -## ✍️ Contributing - -Feel free to jump on the Celo 🚂🚋🚋🚋. Improvements and contributions are highly encouraged! 🙏👊 - -See the [contributing guide](https://docs.celo.org/community/contributing) for details on how to participate. -[![GitHub issues by-label](https://img.shields.io/github/issues/celo-org/celo-monorepo/1%20hour%20tasks)](https://github.com/celo-org/celo-monorepo/issues?q=is%3Aopen+is%3Aissue+label%3A%221+hour+tasks%22) - -All communication and contributions to the Celo project are subject to the [Celo Code of Conduct](https://celo.org/code-of-conduct). - -Not yet ready to contribute but do like the project? Support Celo with a ⭐ or share the love in a [![Twitter URL](https://img.shields.io/twitter/url?style=social&url=https%3A%2F%2Fcelo.org%2F)](https://twitter.com/intent/tweet?url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DkKggE5OvyhE&via=celohq&text=Checkout%20celo%21%20Love%20what%20they%20are%20building.&hashtags=celo) - - - -## 💬 Ask Questions, Find Answers, Get in Touch - -- [Website](https://celo.org/) -- [Docs](https://docs.celo.org/) -- [Blog](https://medium.com/celohq) -- [YouTube](https://www.youtube.com/channel/UCCZgos_YAJSXm5QX5D5Wkcw/videos?view=0&sort=p&flow=grid) -- [Forum](https://forum.celo.org) -- [Discord](https://discord.gg/vRbExjv) -- [Twitter](https://twitter.com/CeloDevs) -- [Reddit](https://www.reddit.com/r/CeloHQ/) -- [Community Events](https://celo.org/community) - -## 📜 License - -All packages are licensed under the terms of the [Apache 2.0 License](LICENSE) unless otherwise specified in the LICENSE file at package's root. diff --git a/packages/docs/developer-resources/wallet-base/reference/SUMMARY.md b/packages/docs/developer-resources/wallet-base/reference/SUMMARY.md deleted file mode 100644 index 56ce801f1d1..00000000000 --- a/packages/docs/developer-resources/wallet-base/reference/SUMMARY.md +++ /dev/null @@ -1,12 +0,0 @@ -* [Globals](globals.md) -* [Modules]() - * [signing-utils](modules/_signing_utils_.md) - * [wallet-base](modules/_wallet_base_.md) - * [WalletBase](classes/_wallet_base_.walletbase.md) - * [UnlockableWallet](interfaces/_wallet_base_.unlockablewallet.md) - * [Wallet](interfaces/_wallet_base_.wallet.md) -* [Classes]() - * [WalletBase](classes/_wallet_base_.walletbase.md) -* [Interfaces]() - * [UnlockableWallet](interfaces/_wallet_base_.unlockablewallet.md) - * [Wallet](interfaces/_wallet_base_.wallet.md) \ No newline at end of file diff --git a/packages/docs/developer-resources/wallet-base/reference/classes/_wallet_base_.walletbase.md b/packages/docs/developer-resources/wallet-base/reference/classes/_wallet_base_.walletbase.md deleted file mode 100644 index 426ba4693c3..00000000000 --- a/packages/docs/developer-resources/wallet-base/reference/classes/_wallet_base_.walletbase.md +++ /dev/null @@ -1,170 +0,0 @@ -# Class: WalletBase <**TSigner**> - -## Type parameters - -▪ **TSigner**: *Signer* - -## Hierarchy - -* **WalletBase** - -## Implements - -* ReadOnlyWallet - -## Index - -### Methods - -* [computeSharedSecret](_wallet_base_.walletbase.md#computesharedsecret) -* [decrypt](_wallet_base_.walletbase.md#decrypt) -* [getAccounts](_wallet_base_.walletbase.md#getaccounts) -* [hasAccount](_wallet_base_.walletbase.md#hasaccount) -* [removeAccount](_wallet_base_.walletbase.md#removeaccount) -* [signPersonalMessage](_wallet_base_.walletbase.md#signpersonalmessage) -* [signTransaction](_wallet_base_.walletbase.md#signtransaction) -* [signTypedData](_wallet_base_.walletbase.md#signtypeddata) - -## Methods - -### computeSharedSecret - -▸ **computeSharedSecret**(`address`: Address, `publicKey`: string): *Promise‹Buffer›* - -*Defined in [wallets/wallet-base/src/wallet-base.ts:140](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-base/src/wallet-base.ts#L140)* - -Computes the shared secret (an ECDH key exchange object) between two accounts - -**Parameters:** - -Name | Type | ------- | ------ | -`address` | Address | -`publicKey` | string | - -**Returns:** *Promise‹Buffer›* - -___ - -### decrypt - -▸ **decrypt**(`address`: string, `ciphertext`: Buffer): *Promise‹Buffer‹››* - -*Defined in [wallets/wallet-base/src/wallet-base.ts:132](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-base/src/wallet-base.ts#L132)* - -**Parameters:** - -Name | Type | ------- | ------ | -`address` | string | -`ciphertext` | Buffer | - -**Returns:** *Promise‹Buffer‹››* - -___ - -### getAccounts - -▸ **getAccounts**(): *Address[]* - -*Defined in [wallets/wallet-base/src/wallet-base.ts:27](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-base/src/wallet-base.ts#L27)* - -Gets a list of accounts that have been registered - -**Returns:** *Address[]* - -___ - -### hasAccount - -▸ **hasAccount**(`address?`: Address): *boolean* - -*Defined in [wallets/wallet-base/src/wallet-base.ts:43](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-base/src/wallet-base.ts#L43)* - -Returns true if account has been registered - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`address?` | Address | Account to check | - -**Returns:** *boolean* - -___ - -### removeAccount - -▸ **removeAccount**(`_address`: string): *void* - -*Defined in [wallets/wallet-base/src/wallet-base.ts:35](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-base/src/wallet-base.ts#L35)* - -Removes the account with the given address. Needs to be implemented by subclass, otherwise throws error - -**Parameters:** - -Name | Type | ------- | ------ | -`_address` | string | - -**Returns:** *void* - -___ - -### signPersonalMessage - -▸ **signPersonalMessage**(`address`: Address, `data`: string): *Promise‹string›* - -*Defined in [wallets/wallet-base/src/wallet-base.ts:96](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-base/src/wallet-base.ts#L96)* - -Sign a personal Ethereum signed message. - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`address` | Address | Address of the account to sign with | -`data` | string | Hex string message to sign | - -**Returns:** *Promise‹string›* - -Signature hex string (order: rsv) - -___ - -### signTransaction - -▸ **signTransaction**(`txParams`: CeloTx): *Promise‹EncodedTransaction›* - -*Defined in [wallets/wallet-base/src/wallet-base.ts:75](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-base/src/wallet-base.ts#L75)* - -Gets the signer based on the 'from' field in the tx body - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`txParams` | CeloTx | Transaction to sign | - -**Returns:** *Promise‹EncodedTransaction›* - -___ - -### signTypedData - -▸ **signTypedData**(`address`: Address, `typedData`: EIP712TypedData): *Promise‹string›* - -*Defined in [wallets/wallet-base/src/wallet-base.ts:113](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-base/src/wallet-base.ts#L113)* - -Sign an EIP712 Typed Data message. - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`address` | Address | Address of the account to sign with | -`typedData` | EIP712TypedData | the typed data object | - -**Returns:** *Promise‹string›* - -Signature hex string (order: rsv) diff --git a/packages/docs/developer-resources/wallet-base/reference/globals.md b/packages/docs/developer-resources/wallet-base/reference/globals.md deleted file mode 100644 index 5fd4997809e..00000000000 --- a/packages/docs/developer-resources/wallet-base/reference/globals.md +++ /dev/null @@ -1,8 +0,0 @@ -# @celo/wallet-base - -## Index - -### Modules - -* ["signing-utils"](modules/_signing_utils_.md) -* ["wallet-base"](modules/_wallet_base_.md) diff --git a/packages/docs/developer-resources/wallet-base/reference/interfaces/_wallet_base_.unlockablewallet.md b/packages/docs/developer-resources/wallet-base/reference/interfaces/_wallet_base_.unlockablewallet.md deleted file mode 100644 index 5b11cb36782..00000000000 --- a/packages/docs/developer-resources/wallet-base/reference/interfaces/_wallet_base_.unlockablewallet.md +++ /dev/null @@ -1,229 +0,0 @@ -# Interface: UnlockableWallet - -## Hierarchy - - ↳ [Wallet](_wallet_base_.wallet.md) - - ↳ **UnlockableWallet** - -## Index - -### Properties - -* [addAccount](_wallet_base_.unlockablewallet.md#addaccount) -* [computeSharedSecret](_wallet_base_.unlockablewallet.md#computesharedsecret) -* [decrypt](_wallet_base_.unlockablewallet.md#decrypt) -* [getAccounts](_wallet_base_.unlockablewallet.md#getaccounts) -* [hasAccount](_wallet_base_.unlockablewallet.md#hasaccount) -* [isAccountUnlocked](_wallet_base_.unlockablewallet.md#isaccountunlocked) -* [removeAccount](_wallet_base_.unlockablewallet.md#removeaccount) -* [signPersonalMessage](_wallet_base_.unlockablewallet.md#signpersonalmessage) -* [signTransaction](_wallet_base_.unlockablewallet.md#signtransaction) -* [signTypedData](_wallet_base_.unlockablewallet.md#signtypeddata) -* [unlockAccount](_wallet_base_.unlockablewallet.md#unlockaccount) - -## Properties - -### addAccount - -• **addAccount**: *addInMemoryAccount | addRemoteAccount* - -*Inherited from [Wallet](_wallet_base_.wallet.md).[addAccount](_wallet_base_.wallet.md#addaccount)* - -*Defined in [wallets/wallet-base/src/wallet-base.ts:11](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-base/src/wallet-base.ts#L11)* - -___ - -### computeSharedSecret - -• **computeSharedSecret**: *function* - -*Inherited from [Wallet](_wallet_base_.wallet.md).[computeSharedSecret](_wallet_base_.wallet.md#computesharedsecret)* - -Defined in connect/lib/wallet.d.ts:12 - -#### Type declaration: - -▸ (`address`: Address, `publicKey`: string): *Promise‹Buffer›* - -**Parameters:** - -Name | Type | ------- | ------ | -`address` | Address | -`publicKey` | string | - -___ - -### decrypt - -• **decrypt**: *function* - -*Inherited from [Wallet](_wallet_base_.wallet.md).[decrypt](_wallet_base_.wallet.md#decrypt)* - -Defined in connect/lib/wallet.d.ts:11 - -#### Type declaration: - -▸ (`address`: Address, `ciphertext`: Buffer): *Promise‹Buffer›* - -**Parameters:** - -Name | Type | ------- | ------ | -`address` | Address | -`ciphertext` | Buffer | - -___ - -### getAccounts - -• **getAccounts**: *function* - -*Inherited from [Wallet](_wallet_base_.wallet.md).[getAccounts](_wallet_base_.wallet.md#getaccounts)* - -Defined in connect/lib/wallet.d.ts:5 - -#### Type declaration: - -▸ (): *Address[]* - -___ - -### hasAccount - -• **hasAccount**: *function* - -*Inherited from [Wallet](_wallet_base_.wallet.md).[hasAccount](_wallet_base_.wallet.md#hasaccount)* - -Defined in connect/lib/wallet.d.ts:7 - -#### Type declaration: - -▸ (`address?`: Address): *boolean* - -**Parameters:** - -Name | Type | ------- | ------ | -`address?` | Address | - -___ - -### isAccountUnlocked - -• **isAccountUnlocked**: *function* - -*Defined in [wallets/wallet-base/src/wallet-base.ts:16](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-base/src/wallet-base.ts#L16)* - -#### Type declaration: - -▸ (`address`: string): *boolean* - -**Parameters:** - -Name | Type | ------- | ------ | -`address` | string | - -___ - -### removeAccount - -• **removeAccount**: *function* - -*Inherited from [Wallet](_wallet_base_.wallet.md).[removeAccount](_wallet_base_.wallet.md#removeaccount)* - -Defined in connect/lib/wallet.d.ts:6 - -#### Type declaration: - -▸ (`address`: Address): *void* - -**Parameters:** - -Name | Type | ------- | ------ | -`address` | Address | - -___ - -### signPersonalMessage - -• **signPersonalMessage**: *function* - -*Inherited from [Wallet](_wallet_base_.wallet.md).[signPersonalMessage](_wallet_base_.wallet.md#signpersonalmessage)* - -Defined in connect/lib/wallet.d.ts:10 - -#### Type declaration: - -▸ (`address`: Address, `data`: string): *Promise‹string›* - -**Parameters:** - -Name | Type | ------- | ------ | -`address` | Address | -`data` | string | - -___ - -### signTransaction - -• **signTransaction**: *function* - -*Inherited from [Wallet](_wallet_base_.wallet.md).[signTransaction](_wallet_base_.wallet.md#signtransaction)* - -Defined in connect/lib/wallet.d.ts:8 - -#### Type declaration: - -▸ (`txParams`: CeloTx): *Promise‹EncodedTransaction›* - -**Parameters:** - -Name | Type | ------- | ------ | -`txParams` | CeloTx | - -___ - -### signTypedData - -• **signTypedData**: *function* - -*Inherited from [Wallet](_wallet_base_.wallet.md).[signTypedData](_wallet_base_.wallet.md#signtypeddata)* - -Defined in connect/lib/wallet.d.ts:9 - -#### Type declaration: - -▸ (`address`: Address, `typedData`: EIP712TypedData): *Promise‹string›* - -**Parameters:** - -Name | Type | ------- | ------ | -`address` | Address | -`typedData` | EIP712TypedData | - -___ - -### unlockAccount - -• **unlockAccount**: *function* - -*Defined in [wallets/wallet-base/src/wallet-base.ts:15](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-base/src/wallet-base.ts#L15)* - -#### Type declaration: - -▸ (`address`: string, `passphrase`: string, `duration`: number): *Promise‹boolean›* - -**Parameters:** - -Name | Type | ------- | ------ | -`address` | string | -`passphrase` | string | -`duration` | number | diff --git a/packages/docs/developer-resources/wallet-base/reference/interfaces/_wallet_base_.wallet.md b/packages/docs/developer-resources/wallet-base/reference/interfaces/_wallet_base_.wallet.md deleted file mode 100644 index 27e1859a71a..00000000000 --- a/packages/docs/developer-resources/wallet-base/reference/interfaces/_wallet_base_.wallet.md +++ /dev/null @@ -1,189 +0,0 @@ -# Interface: Wallet - -## Hierarchy - -* ReadOnlyWallet - - ↳ **Wallet** - - ↳ [UnlockableWallet](_wallet_base_.unlockablewallet.md) - -## Index - -### Properties - -* [addAccount](_wallet_base_.wallet.md#addaccount) -* [computeSharedSecret](_wallet_base_.wallet.md#computesharedsecret) -* [decrypt](_wallet_base_.wallet.md#decrypt) -* [getAccounts](_wallet_base_.wallet.md#getaccounts) -* [hasAccount](_wallet_base_.wallet.md#hasaccount) -* [removeAccount](_wallet_base_.wallet.md#removeaccount) -* [signPersonalMessage](_wallet_base_.wallet.md#signpersonalmessage) -* [signTransaction](_wallet_base_.wallet.md#signtransaction) -* [signTypedData](_wallet_base_.wallet.md#signtypeddata) - -## Properties - -### addAccount - -• **addAccount**: *addInMemoryAccount | addRemoteAccount* - -*Defined in [wallets/wallet-base/src/wallet-base.ts:11](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-base/src/wallet-base.ts#L11)* - -___ - -### computeSharedSecret - -• **computeSharedSecret**: *function* - -*Inherited from [Wallet](_wallet_base_.wallet.md).[computeSharedSecret](_wallet_base_.wallet.md#computesharedsecret)* - -Defined in connect/lib/wallet.d.ts:12 - -#### Type declaration: - -▸ (`address`: Address, `publicKey`: string): *Promise‹Buffer›* - -**Parameters:** - -Name | Type | ------- | ------ | -`address` | Address | -`publicKey` | string | - -___ - -### decrypt - -• **decrypt**: *function* - -*Inherited from [Wallet](_wallet_base_.wallet.md).[decrypt](_wallet_base_.wallet.md#decrypt)* - -Defined in connect/lib/wallet.d.ts:11 - -#### Type declaration: - -▸ (`address`: Address, `ciphertext`: Buffer): *Promise‹Buffer›* - -**Parameters:** - -Name | Type | ------- | ------ | -`address` | Address | -`ciphertext` | Buffer | - -___ - -### getAccounts - -• **getAccounts**: *function* - -*Inherited from [Wallet](_wallet_base_.wallet.md).[getAccounts](_wallet_base_.wallet.md#getaccounts)* - -Defined in connect/lib/wallet.d.ts:5 - -#### Type declaration: - -▸ (): *Address[]* - -___ - -### hasAccount - -• **hasAccount**: *function* - -*Inherited from [Wallet](_wallet_base_.wallet.md).[hasAccount](_wallet_base_.wallet.md#hasaccount)* - -Defined in connect/lib/wallet.d.ts:7 - -#### Type declaration: - -▸ (`address?`: Address): *boolean* - -**Parameters:** - -Name | Type | ------- | ------ | -`address?` | Address | - -___ - -### removeAccount - -• **removeAccount**: *function* - -*Inherited from [Wallet](_wallet_base_.wallet.md).[removeAccount](_wallet_base_.wallet.md#removeaccount)* - -Defined in connect/lib/wallet.d.ts:6 - -#### Type declaration: - -▸ (`address`: Address): *void* - -**Parameters:** - -Name | Type | ------- | ------ | -`address` | Address | - -___ - -### signPersonalMessage - -• **signPersonalMessage**: *function* - -*Inherited from [Wallet](_wallet_base_.wallet.md).[signPersonalMessage](_wallet_base_.wallet.md#signpersonalmessage)* - -Defined in connect/lib/wallet.d.ts:10 - -#### Type declaration: - -▸ (`address`: Address, `data`: string): *Promise‹string›* - -**Parameters:** - -Name | Type | ------- | ------ | -`address` | Address | -`data` | string | - -___ - -### signTransaction - -• **signTransaction**: *function* - -*Inherited from [Wallet](_wallet_base_.wallet.md).[signTransaction](_wallet_base_.wallet.md#signtransaction)* - -Defined in connect/lib/wallet.d.ts:8 - -#### Type declaration: - -▸ (`txParams`: CeloTx): *Promise‹EncodedTransaction›* - -**Parameters:** - -Name | Type | ------- | ------ | -`txParams` | CeloTx | - -___ - -### signTypedData - -• **signTypedData**: *function* - -*Inherited from [Wallet](_wallet_base_.wallet.md).[signTypedData](_wallet_base_.wallet.md#signtypeddata)* - -Defined in connect/lib/wallet.d.ts:9 - -#### Type declaration: - -▸ (`address`: Address, `typedData`: EIP712TypedData): *Promise‹string›* - -**Parameters:** - -Name | Type | ------- | ------ | -`address` | Address | -`typedData` | EIP712TypedData | diff --git a/packages/docs/developer-resources/wallet-base/reference/modules/_signing_utils_.md b/packages/docs/developer-resources/wallet-base/reference/modules/_signing_utils_.md deleted file mode 100644 index aa6a4e78292..00000000000 --- a/packages/docs/developer-resources/wallet-base/reference/modules/_signing_utils_.md +++ /dev/null @@ -1,229 +0,0 @@ -# Module: "signing-utils" - -## Index - -### Variables - -* [publicKeyPrefix](_signing_utils_.md#const-publickeyprefix) -* [sixtyFour](_signing_utils_.md#const-sixtyfour) -* [thirtyTwo](_signing_utils_.md#const-thirtytwo) - -### Functions - -* [chainIdTransformationForSigning](_signing_utils_.md#chainidtransformationforsigning) -* [decodeSig](_signing_utils_.md#decodesig) -* [encodeTransaction](_signing_utils_.md#encodetransaction) -* [extractSignature](_signing_utils_.md#extractsignature) -* [getHashFromEncoded](_signing_utils_.md#gethashfromencoded) -* [recoverMessageSigner](_signing_utils_.md#recovermessagesigner) -* [recoverTransaction](_signing_utils_.md#recovertransaction) -* [rlpEncodedTx](_signing_utils_.md#rlpencodedtx) -* [verifyEIP712TypedDataSigner](_signing_utils_.md#verifyeip712typeddatasigner) -* [verifySignatureWithoutPrefix](_signing_utils_.md#verifysignaturewithoutprefix) - -## Variables - -### `Const` publicKeyPrefix - -• **publicKeyPrefix**: *number* = 4 - -*Defined in [wallets/wallet-base/src/signing-utils.ts:18](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-base/src/signing-utils.ts#L18)* - -___ - -### `Const` sixtyFour - -• **sixtyFour**: *number* = 64 - -*Defined in [wallets/wallet-base/src/signing-utils.ts:19](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-base/src/signing-utils.ts#L19)* - -___ - -### `Const` thirtyTwo - -• **thirtyTwo**: *number* = 32 - -*Defined in [wallets/wallet-base/src/signing-utils.ts:20](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-base/src/signing-utils.ts#L20)* - -## Functions - -### chainIdTransformationForSigning - -▸ **chainIdTransformationForSigning**(`chainId`: number): *number* - -*Defined in [wallets/wallet-base/src/signing-utils.ts:28](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-base/src/signing-utils.ts#L28)* - -**Parameters:** - -Name | Type | ------- | ------ | -`chainId` | number | - -**Returns:** *number* - -___ - -### decodeSig - -▸ **decodeSig**(`sig`: any): *object* - -*Defined in [wallets/wallet-base/src/signing-utils.ts:240](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-base/src/signing-utils.ts#L240)* - -**Parameters:** - -Name | Type | ------- | ------ | -`sig` | any | - -**Returns:** *object* - -* **r**: *Buffer‹›* = ethUtil.toBuffer(r) as Buffer - -* **s**: *Buffer‹›* = ethUtil.toBuffer(s) as Buffer - -* **v**: *number* = parseInt(v, 16) - -___ - -### encodeTransaction - -▸ **encodeTransaction**(`rlpEncoded`: RLPEncodedTx, `signature`: object): *Promise‹EncodedTransaction›* - -*Defined in [wallets/wallet-base/src/signing-utils.ts:121](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-base/src/signing-utils.ts#L121)* - -**Parameters:** - -▪ **rlpEncoded**: *RLPEncodedTx* - -▪ **signature**: *object* - -Name | Type | ------- | ------ | -`r` | Buffer | -`s` | Buffer | -`v` | number | - -**Returns:** *Promise‹EncodedTransaction›* - -___ - -### extractSignature - -▸ **extractSignature**(`rawTx`: string): *object* - -*Defined in [wallets/wallet-base/src/signing-utils.ts:157](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-base/src/signing-utils.ts#L157)* - -**Parameters:** - -Name | Type | ------- | ------ | -`rawTx` | string | - -**Returns:** *object* - -* **r**: *Buffer* - -* **s**: *Buffer* - -* **v**: *number* - -___ - -### getHashFromEncoded - -▸ **getHashFromEncoded**(`rlpEncode`: string): *string* - -*Defined in [wallets/wallet-base/src/signing-utils.ts:32](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-base/src/signing-utils.ts#L32)* - -**Parameters:** - -Name | Type | ------- | ------ | -`rlpEncode` | string | - -**Returns:** *string* - -___ - -### recoverMessageSigner - -▸ **recoverMessageSigner**(`signingDataHex`: string, `signedData`: string): *string* - -*Defined in [wallets/wallet-base/src/signing-utils.ts:207](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-base/src/signing-utils.ts#L207)* - -**Parameters:** - -Name | Type | ------- | ------ | -`signingDataHex` | string | -`signedData` | string | - -**Returns:** *string* - -___ - -### recoverTransaction - -▸ **recoverTransaction**(`rawTx`: string): *[CeloTx, string]* - -*Defined in [wallets/wallet-base/src/signing-utils.ts:175](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-base/src/signing-utils.ts#L175)* - -**Parameters:** - -Name | Type | ------- | ------ | -`rawTx` | string | - -**Returns:** *[CeloTx, string]* - -___ - -### rlpEncodedTx - -▸ **rlpEncodedTx**(`tx`: CeloTx): *RLPEncodedTx* - -*Defined in [wallets/wallet-base/src/signing-utils.ts:70](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-base/src/signing-utils.ts#L70)* - -**Parameters:** - -Name | Type | ------- | ------ | -`tx` | CeloTx | - -**Returns:** *RLPEncodedTx* - -___ - -### verifyEIP712TypedDataSigner - -▸ **verifyEIP712TypedDataSigner**(`typedData`: EIP712TypedData, `signedData`: string, `expectedAddress`: string): *boolean* - -*Defined in [wallets/wallet-base/src/signing-utils.ts:217](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-base/src/signing-utils.ts#L217)* - -**Parameters:** - -Name | Type | ------- | ------ | -`typedData` | EIP712TypedData | -`signedData` | string | -`expectedAddress` | string | - -**Returns:** *boolean* - -___ - -### verifySignatureWithoutPrefix - -▸ **verifySignatureWithoutPrefix**(`messageHash`: string, `signature`: string, `signer`: string): *boolean* - -*Defined in [wallets/wallet-base/src/signing-utils.ts:227](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-base/src/signing-utils.ts#L227)* - -**Parameters:** - -Name | Type | ------- | ------ | -`messageHash` | string | -`signature` | string | -`signer` | string | - -**Returns:** *boolean* diff --git a/packages/docs/developer-resources/wallet-base/reference/modules/_wallet_base_.md b/packages/docs/developer-resources/wallet-base/reference/modules/_wallet_base_.md deleted file mode 100644 index 190d8d815a6..00000000000 --- a/packages/docs/developer-resources/wallet-base/reference/modules/_wallet_base_.md +++ /dev/null @@ -1,12 +0,0 @@ -# Module: "wallet-base" - -## Index - -### Classes - -* [WalletBase](../classes/_wallet_base_.walletbase.md) - -### Interfaces - -* [UnlockableWallet](../interfaces/_wallet_base_.unlockablewallet.md) -* [Wallet](../interfaces/_wallet_base_.wallet.md) diff --git a/packages/docs/developer-resources/wallet-hsm-aws/reference/README.md b/packages/docs/developer-resources/wallet-hsm-aws/reference/README.md deleted file mode 100644 index e3f7869fc70..00000000000 --- a/packages/docs/developer-resources/wallet-hsm-aws/reference/README.md +++ /dev/null @@ -1,162 +0,0 @@ -# @celo/wallet-hsm-aws - -

- - celo logo - -

- -**Celo Monorepo - Official repository for core projects comprising the Celo platform** - -This repository contains the source code for the Celo core projects including the [smart contracts](https://github.com/celo-org/celo-monorepo/tree/master/packages/protocol), [wallet app](https://github.com/celo-org/celo-monorepo/tree/master/packages/mobile), -and other packages. The source code for the Celo Blockchain which operates a node on the Celo Network is kept in a separate repo [here](https://github.com/celo-org/celo-blockchain). - - - -[![CircleCI](https://img.shields.io/circleci/build/github/celo-org/celo-monorepo/master)](https://circleci.com/gh/celo-org/celo-monorepo/tree/master) -[![Codecov](https://img.shields.io/codecov/c/github/celo-org/celo-monorepo)](https://codecov.io/gh/celo-org/celo-monorepo) -[![GitHub contributors](https://img.shields.io/github/contributors/celo-org/celo-monorepo)](https://github.com/celo-org/celo-monorepo/graphs/contributors) -[![GitHub commit activity](https://img.shields.io/github/commit-activity/w/celo-org/celo-monorepo)](https://github.com/celo-org/celo-monorepo/graphs/contributors) -[![GitHub Stars](https://img.shields.io/github/stars/celo-org/celo-monorepo.svg)](https://github.com/celo-org/celo-monorepo/stargazers) -![GitHub repo size](https://img.shields.io/github/repo-size/celo-org/celo-monorepo) -[![GitHub](https://img.shields.io/github/license/celo-org/celo-monorepo?color=blue)](https://github.com/celo-org/celo-monorepo/blob/master/LICENSE) - - - -[![Website celo.org](https://img.shields.io/website-up-down-green-red/https/celo.org.svg)](https://celo.org) -[![Blog](https://img.shields.io/badge/blog-up-green)](https://medium.com/celoorg) -[![docs](https://img.shields.io/badge/docs-up-green)](https://docs.celo.org/) -[![Youtube](https://img.shields.io/badge/YouTube%20channel-up-green)](https://www.youtube.com/channel/UCCZgos_YAJSXm5QX5D5Wkcw/videos?view=0&sort=p&flow=grid) -[![forum](https://img.shields.io/badge/forum-up-green)](https://forum.celo.org) -[![Discord](https://img.shields.io/discord/600834479145353243.svg)](https://discord.gg/RfHQKtY) -[![Twitter CeloDevs](https://img.shields.io/twitter/follow/celodevs?style=social)](https://twitter.com/celodevs) -[![Twitter CeloOrg](https://img.shields.io/twitter/follow/celoorg?style=social)](https://twitter.com/CeloOrg) -[![Subreddit subscribers](https://img.shields.io/reddit/subreddit-subscribers/CeloHQ?style=social)](https://www.reddit.com/r/CeloHQ/) - - - -[![GitHub pull requests by-label](https://img.shields.io/github/issues-pr-raw/celo-org/celo-monorepo)](https://github.com/celo-org/celo-monorepo/pulls) -[![GitHub Issues](https://img.shields.io/github/issues-raw/celo-org/celo-monorepo.svg)](https://github.com/celo-org/celo-monorepo/issues) -[![GitHub issues by-label](https://img.shields.io/github/issues/celo-org/celo-monorepo/1%20hour%20tasks)](https://github.com/celo-org/celo-monorepo/issues?q=is%3Aopen+is%3Aissue+label%3A%221+hour+tasks%22) -[![GitHub issues by-label](https://img.shields.io/github/issues/celo-org/celo-monorepo/betanet-phase-2)](https://github.com/celo-org/celo-monorepo/issues?q=is%3Aopen+is%3Aissue+label%3Abetanet-phase-2) -[![GitHub issues by-label](https://img.shields.io/github/issues/celo-org/celo-monorepo/betanet-phase-3)](https://github.com/celo-org/celo-monorepo/issues?q=is%3Aopen+is%3Aissue+label%3Abetanet-phase-3) - -Contents: - - - -- [Celo's Mission - Prosperity for All](#mission) -- [The Celo Stack](#stack) -- [Documentation](#docs) -- [Issues](#issues) -- [Repo Structure](#repo) -- [Contributing](#contributing) -- [Ask Questions, Find Answers, Get in Touch](#ask) -- [License](#license) - - -## 🥅 Celo's Mission - Prosperity for All - -Celo, pronounced /ˈtselo/, means ‘purpose’ in Esperanto. In a similar spirit, we are aiming to create a new platform to connect people globally and bring financial stability to those who need it most. We believe blockchain technology is one of the most exciting innovations in recent history and as a community we look to push the boundaries of what is possible with it today. More importantly, we are driven by purpose -- to solve real-world problems such as lack of access to sound currency, or friction for cash-transfer programs aimed to alleviate poverty. Our mission is to build a monetary system that creates the conditions for prosperity for all. - - -

- - Play on Youtube - What if money were beautiful - -
- What if money were beautiful? -

- -## 🧱 The Celo Stack - -Celo is oriented around providing the simplest possible experience for end users, who may have no familiarity with cryptocurrencies, and may be using low cost devices with limited connectivity. To achieve this, the project takes a full-stack approach, where each layer of the stack is designed with the end user in mind whilst considering other stakeholders \(e.g. operators of nodes in the network\) involved in enabling the end user experience. - -The Celo stack is structured into the following logical layers: - - -

- Celo protocol -
- The Celo Blockchain and Celo Core Contracts together comprise the Celo Protocol -

- -- **Celo Blockchain**: An open cryptographic protocol that allows applications to make transactions with and run smart contracts in a secure and decentralized fashion. The Celo Blockchain has shared ancestry with [Ethereum](https://www.ethereum.org), and maintains full EVM compatibility for smart contracts. However it uses a [Byzantine Fault Tolerant](http://pmg.csail.mit.edu/papers/osdi99.pdf) \(BFT\) consensus mechanism rather than Proof of Work, and has different block format, transaction format, client synchronization protocols, and gas payment and pricing mechanisms. The network’s native asset is Celo Gold, exposed via an ERC-20 interface. - -- **Celo Core Contracts**: A set of smart contracts running on the Celo Blockchain that comprise much of the logic of the platform features including ERC-20 stable currencies, identity attestations, Proof of Stake and governance. These smart contracts are upgradeable and managed by the decentralized governance process. - - -

- Celo network -
- Topology of a Celo Network -

- -- **Applications:** Applications for end users built on the Celo platform. The Celo Wallet app, the first of an ecosystem of applications, allows end users to manage accounts and make payments securely and simply by taking advantage of the innovations in the Celo protocol. Applications take the form of external mobile or backend software: they interact with the Celo Blockchain to issue transactions and invoke code that forms the Celo Core Contracts’ API. Third parties can also deploy custom smart contracts that their own applications can invoke, which in turn can leverage Celo Core Contracts. Applications may use centralized cloud services to provide some of their functionality: in the case of the Celo Wallet, push notifications and a transaction activity feed. - -## 📚 Documentation - -Follow the instructions in [SETUP.md](SETUP.md) to get a development environment set up. - -See [Developer's Guide](https://docs.celo.org/) for full details about the design of the Celo protocol and other information about running these projects. - -## 🙋 Issues - -See the [issue backlog](https://github.com/celo-org/celo-monorepo/issues) for a list of active or proposed tasks. Feel free to create new issues to report bugs and/or request features. - -## 📂 Repo Structure - -The repository has the following packages (sub projects): - -- [attestation-service](packages/attestation-service) - service run by validators on the Celo network to send SMS messages, enabling attestations of user phone numbers and their accounts on the Celo network -- [blockchain-api](packages/blockchain-api) - service that uses Blockscout to present view of transactions by account for Celo Wallet activity feed -- [celotool](packages/celotool) - scripts for deploying and managing testnets -- [cli](packages/cli) - tool that uses ContractKit to interact with the Celo protocol ([docs](https://docs.celo.org/getting-started/using-the-cli)) -- [contractkit](packages/contractkit) - library to help developers and validators interact with the protocol and it's smart contracts ([docs](https://docs.celo.org/celo-sdk/contractkit)) -- [dappkit](packages/dappkit) - set of functions for mobile DApps to work with the wallet app (ex. sign transactions and access the user's account) ([docs](https://docs.celo.org/celo-sdk/dappkit)) -- [dev-utils](packages/dev-utils) - a utils package for use as a dev dependency -- [docs](packages/docs) - technical documentation for the Celo project ([live](https://docs.celo.org/)) -- [faucet](packages/faucet) - faucet deployment configuration ([live](https://celo.org/build/faucet)) -- [helm-charts](packages/helm-charts) - templatized deployments of entire environments to Kubernetes clusters -- [mobile](packages/mobile) - Android wallet app for the Celo platform ([docs](https://docs.celo.org/getting-started/using-the-mobile-wallet), [live](https://play.google.com/store/apps/details?id=org.celo.mobile.alfajores)) -- [notification-service](packages/notification-service) - service for managing push notifications for Celo Wallet -- [protocol](packages/protocol) - identity, stability and other smart contracts for the Celo protocol ([docs](https://docs.celo.org/celo-codebase/protocol)) -- [react-components](packages/react-components) - generalized react native components -- [reserve-site](packages/reserve-site) - website for ([Celo Reserve.org](https://celoreserve.org/)) -- [terraform-modules](packages/terraform-modules) - templatized deployments of entire VM-based testnets for Google Cloud Platform -- [typescript](packages/typescript) - no README available (improve?) -- [utils](packages/utils) - no README available (improve?) - -Code owners for each package can be found in [.github/CODEOWNERS](.github/CODEOWNERS). - -## ✍️ Contributing - -Feel free to jump on the Celo 🚂🚋🚋🚋. Improvements and contributions are highly encouraged! 🙏👊 - -See the [contributing guide](https://docs.celo.org/community/contributing) for details on how to participate. -[![GitHub issues by-label](https://img.shields.io/github/issues/celo-org/celo-monorepo/1%20hour%20tasks)](https://github.com/celo-org/celo-monorepo/issues?q=is%3Aopen+is%3Aissue+label%3A%221+hour+tasks%22) - -All communication and contributions to the Celo project are subject to the [Celo Code of Conduct](https://celo.org/code-of-conduct). - -Not yet ready to contribute but do like the project? Support Celo with a ⭐ or share the love in a [![Twitter URL](https://img.shields.io/twitter/url?style=social&url=https%3A%2F%2Fcelo.org%2F)](https://twitter.com/intent/tweet?url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DkKggE5OvyhE&via=celohq&text=Checkout%20celo%21%20Love%20what%20they%20are%20building.&hashtags=celo) - - - -## 💬 Ask Questions, Find Answers, Get in Touch - -- [Website](https://celo.org/) -- [Docs](https://docs.celo.org/) -- [Blog](https://medium.com/celohq) -- [YouTube](https://www.youtube.com/channel/UCCZgos_YAJSXm5QX5D5Wkcw/videos?view=0&sort=p&flow=grid) -- [Forum](https://forum.celo.org) -- [Discord](https://discord.gg/vRbExjv) -- [Twitter](https://twitter.com/CeloDevs) -- [Reddit](https://www.reddit.com/r/CeloHQ/) -- [Community Events](https://celo.org/community) - -## 📜 License - -All packages are licensed under the terms of the [Apache 2.0 License](LICENSE) unless otherwise specified in the LICENSE file at package's root. diff --git a/packages/docs/developer-resources/wallet-hsm-aws/reference/SUMMARY.md b/packages/docs/developer-resources/wallet-hsm-aws/reference/SUMMARY.md deleted file mode 100644 index 6da9bf62104..00000000000 --- a/packages/docs/developer-resources/wallet-hsm-aws/reference/SUMMARY.md +++ /dev/null @@ -1,9 +0,0 @@ -* [Globals](globals.md) -* [Modules]() - * [aws-hsm-signer](modules/_aws_hsm_signer_.md) - * [AwsHsmSigner](classes/_aws_hsm_signer_.awshsmsigner.md) - * [aws-hsm-wallet](modules/_aws_hsm_wallet_.md) - * [AwsHsmWallet](classes/_aws_hsm_wallet_.awshsmwallet.md) -* [Classes]() - * [AwsHsmSigner](classes/_aws_hsm_signer_.awshsmsigner.md) - * [AwsHsmWallet](classes/_aws_hsm_wallet_.awshsmwallet.md) \ No newline at end of file diff --git a/packages/docs/developer-resources/wallet-hsm-aws/reference/classes/_aws_hsm_signer_.awshsmsigner.md b/packages/docs/developer-resources/wallet-hsm-aws/reference/classes/_aws_hsm_signer_.awshsmsigner.md deleted file mode 100644 index 90b4af21419..00000000000 --- a/packages/docs/developer-resources/wallet-hsm-aws/reference/classes/_aws_hsm_signer_.awshsmsigner.md +++ /dev/null @@ -1,133 +0,0 @@ -# Class: AwsHsmSigner - -## Hierarchy - -* **AwsHsmSigner** - -## Implements - -* Signer - -## Index - -### Constructors - -* [constructor](_aws_hsm_signer_.awshsmsigner.md#constructor) - -### Methods - -* [computeSharedSecret](_aws_hsm_signer_.awshsmsigner.md#computesharedsecret) -* [decrypt](_aws_hsm_signer_.awshsmsigner.md#decrypt) -* [getNativeKey](_aws_hsm_signer_.awshsmsigner.md#getnativekey) -* [signPersonalMessage](_aws_hsm_signer_.awshsmsigner.md#signpersonalmessage) -* [signTransaction](_aws_hsm_signer_.awshsmsigner.md#signtransaction) -* [signTypedData](_aws_hsm_signer_.awshsmsigner.md#signtypeddata) - -## Constructors - -### constructor - -\+ **new AwsHsmSigner**(`kms`: KMS, `keyId`: string, `publicKey`: BigNumber): *[AwsHsmSigner](_aws_hsm_signer_.awshsmsigner.md)* - -*Defined in [wallet-hsm-aws/src/aws-hsm-signer.ts:24](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-hsm-aws/src/aws-hsm-signer.ts#L24)* - -**Parameters:** - -Name | Type | ------- | ------ | -`kms` | KMS | -`keyId` | string | -`publicKey` | BigNumber | - -**Returns:** *[AwsHsmSigner](_aws_hsm_signer_.awshsmsigner.md)* - -## Methods - -### computeSharedSecret - -▸ **computeSharedSecret**(`_publicKey`: string): *Promise‹Buffer‹››* - -*Defined in [wallet-hsm-aws/src/aws-hsm-signer.ts:115](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-hsm-aws/src/aws-hsm-signer.ts#L115)* - -**Parameters:** - -Name | Type | ------- | ------ | -`_publicKey` | string | - -**Returns:** *Promise‹Buffer‹››* - -___ - -### decrypt - -▸ **decrypt**(`_ciphertext`: Buffer): *Promise‹Buffer‹››* - -*Defined in [wallet-hsm-aws/src/aws-hsm-signer.ts:109](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-hsm-aws/src/aws-hsm-signer.ts#L109)* - -**Parameters:** - -Name | Type | ------- | ------ | -`_ciphertext` | Buffer | - -**Returns:** *Promise‹Buffer‹››* - -___ - -### getNativeKey - -▸ **getNativeKey**(): *string* - -*Defined in [wallet-hsm-aws/src/aws-hsm-signer.ts:105](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-hsm-aws/src/aws-hsm-signer.ts#L105)* - -**Returns:** *string* - -___ - -### signPersonalMessage - -▸ **signPersonalMessage**(`data`: string): *Promise‹Signature›* - -*Defined in [wallet-hsm-aws/src/aws-hsm-signer.ts:82](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-hsm-aws/src/aws-hsm-signer.ts#L82)* - -**Parameters:** - -Name | Type | ------- | ------ | -`data` | string | - -**Returns:** *Promise‹Signature›* - -___ - -### signTransaction - -▸ **signTransaction**(`addToV`: number, `encodedTx`: RLPEncodedTx): *Promise‹Signature›* - -*Defined in [wallet-hsm-aws/src/aws-hsm-signer.ts:70](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-hsm-aws/src/aws-hsm-signer.ts#L70)* - -**Parameters:** - -Name | Type | ------- | ------ | -`addToV` | number | -`encodedTx` | RLPEncodedTx | - -**Returns:** *Promise‹Signature›* - -___ - -### signTypedData - -▸ **signTypedData**(`typedData`: EIP712TypedData): *Promise‹Signature›* - -*Defined in [wallet-hsm-aws/src/aws-hsm-signer.ts:94](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-hsm-aws/src/aws-hsm-signer.ts#L94)* - -**Parameters:** - -Name | Type | ------- | ------ | -`typedData` | EIP712TypedData | - -**Returns:** *Promise‹Signature›* diff --git a/packages/docs/developer-resources/wallet-hsm-aws/reference/classes/_aws_hsm_wallet_.awshsmwallet.md b/packages/docs/developer-resources/wallet-hsm-aws/reference/classes/_aws_hsm_wallet_.awshsmwallet.md deleted file mode 100644 index cdc08f178df..00000000000 --- a/packages/docs/developer-resources/wallet-hsm-aws/reference/classes/_aws_hsm_wallet_.awshsmwallet.md +++ /dev/null @@ -1,271 +0,0 @@ -# Class: AwsHsmWallet - -A Cloud HSM wallet built on AWS KMS -https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/KMS.html -When using the default credentials, it's expected to set the -aws_access_key_id and aws_secret_access_key in ~/.aws/credentials - -## Hierarchy - -* RemoteWallet‹[AwsHsmSigner](_aws_hsm_signer_.awshsmsigner.md)› - - ↳ **AwsHsmWallet** - -## Implements - -* ReadOnlyWallet -* ReadOnlyWallet -* ReadOnlyWallet - -## Index - -### Constructors - -* [constructor](_aws_hsm_wallet_.awshsmwallet.md#constructor) - -### Properties - -* [isSetupFinished](_aws_hsm_wallet_.awshsmwallet.md#issetupfinished) - -### Methods - -* [computeSharedSecret](_aws_hsm_wallet_.awshsmwallet.md#computesharedsecret) -* [decrypt](_aws_hsm_wallet_.awshsmwallet.md#decrypt) -* [getAccounts](_aws_hsm_wallet_.awshsmwallet.md#getaccounts) -* [getAddressFromKeyId](_aws_hsm_wallet_.awshsmwallet.md#getaddressfromkeyid) -* [hasAccount](_aws_hsm_wallet_.awshsmwallet.md#hasaccount) -* [init](_aws_hsm_wallet_.awshsmwallet.md#init) -* [removeAccount](_aws_hsm_wallet_.awshsmwallet.md#removeaccount) -* [signPersonalMessage](_aws_hsm_wallet_.awshsmwallet.md#signpersonalmessage) -* [signTransaction](_aws_hsm_wallet_.awshsmwallet.md#signtransaction) -* [signTypedData](_aws_hsm_wallet_.awshsmwallet.md#signtypeddata) - -## Constructors - -### constructor - -\+ **new AwsHsmWallet**(`awsCredentials?`: KMS.ClientConfiguration): *[AwsHsmWallet](_aws_hsm_wallet_.awshsmwallet.md)* - -*Defined in [wallet-hsm-aws/src/aws-hsm-wallet.ts:31](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-hsm-aws/src/aws-hsm-wallet.ts#L31)* - -**Parameters:** - -Name | Type | ------- | ------ | -`awsCredentials?` | KMS.ClientConfiguration | - -**Returns:** *[AwsHsmWallet](_aws_hsm_wallet_.awshsmwallet.md)* - -## Properties - -### isSetupFinished - -• **isSetupFinished**: *function* - -*Inherited from [AwsHsmWallet](_aws_hsm_wallet_.awshsmwallet.md).[isSetupFinished](_aws_hsm_wallet_.awshsmwallet.md#issetupfinished)* - -Defined in wallet-remote/lib/remote-wallet.d.ts:51 - -#### Type declaration: - -▸ (): *boolean* - -## Methods - -### computeSharedSecret - -▸ **computeSharedSecret**(`address`: Address, `publicKey`: string): *Promise‹Buffer›* - -*Inherited from [AwsHsmWallet](_aws_hsm_wallet_.awshsmwallet.md).[computeSharedSecret](_aws_hsm_wallet_.awshsmwallet.md#computesharedsecret)* - -Defined in wallet-base/lib/wallet-base.d.ts:64 - -Computes the shared secret (an ECDH key exchange object) between two accounts - -**Parameters:** - -Name | Type | ------- | ------ | -`address` | Address | -`publicKey` | string | - -**Returns:** *Promise‹Buffer›* - -___ - -### decrypt - -▸ **decrypt**(`address`: string, `ciphertext`: Buffer): *Promise‹Buffer›* - -*Inherited from [AwsHsmWallet](_aws_hsm_wallet_.awshsmwallet.md).[decrypt](_aws_hsm_wallet_.awshsmwallet.md#decrypt)* - -Defined in wallet-base/lib/wallet-base.d.ts:60 - -**Parameters:** - -Name | Type | ------- | ------ | -`address` | string | -`ciphertext` | Buffer | - -**Returns:** *Promise‹Buffer›* - -___ - -### getAccounts - -▸ **getAccounts**(): *Address[]* - -*Inherited from [AwsHsmWallet](_aws_hsm_wallet_.awshsmwallet.md).[getAccounts](_aws_hsm_wallet_.awshsmwallet.md#getaccounts)* - -*Overrides void* - -Defined in wallet-remote/lib/remote-wallet.d.ts:27 - -Get a list of accounts in the remote wallet - -**Returns:** *Address[]* - -___ - -### getAddressFromKeyId - -▸ **getAddressFromKeyId**(`keyId`: string): *Promise‹Address›* - -*Defined in [wallet-hsm-aws/src/aws-hsm-wallet.ts:92](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-hsm-aws/src/aws-hsm-wallet.ts#L92)* - -Returns the EVM address for the given key -Useful for initially getting the 'from' field given a keyName - -**Parameters:** - -Name | Type | ------- | ------ | -`keyId` | string | - -**Returns:** *Promise‹Address›* - -___ - -### hasAccount - -▸ **hasAccount**(`address?`: Address): *boolean* - -*Inherited from [AwsHsmWallet](_aws_hsm_wallet_.awshsmwallet.md).[hasAccount](_aws_hsm_wallet_.awshsmwallet.md#hasaccount)* - -*Overrides void* - -Defined in wallet-remote/lib/remote-wallet.d.ts:32 - -Returns true if account is in the remote wallet - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`address?` | Address | Account to check | - -**Returns:** *boolean* - -___ - -### init - -▸ **init**(): *Promise‹void›* - -*Inherited from [AwsHsmWallet](_aws_hsm_wallet_.awshsmwallet.md).[init](_aws_hsm_wallet_.awshsmwallet.md#init)* - -Defined in wallet-remote/lib/remote-wallet.d.ts:15 - -Discovers wallet accounts and caches results in memory -Idempotent to ensure multiple calls are benign - -**Returns:** *Promise‹void›* - -___ - -### removeAccount - -▸ **removeAccount**(`_address`: string): *void* - -*Inherited from [AwsHsmWallet](_aws_hsm_wallet_.awshsmwallet.md).[removeAccount](_aws_hsm_wallet_.awshsmwallet.md#removeaccount)* - -Defined in wallet-base/lib/wallet-base.d.ts:23 - -Removes the account with the given address. Needs to be implemented by subclass, otherwise throws error - -**Parameters:** - -Name | Type | ------- | ------ | -`_address` | string | - -**Returns:** *void* - -___ - -### signPersonalMessage - -▸ **signPersonalMessage**(`address`: Address, `data`: string): *Promise‹string›* - -*Inherited from [AwsHsmWallet](_aws_hsm_wallet_.awshsmwallet.md).[signPersonalMessage](_aws_hsm_wallet_.awshsmwallet.md#signpersonalmessage)* - -*Overrides void* - -Defined in wallet-remote/lib/remote-wallet.d.ts:43 - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`address` | Address | Address of the account to sign with | -`data` | string | Hex string message to sign | - -**Returns:** *Promise‹string›* - -Signature hex string (order: rsv) - -___ - -### signTransaction - -▸ **signTransaction**(`txParams`: CeloTx): *Promise‹EncodedTransaction›* - -*Inherited from [AwsHsmWallet](_aws_hsm_wallet_.awshsmwallet.md).[signTransaction](_aws_hsm_wallet_.awshsmwallet.md#signtransaction)* - -*Overrides void* - -Defined in wallet-remote/lib/remote-wallet.d.ts:37 - -Signs the EVM transaction using the signer pulled from the from field - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`txParams` | CeloTx | EVM transaction | - -**Returns:** *Promise‹EncodedTransaction›* - -___ - -### signTypedData - -▸ **signTypedData**(`address`: Address, `typedData`: EIP712TypedData): *Promise‹string›* - -*Inherited from [AwsHsmWallet](_aws_hsm_wallet_.awshsmwallet.md).[signTypedData](_aws_hsm_wallet_.awshsmwallet.md#signtypeddata)* - -*Overrides void* - -Defined in wallet-remote/lib/remote-wallet.d.ts:49 - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`address` | Address | Address of the account to sign with | -`typedData` | EIP712TypedData | the typed data object | - -**Returns:** *Promise‹string›* - -Signature hex string (order: rsv) diff --git a/packages/docs/developer-resources/wallet-hsm-aws/reference/globals.md b/packages/docs/developer-resources/wallet-hsm-aws/reference/globals.md deleted file mode 100644 index 26096b72c1f..00000000000 --- a/packages/docs/developer-resources/wallet-hsm-aws/reference/globals.md +++ /dev/null @@ -1,8 +0,0 @@ -# @celo/wallet-hsm-aws - -## Index - -### Modules - -* ["aws-hsm-signer"](modules/_aws_hsm_signer_.md) -* ["aws-hsm-wallet"](modules/_aws_hsm_wallet_.md) diff --git a/packages/docs/developer-resources/wallet-hsm-aws/reference/modules/_aws_hsm_signer_.md b/packages/docs/developer-resources/wallet-hsm-aws/reference/modules/_aws_hsm_signer_.md deleted file mode 100644 index a43ad84f727..00000000000 --- a/packages/docs/developer-resources/wallet-hsm-aws/reference/modules/_aws_hsm_signer_.md +++ /dev/null @@ -1,7 +0,0 @@ -# Module: "aws-hsm-signer" - -## Index - -### Classes - -* [AwsHsmSigner](../classes/_aws_hsm_signer_.awshsmsigner.md) diff --git a/packages/docs/developer-resources/wallet-hsm-aws/reference/modules/_aws_hsm_wallet_.md b/packages/docs/developer-resources/wallet-hsm-aws/reference/modules/_aws_hsm_wallet_.md deleted file mode 100644 index 93ca7e6e292..00000000000 --- a/packages/docs/developer-resources/wallet-hsm-aws/reference/modules/_aws_hsm_wallet_.md +++ /dev/null @@ -1,7 +0,0 @@ -# Module: "aws-hsm-wallet" - -## Index - -### Classes - -* [AwsHsmWallet](../classes/_aws_hsm_wallet_.awshsmwallet.md) diff --git a/packages/docs/developer-resources/wallet-hsm-azure/reference/README.md b/packages/docs/developer-resources/wallet-hsm-azure/reference/README.md deleted file mode 100644 index be93b3fa6b3..00000000000 --- a/packages/docs/developer-resources/wallet-hsm-azure/reference/README.md +++ /dev/null @@ -1,162 +0,0 @@ -# @celo/wallet-hsm-azure - -

- - celo logo - -

- -**Celo Monorepo - Official repository for core projects comprising the Celo platform** - -This repository contains the source code for the Celo core projects including the [smart contracts](https://github.com/celo-org/celo-monorepo/tree/master/packages/protocol), [wallet app](https://github.com/celo-org/celo-monorepo/tree/master/packages/mobile), -and other packages. The source code for the Celo Blockchain which operates a node on the Celo Network is kept in a separate repo [here](https://github.com/celo-org/celo-blockchain). - - - -[![CircleCI](https://img.shields.io/circleci/build/github/celo-org/celo-monorepo/master)](https://circleci.com/gh/celo-org/celo-monorepo/tree/master) -[![Codecov](https://img.shields.io/codecov/c/github/celo-org/celo-monorepo)](https://codecov.io/gh/celo-org/celo-monorepo) -[![GitHub contributors](https://img.shields.io/github/contributors/celo-org/celo-monorepo)](https://github.com/celo-org/celo-monorepo/graphs/contributors) -[![GitHub commit activity](https://img.shields.io/github/commit-activity/w/celo-org/celo-monorepo)](https://github.com/celo-org/celo-monorepo/graphs/contributors) -[![GitHub Stars](https://img.shields.io/github/stars/celo-org/celo-monorepo.svg)](https://github.com/celo-org/celo-monorepo/stargazers) -![GitHub repo size](https://img.shields.io/github/repo-size/celo-org/celo-monorepo) -[![GitHub](https://img.shields.io/github/license/celo-org/celo-monorepo?color=blue)](https://github.com/celo-org/celo-monorepo/blob/master/LICENSE) - - - -[![Website celo.org](https://img.shields.io/website-up-down-green-red/https/celo.org.svg)](https://celo.org) -[![Blog](https://img.shields.io/badge/blog-up-green)](https://medium.com/celoorg) -[![docs](https://img.shields.io/badge/docs-up-green)](https://docs.celo.org/) -[![Youtube](https://img.shields.io/badge/YouTube%20channel-up-green)](https://www.youtube.com/channel/UCCZgos_YAJSXm5QX5D5Wkcw/videos?view=0&sort=p&flow=grid) -[![forum](https://img.shields.io/badge/forum-up-green)](https://forum.celo.org) -[![Discord](https://img.shields.io/discord/600834479145353243.svg)](https://discord.gg/RfHQKtY) -[![Twitter CeloDevs](https://img.shields.io/twitter/follow/celodevs?style=social)](https://twitter.com/celodevs) -[![Twitter CeloOrg](https://img.shields.io/twitter/follow/celoorg?style=social)](https://twitter.com/CeloOrg) -[![Subreddit subscribers](https://img.shields.io/reddit/subreddit-subscribers/CeloHQ?style=social)](https://www.reddit.com/r/CeloHQ/) - - - -[![GitHub pull requests by-label](https://img.shields.io/github/issues-pr-raw/celo-org/celo-monorepo)](https://github.com/celo-org/celo-monorepo/pulls) -[![GitHub Issues](https://img.shields.io/github/issues-raw/celo-org/celo-monorepo.svg)](https://github.com/celo-org/celo-monorepo/issues) -[![GitHub issues by-label](https://img.shields.io/github/issues/celo-org/celo-monorepo/1%20hour%20tasks)](https://github.com/celo-org/celo-monorepo/issues?q=is%3Aopen+is%3Aissue+label%3A%221+hour+tasks%22) -[![GitHub issues by-label](https://img.shields.io/github/issues/celo-org/celo-monorepo/betanet-phase-2)](https://github.com/celo-org/celo-monorepo/issues?q=is%3Aopen+is%3Aissue+label%3Abetanet-phase-2) -[![GitHub issues by-label](https://img.shields.io/github/issues/celo-org/celo-monorepo/betanet-phase-3)](https://github.com/celo-org/celo-monorepo/issues?q=is%3Aopen+is%3Aissue+label%3Abetanet-phase-3) - -Contents: - - - -- [Celo's Mission - Prosperity for All](#mission) -- [The Celo Stack](#stack) -- [Documentation](#docs) -- [Issues](#issues) -- [Repo Structure](#repo) -- [Contributing](#contributing) -- [Ask Questions, Find Answers, Get in Touch](#ask) -- [License](#license) - - -## 🥅 Celo's Mission - Prosperity for All - -Celo, pronounced /ˈtselo/, means ‘purpose’ in Esperanto. In a similar spirit, we are aiming to create a new platform to connect people globally and bring financial stability to those who need it most. We believe blockchain technology is one of the most exciting innovations in recent history and as a community we look to push the boundaries of what is possible with it today. More importantly, we are driven by purpose -- to solve real-world problems such as lack of access to sound currency, or friction for cash-transfer programs aimed to alleviate poverty. Our mission is to build a monetary system that creates the conditions for prosperity for all. - - -

- - Play on Youtube - What if money were beautiful - -
- What if money were beautiful? -

- -## 🧱 The Celo Stack - -Celo is oriented around providing the simplest possible experience for end users, who may have no familiarity with cryptocurrencies, and may be using low cost devices with limited connectivity. To achieve this, the project takes a full-stack approach, where each layer of the stack is designed with the end user in mind whilst considering other stakeholders \(e.g. operators of nodes in the network\) involved in enabling the end user experience. - -The Celo stack is structured into the following logical layers: - - -

- Celo protocol -
- The Celo Blockchain and Celo Core Contracts together comprise the Celo Protocol -

- -- **Celo Blockchain**: An open cryptographic protocol that allows applications to make transactions with and run smart contracts in a secure and decentralized fashion. The Celo Blockchain has shared ancestry with [Ethereum](https://www.ethereum.org), and maintains full EVM compatibility for smart contracts. However it uses a [Byzantine Fault Tolerant](http://pmg.csail.mit.edu/papers/osdi99.pdf) \(BFT\) consensus mechanism rather than Proof of Work, and has different block format, transaction format, client synchronization protocols, and gas payment and pricing mechanisms. The network’s native asset is Celo Gold, exposed via an ERC-20 interface. - -- **Celo Core Contracts**: A set of smart contracts running on the Celo Blockchain that comprise much of the logic of the platform features including ERC-20 stable currencies, identity attestations, Proof of Stake and governance. These smart contracts are upgradeable and managed by the decentralized governance process. - - -

- Celo network -
- Topology of a Celo Network -

- -- **Applications:** Applications for end users built on the Celo platform. The Celo Wallet app, the first of an ecosystem of applications, allows end users to manage accounts and make payments securely and simply by taking advantage of the innovations in the Celo protocol. Applications take the form of external mobile or backend software: they interact with the Celo Blockchain to issue transactions and invoke code that forms the Celo Core Contracts’ API. Third parties can also deploy custom smart contracts that their own applications can invoke, which in turn can leverage Celo Core Contracts. Applications may use centralized cloud services to provide some of their functionality: in the case of the Celo Wallet, push notifications and a transaction activity feed. - -## 📚 Documentation - -Follow the instructions in [SETUP.md](SETUP.md) to get a development environment set up. - -See [Developer's Guide](https://docs.celo.org/) for full details about the design of the Celo protocol and other information about running these projects. - -## 🙋 Issues - -See the [issue backlog](https://github.com/celo-org/celo-monorepo/issues) for a list of active or proposed tasks. Feel free to create new issues to report bugs and/or request features. - -## 📂 Repo Structure - -The repository has the following packages (sub projects): - -- [attestation-service](packages/attestation-service) - service run by validators on the Celo network to send SMS messages, enabling attestations of user phone numbers and their accounts on the Celo network -- [blockchain-api](packages/blockchain-api) - service that uses Blockscout to present view of transactions by account for Celo Wallet activity feed -- [celotool](packages/celotool) - scripts for deploying and managing testnets -- [cli](packages/cli) - tool that uses ContractKit to interact with the Celo protocol ([docs](https://docs.celo.org/getting-started/using-the-cli)) -- [contractkit](packages/contractkit) - library to help developers and validators interact with the protocol and it's smart contracts ([docs](https://docs.celo.org/celo-sdk/contractkit)) -- [dappkit](packages/dappkit) - set of functions for mobile DApps to work with the wallet app (ex. sign transactions and access the user's account) ([docs](https://docs.celo.org/celo-sdk/dappkit)) -- [dev-utils](packages/dev-utils) - a utils package for use as a dev dependency -- [docs](packages/docs) - technical documentation for the Celo project ([live](https://docs.celo.org/)) -- [faucet](packages/faucet) - faucet deployment configuration ([live](https://celo.org/build/faucet)) -- [helm-charts](packages/helm-charts) - templatized deployments of entire environments to Kubernetes clusters -- [mobile](packages/mobile) - Android wallet app for the Celo platform ([docs](https://docs.celo.org/getting-started/using-the-mobile-wallet), [live](https://play.google.com/store/apps/details?id=org.celo.mobile.alfajores)) -- [notification-service](packages/notification-service) - service for managing push notifications for Celo Wallet -- [protocol](packages/protocol) - identity, stability and other smart contracts for the Celo protocol ([docs](https://docs.celo.org/celo-codebase/protocol)) -- [react-components](packages/react-components) - generalized react native components -- [reserve-site](packages/reserve-site) - website for ([Celo Reserve.org](https://celoreserve.org/)) -- [terraform-modules](packages/terraform-modules) - templatized deployments of entire VM-based testnets for Google Cloud Platform -- [typescript](packages/typescript) - no README available (improve?) -- [utils](packages/utils) - no README available (improve?) - -Code owners for each package can be found in [.github/CODEOWNERS](.github/CODEOWNERS). - -## ✍️ Contributing - -Feel free to jump on the Celo 🚂🚋🚋🚋. Improvements and contributions are highly encouraged! 🙏👊 - -See the [contributing guide](https://docs.celo.org/community/contributing) for details on how to participate. -[![GitHub issues by-label](https://img.shields.io/github/issues/celo-org/celo-monorepo/1%20hour%20tasks)](https://github.com/celo-org/celo-monorepo/issues?q=is%3Aopen+is%3Aissue+label%3A%221+hour+tasks%22) - -All communication and contributions to the Celo project are subject to the [Celo Code of Conduct](https://celo.org/code-of-conduct). - -Not yet ready to contribute but do like the project? Support Celo with a ⭐ or share the love in a [![Twitter URL](https://img.shields.io/twitter/url?style=social&url=https%3A%2F%2Fcelo.org%2F)](https://twitter.com/intent/tweet?url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DkKggE5OvyhE&via=celohq&text=Checkout%20celo%21%20Love%20what%20they%20are%20building.&hashtags=celo) - - - -## 💬 Ask Questions, Find Answers, Get in Touch - -- [Website](https://celo.org/) -- [Docs](https://docs.celo.org/) -- [Blog](https://medium.com/celohq) -- [YouTube](https://www.youtube.com/channel/UCCZgos_YAJSXm5QX5D5Wkcw/videos?view=0&sort=p&flow=grid) -- [Forum](https://forum.celo.org) -- [Discord](https://discord.gg/vRbExjv) -- [Twitter](https://twitter.com/CeloDevs) -- [Reddit](https://www.reddit.com/r/CeloHQ/) -- [Community Events](https://celo.org/community) - -## 📜 License - -All packages are licensed under the terms of the [Apache 2.0 License](LICENSE) unless otherwise specified in the LICENSE file at package's root. diff --git a/packages/docs/developer-resources/wallet-hsm-azure/reference/SUMMARY.md b/packages/docs/developer-resources/wallet-hsm-azure/reference/SUMMARY.md deleted file mode 100644 index 841046759aa..00000000000 --- a/packages/docs/developer-resources/wallet-hsm-azure/reference/SUMMARY.md +++ /dev/null @@ -1,12 +0,0 @@ -* [Globals](globals.md) -* [Modules]() - * [azure-hsm-signer](modules/_azure_hsm_signer_.md) - * [AzureHSMSigner](classes/_azure_hsm_signer_.azurehsmsigner.md) - * [azure-hsm-wallet](modules/_azure_hsm_wallet_.md) - * [AzureHSMWallet](classes/_azure_hsm_wallet_.azurehsmwallet.md) - * [azure-key-vault-client](modules/_azure_key_vault_client_.md) - * [AzureKeyVaultClient](classes/_azure_key_vault_client_.azurekeyvaultclient.md) -* [Classes]() - * [AzureHSMSigner](classes/_azure_hsm_signer_.azurehsmsigner.md) - * [AzureHSMWallet](classes/_azure_hsm_wallet_.azurehsmwallet.md) - * [AzureKeyVaultClient](classes/_azure_key_vault_client_.azurekeyvaultclient.md) \ No newline at end of file diff --git a/packages/docs/developer-resources/wallet-hsm-azure/reference/classes/_azure_hsm_signer_.azurehsmsigner.md b/packages/docs/developer-resources/wallet-hsm-azure/reference/classes/_azure_hsm_signer_.azurehsmsigner.md deleted file mode 100644 index d387d36df90..00000000000 --- a/packages/docs/developer-resources/wallet-hsm-azure/reference/classes/_azure_hsm_signer_.azurehsmsigner.md +++ /dev/null @@ -1,134 +0,0 @@ -# Class: AzureHSMSigner - -Signs the EVM transaction using an HSM key in Azure Key Vault - -## Hierarchy - -* **AzureHSMSigner** - -## Implements - -* Signer - -## Index - -### Constructors - -* [constructor](_azure_hsm_signer_.azurehsmsigner.md#constructor) - -### Methods - -* [computeSharedSecret](_azure_hsm_signer_.azurehsmsigner.md#computesharedsecret) -* [decrypt](_azure_hsm_signer_.azurehsmsigner.md#decrypt) -* [getNativeKey](_azure_hsm_signer_.azurehsmsigner.md#getnativekey) -* [signPersonalMessage](_azure_hsm_signer_.azurehsmsigner.md#signpersonalmessage) -* [signTransaction](_azure_hsm_signer_.azurehsmsigner.md#signtransaction) -* [signTypedData](_azure_hsm_signer_.azurehsmsigner.md#signtypeddata) - -## Constructors - -### constructor - -\+ **new AzureHSMSigner**(`keyVaultClient`: [AzureKeyVaultClient](_azure_key_vault_client_.azurekeyvaultclient.md), `keyName`: string): *[AzureHSMSigner](_azure_hsm_signer_.azurehsmsigner.md)* - -*Defined in [wallet-hsm-azure/src/azure-hsm-signer.ts:13](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-hsm-azure/src/azure-hsm-signer.ts#L13)* - -**Parameters:** - -Name | Type | ------- | ------ | -`keyVaultClient` | [AzureKeyVaultClient](_azure_key_vault_client_.azurekeyvaultclient.md) | -`keyName` | string | - -**Returns:** *[AzureHSMSigner](_azure_hsm_signer_.azurehsmsigner.md)* - -## Methods - -### computeSharedSecret - -▸ **computeSharedSecret**(`_publicKey`: string): *Promise‹Buffer‹››* - -*Defined in [wallet-hsm-azure/src/azure-hsm-signer.ts:81](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-hsm-azure/src/azure-hsm-signer.ts#L81)* - -**Parameters:** - -Name | Type | ------- | ------ | -`_publicKey` | string | - -**Returns:** *Promise‹Buffer‹››* - -___ - -### decrypt - -▸ **decrypt**(`_ciphertext`: Buffer): *Promise‹Buffer‹››* - -*Defined in [wallet-hsm-azure/src/azure-hsm-signer.ts:75](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-hsm-azure/src/azure-hsm-signer.ts#L75)* - -**Parameters:** - -Name | Type | ------- | ------ | -`_ciphertext` | Buffer | - -**Returns:** *Promise‹Buffer‹››* - -___ - -### getNativeKey - -▸ **getNativeKey**(): *string* - -*Defined in [wallet-hsm-azure/src/azure-hsm-signer.ts:71](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-hsm-azure/src/azure-hsm-signer.ts#L71)* - -**Returns:** *string* - -___ - -### signPersonalMessage - -▸ **signPersonalMessage**(`data`: string): *Promise‹object›* - -*Defined in [wallet-hsm-azure/src/azure-hsm-signer.ts:39](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-hsm-azure/src/azure-hsm-signer.ts#L39)* - -**Parameters:** - -Name | Type | ------- | ------ | -`data` | string | - -**Returns:** *Promise‹object›* - -___ - -### signTransaction - -▸ **signTransaction**(`addToV`: number, `encodedTx`: RLPEncodedTx): *Promise‹object›* - -*Defined in [wallet-hsm-azure/src/azure-hsm-signer.ts:23](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-hsm-azure/src/azure-hsm-signer.ts#L23)* - -**Parameters:** - -Name | Type | ------- | ------ | -`addToV` | number | -`encodedTx` | RLPEncodedTx | - -**Returns:** *Promise‹object›* - -___ - -### signTypedData - -▸ **signTypedData**(`typedData`: EIP712TypedData): *Promise‹object›* - -*Defined in [wallet-hsm-azure/src/azure-hsm-signer.ts:57](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-hsm-azure/src/azure-hsm-signer.ts#L57)* - -**Parameters:** - -Name | Type | ------- | ------ | -`typedData` | EIP712TypedData | - -**Returns:** *Promise‹object›* diff --git a/packages/docs/developer-resources/wallet-hsm-azure/reference/classes/_azure_hsm_wallet_.azurehsmwallet.md b/packages/docs/developer-resources/wallet-hsm-azure/reference/classes/_azure_hsm_wallet_.azurehsmwallet.md deleted file mode 100644 index e1d28937571..00000000000 --- a/packages/docs/developer-resources/wallet-hsm-azure/reference/classes/_azure_hsm_wallet_.azurehsmwallet.md +++ /dev/null @@ -1,266 +0,0 @@ -# Class: AzureHSMWallet - -## Hierarchy - -* RemoteWallet‹[AzureHSMSigner](_azure_hsm_signer_.azurehsmsigner.md)› - - ↳ **AzureHSMWallet** - -## Implements - -* ReadOnlyWallet -* ReadOnlyWallet -* ReadOnlyWallet - -## Index - -### Constructors - -* [constructor](_azure_hsm_wallet_.azurehsmwallet.md#constructor) - -### Properties - -* [isSetupFinished](_azure_hsm_wallet_.azurehsmwallet.md#issetupfinished) - -### Methods - -* [computeSharedSecret](_azure_hsm_wallet_.azurehsmwallet.md#computesharedsecret) -* [decrypt](_azure_hsm_wallet_.azurehsmwallet.md#decrypt) -* [getAccounts](_azure_hsm_wallet_.azurehsmwallet.md#getaccounts) -* [getAddressFromKeyName](_azure_hsm_wallet_.azurehsmwallet.md#getaddressfromkeyname) -* [hasAccount](_azure_hsm_wallet_.azurehsmwallet.md#hasaccount) -* [init](_azure_hsm_wallet_.azurehsmwallet.md#init) -* [removeAccount](_azure_hsm_wallet_.azurehsmwallet.md#removeaccount) -* [signPersonalMessage](_azure_hsm_wallet_.azurehsmwallet.md#signpersonalmessage) -* [signTransaction](_azure_hsm_wallet_.azurehsmwallet.md#signtransaction) -* [signTypedData](_azure_hsm_wallet_.azurehsmwallet.md#signtypeddata) - -## Constructors - -### constructor - -\+ **new AzureHSMWallet**(`vaultName`: string): *[AzureHSMWallet](_azure_hsm_wallet_.azurehsmwallet.md)* - -*Defined in [wallet-hsm-azure/src/azure-hsm-wallet.ts:12](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-hsm-azure/src/azure-hsm-wallet.ts#L12)* - -**Parameters:** - -Name | Type | ------- | ------ | -`vaultName` | string | - -**Returns:** *[AzureHSMWallet](_azure_hsm_wallet_.azurehsmwallet.md)* - -## Properties - -### isSetupFinished - -• **isSetupFinished**: *function* - -*Inherited from [AzureHSMWallet](_azure_hsm_wallet_.azurehsmwallet.md).[isSetupFinished](_azure_hsm_wallet_.azurehsmwallet.md#issetupfinished)* - -Defined in wallet-remote/lib/remote-wallet.d.ts:51 - -#### Type declaration: - -▸ (): *boolean* - -## Methods - -### computeSharedSecret - -▸ **computeSharedSecret**(`address`: Address, `publicKey`: string): *Promise‹Buffer›* - -*Inherited from [AzureHSMWallet](_azure_hsm_wallet_.azurehsmwallet.md).[computeSharedSecret](_azure_hsm_wallet_.azurehsmwallet.md#computesharedsecret)* - -Defined in wallet-base/lib/wallet-base.d.ts:64 - -Computes the shared secret (an ECDH key exchange object) between two accounts - -**Parameters:** - -Name | Type | ------- | ------ | -`address` | Address | -`publicKey` | string | - -**Returns:** *Promise‹Buffer›* - -___ - -### decrypt - -▸ **decrypt**(`address`: string, `ciphertext`: Buffer): *Promise‹Buffer›* - -*Inherited from [AzureHSMWallet](_azure_hsm_wallet_.azurehsmwallet.md).[decrypt](_azure_hsm_wallet_.azurehsmwallet.md#decrypt)* - -Defined in wallet-base/lib/wallet-base.d.ts:60 - -**Parameters:** - -Name | Type | ------- | ------ | -`address` | string | -`ciphertext` | Buffer | - -**Returns:** *Promise‹Buffer›* - -___ - -### getAccounts - -▸ **getAccounts**(): *Address[]* - -*Inherited from [AzureHSMWallet](_azure_hsm_wallet_.azurehsmwallet.md).[getAccounts](_azure_hsm_wallet_.azurehsmwallet.md#getaccounts)* - -*Overrides void* - -Defined in wallet-remote/lib/remote-wallet.d.ts:27 - -Get a list of accounts in the remote wallet - -**Returns:** *Address[]* - -___ - -### getAddressFromKeyName - -▸ **getAddressFromKeyName**(`keyName`: string): *Promise‹Address›* - -*Defined in [wallet-hsm-azure/src/azure-hsm-wallet.ts:50](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-hsm-azure/src/azure-hsm-wallet.ts#L50)* - -Returns the EVM address for the given key -Useful for initially getting the 'from' field given a keyName - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`keyName` | string | Azure KeyVault key name | - -**Returns:** *Promise‹Address›* - -___ - -### hasAccount - -▸ **hasAccount**(`address?`: Address): *boolean* - -*Inherited from [AzureHSMWallet](_azure_hsm_wallet_.azurehsmwallet.md).[hasAccount](_azure_hsm_wallet_.azurehsmwallet.md#hasaccount)* - -*Overrides void* - -Defined in wallet-remote/lib/remote-wallet.d.ts:32 - -Returns true if account is in the remote wallet - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`address?` | Address | Account to check | - -**Returns:** *boolean* - -___ - -### init - -▸ **init**(): *Promise‹void›* - -*Inherited from [AzureHSMWallet](_azure_hsm_wallet_.azurehsmwallet.md).[init](_azure_hsm_wallet_.azurehsmwallet.md#init)* - -Defined in wallet-remote/lib/remote-wallet.d.ts:15 - -Discovers wallet accounts and caches results in memory -Idempotent to ensure multiple calls are benign - -**Returns:** *Promise‹void›* - -___ - -### removeAccount - -▸ **removeAccount**(`_address`: string): *void* - -*Inherited from [AzureHSMWallet](_azure_hsm_wallet_.azurehsmwallet.md).[removeAccount](_azure_hsm_wallet_.azurehsmwallet.md#removeaccount)* - -Defined in wallet-base/lib/wallet-base.d.ts:23 - -Removes the account with the given address. Needs to be implemented by subclass, otherwise throws error - -**Parameters:** - -Name | Type | ------- | ------ | -`_address` | string | - -**Returns:** *void* - -___ - -### signPersonalMessage - -▸ **signPersonalMessage**(`address`: Address, `data`: string): *Promise‹string›* - -*Inherited from [AzureHSMWallet](_azure_hsm_wallet_.azurehsmwallet.md).[signPersonalMessage](_azure_hsm_wallet_.azurehsmwallet.md#signpersonalmessage)* - -*Overrides void* - -Defined in wallet-remote/lib/remote-wallet.d.ts:43 - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`address` | Address | Address of the account to sign with | -`data` | string | Hex string message to sign | - -**Returns:** *Promise‹string›* - -Signature hex string (order: rsv) - -___ - -### signTransaction - -▸ **signTransaction**(`txParams`: CeloTx): *Promise‹EncodedTransaction›* - -*Inherited from [AzureHSMWallet](_azure_hsm_wallet_.azurehsmwallet.md).[signTransaction](_azure_hsm_wallet_.azurehsmwallet.md#signtransaction)* - -*Overrides void* - -Defined in wallet-remote/lib/remote-wallet.d.ts:37 - -Signs the EVM transaction using the signer pulled from the from field - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`txParams` | CeloTx | EVM transaction | - -**Returns:** *Promise‹EncodedTransaction›* - -___ - -### signTypedData - -▸ **signTypedData**(`address`: Address, `typedData`: EIP712TypedData): *Promise‹string›* - -*Inherited from [AzureHSMWallet](_azure_hsm_wallet_.azurehsmwallet.md).[signTypedData](_azure_hsm_wallet_.azurehsmwallet.md#signtypeddata)* - -*Overrides void* - -Defined in wallet-remote/lib/remote-wallet.d.ts:49 - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`address` | Address | Address of the account to sign with | -`typedData` | EIP712TypedData | the typed data object | - -**Returns:** *Promise‹string›* - -Signature hex string (order: rsv) diff --git a/packages/docs/developer-resources/wallet-hsm-azure/reference/classes/_azure_key_vault_client_.azurekeyvaultclient.md b/packages/docs/developer-resources/wallet-hsm-azure/reference/classes/_azure_key_vault_client_.azurekeyvaultclient.md deleted file mode 100644 index 4a5127a8658..00000000000 --- a/packages/docs/developer-resources/wallet-hsm-azure/reference/classes/_azure_key_vault_client_.azurekeyvaultclient.md +++ /dev/null @@ -1,130 +0,0 @@ -# Class: AzureKeyVaultClient - -Provides an abstraction on Azure Key Vault for performing signing operations - -## Hierarchy - -* **AzureKeyVaultClient** - -## Index - -### Constructors - -* [constructor](_azure_key_vault_client_.azurekeyvaultclient.md#constructor) - -### Methods - -* [getKeyId](_azure_key_vault_client_.azurekeyvaultclient.md#getkeyid) -* [getKeys](_azure_key_vault_client_.azurekeyvaultclient.md#getkeys) -* [getPublicKey](_azure_key_vault_client_.azurekeyvaultclient.md#getpublickey) -* [getSecret](_azure_key_vault_client_.azurekeyvaultclient.md#getsecret) -* [hasKey](_azure_key_vault_client_.azurekeyvaultclient.md#haskey) -* [signMessage](_azure_key_vault_client_.azurekeyvaultclient.md#signmessage) - -## Constructors - -### constructor - -\+ **new AzureKeyVaultClient**(`vaultName`: string, `credential?`: TokenCredential): *[AzureKeyVaultClient](_azure_key_vault_client_.azurekeyvaultclient.md)* - -*Defined in [wallet-hsm-azure/src/azure-key-vault-client.ts:42](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-hsm-azure/src/azure-key-vault-client.ts#L42)* - -**Parameters:** - -Name | Type | ------- | ------ | -`vaultName` | string | -`credential?` | TokenCredential | - -**Returns:** *[AzureKeyVaultClient](_azure_key_vault_client_.azurekeyvaultclient.md)* - -## Methods - -### getKeyId - -▸ **getKeyId**(`keyName`: string): *Promise‹string›* - -*Defined in [wallet-hsm-azure/src/azure-key-vault-client.ts:75](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-hsm-azure/src/azure-key-vault-client.ts#L75)* - -**Parameters:** - -Name | Type | ------- | ------ | -`keyName` | string | - -**Returns:** *Promise‹string›* - -___ - -### getKeys - -▸ **getKeys**(): *Promise‹string[]›* - -*Defined in [wallet-hsm-azure/src/azure-key-vault-client.ts:54](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-hsm-azure/src/azure-key-vault-client.ts#L54)* - -**Returns:** *Promise‹string[]›* - -___ - -### getPublicKey - -▸ **getPublicKey**(`keyName`: string): *Promise‹BigNumber›* - -*Defined in [wallet-hsm-azure/src/azure-key-vault-client.ts:62](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-hsm-azure/src/azure-key-vault-client.ts#L62)* - -**Parameters:** - -Name | Type | ------- | ------ | -`keyName` | string | - -**Returns:** *Promise‹BigNumber›* - -___ - -### getSecret - -▸ **getSecret**(`secretName`: string): *Promise‹string›* - -*Defined in [wallet-hsm-azure/src/azure-key-vault-client.ts:135](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-hsm-azure/src/azure-key-vault-client.ts#L135)* - -**Parameters:** - -Name | Type | ------- | ------ | -`secretName` | string | - -**Returns:** *Promise‹string›* - -___ - -### hasKey - -▸ **hasKey**(`keyName`: string): *Promise‹boolean›* - -*Defined in [wallet-hsm-azure/src/azure-key-vault-client.ts:123](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-hsm-azure/src/azure-key-vault-client.ts#L123)* - -**Parameters:** - -Name | Type | ------- | ------ | -`keyName` | string | - -**Returns:** *Promise‹boolean›* - -___ - -### signMessage - -▸ **signMessage**(`message`: Buffer, `keyName`: string): *Promise‹Signature›* - -*Defined in [wallet-hsm-azure/src/azure-key-vault-client.ts:82](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-hsm-azure/src/azure-key-vault-client.ts#L82)* - -**Parameters:** - -Name | Type | ------- | ------ | -`message` | Buffer | -`keyName` | string | - -**Returns:** *Promise‹Signature›* diff --git a/packages/docs/developer-resources/wallet-hsm-azure/reference/globals.md b/packages/docs/developer-resources/wallet-hsm-azure/reference/globals.md deleted file mode 100644 index 90e164d39df..00000000000 --- a/packages/docs/developer-resources/wallet-hsm-azure/reference/globals.md +++ /dev/null @@ -1,9 +0,0 @@ -# @celo/wallet-hsm-azure - -## Index - -### Modules - -* ["azure-hsm-signer"](modules/_azure_hsm_signer_.md) -* ["azure-hsm-wallet"](modules/_azure_hsm_wallet_.md) -* ["azure-key-vault-client"](modules/_azure_key_vault_client_.md) diff --git a/packages/docs/developer-resources/wallet-hsm-azure/reference/modules/_azure_hsm_signer_.md b/packages/docs/developer-resources/wallet-hsm-azure/reference/modules/_azure_hsm_signer_.md deleted file mode 100644 index ee634d63041..00000000000 --- a/packages/docs/developer-resources/wallet-hsm-azure/reference/modules/_azure_hsm_signer_.md +++ /dev/null @@ -1,7 +0,0 @@ -# Module: "azure-hsm-signer" - -## Index - -### Classes - -* [AzureHSMSigner](../classes/_azure_hsm_signer_.azurehsmsigner.md) diff --git a/packages/docs/developer-resources/wallet-hsm-azure/reference/modules/_azure_hsm_wallet_.md b/packages/docs/developer-resources/wallet-hsm-azure/reference/modules/_azure_hsm_wallet_.md deleted file mode 100644 index b67b2de7eeb..00000000000 --- a/packages/docs/developer-resources/wallet-hsm-azure/reference/modules/_azure_hsm_wallet_.md +++ /dev/null @@ -1,7 +0,0 @@ -# Module: "azure-hsm-wallet" - -## Index - -### Classes - -* [AzureHSMWallet](../classes/_azure_hsm_wallet_.azurehsmwallet.md) diff --git a/packages/docs/developer-resources/wallet-hsm-azure/reference/modules/_azure_key_vault_client_.md b/packages/docs/developer-resources/wallet-hsm-azure/reference/modules/_azure_key_vault_client_.md deleted file mode 100644 index 01e97dacd6d..00000000000 --- a/packages/docs/developer-resources/wallet-hsm-azure/reference/modules/_azure_key_vault_client_.md +++ /dev/null @@ -1,7 +0,0 @@ -# Module: "azure-key-vault-client" - -## Index - -### Classes - -* [AzureKeyVaultClient](../classes/_azure_key_vault_client_.azurekeyvaultclient.md) diff --git a/packages/docs/developer-resources/wallet-hsm/reference/README.md b/packages/docs/developer-resources/wallet-hsm/reference/README.md deleted file mode 100644 index 0112cbea2a0..00000000000 --- a/packages/docs/developer-resources/wallet-hsm/reference/README.md +++ /dev/null @@ -1,162 +0,0 @@ -# @celo/wallet-hsm - -

- - celo logo - -

- -**Celo Monorepo - Official repository for core projects comprising the Celo platform** - -This repository contains the source code for the Celo core projects including the [smart contracts](https://github.com/celo-org/celo-monorepo/tree/master/packages/protocol), [wallet app](https://github.com/celo-org/celo-monorepo/tree/master/packages/mobile), -and other packages. The source code for the Celo Blockchain which operates a node on the Celo Network is kept in a separate repo [here](https://github.com/celo-org/celo-blockchain). - - - -[![CircleCI](https://img.shields.io/circleci/build/github/celo-org/celo-monorepo/master)](https://circleci.com/gh/celo-org/celo-monorepo/tree/master) -[![Codecov](https://img.shields.io/codecov/c/github/celo-org/celo-monorepo)](https://codecov.io/gh/celo-org/celo-monorepo) -[![GitHub contributors](https://img.shields.io/github/contributors/celo-org/celo-monorepo)](https://github.com/celo-org/celo-monorepo/graphs/contributors) -[![GitHub commit activity](https://img.shields.io/github/commit-activity/w/celo-org/celo-monorepo)](https://github.com/celo-org/celo-monorepo/graphs/contributors) -[![GitHub Stars](https://img.shields.io/github/stars/celo-org/celo-monorepo.svg)](https://github.com/celo-org/celo-monorepo/stargazers) -![GitHub repo size](https://img.shields.io/github/repo-size/celo-org/celo-monorepo) -[![GitHub](https://img.shields.io/github/license/celo-org/celo-monorepo?color=blue)](https://github.com/celo-org/celo-monorepo/blob/master/LICENSE) - - - -[![Website celo.org](https://img.shields.io/website-up-down-green-red/https/celo.org.svg)](https://celo.org) -[![Blog](https://img.shields.io/badge/blog-up-green)](https://medium.com/celoorg) -[![docs](https://img.shields.io/badge/docs-up-green)](https://docs.celo.org/) -[![Youtube](https://img.shields.io/badge/YouTube%20channel-up-green)](https://www.youtube.com/channel/UCCZgos_YAJSXm5QX5D5Wkcw/videos?view=0&sort=p&flow=grid) -[![forum](https://img.shields.io/badge/forum-up-green)](https://forum.celo.org) -[![Discord](https://img.shields.io/discord/600834479145353243.svg)](https://discord.gg/RfHQKtY) -[![Twitter CeloDevs](https://img.shields.io/twitter/follow/celodevs?style=social)](https://twitter.com/celodevs) -[![Twitter CeloOrg](https://img.shields.io/twitter/follow/celoorg?style=social)](https://twitter.com/CeloOrg) -[![Subreddit subscribers](https://img.shields.io/reddit/subreddit-subscribers/CeloHQ?style=social)](https://www.reddit.com/r/CeloHQ/) - - - -[![GitHub pull requests by-label](https://img.shields.io/github/issues-pr-raw/celo-org/celo-monorepo)](https://github.com/celo-org/celo-monorepo/pulls) -[![GitHub Issues](https://img.shields.io/github/issues-raw/celo-org/celo-monorepo.svg)](https://github.com/celo-org/celo-monorepo/issues) -[![GitHub issues by-label](https://img.shields.io/github/issues/celo-org/celo-monorepo/1%20hour%20tasks)](https://github.com/celo-org/celo-monorepo/issues?q=is%3Aopen+is%3Aissue+label%3A%221+hour+tasks%22) -[![GitHub issues by-label](https://img.shields.io/github/issues/celo-org/celo-monorepo/betanet-phase-2)](https://github.com/celo-org/celo-monorepo/issues?q=is%3Aopen+is%3Aissue+label%3Abetanet-phase-2) -[![GitHub issues by-label](https://img.shields.io/github/issues/celo-org/celo-monorepo/betanet-phase-3)](https://github.com/celo-org/celo-monorepo/issues?q=is%3Aopen+is%3Aissue+label%3Abetanet-phase-3) - -Contents: - - - -- [Celo's Mission - Prosperity for All](#mission) -- [The Celo Stack](#stack) -- [Documentation](#docs) -- [Issues](#issues) -- [Repo Structure](#repo) -- [Contributing](#contributing) -- [Ask Questions, Find Answers, Get in Touch](#ask) -- [License](#license) - - -## 🥅 Celo's Mission - Prosperity for All - -Celo, pronounced /ˈtselo/, means ‘purpose’ in Esperanto. In a similar spirit, we are aiming to create a new platform to connect people globally and bring financial stability to those who need it most. We believe blockchain technology is one of the most exciting innovations in recent history and as a community we look to push the boundaries of what is possible with it today. More importantly, we are driven by purpose -- to solve real-world problems such as lack of access to sound currency, or friction for cash-transfer programs aimed to alleviate poverty. Our mission is to build a monetary system that creates the conditions for prosperity for all. - - -

- - Play on Youtube - What if money were beautiful - -
- What if money were beautiful? -

- -## 🧱 The Celo Stack - -Celo is oriented around providing the simplest possible experience for end users, who may have no familiarity with cryptocurrencies, and may be using low cost devices with limited connectivity. To achieve this, the project takes a full-stack approach, where each layer of the stack is designed with the end user in mind whilst considering other stakeholders \(e.g. operators of nodes in the network\) involved in enabling the end user experience. - -The Celo stack is structured into the following logical layers: - - -

- Celo protocol -
- The Celo Blockchain and Celo Core Contracts together comprise the Celo Protocol -

- -- **Celo Blockchain**: An open cryptographic protocol that allows applications to make transactions with and run smart contracts in a secure and decentralized fashion. The Celo Blockchain has shared ancestry with [Ethereum](https://www.ethereum.org), and maintains full EVM compatibility for smart contracts. However it uses a [Byzantine Fault Tolerant](http://pmg.csail.mit.edu/papers/osdi99.pdf) \(BFT\) consensus mechanism rather than Proof of Work, and has different block format, transaction format, client synchronization protocols, and gas payment and pricing mechanisms. The network’s native asset is Celo Gold, exposed via an ERC-20 interface. - -- **Celo Core Contracts**: A set of smart contracts running on the Celo Blockchain that comprise much of the logic of the platform features including ERC-20 stable currencies, identity attestations, Proof of Stake and governance. These smart contracts are upgradeable and managed by the decentralized governance process. - - -

- Celo network -
- Topology of a Celo Network -

- -- **Applications:** Applications for end users built on the Celo platform. The Celo Wallet app, the first of an ecosystem of applications, allows end users to manage accounts and make payments securely and simply by taking advantage of the innovations in the Celo protocol. Applications take the form of external mobile or backend software: they interact with the Celo Blockchain to issue transactions and invoke code that forms the Celo Core Contracts’ API. Third parties can also deploy custom smart contracts that their own applications can invoke, which in turn can leverage Celo Core Contracts. Applications may use centralized cloud services to provide some of their functionality: in the case of the Celo Wallet, push notifications and a transaction activity feed. - -## 📚 Documentation - -Follow the instructions in [SETUP.md](SETUP.md) to get a development environment set up. - -See [Developer's Guide](https://docs.celo.org/) for full details about the design of the Celo protocol and other information about running these projects. - -## 🙋 Issues - -See the [issue backlog](https://github.com/celo-org/celo-monorepo/issues) for a list of active or proposed tasks. Feel free to create new issues to report bugs and/or request features. - -## 📂 Repo Structure - -The repository has the following packages (sub projects): - -- [attestation-service](packages/attestation-service) - service run by validators on the Celo network to send SMS messages, enabling attestations of user phone numbers and their accounts on the Celo network -- [blockchain-api](packages/blockchain-api) - service that uses Blockscout to present view of transactions by account for Celo Wallet activity feed -- [celotool](packages/celotool) - scripts for deploying and managing testnets -- [cli](packages/cli) - tool that uses ContractKit to interact with the Celo protocol ([docs](https://docs.celo.org/getting-started/using-the-cli)) -- [contractkit](packages/contractkit) - library to help developers and validators interact with the protocol and it's smart contracts ([docs](https://docs.celo.org/celo-sdk/contractkit)) -- [dappkit](packages/dappkit) - set of functions for mobile DApps to work with the wallet app (ex. sign transactions and access the user's account) ([docs](https://docs.celo.org/celo-sdk/dappkit)) -- [dev-utils](packages/dev-utils) - a utils package for use as a dev dependency -- [docs](packages/docs) - technical documentation for the Celo project ([live](https://docs.celo.org/)) -- [faucet](packages/faucet) - faucet deployment configuration ([live](https://celo.org/build/faucet)) -- [helm-charts](packages/helm-charts) - templatized deployments of entire environments to Kubernetes clusters -- [mobile](packages/mobile) - Android wallet app for the Celo platform ([docs](https://docs.celo.org/getting-started/using-the-mobile-wallet), [live](https://play.google.com/store/apps/details?id=org.celo.mobile.alfajores)) -- [notification-service](packages/notification-service) - service for managing push notifications for Celo Wallet -- [protocol](packages/protocol) - identity, stability and other smart contracts for the Celo protocol ([docs](https://docs.celo.org/celo-codebase/protocol)) -- [react-components](packages/react-components) - generalized react native components -- [reserve-site](packages/reserve-site) - website for ([Celo Reserve.org](https://celoreserve.org/)) -- [terraform-modules](packages/terraform-modules) - templatized deployments of entire VM-based testnets for Google Cloud Platform -- [typescript](packages/typescript) - no README available (improve?) -- [utils](packages/utils) - no README available (improve?) - -Code owners for each package can be found in [.github/CODEOWNERS](.github/CODEOWNERS). - -## ✍️ Contributing - -Feel free to jump on the Celo 🚂🚋🚋🚋. Improvements and contributions are highly encouraged! 🙏👊 - -See the [contributing guide](https://docs.celo.org/community/contributing) for details on how to participate. -[![GitHub issues by-label](https://img.shields.io/github/issues/celo-org/celo-monorepo/1%20hour%20tasks)](https://github.com/celo-org/celo-monorepo/issues?q=is%3Aopen+is%3Aissue+label%3A%221+hour+tasks%22) - -All communication and contributions to the Celo project are subject to the [Celo Code of Conduct](https://celo.org/code-of-conduct). - -Not yet ready to contribute but do like the project? Support Celo with a ⭐ or share the love in a [![Twitter URL](https://img.shields.io/twitter/url?style=social&url=https%3A%2F%2Fcelo.org%2F)](https://twitter.com/intent/tweet?url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DkKggE5OvyhE&via=celohq&text=Checkout%20celo%21%20Love%20what%20they%20are%20building.&hashtags=celo) - - - -## 💬 Ask Questions, Find Answers, Get in Touch - -- [Website](https://celo.org/) -- [Docs](https://docs.celo.org/) -- [Blog](https://medium.com/celohq) -- [YouTube](https://www.youtube.com/channel/UCCZgos_YAJSXm5QX5D5Wkcw/videos?view=0&sort=p&flow=grid) -- [Forum](https://forum.celo.org) -- [Discord](https://discord.gg/vRbExjv) -- [Twitter](https://twitter.com/CeloDevs) -- [Reddit](https://www.reddit.com/r/CeloHQ/) -- [Community Events](https://celo.org/community) - -## 📜 License - -All packages are licensed under the terms of the [Apache 2.0 License](LICENSE) unless otherwise specified in the LICENSE file at package's root. diff --git a/packages/docs/developer-resources/wallet-hsm/reference/SUMMARY.md b/packages/docs/developer-resources/wallet-hsm/reference/SUMMARY.md deleted file mode 100644 index 675785f2082..00000000000 --- a/packages/docs/developer-resources/wallet-hsm/reference/SUMMARY.md +++ /dev/null @@ -1,7 +0,0 @@ -* [Globals](globals.md) -* [Modules]() - * [ber-utils](modules/_ber_utils_.md) - * [signature-utils](modules/_signature_utils_.md) - * [Signature](classes/_signature_utils_.signature.md) -* [Classes]() - * [Signature](classes/_signature_utils_.signature.md) \ No newline at end of file diff --git a/packages/docs/developer-resources/wallet-hsm/reference/classes/_signature_utils_.signature.md b/packages/docs/developer-resources/wallet-hsm/reference/classes/_signature_utils_.signature.md deleted file mode 100644 index 66e694b3e9e..00000000000 --- a/packages/docs/developer-resources/wallet-hsm/reference/classes/_signature_utils_.signature.md +++ /dev/null @@ -1,59 +0,0 @@ -# Class: Signature - -## Hierarchy - -* **Signature** - -## Index - -### Constructors - -* [constructor](_signature_utils_.signature.md#constructor) - -### Properties - -* [r](_signature_utils_.signature.md#r) -* [s](_signature_utils_.signature.md#s) -* [v](_signature_utils_.signature.md#v) - -## Constructors - -### constructor - -\+ **new Signature**(`v`: number, `r`: Buffer, `s`: Buffer): *[Signature](_signature_utils_.signature.md)* - -*Defined in [signature-utils.ts:46](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-hsm/src/signature-utils.ts#L46)* - -**Parameters:** - -Name | Type | ------- | ------ | -`v` | number | -`r` | Buffer | -`s` | Buffer | - -**Returns:** *[Signature](_signature_utils_.signature.md)* - -## Properties - -### r - -• **r**: *Buffer* - -*Defined in [signature-utils.ts:45](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-hsm/src/signature-utils.ts#L45)* - -___ - -### s - -• **s**: *Buffer* - -*Defined in [signature-utils.ts:46](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-hsm/src/signature-utils.ts#L46)* - -___ - -### v - -• **v**: *number* - -*Defined in [signature-utils.ts:44](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-hsm/src/signature-utils.ts#L44)* diff --git a/packages/docs/developer-resources/wallet-hsm/reference/globals.md b/packages/docs/developer-resources/wallet-hsm/reference/globals.md deleted file mode 100644 index a03952b1ceb..00000000000 --- a/packages/docs/developer-resources/wallet-hsm/reference/globals.md +++ /dev/null @@ -1,8 +0,0 @@ -# @celo/wallet-hsm - -## Index - -### Modules - -* ["ber-utils"](modules/_ber_utils_.md) -* ["signature-utils"](modules/_signature_utils_.md) diff --git a/packages/docs/developer-resources/wallet-hsm/reference/modules/_ber_utils_.md b/packages/docs/developer-resources/wallet-hsm/reference/modules/_ber_utils_.md deleted file mode 100644 index efd0cfb1637..00000000000 --- a/packages/docs/developer-resources/wallet-hsm/reference/modules/_ber_utils_.md +++ /dev/null @@ -1,83 +0,0 @@ -# Module: "ber-utils" - -## Index - -### Functions - -* [asn1FromPublicKey](_ber_utils_.md#asn1frompublickey) -* [parseBERSignature](_ber_utils_.md#parsebersignature) -* [publicKeyFromAsn1](_ber_utils_.md#publickeyfromasn1) -* [toArrayBuffer](_ber_utils_.md#const-toarraybuffer) - -## Functions - -### asn1FromPublicKey - -▸ **asn1FromPublicKey**(`bn`: BigNumber): *Buffer* - -*Defined in [ber-utils.ts:23](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-hsm/src/ber-utils.ts#L23)* - -This is used only for mocking -Creates an asn1 key to emulate KMS response - -**Parameters:** - -Name | Type | ------- | ------ | -`bn` | BigNumber | - -**Returns:** *Buffer* - -___ - -### parseBERSignature - -▸ **parseBERSignature**(`b`: Buffer): *object* - -*Defined in [ber-utils.ts:44](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-hsm/src/ber-utils.ts#L44)* - -AWS returns DER encoded signatures but DER is valid BER - -**Parameters:** - -Name | Type | ------- | ------ | -`b` | Buffer | - -**Returns:** *object* - -* **r**: *Buffer* - -* **s**: *Buffer* - -___ - -### publicKeyFromAsn1 - -▸ **publicKeyFromAsn1**(`b`: Buffer): *BigNumber* - -*Defined in [ber-utils.ts:9](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-hsm/src/ber-utils.ts#L9)* - -**Parameters:** - -Name | Type | ------- | ------ | -`b` | Buffer | - -**Returns:** *BigNumber* - -___ - -### `Const` toArrayBuffer - -▸ **toArrayBuffer**(`b`: Buffer): *ArrayBuffer* - -*Defined in [ber-utils.ts:5](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-hsm/src/ber-utils.ts#L5)* - -**Parameters:** - -Name | Type | ------- | ------ | -`b` | Buffer | - -**Returns:** *ArrayBuffer* diff --git a/packages/docs/developer-resources/wallet-hsm/reference/modules/_signature_utils_.md b/packages/docs/developer-resources/wallet-hsm/reference/modules/_signature_utils_.md deleted file mode 100644 index 5141a9d15bd..00000000000 --- a/packages/docs/developer-resources/wallet-hsm/reference/modules/_signature_utils_.md +++ /dev/null @@ -1,135 +0,0 @@ -# Module: "signature-utils" - -## Index - -### Classes - -* [Signature](../classes/_signature_utils_.signature.md) - -### Variables - -* [publicKeyPrefix](_signature_utils_.md#const-publickeyprefix) -* [sixtyFour](_signature_utils_.md#const-sixtyfour) -* [thirtyTwo](_signature_utils_.md#const-thirtytwo) - -### Functions - -* [bigNumberToBuffer](_signature_utils_.md#const-bignumbertobuffer) -* [bufferToBigNumber](_signature_utils_.md#const-buffertobignumber) -* [getAddressFromPublicKey](_signature_utils_.md#getaddressfrompublickey) -* [makeCanonical](_signature_utils_.md#const-makecanonical) -* [recoverKeyIndex](_signature_utils_.md#recoverkeyindex) - -## Variables - -### `Const` publicKeyPrefix - -• **publicKeyPrefix**: *number* = 4 - -*Defined in [signature-utils.ts:9](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-hsm/src/signature-utils.ts#L9)* - -___ - -### `Const` sixtyFour - -• **sixtyFour**: *number* = 64 - -*Defined in [signature-utils.ts:10](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-hsm/src/signature-utils.ts#L10)* - -___ - -### `Const` thirtyTwo - -• **thirtyTwo**: *number* = 32 - -*Defined in [signature-utils.ts:11](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-hsm/src/signature-utils.ts#L11)* - -## Functions - -### `Const` bigNumberToBuffer - -▸ **bigNumberToBuffer**(`input`: BigNumber, `lengthInBytes`: number): *Buffer* - -*Defined in [signature-utils.ts:34](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-hsm/src/signature-utils.ts#L34)* - -**Parameters:** - -Name | Type | ------- | ------ | -`input` | BigNumber | -`lengthInBytes` | number | - -**Returns:** *Buffer* - -___ - -### `Const` bufferToBigNumber - -▸ **bufferToBigNumber**(`input`: Buffer): *BigNumber* - -*Defined in [signature-utils.ts:30](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-hsm/src/signature-utils.ts#L30)* - -**Parameters:** - -Name | Type | ------- | ------ | -`input` | Buffer | - -**Returns:** *BigNumber* - -___ - -### getAddressFromPublicKey - -▸ **getAddressFromPublicKey**(`publicKey`: BigNumber): *Address* - -*Defined in [signature-utils.ts:78](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-hsm/src/signature-utils.ts#L78)* - -**Parameters:** - -Name | Type | ------- | ------ | -`publicKey` | BigNumber | - -**Returns:** *Address* - -___ - -### `Const` makeCanonical - -▸ **makeCanonical**(`S`: BigNumber): *BigNumber* - -*Defined in [signature-utils.ts:21](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-hsm/src/signature-utils.ts#L21)* - -If the signature is in the "bottom" of the curve, it is non-canonical -Non-canonical signatures are illegal in Ethereum and therefore the S value -must be transposed to the lower intersection -https://github.com/bitcoin/bips/blob/master/bip-0062.mediawiki#Low_S_values_in_signatures - -**Parameters:** - -Name | Type | ------- | ------ | -`S` | BigNumber | - -**Returns:** *BigNumber* - -___ - -### recoverKeyIndex - -▸ **recoverKeyIndex**(`signature`: Uint8Array, `publicKey`: BigNumber, `hash`: Uint8Array): *number* - -*Defined in [signature-utils.ts:58](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-hsm/src/signature-utils.ts#L58)* - -Attempts each recovery key to find a match - -**Parameters:** - -Name | Type | ------- | ------ | -`signature` | Uint8Array | -`publicKey` | BigNumber | -`hash` | Uint8Array | - -**Returns:** *number* diff --git a/packages/docs/developer-resources/wallet-ledger/reference/README.md b/packages/docs/developer-resources/wallet-ledger/reference/README.md deleted file mode 100644 index 02445a82d5a..00000000000 --- a/packages/docs/developer-resources/wallet-ledger/reference/README.md +++ /dev/null @@ -1,162 +0,0 @@ -# @celo/wallet-ledger - -

- - celo logo - -

- -**Celo Monorepo - Official repository for core projects comprising the Celo platform** - -This repository contains the source code for the Celo core projects including the [smart contracts](https://github.com/celo-org/celo-monorepo/tree/master/packages/protocol), [wallet app](https://github.com/celo-org/celo-monorepo/tree/master/packages/mobile), -and other packages. The source code for the Celo Blockchain which operates a node on the Celo Network is kept in a separate repo [here](https://github.com/celo-org/celo-blockchain). - - - -[![CircleCI](https://img.shields.io/circleci/build/github/celo-org/celo-monorepo/master)](https://circleci.com/gh/celo-org/celo-monorepo/tree/master) -[![Codecov](https://img.shields.io/codecov/c/github/celo-org/celo-monorepo)](https://codecov.io/gh/celo-org/celo-monorepo) -[![GitHub contributors](https://img.shields.io/github/contributors/celo-org/celo-monorepo)](https://github.com/celo-org/celo-monorepo/graphs/contributors) -[![GitHub commit activity](https://img.shields.io/github/commit-activity/w/celo-org/celo-monorepo)](https://github.com/celo-org/celo-monorepo/graphs/contributors) -[![GitHub Stars](https://img.shields.io/github/stars/celo-org/celo-monorepo.svg)](https://github.com/celo-org/celo-monorepo/stargazers) -![GitHub repo size](https://img.shields.io/github/repo-size/celo-org/celo-monorepo) -[![GitHub](https://img.shields.io/github/license/celo-org/celo-monorepo?color=blue)](https://github.com/celo-org/celo-monorepo/blob/master/LICENSE) - - - -[![Website celo.org](https://img.shields.io/website-up-down-green-red/https/celo.org.svg)](https://celo.org) -[![Blog](https://img.shields.io/badge/blog-up-green)](https://medium.com/celoorg) -[![docs](https://img.shields.io/badge/docs-up-green)](https://docs.celo.org/) -[![Youtube](https://img.shields.io/badge/YouTube%20channel-up-green)](https://www.youtube.com/channel/UCCZgos_YAJSXm5QX5D5Wkcw/videos?view=0&sort=p&flow=grid) -[![forum](https://img.shields.io/badge/forum-up-green)](https://forum.celo.org) -[![Discord](https://img.shields.io/discord/600834479145353243.svg)](https://discord.gg/RfHQKtY) -[![Twitter CeloDevs](https://img.shields.io/twitter/follow/celodevs?style=social)](https://twitter.com/celodevs) -[![Twitter CeloOrg](https://img.shields.io/twitter/follow/celoorg?style=social)](https://twitter.com/CeloOrg) -[![Subreddit subscribers](https://img.shields.io/reddit/subreddit-subscribers/CeloHQ?style=social)](https://www.reddit.com/r/CeloHQ/) - - - -[![GitHub pull requests by-label](https://img.shields.io/github/issues-pr-raw/celo-org/celo-monorepo)](https://github.com/celo-org/celo-monorepo/pulls) -[![GitHub Issues](https://img.shields.io/github/issues-raw/celo-org/celo-monorepo.svg)](https://github.com/celo-org/celo-monorepo/issues) -[![GitHub issues by-label](https://img.shields.io/github/issues/celo-org/celo-monorepo/1%20hour%20tasks)](https://github.com/celo-org/celo-monorepo/issues?q=is%3Aopen+is%3Aissue+label%3A%221+hour+tasks%22) -[![GitHub issues by-label](https://img.shields.io/github/issues/celo-org/celo-monorepo/betanet-phase-2)](https://github.com/celo-org/celo-monorepo/issues?q=is%3Aopen+is%3Aissue+label%3Abetanet-phase-2) -[![GitHub issues by-label](https://img.shields.io/github/issues/celo-org/celo-monorepo/betanet-phase-3)](https://github.com/celo-org/celo-monorepo/issues?q=is%3Aopen+is%3Aissue+label%3Abetanet-phase-3) - -Contents: - - - -- [Celo's Mission - Prosperity for All](#mission) -- [The Celo Stack](#stack) -- [Documentation](#docs) -- [Issues](#issues) -- [Repo Structure](#repo) -- [Contributing](#contributing) -- [Ask Questions, Find Answers, Get in Touch](#ask) -- [License](#license) - - -## 🥅 Celo's Mission - Prosperity for All - -Celo, pronounced /ˈtselo/, means ‘purpose’ in Esperanto. In a similar spirit, we are aiming to create a new platform to connect people globally and bring financial stability to those who need it most. We believe blockchain technology is one of the most exciting innovations in recent history and as a community we look to push the boundaries of what is possible with it today. More importantly, we are driven by purpose -- to solve real-world problems such as lack of access to sound currency, or friction for cash-transfer programs aimed to alleviate poverty. Our mission is to build a monetary system that creates the conditions for prosperity for all. - - -

- - Play on Youtube - What if money were beautiful - -
- What if money were beautiful? -

- -## 🧱 The Celo Stack - -Celo is oriented around providing the simplest possible experience for end users, who may have no familiarity with cryptocurrencies, and may be using low cost devices with limited connectivity. To achieve this, the project takes a full-stack approach, where each layer of the stack is designed with the end user in mind whilst considering other stakeholders \(e.g. operators of nodes in the network\) involved in enabling the end user experience. - -The Celo stack is structured into the following logical layers: - - -

- Celo protocol -
- The Celo Blockchain and Celo Core Contracts together comprise the Celo Protocol -

- -- **Celo Blockchain**: An open cryptographic protocol that allows applications to make transactions with and run smart contracts in a secure and decentralized fashion. The Celo Blockchain has shared ancestry with [Ethereum](https://www.ethereum.org), and maintains full EVM compatibility for smart contracts. However it uses a [Byzantine Fault Tolerant](http://pmg.csail.mit.edu/papers/osdi99.pdf) \(BFT\) consensus mechanism rather than Proof of Work, and has different block format, transaction format, client synchronization protocols, and gas payment and pricing mechanisms. The network’s native asset is Celo Gold, exposed via an ERC-20 interface. - -- **Celo Core Contracts**: A set of smart contracts running on the Celo Blockchain that comprise much of the logic of the platform features including ERC-20 stable currencies, identity attestations, Proof of Stake and governance. These smart contracts are upgradeable and managed by the decentralized governance process. - - -

- Celo network -
- Topology of a Celo Network -

- -- **Applications:** Applications for end users built on the Celo platform. The Celo Wallet app, the first of an ecosystem of applications, allows end users to manage accounts and make payments securely and simply by taking advantage of the innovations in the Celo protocol. Applications take the form of external mobile or backend software: they interact with the Celo Blockchain to issue transactions and invoke code that forms the Celo Core Contracts’ API. Third parties can also deploy custom smart contracts that their own applications can invoke, which in turn can leverage Celo Core Contracts. Applications may use centralized cloud services to provide some of their functionality: in the case of the Celo Wallet, push notifications and a transaction activity feed. - -## 📚 Documentation - -Follow the instructions in [SETUP.md](SETUP.md) to get a development environment set up. - -See [Developer's Guide](https://docs.celo.org/) for full details about the design of the Celo protocol and other information about running these projects. - -## 🙋 Issues - -See the [issue backlog](https://github.com/celo-org/celo-monorepo/issues) for a list of active or proposed tasks. Feel free to create new issues to report bugs and/or request features. - -## 📂 Repo Structure - -The repository has the following packages (sub projects): - -- [attestation-service](packages/attestation-service) - service run by validators on the Celo network to send SMS messages, enabling attestations of user phone numbers and their accounts on the Celo network -- [blockchain-api](packages/blockchain-api) - service that uses Blockscout to present view of transactions by account for Celo Wallet activity feed -- [celotool](packages/celotool) - scripts for deploying and managing testnets -- [cli](packages/cli) - tool that uses ContractKit to interact with the Celo protocol ([docs](https://docs.celo.org/getting-started/using-the-cli)) -- [contractkit](packages/contractkit) - library to help developers and validators interact with the protocol and it's smart contracts ([docs](https://docs.celo.org/celo-sdk/contractkit)) -- [dappkit](packages/dappkit) - set of functions for mobile DApps to work with the wallet app (ex. sign transactions and access the user's account) ([docs](https://docs.celo.org/celo-sdk/dappkit)) -- [dev-utils](packages/dev-utils) - a utils package for use as a dev dependency -- [docs](packages/docs) - technical documentation for the Celo project ([live](https://docs.celo.org/)) -- [faucet](packages/faucet) - faucet deployment configuration ([live](https://celo.org/build/faucet)) -- [helm-charts](packages/helm-charts) - templatized deployments of entire environments to Kubernetes clusters -- [mobile](packages/mobile) - Android wallet app for the Celo platform ([docs](https://docs.celo.org/getting-started/using-the-mobile-wallet), [live](https://play.google.com/store/apps/details?id=org.celo.mobile.alfajores)) -- [notification-service](packages/notification-service) - service for managing push notifications for Celo Wallet -- [protocol](packages/protocol) - identity, stability and other smart contracts for the Celo protocol ([docs](https://docs.celo.org/celo-codebase/protocol)) -- [react-components](packages/react-components) - generalized react native components -- [reserve-site](packages/reserve-site) - website for ([Celo Reserve.org](https://celoreserve.org/)) -- [terraform-modules](packages/terraform-modules) - templatized deployments of entire VM-based testnets for Google Cloud Platform -- [typescript](packages/typescript) - no README available (improve?) -- [utils](packages/utils) - no README available (improve?) - -Code owners for each package can be found in [.github/CODEOWNERS](.github/CODEOWNERS). - -## ✍️ Contributing - -Feel free to jump on the Celo 🚂🚋🚋🚋. Improvements and contributions are highly encouraged! 🙏👊 - -See the [contributing guide](https://docs.celo.org/community/contributing) for details on how to participate. -[![GitHub issues by-label](https://img.shields.io/github/issues/celo-org/celo-monorepo/1%20hour%20tasks)](https://github.com/celo-org/celo-monorepo/issues?q=is%3Aopen+is%3Aissue+label%3A%221+hour+tasks%22) - -All communication and contributions to the Celo project are subject to the [Celo Code of Conduct](https://celo.org/code-of-conduct). - -Not yet ready to contribute but do like the project? Support Celo with a ⭐ or share the love in a [![Twitter URL](https://img.shields.io/twitter/url?style=social&url=https%3A%2F%2Fcelo.org%2F)](https://twitter.com/intent/tweet?url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DkKggE5OvyhE&via=celohq&text=Checkout%20celo%21%20Love%20what%20they%20are%20building.&hashtags=celo) - - - -## 💬 Ask Questions, Find Answers, Get in Touch - -- [Website](https://celo.org/) -- [Docs](https://docs.celo.org/) -- [Blog](https://medium.com/celohq) -- [YouTube](https://www.youtube.com/channel/UCCZgos_YAJSXm5QX5D5Wkcw/videos?view=0&sort=p&flow=grid) -- [Forum](https://forum.celo.org) -- [Discord](https://discord.gg/vRbExjv) -- [Twitter](https://twitter.com/CeloDevs) -- [Reddit](https://www.reddit.com/r/CeloHQ/) -- [Community Events](https://celo.org/community) - -## 📜 License - -All packages are licensed under the terms of the [Apache 2.0 License](LICENSE) unless otherwise specified in the LICENSE file at package's root. diff --git a/packages/docs/developer-resources/wallet-ledger/reference/SUMMARY.md b/packages/docs/developer-resources/wallet-ledger/reference/SUMMARY.md deleted file mode 100644 index 56fab06c4cf..00000000000 --- a/packages/docs/developer-resources/wallet-ledger/reference/SUMMARY.md +++ /dev/null @@ -1,20 +0,0 @@ -* [Globals](globals.md) -* [Modules]() - * [data](modules/_data_.md) - * [ledger-signer](modules/_ledger_signer_.md) - * [LedgerSigner](classes/_ledger_signer_.ledgersigner.md) - * [ledger-utils](modules/_ledger_utils_.md) - * [ledger-wallet](modules/_ledger_wallet_.md) - * [AddressValidation](enums/_ledger_wallet_.addressvalidation.md) - * [LedgerWallet](classes/_ledger_wallet_.ledgerwallet.md) - * [tokens](modules/_tokens_.md) - * [API](interfaces/_tokens_.api.md) - * [TokenInfo](interfaces/_tokens_.tokeninfo.md) -* [Classes]() - * [LedgerSigner](classes/_ledger_signer_.ledgersigner.md) - * [LedgerWallet](classes/_ledger_wallet_.ledgerwallet.md) -* [Enums]() - * [AddressValidation](enums/_ledger_wallet_.addressvalidation.md) -* [Interfaces]() - * [API](interfaces/_tokens_.api.md) - * [TokenInfo](interfaces/_tokens_.tokeninfo.md) \ No newline at end of file diff --git a/packages/docs/developer-resources/wallet-ledger/reference/classes/_ledger_signer_.ledgersigner.md b/packages/docs/developer-resources/wallet-ledger/reference/classes/_ledger_signer_.ledgersigner.md deleted file mode 100644 index bda0b45a52e..00000000000 --- a/packages/docs/developer-resources/wallet-ledger/reference/classes/_ledger_signer_.ledgersigner.md +++ /dev/null @@ -1,145 +0,0 @@ -# Class: LedgerSigner - -Signs the EVM transaction with a Ledger device - -## Hierarchy - -* **LedgerSigner** - -## Implements - -* Signer - -## Index - -### Constructors - -* [constructor](_ledger_signer_.ledgersigner.md#constructor) - -### Methods - -* [computeSharedSecret](_ledger_signer_.ledgersigner.md#computesharedsecret) -* [decrypt](_ledger_signer_.ledgersigner.md#decrypt) -* [getNativeKey](_ledger_signer_.ledgersigner.md#getnativekey) -* [signPersonalMessage](_ledger_signer_.ledgersigner.md#signpersonalmessage) -* [signTransaction](_ledger_signer_.ledgersigner.md#signtransaction) -* [signTypedData](_ledger_signer_.ledgersigner.md#signtypeddata) - -## Constructors - -### constructor - -\+ **new LedgerSigner**(`ledger`: any, `derivationPath`: string, `ledgerAddressValidation`: [AddressValidation](../enums/_ledger_wallet_.addressvalidation.md), `appConfiguration`: object): *[LedgerSigner](_ledger_signer_.ledgersigner.md)* - -*Defined in [wallet-ledger/src/ledger-signer.ts:22](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-ledger/src/ledger-signer.ts#L22)* - -**Parameters:** - -▪ **ledger**: *any* - -▪ **derivationPath**: *string* - -▪ **ledgerAddressValidation**: *[AddressValidation](../enums/_ledger_wallet_.addressvalidation.md)* - -▪`Default value` **appConfiguration**: *object*= { - arbitraryDataEnabled: 0, - version: '0.0.0', - } - -Name | Type | ------- | ------ | -`arbitraryDataEnabled` | number | -`version` | string | - -**Returns:** *[LedgerSigner](_ledger_signer_.ledgersigner.md)* - -## Methods - -### computeSharedSecret - -▸ **computeSharedSecret**(`_publicKey`: string): *Promise‹Buffer‹››* - -*Defined in [wallet-ledger/src/ledger-signer.ts:196](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-ledger/src/ledger-signer.ts#L196)* - -**Parameters:** - -Name | Type | ------- | ------ | -`_publicKey` | string | - -**Returns:** *Promise‹Buffer‹››* - -___ - -### decrypt - -▸ **decrypt**(`_ciphertext`: Buffer): *Promise‹Buffer‹››* - -*Defined in [wallet-ledger/src/ledger-signer.ts:190](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-ledger/src/ledger-signer.ts#L190)* - -**Parameters:** - -Name | Type | ------- | ------ | -`_ciphertext` | Buffer | - -**Returns:** *Promise‹Buffer‹››* - -___ - -### getNativeKey - -▸ **getNativeKey**(): *string* - -*Defined in [wallet-ledger/src/ledger-signer.ts:39](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-ledger/src/ledger-signer.ts#L39)* - -**Returns:** *string* - -___ - -### signPersonalMessage - -▸ **signPersonalMessage**(`data`: string): *Promise‹object›* - -*Defined in [wallet-ledger/src/ledger-signer.ts:82](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-ledger/src/ledger-signer.ts#L82)* - -**Parameters:** - -Name | Type | ------- | ------ | -`data` | string | - -**Returns:** *Promise‹object›* - -___ - -### signTransaction - -▸ **signTransaction**(`addToV`: number, `encodedTx`: RLPEncodedTx): *Promise‹object›* - -*Defined in [wallet-ledger/src/ledger-signer.ts:43](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-ledger/src/ledger-signer.ts#L43)* - -**Parameters:** - -Name | Type | ------- | ------ | -`addToV` | number | -`encodedTx` | RLPEncodedTx | - -**Returns:** *Promise‹object›* - -___ - -### signTypedData - -▸ **signTypedData**(`typedData`: EIP712TypedData): *Promise‹object›* - -*Defined in [wallet-ledger/src/ledger-signer.ts:103](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-ledger/src/ledger-signer.ts#L103)* - -**Parameters:** - -Name | Type | ------- | ------ | -`typedData` | EIP712TypedData | - -**Returns:** *Promise‹object›* diff --git a/packages/docs/developer-resources/wallet-ledger/reference/classes/_ledger_wallet_.ledgerwallet.md b/packages/docs/developer-resources/wallet-ledger/reference/classes/_ledger_wallet_.ledgerwallet.md deleted file mode 100644 index 4f7cdcd67ec..00000000000 --- a/packages/docs/developer-resources/wallet-ledger/reference/classes/_ledger_wallet_.ledgerwallet.md +++ /dev/null @@ -1,294 +0,0 @@ -# Class: LedgerWallet - -## Hierarchy - -* RemoteWallet‹[LedgerSigner](_ledger_signer_.ledgersigner.md)› - - ↳ **LedgerWallet** - -## Implements - -* ReadOnlyWallet -* ReadOnlyWallet -* ReadOnlyWallet - -## Index - -### Constructors - -* [constructor](_ledger_wallet_.ledgerwallet.md#constructor) - -### Properties - -* [baseDerivationPath](_ledger_wallet_.ledgerwallet.md#readonly-basederivationpath) -* [derivationPathIndexes](_ledger_wallet_.ledgerwallet.md#readonly-derivationpathindexes) -* [isSetupFinished](_ledger_wallet_.ledgerwallet.md#issetupfinished) -* [ledgerAddressValidation](_ledger_wallet_.ledgerwallet.md#readonly-ledgeraddressvalidation) -* [transport](_ledger_wallet_.ledgerwallet.md#readonly-transport) - -### Methods - -* [computeSharedSecret](_ledger_wallet_.ledgerwallet.md#computesharedsecret) -* [decrypt](_ledger_wallet_.ledgerwallet.md#decrypt) -* [getAccounts](_ledger_wallet_.ledgerwallet.md#getaccounts) -* [hasAccount](_ledger_wallet_.ledgerwallet.md#hasaccount) -* [init](_ledger_wallet_.ledgerwallet.md#init) -* [removeAccount](_ledger_wallet_.ledgerwallet.md#removeaccount) -* [signPersonalMessage](_ledger_wallet_.ledgerwallet.md#signpersonalmessage) -* [signTransaction](_ledger_wallet_.ledgerwallet.md#signtransaction) -* [signTypedData](_ledger_wallet_.ledgerwallet.md#signtypeddata) - -## Constructors - -### constructor - -\+ **new LedgerWallet**(`derivationPathIndexes`: number[], `baseDerivationPath`: string, `transport`: any, `ledgerAddressValidation`: [AddressValidation](../enums/_ledger_wallet_.addressvalidation.md)): *[LedgerWallet](_ledger_wallet_.ledgerwallet.md)* - -*Defined in [wallet-ledger/src/ledger-wallet.ts:45](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-ledger/src/ledger-wallet.ts#L45)* - -**Parameters:** - -Name | Type | Default | Description | ------- | ------ | ------ | ------ | -`derivationPathIndexes` | number[] | zeroRange(ADDRESS_QTY) | number array of "address_index" for the base derivation path. Default: Array[0..9]. Example: [3, 99, 53] will retrieve the derivation paths of [`${baseDerivationPath}/3`, `${baseDerivationPath}/99`, `${baseDerivationPath}/53`] | -`baseDerivationPath` | string | CELO_BASE_DERIVATION_PATH | base derivation path. Default: "44'/52752'/0'/0" | -`transport` | any | {} | Transport to connect the ledger device | -`ledgerAddressValidation` | [AddressValidation](../enums/_ledger_wallet_.addressvalidation.md) | AddressValidation.firstTransactionPerAddress | - | - -**Returns:** *[LedgerWallet](_ledger_wallet_.ledgerwallet.md)* - -## Properties - -### `Readonly` baseDerivationPath - -• **baseDerivationPath**: *string* - -*Defined in [wallet-ledger/src/ledger-wallet.ts:57](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-ledger/src/ledger-wallet.ts#L57)* - -base derivation path. Default: "44'/52752'/0'/0" - -___ - -### `Readonly` derivationPathIndexes - -• **derivationPathIndexes**: *number[]* - -*Defined in [wallet-ledger/src/ledger-wallet.ts:56](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-ledger/src/ledger-wallet.ts#L56)* - -number array of "address_index" for the base derivation path. -Default: Array[0..9]. -Example: [3, 99, 53] will retrieve the derivation paths of -[`${baseDerivationPath}/3`, `${baseDerivationPath}/99`, `${baseDerivationPath}/53`] - -___ - -### isSetupFinished - -• **isSetupFinished**: *function* - -*Inherited from [LedgerWallet](_ledger_wallet_.ledgerwallet.md).[isSetupFinished](_ledger_wallet_.ledgerwallet.md#issetupfinished)* - -Defined in wallet-remote/lib/remote-wallet.d.ts:51 - -#### Type declaration: - -▸ (): *boolean* - -___ - -### `Readonly` ledgerAddressValidation - -• **ledgerAddressValidation**: *[AddressValidation](../enums/_ledger_wallet_.addressvalidation.md)* - -*Defined in [wallet-ledger/src/ledger-wallet.ts:59](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-ledger/src/ledger-wallet.ts#L59)* - -___ - -### `Readonly` transport - -• **transport**: *any* - -*Defined in [wallet-ledger/src/ledger-wallet.ts:58](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-ledger/src/ledger-wallet.ts#L58)* - -Transport to connect the ledger device - -## Methods - -### computeSharedSecret - -▸ **computeSharedSecret**(`address`: Address, `publicKey`: string): *Promise‹Buffer›* - -*Inherited from [LedgerWallet](_ledger_wallet_.ledgerwallet.md).[computeSharedSecret](_ledger_wallet_.ledgerwallet.md#computesharedsecret)* - -Defined in wallet-base/lib/wallet-base.d.ts:64 - -Computes the shared secret (an ECDH key exchange object) between two accounts - -**Parameters:** - -Name | Type | ------- | ------ | -`address` | Address | -`publicKey` | string | - -**Returns:** *Promise‹Buffer›* - -___ - -### decrypt - -▸ **decrypt**(`address`: string, `ciphertext`: Buffer): *Promise‹Buffer›* - -*Inherited from [LedgerWallet](_ledger_wallet_.ledgerwallet.md).[decrypt](_ledger_wallet_.ledgerwallet.md#decrypt)* - -Defined in wallet-base/lib/wallet-base.d.ts:60 - -**Parameters:** - -Name | Type | ------- | ------ | -`address` | string | -`ciphertext` | Buffer | - -**Returns:** *Promise‹Buffer›* - -___ - -### getAccounts - -▸ **getAccounts**(): *Address[]* - -*Inherited from [LedgerWallet](_ledger_wallet_.ledgerwallet.md).[getAccounts](_ledger_wallet_.ledgerwallet.md#getaccounts)* - -*Overrides void* - -Defined in wallet-remote/lib/remote-wallet.d.ts:27 - -Get a list of accounts in the remote wallet - -**Returns:** *Address[]* - -___ - -### hasAccount - -▸ **hasAccount**(`address?`: Address): *boolean* - -*Inherited from [LedgerWallet](_ledger_wallet_.ledgerwallet.md).[hasAccount](_ledger_wallet_.ledgerwallet.md#hasaccount)* - -*Overrides void* - -Defined in wallet-remote/lib/remote-wallet.d.ts:32 - -Returns true if account is in the remote wallet - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`address?` | Address | Account to check | - -**Returns:** *boolean* - -___ - -### init - -▸ **init**(): *Promise‹void›* - -*Inherited from [LedgerWallet](_ledger_wallet_.ledgerwallet.md).[init](_ledger_wallet_.ledgerwallet.md#init)* - -Defined in wallet-remote/lib/remote-wallet.d.ts:15 - -Discovers wallet accounts and caches results in memory -Idempotent to ensure multiple calls are benign - -**Returns:** *Promise‹void›* - -___ - -### removeAccount - -▸ **removeAccount**(`_address`: string): *void* - -*Inherited from [LedgerWallet](_ledger_wallet_.ledgerwallet.md).[removeAccount](_ledger_wallet_.ledgerwallet.md#removeaccount)* - -Defined in wallet-base/lib/wallet-base.d.ts:23 - -Removes the account with the given address. Needs to be implemented by subclass, otherwise throws error - -**Parameters:** - -Name | Type | ------- | ------ | -`_address` | string | - -**Returns:** *void* - -___ - -### signPersonalMessage - -▸ **signPersonalMessage**(`address`: Address, `data`: string): *Promise‹string›* - -*Inherited from [LedgerWallet](_ledger_wallet_.ledgerwallet.md).[signPersonalMessage](_ledger_wallet_.ledgerwallet.md#signpersonalmessage)* - -*Overrides void* - -Defined in wallet-remote/lib/remote-wallet.d.ts:43 - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`address` | Address | Address of the account to sign with | -`data` | string | Hex string message to sign | - -**Returns:** *Promise‹string›* - -Signature hex string (order: rsv) - -___ - -### signTransaction - -▸ **signTransaction**(`txParams`: CeloTx): *Promise‹EncodedTransaction›* - -*Inherited from [LedgerWallet](_ledger_wallet_.ledgerwallet.md).[signTransaction](_ledger_wallet_.ledgerwallet.md#signtransaction)* - -*Overrides void* - -Defined in wallet-remote/lib/remote-wallet.d.ts:37 - -Signs the EVM transaction using the signer pulled from the from field - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`txParams` | CeloTx | EVM transaction | - -**Returns:** *Promise‹EncodedTransaction›* - -___ - -### signTypedData - -▸ **signTypedData**(`address`: Address, `typedData`: EIP712TypedData): *Promise‹string›* - -*Inherited from [LedgerWallet](_ledger_wallet_.ledgerwallet.md).[signTypedData](_ledger_wallet_.ledgerwallet.md#signtypeddata)* - -*Overrides void* - -Defined in wallet-remote/lib/remote-wallet.d.ts:49 - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`address` | Address | Address of the account to sign with | -`typedData` | EIP712TypedData | the typed data object | - -**Returns:** *Promise‹string›* - -Signature hex string (order: rsv) diff --git a/packages/docs/developer-resources/wallet-ledger/reference/enums/_ledger_wallet_.addressvalidation.md b/packages/docs/developer-resources/wallet-ledger/reference/enums/_ledger_wallet_.addressvalidation.md deleted file mode 100644 index bd0a4dca6af..00000000000 --- a/packages/docs/developer-resources/wallet-ledger/reference/enums/_ledger_wallet_.addressvalidation.md +++ /dev/null @@ -1,42 +0,0 @@ -# Enumeration: AddressValidation - -## Index - -### Enumeration members - -* [everyTransaction](_ledger_wallet_.addressvalidation.md#everytransaction) -* [firstTransactionPerAddress](_ledger_wallet_.addressvalidation.md#firsttransactionperaddress) -* [initializationOnly](_ledger_wallet_.addressvalidation.md#initializationonly) -* [never](_ledger_wallet_.addressvalidation.md#never) - -## Enumeration members - -### everyTransaction - -• **everyTransaction**: - -*Defined in [wallet-ledger/src/ledger-wallet.ts:19](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-ledger/src/ledger-wallet.ts#L19)* - -___ - -### firstTransactionPerAddress - -• **firstTransactionPerAddress**: - -*Defined in [wallet-ledger/src/ledger-wallet.ts:21](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-ledger/src/ledger-wallet.ts#L21)* - -___ - -### initializationOnly - -• **initializationOnly**: - -*Defined in [wallet-ledger/src/ledger-wallet.ts:17](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-ledger/src/ledger-wallet.ts#L17)* - -___ - -### never - -• **never**: - -*Defined in [wallet-ledger/src/ledger-wallet.ts:23](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-ledger/src/ledger-wallet.ts#L23)* diff --git a/packages/docs/developer-resources/wallet-ledger/reference/globals.md b/packages/docs/developer-resources/wallet-ledger/reference/globals.md deleted file mode 100644 index b47006f91ac..00000000000 --- a/packages/docs/developer-resources/wallet-ledger/reference/globals.md +++ /dev/null @@ -1,11 +0,0 @@ -# @celo/wallet-ledger - -## Index - -### Modules - -* ["data"](modules/_data_.md) -* ["ledger-signer"](modules/_ledger_signer_.md) -* ["ledger-utils"](modules/_ledger_utils_.md) -* ["ledger-wallet"](modules/_ledger_wallet_.md) -* ["tokens"](modules/_tokens_.md) diff --git a/packages/docs/developer-resources/wallet-ledger/reference/interfaces/_tokens_.api.md b/packages/docs/developer-resources/wallet-ledger/reference/interfaces/_tokens_.api.md deleted file mode 100644 index 4340dab729a..00000000000 --- a/packages/docs/developer-resources/wallet-ledger/reference/interfaces/_tokens_.api.md +++ /dev/null @@ -1,42 +0,0 @@ -# Interface: API - -## Hierarchy - -* **API** - -## Index - -### Properties - -* [byContractKey](_tokens_.api.md#bycontractkey) -* [list](_tokens_.api.md#list) - -## Properties - -### byContractKey - -• **byContractKey**: *function* - -*Defined in [wallet-ledger/src/tokens.ts:45](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-ledger/src/tokens.ts#L45)* - -#### Type declaration: - -▸ (`arg0`: string): *[TokenInfo](_tokens_.tokeninfo.md) | null | undefined* - -**Parameters:** - -Name | Type | ------- | ------ | -`arg0` | string | - -___ - -### list - -• **list**: *function* - -*Defined in [wallet-ledger/src/tokens.ts:46](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-ledger/src/tokens.ts#L46)* - -#### Type declaration: - -▸ (): *[TokenInfo](_tokens_.tokeninfo.md)[]* diff --git a/packages/docs/developer-resources/wallet-ledger/reference/interfaces/_tokens_.tokeninfo.md b/packages/docs/developer-resources/wallet-ledger/reference/interfaces/_tokens_.tokeninfo.md deleted file mode 100644 index cb6faaec0a3..00000000000 --- a/packages/docs/developer-resources/wallet-ledger/reference/interfaces/_tokens_.tokeninfo.md +++ /dev/null @@ -1,64 +0,0 @@ -# Interface: TokenInfo - -## Hierarchy - -* **TokenInfo** - -## Index - -### Properties - -* [chainId](_tokens_.tokeninfo.md#chainid) -* [contractAddress](_tokens_.tokeninfo.md#contractaddress) -* [data](_tokens_.tokeninfo.md#data) -* [decimals](_tokens_.tokeninfo.md#decimals) -* [signature](_tokens_.tokeninfo.md#signature) -* [ticker](_tokens_.tokeninfo.md#ticker) - -## Properties - -### chainId - -• **chainId**: *number* - -*Defined in [wallet-ledger/src/tokens.ts:22](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-ledger/src/tokens.ts#L22)* - -___ - -### contractAddress - -• **contractAddress**: *Address* - -*Defined in [wallet-ledger/src/tokens.ts:19](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-ledger/src/tokens.ts#L19)* - -___ - -### data - -• **data**: *Buffer* - -*Defined in [wallet-ledger/src/tokens.ts:24](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-ledger/src/tokens.ts#L24)* - -___ - -### decimals - -• **decimals**: *number* - -*Defined in [wallet-ledger/src/tokens.ts:21](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-ledger/src/tokens.ts#L21)* - -___ - -### signature - -• **signature**: *Buffer* - -*Defined in [wallet-ledger/src/tokens.ts:23](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-ledger/src/tokens.ts#L23)* - -___ - -### ticker - -• **ticker**: *string* - -*Defined in [wallet-ledger/src/tokens.ts:20](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-ledger/src/tokens.ts#L20)* diff --git a/packages/docs/developer-resources/wallet-ledger/reference/modules/_data_.md b/packages/docs/developer-resources/wallet-ledger/reference/modules/_data_.md deleted file mode 100644 index dbd8a5177ee..00000000000 --- a/packages/docs/developer-resources/wallet-ledger/reference/modules/_data_.md +++ /dev/null @@ -1,3 +0,0 @@ -# Module: "data" - - diff --git a/packages/docs/developer-resources/wallet-ledger/reference/modules/_ledger_signer_.md b/packages/docs/developer-resources/wallet-ledger/reference/modules/_ledger_signer_.md deleted file mode 100644 index f87389d060e..00000000000 --- a/packages/docs/developer-resources/wallet-ledger/reference/modules/_ledger_signer_.md +++ /dev/null @@ -1,7 +0,0 @@ -# Module: "ledger-signer" - -## Index - -### Classes - -* [LedgerSigner](../classes/_ledger_signer_.ledgersigner.md) diff --git a/packages/docs/developer-resources/wallet-ledger/reference/modules/_ledger_utils_.md b/packages/docs/developer-resources/wallet-ledger/reference/modules/_ledger_utils_.md deleted file mode 100644 index 1fefa02863a..00000000000 --- a/packages/docs/developer-resources/wallet-ledger/reference/modules/_ledger_utils_.md +++ /dev/null @@ -1,23 +0,0 @@ -# Module: "ledger-utils" - -## Index - -### Functions - -* [transportErrorFriendlyMessage](_ledger_utils_.md#transporterrorfriendlymessage) - -## Functions - -### transportErrorFriendlyMessage - -▸ **transportErrorFriendlyMessage**(`error`: any): *void* - -*Defined in [wallet-ledger/src/ledger-utils.ts:5](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-ledger/src/ledger-utils.ts#L5)* - -**Parameters:** - -Name | Type | ------- | ------ | -`error` | any | - -**Returns:** *void* diff --git a/packages/docs/developer-resources/wallet-ledger/reference/modules/_ledger_wallet_.md b/packages/docs/developer-resources/wallet-ledger/reference/modules/_ledger_wallet_.md deleted file mode 100644 index 2b148960bfe..00000000000 --- a/packages/docs/developer-resources/wallet-ledger/reference/modules/_ledger_wallet_.md +++ /dev/null @@ -1,46 +0,0 @@ -# Module: "ledger-wallet" - -## Index - -### Enumerations - -* [AddressValidation](../enums/_ledger_wallet_.addressvalidation.md) - -### Classes - -* [LedgerWallet](../classes/_ledger_wallet_.ledgerwallet.md) - -### Variables - -* [CELO_BASE_DERIVATION_PATH](_ledger_wallet_.md#const-celo_base_derivation_path) - -### Functions - -* [newLedgerWalletWithSetup](_ledger_wallet_.md#newledgerwalletwithsetup) - -## Variables - -### `Const` CELO_BASE_DERIVATION_PATH - -• **CELO_BASE_DERIVATION_PATH**: *string* = `${CELO_DERIVATION_PATH_BASE.slice(2)}/0` - -*Defined in [wallet-ledger/src/ledger-wallet.ts:11](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-ledger/src/ledger-wallet.ts#L11)* - -## Functions - -### newLedgerWalletWithSetup - -▸ **newLedgerWalletWithSetup**(`transport`: any, `derivationPathIndexes?`: number[], `baseDerivationPath?`: undefined | string, `ledgerAddressValidation?`: [AddressValidation](../enums/_ledger_wallet_.addressvalidation.md)): *Promise‹[LedgerWallet](../classes/_ledger_wallet_.ledgerwallet.md)›* - -*Defined in [wallet-ledger/src/ledger-wallet.ts:26](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-ledger/src/ledger-wallet.ts#L26)* - -**Parameters:** - -Name | Type | ------- | ------ | -`transport` | any | -`derivationPathIndexes?` | number[] | -`baseDerivationPath?` | undefined | string | -`ledgerAddressValidation?` | [AddressValidation](../enums/_ledger_wallet_.addressvalidation.md) | - -**Returns:** *Promise‹[LedgerWallet](../classes/_ledger_wallet_.ledgerwallet.md)›* diff --git a/packages/docs/developer-resources/wallet-ledger/reference/modules/_tokens_.md b/packages/docs/developer-resources/wallet-ledger/reference/modules/_tokens_.md deleted file mode 100644 index 3c93736b944..00000000000 --- a/packages/docs/developer-resources/wallet-ledger/reference/modules/_tokens_.md +++ /dev/null @@ -1,66 +0,0 @@ -# Module: "tokens" - -## Index - -### Interfaces - -* [API](../interfaces/_tokens_.api.md) -* [TokenInfo](../interfaces/_tokens_.tokeninfo.md) - -### Functions - -* [compareLedgerAppVersions](_tokens_.md#compareledgerappversions) -* [list](_tokens_.md#const-list) -* [tokenInfoByAddressAndChainId](_tokens_.md#const-tokeninfobyaddressandchainid) - -## Functions - -### compareLedgerAppVersions - -▸ **compareLedgerAppVersions**(`version1`: string, `version2`: string): *number* - -*Defined in [wallet-ledger/src/tokens.ts:33](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-ledger/src/tokens.ts#L33)* - -**Parameters:** - -Name | Type | ------- | ------ | -`version1` | string | -`version2` | string | - -**Returns:** *number* - --1: version1 < version2, - 0: version1 == version2, - 1: version1 > version2 - -___ - -### `Const` list - -▸ **list**(): *[TokenInfo](../interfaces/_tokens_.tokeninfo.md)[]* - -*Defined in [wallet-ledger/src/tokens.ts:16](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-ledger/src/tokens.ts#L16)* - -list all the ERC20 tokens informations - -**Returns:** *[TokenInfo](../interfaces/_tokens_.tokeninfo.md)[]* - -___ - -### `Const` tokenInfoByAddressAndChainId - -▸ **tokenInfoByAddressAndChainId**(`contract`: Address, `chainId`: number): *[TokenInfo](../interfaces/_tokens_.tokeninfo.md) | null | undefined* - -*Defined in [wallet-ledger/src/tokens.ts:8](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-ledger/src/tokens.ts#L8)* - -Retrieve the token information by a given contract address and chainId if any - -**Parameters:** - -Name | Type | ------- | ------ | -`contract` | Address | -`chainId` | number | - -**Returns:** *[TokenInfo](../interfaces/_tokens_.tokeninfo.md) | null | undefined* diff --git a/packages/docs/developer-resources/wallet-local/reference/README.md b/packages/docs/developer-resources/wallet-local/reference/README.md deleted file mode 100644 index 17acc15c9ac..00000000000 --- a/packages/docs/developer-resources/wallet-local/reference/README.md +++ /dev/null @@ -1,162 +0,0 @@ -# @celo/wallet-local - -

- - celo logo - -

- -**Celo Monorepo - Official repository for core projects comprising the Celo platform** - -This repository contains the source code for the Celo core projects including the [smart contracts](https://github.com/celo-org/celo-monorepo/tree/master/packages/protocol), [wallet app](https://github.com/celo-org/celo-monorepo/tree/master/packages/mobile), -and other packages. The source code for the Celo Blockchain which operates a node on the Celo Network is kept in a separate repo [here](https://github.com/celo-org/celo-blockchain). - - - -[![CircleCI](https://img.shields.io/circleci/build/github/celo-org/celo-monorepo/master)](https://circleci.com/gh/celo-org/celo-monorepo/tree/master) -[![Codecov](https://img.shields.io/codecov/c/github/celo-org/celo-monorepo)](https://codecov.io/gh/celo-org/celo-monorepo) -[![GitHub contributors](https://img.shields.io/github/contributors/celo-org/celo-monorepo)](https://github.com/celo-org/celo-monorepo/graphs/contributors) -[![GitHub commit activity](https://img.shields.io/github/commit-activity/w/celo-org/celo-monorepo)](https://github.com/celo-org/celo-monorepo/graphs/contributors) -[![GitHub Stars](https://img.shields.io/github/stars/celo-org/celo-monorepo.svg)](https://github.com/celo-org/celo-monorepo/stargazers) -![GitHub repo size](https://img.shields.io/github/repo-size/celo-org/celo-monorepo) -[![GitHub](https://img.shields.io/github/license/celo-org/celo-monorepo?color=blue)](https://github.com/celo-org/celo-monorepo/blob/master/LICENSE) - - - -[![Website celo.org](https://img.shields.io/website-up-down-green-red/https/celo.org.svg)](https://celo.org) -[![Blog](https://img.shields.io/badge/blog-up-green)](https://medium.com/celoorg) -[![docs](https://img.shields.io/badge/docs-up-green)](https://docs.celo.org/) -[![Youtube](https://img.shields.io/badge/YouTube%20channel-up-green)](https://www.youtube.com/channel/UCCZgos_YAJSXm5QX5D5Wkcw/videos?view=0&sort=p&flow=grid) -[![forum](https://img.shields.io/badge/forum-up-green)](https://forum.celo.org) -[![Discord](https://img.shields.io/discord/600834479145353243.svg)](https://discord.gg/RfHQKtY) -[![Twitter CeloDevs](https://img.shields.io/twitter/follow/celodevs?style=social)](https://twitter.com/celodevs) -[![Twitter CeloOrg](https://img.shields.io/twitter/follow/celoorg?style=social)](https://twitter.com/CeloOrg) -[![Subreddit subscribers](https://img.shields.io/reddit/subreddit-subscribers/CeloHQ?style=social)](https://www.reddit.com/r/CeloHQ/) - - - -[![GitHub pull requests by-label](https://img.shields.io/github/issues-pr-raw/celo-org/celo-monorepo)](https://github.com/celo-org/celo-monorepo/pulls) -[![GitHub Issues](https://img.shields.io/github/issues-raw/celo-org/celo-monorepo.svg)](https://github.com/celo-org/celo-monorepo/issues) -[![GitHub issues by-label](https://img.shields.io/github/issues/celo-org/celo-monorepo/1%20hour%20tasks)](https://github.com/celo-org/celo-monorepo/issues?q=is%3Aopen+is%3Aissue+label%3A%221+hour+tasks%22) -[![GitHub issues by-label](https://img.shields.io/github/issues/celo-org/celo-monorepo/betanet-phase-2)](https://github.com/celo-org/celo-monorepo/issues?q=is%3Aopen+is%3Aissue+label%3Abetanet-phase-2) -[![GitHub issues by-label](https://img.shields.io/github/issues/celo-org/celo-monorepo/betanet-phase-3)](https://github.com/celo-org/celo-monorepo/issues?q=is%3Aopen+is%3Aissue+label%3Abetanet-phase-3) - -Contents: - - - -- [Celo's Mission - Prosperity for All](#mission) -- [The Celo Stack](#stack) -- [Documentation](#docs) -- [Issues](#issues) -- [Repo Structure](#repo) -- [Contributing](#contributing) -- [Ask Questions, Find Answers, Get in Touch](#ask) -- [License](#license) - - -## 🥅 Celo's Mission - Prosperity for All - -Celo, pronounced /ˈtselo/, means ‘purpose’ in Esperanto. In a similar spirit, we are aiming to create a new platform to connect people globally and bring financial stability to those who need it most. We believe blockchain technology is one of the most exciting innovations in recent history and as a community we look to push the boundaries of what is possible with it today. More importantly, we are driven by purpose -- to solve real-world problems such as lack of access to sound currency, or friction for cash-transfer programs aimed to alleviate poverty. Our mission is to build a monetary system that creates the conditions for prosperity for all. - - -

- - Play on Youtube - What if money were beautiful - -
- What if money were beautiful? -

- -## 🧱 The Celo Stack - -Celo is oriented around providing the simplest possible experience for end users, who may have no familiarity with cryptocurrencies, and may be using low cost devices with limited connectivity. To achieve this, the project takes a full-stack approach, where each layer of the stack is designed with the end user in mind whilst considering other stakeholders \(e.g. operators of nodes in the network\) involved in enabling the end user experience. - -The Celo stack is structured into the following logical layers: - - -

- Celo protocol -
- The Celo Blockchain and Celo Core Contracts together comprise the Celo Protocol -

- -- **Celo Blockchain**: An open cryptographic protocol that allows applications to make transactions with and run smart contracts in a secure and decentralized fashion. The Celo Blockchain has shared ancestry with [Ethereum](https://www.ethereum.org), and maintains full EVM compatibility for smart contracts. However it uses a [Byzantine Fault Tolerant](http://pmg.csail.mit.edu/papers/osdi99.pdf) \(BFT\) consensus mechanism rather than Proof of Work, and has different block format, transaction format, client synchronization protocols, and gas payment and pricing mechanisms. The network’s native asset is Celo Gold, exposed via an ERC-20 interface. - -- **Celo Core Contracts**: A set of smart contracts running on the Celo Blockchain that comprise much of the logic of the platform features including ERC-20 stable currencies, identity attestations, Proof of Stake and governance. These smart contracts are upgradeable and managed by the decentralized governance process. - - -

- Celo network -
- Topology of a Celo Network -

- -- **Applications:** Applications for end users built on the Celo platform. The Celo Wallet app, the first of an ecosystem of applications, allows end users to manage accounts and make payments securely and simply by taking advantage of the innovations in the Celo protocol. Applications take the form of external mobile or backend software: they interact with the Celo Blockchain to issue transactions and invoke code that forms the Celo Core Contracts’ API. Third parties can also deploy custom smart contracts that their own applications can invoke, which in turn can leverage Celo Core Contracts. Applications may use centralized cloud services to provide some of their functionality: in the case of the Celo Wallet, push notifications and a transaction activity feed. - -## 📚 Documentation - -Follow the instructions in [SETUP.md](SETUP.md) to get a development environment set up. - -See [Developer's Guide](https://docs.celo.org/) for full details about the design of the Celo protocol and other information about running these projects. - -## 🙋 Issues - -See the [issue backlog](https://github.com/celo-org/celo-monorepo/issues) for a list of active or proposed tasks. Feel free to create new issues to report bugs and/or request features. - -## 📂 Repo Structure - -The repository has the following packages (sub projects): - -- [attestation-service](packages/attestation-service) - service run by validators on the Celo network to send SMS messages, enabling attestations of user phone numbers and their accounts on the Celo network -- [blockchain-api](packages/blockchain-api) - service that uses Blockscout to present view of transactions by account for Celo Wallet activity feed -- [celotool](packages/celotool) - scripts for deploying and managing testnets -- [cli](packages/cli) - tool that uses ContractKit to interact with the Celo protocol ([docs](https://docs.celo.org/getting-started/using-the-cli)) -- [contractkit](packages/contractkit) - library to help developers and validators interact with the protocol and it's smart contracts ([docs](https://docs.celo.org/celo-sdk/contractkit)) -- [dappkit](packages/dappkit) - set of functions for mobile DApps to work with the wallet app (ex. sign transactions and access the user's account) ([docs](https://docs.celo.org/celo-sdk/dappkit)) -- [dev-utils](packages/dev-utils) - a utils package for use as a dev dependency -- [docs](packages/docs) - technical documentation for the Celo project ([live](https://docs.celo.org/)) -- [faucet](packages/faucet) - faucet deployment configuration ([live](https://celo.org/build/faucet)) -- [helm-charts](packages/helm-charts) - templatized deployments of entire environments to Kubernetes clusters -- [mobile](packages/mobile) - Android wallet app for the Celo platform ([docs](https://docs.celo.org/getting-started/using-the-mobile-wallet), [live](https://play.google.com/store/apps/details?id=org.celo.mobile.alfajores)) -- [notification-service](packages/notification-service) - service for managing push notifications for Celo Wallet -- [protocol](packages/protocol) - identity, stability and other smart contracts for the Celo protocol ([docs](https://docs.celo.org/celo-codebase/protocol)) -- [react-components](packages/react-components) - generalized react native components -- [reserve-site](packages/reserve-site) - website for ([Celo Reserve.org](https://celoreserve.org/)) -- [terraform-modules](packages/terraform-modules) - templatized deployments of entire VM-based testnets for Google Cloud Platform -- [typescript](packages/typescript) - no README available (improve?) -- [utils](packages/utils) - no README available (improve?) - -Code owners for each package can be found in [.github/CODEOWNERS](.github/CODEOWNERS). - -## ✍️ Contributing - -Feel free to jump on the Celo 🚂🚋🚋🚋. Improvements and contributions are highly encouraged! 🙏👊 - -See the [contributing guide](https://docs.celo.org/community/contributing) for details on how to participate. -[![GitHub issues by-label](https://img.shields.io/github/issues/celo-org/celo-monorepo/1%20hour%20tasks)](https://github.com/celo-org/celo-monorepo/issues?q=is%3Aopen+is%3Aissue+label%3A%221+hour+tasks%22) - -All communication and contributions to the Celo project are subject to the [Celo Code of Conduct](https://celo.org/code-of-conduct). - -Not yet ready to contribute but do like the project? Support Celo with a ⭐ or share the love in a [![Twitter URL](https://img.shields.io/twitter/url?style=social&url=https%3A%2F%2Fcelo.org%2F)](https://twitter.com/intent/tweet?url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DkKggE5OvyhE&via=celohq&text=Checkout%20celo%21%20Love%20what%20they%20are%20building.&hashtags=celo) - - - -## 💬 Ask Questions, Find Answers, Get in Touch - -- [Website](https://celo.org/) -- [Docs](https://docs.celo.org/) -- [Blog](https://medium.com/celohq) -- [YouTube](https://www.youtube.com/channel/UCCZgos_YAJSXm5QX5D5Wkcw/videos?view=0&sort=p&flow=grid) -- [Forum](https://forum.celo.org) -- [Discord](https://discord.gg/vRbExjv) -- [Twitter](https://twitter.com/CeloDevs) -- [Reddit](https://www.reddit.com/r/CeloHQ/) -- [Community Events](https://celo.org/community) - -## 📜 License - -All packages are licensed under the terms of the [Apache 2.0 License](LICENSE) unless otherwise specified in the LICENSE file at package's root. diff --git a/packages/docs/developer-resources/wallet-local/reference/SUMMARY.md b/packages/docs/developer-resources/wallet-local/reference/SUMMARY.md deleted file mode 100644 index eea297dc82d..00000000000 --- a/packages/docs/developer-resources/wallet-local/reference/SUMMARY.md +++ /dev/null @@ -1,9 +0,0 @@ -* [Globals](globals.md) -* [Modules]() - * [local-signer](modules/_local_signer_.md) - * [LocalSigner](classes/_local_signer_.localsigner.md) - * [local-wallet](modules/_local_wallet_.md) - * [LocalWallet](classes/_local_wallet_.localwallet.md) -* [Classes]() - * [LocalSigner](classes/_local_signer_.localsigner.md) - * [LocalWallet](classes/_local_wallet_.localwallet.md) \ No newline at end of file diff --git a/packages/docs/developer-resources/wallet-local/reference/classes/_local_signer_.localsigner.md b/packages/docs/developer-resources/wallet-local/reference/classes/_local_signer_.localsigner.md deleted file mode 100644 index 7b7345d56f6..00000000000 --- a/packages/docs/developer-resources/wallet-local/reference/classes/_local_signer_.localsigner.md +++ /dev/null @@ -1,133 +0,0 @@ -# Class: LocalSigner - -Signs the EVM transaction using the provided private key - -## Hierarchy - -* **LocalSigner** - -## Implements - -* Signer - -## Index - -### Constructors - -* [constructor](_local_signer_.localsigner.md#constructor) - -### Methods - -* [computeSharedSecret](_local_signer_.localsigner.md#computesharedsecret) -* [decrypt](_local_signer_.localsigner.md#decrypt) -* [getNativeKey](_local_signer_.localsigner.md#getnativekey) -* [signPersonalMessage](_local_signer_.localsigner.md#signpersonalmessage) -* [signTransaction](_local_signer_.localsigner.md#signtransaction) -* [signTypedData](_local_signer_.localsigner.md#signtypeddata) - -## Constructors - -### constructor - -\+ **new LocalSigner**(`privateKey`: string): *[LocalSigner](_local_signer_.localsigner.md)* - -*Defined in [wallet-local/src/local-signer.ts:15](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-local/src/local-signer.ts#L15)* - -**Parameters:** - -Name | Type | ------- | ------ | -`privateKey` | string | - -**Returns:** *[LocalSigner](_local_signer_.localsigner.md)* - -## Methods - -### computeSharedSecret - -▸ **computeSharedSecret**(`publicKey`: string): *Promise‹Buffer›* - -*Defined in [wallet-local/src/local-signer.ts:71](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-local/src/local-signer.ts#L71)* - -**Parameters:** - -Name | Type | ------- | ------ | -`publicKey` | string | - -**Returns:** *Promise‹Buffer›* - -___ - -### decrypt - -▸ **decrypt**(`ciphertext`: Buffer): *Promise‹Buffer‹››* - -*Defined in [wallet-local/src/local-signer.ts:63](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-local/src/local-signer.ts#L63)* - -**Parameters:** - -Name | Type | ------- | ------ | -`ciphertext` | Buffer | - -**Returns:** *Promise‹Buffer‹››* - -___ - -### getNativeKey - -▸ **getNativeKey**(): *string* - -*Defined in [wallet-local/src/local-signer.ts:21](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-local/src/local-signer.ts#L21)* - -**Returns:** *string* - -___ - -### signPersonalMessage - -▸ **signPersonalMessage**(`data`: string): *Promise‹object›* - -*Defined in [wallet-local/src/local-signer.ts:34](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-local/src/local-signer.ts#L34)* - -**Parameters:** - -Name | Type | ------- | ------ | -`data` | string | - -**Returns:** *Promise‹object›* - -___ - -### signTransaction - -▸ **signTransaction**(`addToV`: number, `encodedTx`: RLPEncodedTx): *Promise‹object›* - -*Defined in [wallet-local/src/local-signer.ts:25](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-local/src/local-signer.ts#L25)* - -**Parameters:** - -Name | Type | ------- | ------ | -`addToV` | number | -`encodedTx` | RLPEncodedTx | - -**Returns:** *Promise‹object›* - -___ - -### signTypedData - -▸ **signTypedData**(`typedData`: EIP712TypedData): *Promise‹object›* - -*Defined in [wallet-local/src/local-signer.ts:50](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-local/src/local-signer.ts#L50)* - -**Parameters:** - -Name | Type | ------- | ------ | -`typedData` | EIP712TypedData | - -**Returns:** *Promise‹object›* diff --git a/packages/docs/developer-resources/wallet-local/reference/classes/_local_wallet_.localwallet.md b/packages/docs/developer-resources/wallet-local/reference/classes/_local_wallet_.localwallet.md deleted file mode 100644 index 4fb50e2db6c..00000000000 --- a/packages/docs/developer-resources/wallet-local/reference/classes/_local_wallet_.localwallet.md +++ /dev/null @@ -1,204 +0,0 @@ -# Class: LocalWallet - -## Hierarchy - -* WalletBase‹[LocalSigner](_local_signer_.localsigner.md)› - - ↳ **LocalWallet** - -## Implements - -* ReadOnlyWallet -* Wallet - -## Index - -### Methods - -* [addAccount](_local_wallet_.localwallet.md#addaccount) -* [computeSharedSecret](_local_wallet_.localwallet.md#computesharedsecret) -* [decrypt](_local_wallet_.localwallet.md#decrypt) -* [getAccounts](_local_wallet_.localwallet.md#getaccounts) -* [hasAccount](_local_wallet_.localwallet.md#hasaccount) -* [removeAccount](_local_wallet_.localwallet.md#removeaccount) -* [signPersonalMessage](_local_wallet_.localwallet.md#signpersonalmessage) -* [signTransaction](_local_wallet_.localwallet.md#signtransaction) -* [signTypedData](_local_wallet_.localwallet.md#signtypeddata) - -## Methods - -### addAccount - -▸ **addAccount**(`privateKey`: string): *void* - -*Defined in [wallet-local/src/local-wallet.ts:10](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-local/src/local-wallet.ts#L10)* - -Register the private key as signer account - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`privateKey` | string | account private key | - -**Returns:** *void* - -___ - -### computeSharedSecret - -▸ **computeSharedSecret**(`address`: Address, `publicKey`: string): *Promise‹Buffer›* - -*Inherited from [LocalWallet](_local_wallet_.localwallet.md).[computeSharedSecret](_local_wallet_.localwallet.md#computesharedsecret)* - -Defined in wallet-base/lib/wallet-base.d.ts:64 - -Computes the shared secret (an ECDH key exchange object) between two accounts - -**Parameters:** - -Name | Type | ------- | ------ | -`address` | Address | -`publicKey` | string | - -**Returns:** *Promise‹Buffer›* - -___ - -### decrypt - -▸ **decrypt**(`address`: string, `ciphertext`: Buffer): *Promise‹Buffer›* - -*Inherited from [LocalWallet](_local_wallet_.localwallet.md).[decrypt](_local_wallet_.localwallet.md#decrypt)* - -Defined in wallet-base/lib/wallet-base.d.ts:60 - -**Parameters:** - -Name | Type | ------- | ------ | -`address` | string | -`ciphertext` | Buffer | - -**Returns:** *Promise‹Buffer›* - -___ - -### getAccounts - -▸ **getAccounts**(): *Address[]* - -*Inherited from [LocalWallet](_local_wallet_.localwallet.md).[getAccounts](_local_wallet_.localwallet.md#getaccounts)* - -Defined in wallet-base/lib/wallet-base.d.ts:18 - -Gets a list of accounts that have been registered - -**Returns:** *Address[]* - -___ - -### hasAccount - -▸ **hasAccount**(`address?`: Address): *boolean* - -*Inherited from [LocalWallet](_local_wallet_.localwallet.md).[hasAccount](_local_wallet_.localwallet.md#hasaccount)* - -Defined in wallet-base/lib/wallet-base.d.ts:28 - -Returns true if account has been registered - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`address?` | Address | Account to check | - -**Returns:** *boolean* - -___ - -### removeAccount - -▸ **removeAccount**(`address`: Address): *void* - -*Overrides void* - -*Defined in [wallet-local/src/local-wallet.ts:24](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-local/src/local-wallet.ts#L24)* - -Remove the account - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`address` | Address | Adddress of the account to remove | - -**Returns:** *void* - -___ - -### signPersonalMessage - -▸ **signPersonalMessage**(`address`: Address, `data`: string): *Promise‹string›* - -*Inherited from [LocalWallet](_local_wallet_.localwallet.md).[signPersonalMessage](_local_wallet_.localwallet.md#signpersonalmessage)* - -Defined in wallet-base/lib/wallet-base.d.ts:51 - -Sign a personal Ethereum signed message. - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`address` | Address | Address of the account to sign with | -`data` | string | Hex string message to sign | - -**Returns:** *Promise‹string›* - -Signature hex string (order: rsv) - -___ - -### signTransaction - -▸ **signTransaction**(`txParams`: CeloTx): *Promise‹EncodedTransaction›* - -*Inherited from [LocalWallet](_local_wallet_.localwallet.md).[signTransaction](_local_wallet_.localwallet.md#signtransaction)* - -Defined in wallet-base/lib/wallet-base.d.ts:44 - -Gets the signer based on the 'from' field in the tx body - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`txParams` | CeloTx | Transaction to sign | - -**Returns:** *Promise‹EncodedTransaction›* - -___ - -### signTypedData - -▸ **signTypedData**(`address`: Address, `typedData`: EIP712TypedData): *Promise‹string›* - -*Inherited from [LocalWallet](_local_wallet_.localwallet.md).[signTypedData](_local_wallet_.localwallet.md#signtypeddata)* - -Defined in wallet-base/lib/wallet-base.d.ts:58 - -Sign an EIP712 Typed Data message. - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`address` | Address | Address of the account to sign with | -`typedData` | EIP712TypedData | the typed data object | - -**Returns:** *Promise‹string›* - -Signature hex string (order: rsv) diff --git a/packages/docs/developer-resources/wallet-local/reference/globals.md b/packages/docs/developer-resources/wallet-local/reference/globals.md deleted file mode 100644 index eb944342914..00000000000 --- a/packages/docs/developer-resources/wallet-local/reference/globals.md +++ /dev/null @@ -1,8 +0,0 @@ -# @celo/wallet-local - -## Index - -### Modules - -* ["local-signer"](modules/_local_signer_.md) -* ["local-wallet"](modules/_local_wallet_.md) diff --git a/packages/docs/developer-resources/wallet-local/reference/modules/_local_signer_.md b/packages/docs/developer-resources/wallet-local/reference/modules/_local_signer_.md deleted file mode 100644 index e2a79bb65a3..00000000000 --- a/packages/docs/developer-resources/wallet-local/reference/modules/_local_signer_.md +++ /dev/null @@ -1,7 +0,0 @@ -# Module: "local-signer" - -## Index - -### Classes - -* [LocalSigner](../classes/_local_signer_.localsigner.md) diff --git a/packages/docs/developer-resources/wallet-local/reference/modules/_local_wallet_.md b/packages/docs/developer-resources/wallet-local/reference/modules/_local_wallet_.md deleted file mode 100644 index bfc7eb25344..00000000000 --- a/packages/docs/developer-resources/wallet-local/reference/modules/_local_wallet_.md +++ /dev/null @@ -1,7 +0,0 @@ -# Module: "local-wallet" - -## Index - -### Classes - -* [LocalWallet](../classes/_local_wallet_.localwallet.md) diff --git a/packages/docs/developer-resources/wallet-remote/reference/README.md b/packages/docs/developer-resources/wallet-remote/reference/README.md deleted file mode 100644 index fc974dd75ea..00000000000 --- a/packages/docs/developer-resources/wallet-remote/reference/README.md +++ /dev/null @@ -1,162 +0,0 @@ -# @celo/wallet-remote - -

- - celo logo - -

- -**Celo Monorepo - Official repository for core projects comprising the Celo platform** - -This repository contains the source code for the Celo core projects including the [smart contracts](https://github.com/celo-org/celo-monorepo/tree/master/packages/protocol), [wallet app](https://github.com/celo-org/celo-monorepo/tree/master/packages/mobile), -and other packages. The source code for the Celo Blockchain which operates a node on the Celo Network is kept in a separate repo [here](https://github.com/celo-org/celo-blockchain). - - - -[![CircleCI](https://img.shields.io/circleci/build/github/celo-org/celo-monorepo/master)](https://circleci.com/gh/celo-org/celo-monorepo/tree/master) -[![Codecov](https://img.shields.io/codecov/c/github/celo-org/celo-monorepo)](https://codecov.io/gh/celo-org/celo-monorepo) -[![GitHub contributors](https://img.shields.io/github/contributors/celo-org/celo-monorepo)](https://github.com/celo-org/celo-monorepo/graphs/contributors) -[![GitHub commit activity](https://img.shields.io/github/commit-activity/w/celo-org/celo-monorepo)](https://github.com/celo-org/celo-monorepo/graphs/contributors) -[![GitHub Stars](https://img.shields.io/github/stars/celo-org/celo-monorepo.svg)](https://github.com/celo-org/celo-monorepo/stargazers) -![GitHub repo size](https://img.shields.io/github/repo-size/celo-org/celo-monorepo) -[![GitHub](https://img.shields.io/github/license/celo-org/celo-monorepo?color=blue)](https://github.com/celo-org/celo-monorepo/blob/master/LICENSE) - - - -[![Website celo.org](https://img.shields.io/website-up-down-green-red/https/celo.org.svg)](https://celo.org) -[![Blog](https://img.shields.io/badge/blog-up-green)](https://medium.com/celoorg) -[![docs](https://img.shields.io/badge/docs-up-green)](https://docs.celo.org/) -[![Youtube](https://img.shields.io/badge/YouTube%20channel-up-green)](https://www.youtube.com/channel/UCCZgos_YAJSXm5QX5D5Wkcw/videos?view=0&sort=p&flow=grid) -[![forum](https://img.shields.io/badge/forum-up-green)](https://forum.celo.org) -[![Discord](https://img.shields.io/discord/600834479145353243.svg)](https://discord.gg/RfHQKtY) -[![Twitter CeloDevs](https://img.shields.io/twitter/follow/celodevs?style=social)](https://twitter.com/celodevs) -[![Twitter CeloOrg](https://img.shields.io/twitter/follow/celoorg?style=social)](https://twitter.com/CeloOrg) -[![Subreddit subscribers](https://img.shields.io/reddit/subreddit-subscribers/CeloHQ?style=social)](https://www.reddit.com/r/CeloHQ/) - - - -[![GitHub pull requests by-label](https://img.shields.io/github/issues-pr-raw/celo-org/celo-monorepo)](https://github.com/celo-org/celo-monorepo/pulls) -[![GitHub Issues](https://img.shields.io/github/issues-raw/celo-org/celo-monorepo.svg)](https://github.com/celo-org/celo-monorepo/issues) -[![GitHub issues by-label](https://img.shields.io/github/issues/celo-org/celo-monorepo/1%20hour%20tasks)](https://github.com/celo-org/celo-monorepo/issues?q=is%3Aopen+is%3Aissue+label%3A%221+hour+tasks%22) -[![GitHub issues by-label](https://img.shields.io/github/issues/celo-org/celo-monorepo/betanet-phase-2)](https://github.com/celo-org/celo-monorepo/issues?q=is%3Aopen+is%3Aissue+label%3Abetanet-phase-2) -[![GitHub issues by-label](https://img.shields.io/github/issues/celo-org/celo-monorepo/betanet-phase-3)](https://github.com/celo-org/celo-monorepo/issues?q=is%3Aopen+is%3Aissue+label%3Abetanet-phase-3) - -Contents: - - - -- [Celo's Mission - Prosperity for All](#mission) -- [The Celo Stack](#stack) -- [Documentation](#docs) -- [Issues](#issues) -- [Repo Structure](#repo) -- [Contributing](#contributing) -- [Ask Questions, Find Answers, Get in Touch](#ask) -- [License](#license) - - -## 🥅 Celo's Mission - Prosperity for All - -Celo, pronounced /ˈtselo/, means ‘purpose’ in Esperanto. In a similar spirit, we are aiming to create a new platform to connect people globally and bring financial stability to those who need it most. We believe blockchain technology is one of the most exciting innovations in recent history and as a community we look to push the boundaries of what is possible with it today. More importantly, we are driven by purpose -- to solve real-world problems such as lack of access to sound currency, or friction for cash-transfer programs aimed to alleviate poverty. Our mission is to build a monetary system that creates the conditions for prosperity for all. - - -

- - Play on Youtube - What if money were beautiful - -
- What if money were beautiful? -

- -## 🧱 The Celo Stack - -Celo is oriented around providing the simplest possible experience for end users, who may have no familiarity with cryptocurrencies, and may be using low cost devices with limited connectivity. To achieve this, the project takes a full-stack approach, where each layer of the stack is designed with the end user in mind whilst considering other stakeholders \(e.g. operators of nodes in the network\) involved in enabling the end user experience. - -The Celo stack is structured into the following logical layers: - - -

- Celo protocol -
- The Celo Blockchain and Celo Core Contracts together comprise the Celo Protocol -

- -- **Celo Blockchain**: An open cryptographic protocol that allows applications to make transactions with and run smart contracts in a secure and decentralized fashion. The Celo Blockchain has shared ancestry with [Ethereum](https://www.ethereum.org), and maintains full EVM compatibility for smart contracts. However it uses a [Byzantine Fault Tolerant](http://pmg.csail.mit.edu/papers/osdi99.pdf) \(BFT\) consensus mechanism rather than Proof of Work, and has different block format, transaction format, client synchronization protocols, and gas payment and pricing mechanisms. The network’s native asset is Celo Gold, exposed via an ERC-20 interface. - -- **Celo Core Contracts**: A set of smart contracts running on the Celo Blockchain that comprise much of the logic of the platform features including ERC-20 stable currencies, identity attestations, Proof of Stake and governance. These smart contracts are upgradeable and managed by the decentralized governance process. - - -

- Celo network -
- Topology of a Celo Network -

- -- **Applications:** Applications for end users built on the Celo platform. The Celo Wallet app, the first of an ecosystem of applications, allows end users to manage accounts and make payments securely and simply by taking advantage of the innovations in the Celo protocol. Applications take the form of external mobile or backend software: they interact with the Celo Blockchain to issue transactions and invoke code that forms the Celo Core Contracts’ API. Third parties can also deploy custom smart contracts that their own applications can invoke, which in turn can leverage Celo Core Contracts. Applications may use centralized cloud services to provide some of their functionality: in the case of the Celo Wallet, push notifications and a transaction activity feed. - -## 📚 Documentation - -Follow the instructions in [SETUP.md](SETUP.md) to get a development environment set up. - -See [Developer's Guide](https://docs.celo.org/) for full details about the design of the Celo protocol and other information about running these projects. - -## 🙋 Issues - -See the [issue backlog](https://github.com/celo-org/celo-monorepo/issues) for a list of active or proposed tasks. Feel free to create new issues to report bugs and/or request features. - -## 📂 Repo Structure - -The repository has the following packages (sub projects): - -- [attestation-service](packages/attestation-service) - service run by validators on the Celo network to send SMS messages, enabling attestations of user phone numbers and their accounts on the Celo network -- [blockchain-api](packages/blockchain-api) - service that uses Blockscout to present view of transactions by account for Celo Wallet activity feed -- [celotool](packages/celotool) - scripts for deploying and managing testnets -- [cli](packages/cli) - tool that uses ContractKit to interact with the Celo protocol ([docs](https://docs.celo.org/getting-started/using-the-cli)) -- [contractkit](packages/contractkit) - library to help developers and validators interact with the protocol and it's smart contracts ([docs](https://docs.celo.org/celo-sdk/contractkit)) -- [dappkit](packages/dappkit) - set of functions for mobile DApps to work with the wallet app (ex. sign transactions and access the user's account) ([docs](https://docs.celo.org/celo-sdk/dappkit)) -- [dev-utils](packages/dev-utils) - a utils package for use as a dev dependency -- [docs](packages/docs) - technical documentation for the Celo project ([live](https://docs.celo.org/)) -- [faucet](packages/faucet) - faucet deployment configuration ([live](https://celo.org/build/faucet)) -- [helm-charts](packages/helm-charts) - templatized deployments of entire environments to Kubernetes clusters -- [mobile](packages/mobile) - Android wallet app for the Celo platform ([docs](https://docs.celo.org/getting-started/using-the-mobile-wallet), [live](https://play.google.com/store/apps/details?id=org.celo.mobile.alfajores)) -- [notification-service](packages/notification-service) - service for managing push notifications for Celo Wallet -- [protocol](packages/protocol) - identity, stability and other smart contracts for the Celo protocol ([docs](https://docs.celo.org/celo-codebase/protocol)) -- [react-components](packages/react-components) - generalized react native components -- [reserve-site](packages/reserve-site) - website for ([Celo Reserve.org](https://celoreserve.org/)) -- [terraform-modules](packages/terraform-modules) - templatized deployments of entire VM-based testnets for Google Cloud Platform -- [typescript](packages/typescript) - no README available (improve?) -- [utils](packages/utils) - no README available (improve?) - -Code owners for each package can be found in [.github/CODEOWNERS](.github/CODEOWNERS). - -## ✍️ Contributing - -Feel free to jump on the Celo 🚂🚋🚋🚋. Improvements and contributions are highly encouraged! 🙏👊 - -See the [contributing guide](https://docs.celo.org/community/contributing) for details on how to participate. -[![GitHub issues by-label](https://img.shields.io/github/issues/celo-org/celo-monorepo/1%20hour%20tasks)](https://github.com/celo-org/celo-monorepo/issues?q=is%3Aopen+is%3Aissue+label%3A%221+hour+tasks%22) - -All communication and contributions to the Celo project are subject to the [Celo Code of Conduct](https://celo.org/code-of-conduct). - -Not yet ready to contribute but do like the project? Support Celo with a ⭐ or share the love in a [![Twitter URL](https://img.shields.io/twitter/url?style=social&url=https%3A%2F%2Fcelo.org%2F)](https://twitter.com/intent/tweet?url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DkKggE5OvyhE&via=celohq&text=Checkout%20celo%21%20Love%20what%20they%20are%20building.&hashtags=celo) - - - -## 💬 Ask Questions, Find Answers, Get in Touch - -- [Website](https://celo.org/) -- [Docs](https://docs.celo.org/) -- [Blog](https://medium.com/celohq) -- [YouTube](https://www.youtube.com/channel/UCCZgos_YAJSXm5QX5D5Wkcw/videos?view=0&sort=p&flow=grid) -- [Forum](https://forum.celo.org) -- [Discord](https://discord.gg/vRbExjv) -- [Twitter](https://twitter.com/CeloDevs) -- [Reddit](https://www.reddit.com/r/CeloHQ/) -- [Community Events](https://celo.org/community) - -## 📜 License - -All packages are licensed under the terms of the [Apache 2.0 License](LICENSE) unless otherwise specified in the LICENSE file at package's root. diff --git a/packages/docs/developer-resources/wallet-remote/reference/SUMMARY.md b/packages/docs/developer-resources/wallet-remote/reference/SUMMARY.md deleted file mode 100644 index 0a8e57a63a8..00000000000 --- a/packages/docs/developer-resources/wallet-remote/reference/SUMMARY.md +++ /dev/null @@ -1,6 +0,0 @@ -* [Globals](globals.md) -* [Modules]() - * [remote-wallet](modules/_remote_wallet_.md) - * [RemoteWallet](classes/_remote_wallet_.remotewallet.md) -* [Classes]() - * [RemoteWallet](classes/_remote_wallet_.remotewallet.md) \ No newline at end of file diff --git a/packages/docs/developer-resources/wallet-remote/reference/classes/_remote_wallet_.remotewallet.md b/packages/docs/developer-resources/wallet-remote/reference/classes/_remote_wallet_.remotewallet.md deleted file mode 100644 index 75aee71566e..00000000000 --- a/packages/docs/developer-resources/wallet-remote/reference/classes/_remote_wallet_.remotewallet.md +++ /dev/null @@ -1,212 +0,0 @@ -# Class: RemoteWallet <**TSigner**> - -Abstract class representing a remote wallet that requires async initialization - -## Type parameters - -▪ **TSigner**: *Signer* - -## Hierarchy - -* WalletBase‹TSigner› - - ↳ **RemoteWallet** - -## Implements - -* ReadOnlyWallet -* ReadOnlyWallet - -## Index - -### Methods - -* [computeSharedSecret](_remote_wallet_.remotewallet.md#computesharedsecret) -* [decrypt](_remote_wallet_.remotewallet.md#decrypt) -* [getAccounts](_remote_wallet_.remotewallet.md#getaccounts) -* [hasAccount](_remote_wallet_.remotewallet.md#hasaccount) -* [init](_remote_wallet_.remotewallet.md#init) -* [isSetupFinished](_remote_wallet_.remotewallet.md#issetupfinished) -* [removeAccount](_remote_wallet_.remotewallet.md#removeaccount) -* [signPersonalMessage](_remote_wallet_.remotewallet.md#signpersonalmessage) -* [signTransaction](_remote_wallet_.remotewallet.md#signtransaction) -* [signTypedData](_remote_wallet_.remotewallet.md#signtypeddata) - -## Methods - -### computeSharedSecret - -▸ **computeSharedSecret**(`address`: Address, `publicKey`: string): *Promise‹Buffer›* - -*Inherited from [RemoteWallet](_remote_wallet_.remotewallet.md).[computeSharedSecret](_remote_wallet_.remotewallet.md#computesharedsecret)* - -Defined in wallet-base/lib/wallet-base.d.ts:64 - -Computes the shared secret (an ECDH key exchange object) between two accounts - -**Parameters:** - -Name | Type | ------- | ------ | -`address` | Address | -`publicKey` | string | - -**Returns:** *Promise‹Buffer›* - -___ - -### decrypt - -▸ **decrypt**(`address`: string, `ciphertext`: Buffer): *Promise‹Buffer›* - -*Inherited from [RemoteWallet](_remote_wallet_.remotewallet.md).[decrypt](_remote_wallet_.remotewallet.md#decrypt)* - -Defined in wallet-base/lib/wallet-base.d.ts:60 - -**Parameters:** - -Name | Type | ------- | ------ | -`address` | string | -`ciphertext` | Buffer | - -**Returns:** *Promise‹Buffer›* - -___ - -### getAccounts - -▸ **getAccounts**(): *Address[]* - -*Overrides void* - -*Defined in [wallet-remote/src/remote-wallet.ts:60](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-remote/src/remote-wallet.ts#L60)* - -Get a list of accounts in the remote wallet - -**Returns:** *Address[]* - -___ - -### hasAccount - -▸ **hasAccount**(`address?`: Address): *boolean* - -*Overrides void* - -*Defined in [wallet-remote/src/remote-wallet.ts:69](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-remote/src/remote-wallet.ts#L69)* - -Returns true if account is in the remote wallet - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`address?` | Address | Account to check | - -**Returns:** *boolean* - -___ - -### init - -▸ **init**(): *Promise‹void›* - -*Defined in [wallet-remote/src/remote-wallet.ts:19](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-remote/src/remote-wallet.ts#L19)* - -Discovers wallet accounts and caches results in memory -Idempotent to ensure multiple calls are benign - -**Returns:** *Promise‹void›* - -___ - -### isSetupFinished - -▸ **isSetupFinished**(): *boolean* - -*Defined in [wallet-remote/src/remote-wallet.ts:109](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-remote/src/remote-wallet.ts#L109)* - -**Returns:** *boolean* - -___ - -### removeAccount - -▸ **removeAccount**(`_address`: string): *void* - -*Inherited from [RemoteWallet](_remote_wallet_.remotewallet.md).[removeAccount](_remote_wallet_.remotewallet.md#removeaccount)* - -Defined in wallet-base/lib/wallet-base.d.ts:23 - -Removes the account with the given address. Needs to be implemented by subclass, otherwise throws error - -**Parameters:** - -Name | Type | ------- | ------ | -`_address` | string | - -**Returns:** *void* - -___ - -### signPersonalMessage - -▸ **signPersonalMessage**(`address`: Address, `data`: string): *Promise‹string›* - -*Overrides void* - -*Defined in [wallet-remote/src/remote-wallet.ts:88](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-remote/src/remote-wallet.ts#L88)* - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`address` | Address | Address of the account to sign with | -`data` | string | Hex string message to sign | - -**Returns:** *Promise‹string›* - -Signature hex string (order: rsv) - -___ - -### signTransaction - -▸ **signTransaction**(`txParams`: CeloTx): *Promise‹EncodedTransaction›* - -*Overrides void* - -*Defined in [wallet-remote/src/remote-wallet.ts:78](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-remote/src/remote-wallet.ts#L78)* - -Signs the EVM transaction using the signer pulled from the from field - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`txParams` | CeloTx | EVM transaction | - -**Returns:** *Promise‹EncodedTransaction›* - -___ - -### signTypedData - -▸ **signTypedData**(`address`: Address, `typedData`: EIP712TypedData): *Promise‹string›* - -*Overrides void* - -*Defined in [wallet-remote/src/remote-wallet.ts:98](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-remote/src/remote-wallet.ts#L98)* - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`address` | Address | Address of the account to sign with | -`typedData` | EIP712TypedData | the typed data object | - -**Returns:** *Promise‹string›* - -Signature hex string (order: rsv) diff --git a/packages/docs/developer-resources/wallet-remote/reference/globals.md b/packages/docs/developer-resources/wallet-remote/reference/globals.md deleted file mode 100644 index 4e0c8de3e41..00000000000 --- a/packages/docs/developer-resources/wallet-remote/reference/globals.md +++ /dev/null @@ -1,7 +0,0 @@ -# @celo/wallet-remote - -## Index - -### Modules - -* ["remote-wallet"](modules/_remote_wallet_.md) diff --git a/packages/docs/developer-resources/wallet-remote/reference/modules/_remote_wallet_.md b/packages/docs/developer-resources/wallet-remote/reference/modules/_remote_wallet_.md deleted file mode 100644 index 23e92c9e93d..00000000000 --- a/packages/docs/developer-resources/wallet-remote/reference/modules/_remote_wallet_.md +++ /dev/null @@ -1,7 +0,0 @@ -# Module: "remote-wallet" - -## Index - -### Classes - -* [RemoteWallet](../classes/_remote_wallet_.remotewallet.md) diff --git a/packages/docs/developer-resources/wallet-rpc/reference/README.md b/packages/docs/developer-resources/wallet-rpc/reference/README.md deleted file mode 100644 index 53336daf815..00000000000 --- a/packages/docs/developer-resources/wallet-rpc/reference/README.md +++ /dev/null @@ -1,162 +0,0 @@ -# @celo/wallet-rpc - -

- - celo logo - -

- -**Celo Monorepo - Official repository for core projects comprising the Celo platform** - -This repository contains the source code for the Celo core projects including the [smart contracts](https://github.com/celo-org/celo-monorepo/tree/master/packages/protocol), [wallet app](https://github.com/celo-org/celo-monorepo/tree/master/packages/mobile), -and other packages. The source code for the Celo Blockchain which operates a node on the Celo Network is kept in a separate repo [here](https://github.com/celo-org/celo-blockchain). - - - -[![CircleCI](https://img.shields.io/circleci/build/github/celo-org/celo-monorepo/master)](https://circleci.com/gh/celo-org/celo-monorepo/tree/master) -[![Codecov](https://img.shields.io/codecov/c/github/celo-org/celo-monorepo)](https://codecov.io/gh/celo-org/celo-monorepo) -[![GitHub contributors](https://img.shields.io/github/contributors/celo-org/celo-monorepo)](https://github.com/celo-org/celo-monorepo/graphs/contributors) -[![GitHub commit activity](https://img.shields.io/github/commit-activity/w/celo-org/celo-monorepo)](https://github.com/celo-org/celo-monorepo/graphs/contributors) -[![GitHub Stars](https://img.shields.io/github/stars/celo-org/celo-monorepo.svg)](https://github.com/celo-org/celo-monorepo/stargazers) -![GitHub repo size](https://img.shields.io/github/repo-size/celo-org/celo-monorepo) -[![GitHub](https://img.shields.io/github/license/celo-org/celo-monorepo?color=blue)](https://github.com/celo-org/celo-monorepo/blob/master/LICENSE) - - - -[![Website celo.org](https://img.shields.io/website-up-down-green-red/https/celo.org.svg)](https://celo.org) -[![Blog](https://img.shields.io/badge/blog-up-green)](https://medium.com/celoorg) -[![docs](https://img.shields.io/badge/docs-up-green)](https://docs.celo.org/) -[![Youtube](https://img.shields.io/badge/YouTube%20channel-up-green)](https://www.youtube.com/channel/UCCZgos_YAJSXm5QX5D5Wkcw/videos?view=0&sort=p&flow=grid) -[![forum](https://img.shields.io/badge/forum-up-green)](https://forum.celo.org) -[![Discord](https://img.shields.io/discord/600834479145353243.svg)](https://discord.gg/RfHQKtY) -[![Twitter CeloDevs](https://img.shields.io/twitter/follow/celodevs?style=social)](https://twitter.com/celodevs) -[![Twitter CeloOrg](https://img.shields.io/twitter/follow/celoorg?style=social)](https://twitter.com/CeloOrg) -[![Subreddit subscribers](https://img.shields.io/reddit/subreddit-subscribers/CeloHQ?style=social)](https://www.reddit.com/r/CeloHQ/) - - - -[![GitHub pull requests by-label](https://img.shields.io/github/issues-pr-raw/celo-org/celo-monorepo)](https://github.com/celo-org/celo-monorepo/pulls) -[![GitHub Issues](https://img.shields.io/github/issues-raw/celo-org/celo-monorepo.svg)](https://github.com/celo-org/celo-monorepo/issues) -[![GitHub issues by-label](https://img.shields.io/github/issues/celo-org/celo-monorepo/1%20hour%20tasks)](https://github.com/celo-org/celo-monorepo/issues?q=is%3Aopen+is%3Aissue+label%3A%221+hour+tasks%22) -[![GitHub issues by-label](https://img.shields.io/github/issues/celo-org/celo-monorepo/betanet-phase-2)](https://github.com/celo-org/celo-monorepo/issues?q=is%3Aopen+is%3Aissue+label%3Abetanet-phase-2) -[![GitHub issues by-label](https://img.shields.io/github/issues/celo-org/celo-monorepo/betanet-phase-3)](https://github.com/celo-org/celo-monorepo/issues?q=is%3Aopen+is%3Aissue+label%3Abetanet-phase-3) - -Contents: - - - -- [Celo's Mission - Prosperity for All](#mission) -- [The Celo Stack](#stack) -- [Documentation](#docs) -- [Issues](#issues) -- [Repo Structure](#repo) -- [Contributing](#contributing) -- [Ask Questions, Find Answers, Get in Touch](#ask) -- [License](#license) - - -## 🥅 Celo's Mission - Prosperity for All - -Celo, pronounced /ˈtselo/, means ‘purpose’ in Esperanto. In a similar spirit, we are aiming to create a new platform to connect people globally and bring financial stability to those who need it most. We believe blockchain technology is one of the most exciting innovations in recent history and as a community we look to push the boundaries of what is possible with it today. More importantly, we are driven by purpose -- to solve real-world problems such as lack of access to sound currency, or friction for cash-transfer programs aimed to alleviate poverty. Our mission is to build a monetary system that creates the conditions for prosperity for all. - - -

- - Play on Youtube - What if money were beautiful - -
- What if money were beautiful? -

- -## 🧱 The Celo Stack - -Celo is oriented around providing the simplest possible experience for end users, who may have no familiarity with cryptocurrencies, and may be using low cost devices with limited connectivity. To achieve this, the project takes a full-stack approach, where each layer of the stack is designed with the end user in mind whilst considering other stakeholders \(e.g. operators of nodes in the network\) involved in enabling the end user experience. - -The Celo stack is structured into the following logical layers: - - -

- Celo protocol -
- The Celo Blockchain and Celo Core Contracts together comprise the Celo Protocol -

- -- **Celo Blockchain**: An open cryptographic protocol that allows applications to make transactions with and run smart contracts in a secure and decentralized fashion. The Celo Blockchain has shared ancestry with [Ethereum](https://www.ethereum.org), and maintains full EVM compatibility for smart contracts. However it uses a [Byzantine Fault Tolerant](http://pmg.csail.mit.edu/papers/osdi99.pdf) \(BFT\) consensus mechanism rather than Proof of Work, and has different block format, transaction format, client synchronization protocols, and gas payment and pricing mechanisms. The network’s native asset is Celo Gold, exposed via an ERC-20 interface. - -- **Celo Core Contracts**: A set of smart contracts running on the Celo Blockchain that comprise much of the logic of the platform features including ERC-20 stable currencies, identity attestations, Proof of Stake and governance. These smart contracts are upgradeable and managed by the decentralized governance process. - - -

- Celo network -
- Topology of a Celo Network -

- -- **Applications:** Applications for end users built on the Celo platform. The Celo Wallet app, the first of an ecosystem of applications, allows end users to manage accounts and make payments securely and simply by taking advantage of the innovations in the Celo protocol. Applications take the form of external mobile or backend software: they interact with the Celo Blockchain to issue transactions and invoke code that forms the Celo Core Contracts’ API. Third parties can also deploy custom smart contracts that their own applications can invoke, which in turn can leverage Celo Core Contracts. Applications may use centralized cloud services to provide some of their functionality: in the case of the Celo Wallet, push notifications and a transaction activity feed. - -## 📚 Documentation - -Follow the instructions in [SETUP.md](SETUP.md) to get a development environment set up. - -See [Developer's Guide](https://docs.celo.org/) for full details about the design of the Celo protocol and other information about running these projects. - -## 🙋 Issues - -See the [issue backlog](https://github.com/celo-org/celo-monorepo/issues) for a list of active or proposed tasks. Feel free to create new issues to report bugs and/or request features. - -## 📂 Repo Structure - -The repository has the following packages (sub projects): - -- [attestation-service](packages/attestation-service) - service run by validators on the Celo network to send SMS messages, enabling attestations of user phone numbers and their accounts on the Celo network -- [blockchain-api](packages/blockchain-api) - service that uses Blockscout to present view of transactions by account for Celo Wallet activity feed -- [celotool](packages/celotool) - scripts for deploying and managing testnets -- [cli](packages/cli) - tool that uses ContractKit to interact with the Celo protocol ([docs](https://docs.celo.org/getting-started/using-the-cli)) -- [contractkit](packages/contractkit) - library to help developers and validators interact with the protocol and it's smart contracts ([docs](https://docs.celo.org/celo-sdk/contractkit)) -- [dappkit](packages/dappkit) - set of functions for mobile DApps to work with the wallet app (ex. sign transactions and access the user's account) ([docs](https://docs.celo.org/celo-sdk/dappkit)) -- [dev-utils](packages/dev-utils) - a utils package for use as a dev dependency -- [docs](packages/docs) - technical documentation for the Celo project ([live](https://docs.celo.org/)) -- [faucet](packages/faucet) - faucet deployment configuration ([live](https://celo.org/build/faucet)) -- [helm-charts](packages/helm-charts) - templatized deployments of entire environments to Kubernetes clusters -- [mobile](packages/mobile) - Android wallet app for the Celo platform ([docs](https://docs.celo.org/getting-started/using-the-mobile-wallet), [live](https://play.google.com/store/apps/details?id=org.celo.mobile.alfajores)) -- [notification-service](packages/notification-service) - service for managing push notifications for Celo Wallet -- [protocol](packages/protocol) - identity, stability and other smart contracts for the Celo protocol ([docs](https://docs.celo.org/celo-codebase/protocol)) -- [react-components](packages/react-components) - generalized react native components -- [reserve-site](packages/reserve-site) - website for ([Celo Reserve.org](https://celoreserve.org/)) -- [terraform-modules](packages/terraform-modules) - templatized deployments of entire VM-based testnets for Google Cloud Platform -- [typescript](packages/typescript) - no README available (improve?) -- [utils](packages/utils) - no README available (improve?) - -Code owners for each package can be found in [.github/CODEOWNERS](.github/CODEOWNERS). - -## ✍️ Contributing - -Feel free to jump on the Celo 🚂🚋🚋🚋. Improvements and contributions are highly encouraged! 🙏👊 - -See the [contributing guide](https://docs.celo.org/community/contributing) for details on how to participate. -[![GitHub issues by-label](https://img.shields.io/github/issues/celo-org/celo-monorepo/1%20hour%20tasks)](https://github.com/celo-org/celo-monorepo/issues?q=is%3Aopen+is%3Aissue+label%3A%221+hour+tasks%22) - -All communication and contributions to the Celo project are subject to the [Celo Code of Conduct](https://celo.org/code-of-conduct). - -Not yet ready to contribute but do like the project? Support Celo with a ⭐ or share the love in a [![Twitter URL](https://img.shields.io/twitter/url?style=social&url=https%3A%2F%2Fcelo.org%2F)](https://twitter.com/intent/tweet?url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DkKggE5OvyhE&via=celohq&text=Checkout%20celo%21%20Love%20what%20they%20are%20building.&hashtags=celo) - - - -## 💬 Ask Questions, Find Answers, Get in Touch - -- [Website](https://celo.org/) -- [Docs](https://docs.celo.org/) -- [Blog](https://medium.com/celohq) -- [YouTube](https://www.youtube.com/channel/UCCZgos_YAJSXm5QX5D5Wkcw/videos?view=0&sort=p&flow=grid) -- [Forum](https://forum.celo.org) -- [Discord](https://discord.gg/vRbExjv) -- [Twitter](https://twitter.com/CeloDevs) -- [Reddit](https://www.reddit.com/r/CeloHQ/) -- [Community Events](https://celo.org/community) - -## 📜 License - -All packages are licensed under the terms of the [Apache 2.0 License](LICENSE) unless otherwise specified in the LICENSE file at package's root. diff --git a/packages/docs/developer-resources/wallet-rpc/reference/SUMMARY.md b/packages/docs/developer-resources/wallet-rpc/reference/SUMMARY.md deleted file mode 100644 index 8a6857973da..00000000000 --- a/packages/docs/developer-resources/wallet-rpc/reference/SUMMARY.md +++ /dev/null @@ -1,14 +0,0 @@ -* [Globals](globals.md) -* [Modules]() - * [rpc-signer](modules/_rpc_signer_.md) - * [RpcSigner](classes/_rpc_signer_.rpcsigner.md) - * [rpc-wallet](modules/_rpc_wallet_.md) - * [RpcWalletErrors](enums/_rpc_wallet_.rpcwalleterrors.md) - * [RpcWallet](classes/_rpc_wallet_.rpcwallet.md) - * [test-utils/ganache.setup](modules/_test_utils_ganache_setup_.md) - * [test-utils/ganache.teardown](modules/_test_utils_ganache_teardown_.md) -* [Classes]() - * [RpcSigner](classes/_rpc_signer_.rpcsigner.md) - * [RpcWallet](classes/_rpc_wallet_.rpcwallet.md) -* [Enums]() - * [RpcWalletErrors](enums/_rpc_wallet_.rpcwalleterrors.md) \ No newline at end of file diff --git a/packages/docs/developer-resources/wallet-rpc/reference/classes/_rpc_signer_.rpcsigner.md b/packages/docs/developer-resources/wallet-rpc/reference/classes/_rpc_signer_.rpcsigner.md deleted file mode 100644 index e8d0e1fa566..00000000000 --- a/packages/docs/developer-resources/wallet-rpc/reference/classes/_rpc_signer_.rpcsigner.md +++ /dev/null @@ -1,196 +0,0 @@ -# Class: RpcSigner - -Implements the signer interface on top of the JSON-RPC interface. - -## Hierarchy - -* **RpcSigner** - -## Implements - -* Signer - -## Index - -### Constructors - -* [constructor](_rpc_signer_.rpcsigner.md#constructor) - -### Methods - -* [computeSharedSecret](_rpc_signer_.rpcsigner.md#computesharedsecret) -* [decrypt](_rpc_signer_.rpcsigner.md#decrypt) -* [getNativeKey](_rpc_signer_.rpcsigner.md#getnativekey) -* [init](_rpc_signer_.rpcsigner.md#init) -* [isUnlocked](_rpc_signer_.rpcsigner.md#isunlocked) -* [signPersonalMessage](_rpc_signer_.rpcsigner.md#signpersonalmessage) -* [signRawTransaction](_rpc_signer_.rpcsigner.md#signrawtransaction) -* [signTransaction](_rpc_signer_.rpcsigner.md#signtransaction) -* [signTypedData](_rpc_signer_.rpcsigner.md#signtypeddata) -* [unlock](_rpc_signer_.rpcsigner.md#unlock) - -## Constructors - -### constructor - -\+ **new RpcSigner**(`rpc`: RpcCaller, `account`: string, `unlockBufferSeconds`: number, `unlockTime?`: undefined | number, `unlockDuration?`: undefined | number): *[RpcSigner](_rpc_signer_.rpcsigner.md)* - -*Defined in [wallet-rpc/src/rpc-signer.ts:54](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-rpc/src/rpc-signer.ts#L54)* - -Construct a new instance of the RPC signer - -**Parameters:** - -Name | Type | Default | Description | ------- | ------ | ------ | ------ | -`rpc` | RpcCaller | - | RPC caller instance | -`account` | string | - | Account address derived from the private key to be called in init | -`unlockBufferSeconds` | number | 5 | Number of seconds to shrink the unlocked duration by to account for latency and timing inconsistencies on the node | -`unlockTime?` | undefined | number | - | Timestamp in seconds when the signer was last unlocked | -`unlockDuration?` | undefined | number | - | Number of seconds that the signer was last unlocked for | - -**Returns:** *[RpcSigner](_rpc_signer_.rpcsigner.md)* - -## Methods - -### computeSharedSecret - -▸ **computeSharedSecret**(`_publicKey`: string): *Promise‹Buffer‹››* - -*Defined in [wallet-rpc/src/rpc-signer.ts:169](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-rpc/src/rpc-signer.ts#L169)* - -**Parameters:** - -Name | Type | ------- | ------ | -`_publicKey` | string | - -**Returns:** *Promise‹Buffer‹››* - -___ - -### decrypt - -▸ **decrypt**(`ciphertext`: Buffer): *Promise‹Buffer‹››* - -*Defined in [wallet-rpc/src/rpc-signer.ts:160](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-rpc/src/rpc-signer.ts#L160)* - -**Parameters:** - -Name | Type | ------- | ------ | -`ciphertext` | Buffer | - -**Returns:** *Promise‹Buffer‹››* - -___ - -### getNativeKey - -▸ **getNativeKey**(): *string* - -*Defined in [wallet-rpc/src/rpc-signer.ts:118](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-rpc/src/rpc-signer.ts#L118)* - -**Returns:** *string* - -___ - -### init - -▸ **init**(`privateKey`: string, `passphrase`: string): *Promise‹string›* - -*Defined in [wallet-rpc/src/rpc-signer.ts:74](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-rpc/src/rpc-signer.ts#L74)* - -**Parameters:** - -Name | Type | ------- | ------ | -`privateKey` | string | -`passphrase` | string | - -**Returns:** *Promise‹string›* - -___ - -### isUnlocked - -▸ **isUnlocked**(): *boolean* - -*Defined in [wallet-rpc/src/rpc-signer.ts:142](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-rpc/src/rpc-signer.ts#L142)* - -**Returns:** *boolean* - -___ - -### signPersonalMessage - -▸ **signPersonalMessage**(`data`: string): *Promise‹object›* - -*Defined in [wallet-rpc/src/rpc-signer.ts:110](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-rpc/src/rpc-signer.ts#L110)* - -**Parameters:** - -Name | Type | ------- | ------ | -`data` | string | - -**Returns:** *Promise‹object›* - -___ - -### signRawTransaction - -▸ **signRawTransaction**(`tx`: CeloTx): *Promise‹EncodedTransaction›* - -*Defined in [wallet-rpc/src/rpc-signer.ts:80](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-rpc/src/rpc-signer.ts#L80)* - -**Parameters:** - -Name | Type | ------- | ------ | -`tx` | CeloTx | - -**Returns:** *Promise‹EncodedTransaction›* - -___ - -### signTransaction - -▸ **signTransaction**(): *Promise‹object›* - -*Defined in [wallet-rpc/src/rpc-signer.ts:97](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-rpc/src/rpc-signer.ts#L97)* - -**Returns:** *Promise‹object›* - -___ - -### signTypedData - -▸ **signTypedData**(`typedData`: EIP712TypedData): *Promise‹object›* - -*Defined in [wallet-rpc/src/rpc-signer.ts:101](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-rpc/src/rpc-signer.ts#L101)* - -**Parameters:** - -Name | Type | ------- | ------ | -`typedData` | EIP712TypedData | - -**Returns:** *Promise‹object›* - -___ - -### unlock - -▸ **unlock**(`passphrase`: string, `duration`: number): *Promise‹boolean›* - -*Defined in [wallet-rpc/src/rpc-signer.ts:120](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-rpc/src/rpc-signer.ts#L120)* - -**Parameters:** - -Name | Type | ------- | ------ | -`passphrase` | string | -`duration` | number | - -**Returns:** *Promise‹boolean›* diff --git a/packages/docs/developer-resources/wallet-rpc/reference/classes/_rpc_wallet_.rpcwallet.md b/packages/docs/developer-resources/wallet-rpc/reference/classes/_rpc_wallet_.rpcwallet.md deleted file mode 100644 index 7dc932fd099..00000000000 --- a/packages/docs/developer-resources/wallet-rpc/reference/classes/_rpc_wallet_.rpcwallet.md +++ /dev/null @@ -1,313 +0,0 @@ -# Class: RpcWallet - -## Hierarchy - -* RemoteWallet‹[RpcSigner](_rpc_signer_.rpcsigner.md)› - - ↳ **RpcWallet** - -## Implements - -* ReadOnlyWallet -* ReadOnlyWallet -* UnlockableWallet - -## Index - -### Constructors - -* [constructor](_rpc_wallet_.rpcwallet.md#constructor) - -### Properties - -* [isSetupFinished](_rpc_wallet_.rpcwallet.md#issetupfinished) - -### Methods - -* [addAccount](_rpc_wallet_.rpcwallet.md#addaccount) -* [computeSharedSecret](_rpc_wallet_.rpcwallet.md#computesharedsecret) -* [decrypt](_rpc_wallet_.rpcwallet.md#decrypt) -* [getAccounts](_rpc_wallet_.rpcwallet.md#getaccounts) -* [hasAccount](_rpc_wallet_.rpcwallet.md#hasaccount) -* [init](_rpc_wallet_.rpcwallet.md#init) -* [isAccountUnlocked](_rpc_wallet_.rpcwallet.md#isaccountunlocked) -* [loadAccountSigners](_rpc_wallet_.rpcwallet.md#loadaccountsigners) -* [removeAccount](_rpc_wallet_.rpcwallet.md#removeaccount) -* [signPersonalMessage](_rpc_wallet_.rpcwallet.md#signpersonalmessage) -* [signTransaction](_rpc_wallet_.rpcwallet.md#signtransaction) -* [signTypedData](_rpc_wallet_.rpcwallet.md#signtypeddata) -* [unlockAccount](_rpc_wallet_.rpcwallet.md#unlockaccount) - -## Constructors - -### constructor - -\+ **new RpcWallet**(`_provider`: Provider): *[RpcWallet](_rpc_wallet_.rpcwallet.md)* - -*Defined in [wallet-rpc/src/rpc-wallet.ts:18](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-rpc/src/rpc-wallet.ts#L18)* - -**Parameters:** - -Name | Type | ------- | ------ | -`_provider` | Provider | - -**Returns:** *[RpcWallet](_rpc_wallet_.rpcwallet.md)* - -## Properties - -### isSetupFinished - -• **isSetupFinished**: *function* - -*Inherited from [RpcWallet](_rpc_wallet_.rpcwallet.md).[isSetupFinished](_rpc_wallet_.rpcwallet.md#issetupfinished)* - -Defined in wallet-remote/lib/remote-wallet.d.ts:51 - -#### Type declaration: - -▸ (): *boolean* - -## Methods - -### addAccount - -▸ **addAccount**(`privateKey`: string, `passphrase`: string): *Promise‹string›* - -*Defined in [wallet-rpc/src/rpc-wallet.ts:38](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-rpc/src/rpc-wallet.ts#L38)* - -**Parameters:** - -Name | Type | ------- | ------ | -`privateKey` | string | -`passphrase` | string | - -**Returns:** *Promise‹string›* - -___ - -### computeSharedSecret - -▸ **computeSharedSecret**(`address`: Address, `publicKey`: string): *Promise‹Buffer›* - -*Inherited from [RpcWallet](_rpc_wallet_.rpcwallet.md).[computeSharedSecret](_rpc_wallet_.rpcwallet.md#computesharedsecret)* - -Defined in wallet-base/lib/wallet-base.d.ts:64 - -Computes the shared secret (an ECDH key exchange object) between two accounts - -**Parameters:** - -Name | Type | ------- | ------ | -`address` | Address | -`publicKey` | string | - -**Returns:** *Promise‹Buffer›* - -___ - -### decrypt - -▸ **decrypt**(`address`: string, `ciphertext`: Buffer): *Promise‹Buffer›* - -*Inherited from [RpcWallet](_rpc_wallet_.rpcwallet.md).[decrypt](_rpc_wallet_.rpcwallet.md#decrypt)* - -Defined in wallet-base/lib/wallet-base.d.ts:60 - -**Parameters:** - -Name | Type | ------- | ------ | -`address` | string | -`ciphertext` | Buffer | - -**Returns:** *Promise‹Buffer›* - -___ - -### getAccounts - -▸ **getAccounts**(): *Address[]* - -*Inherited from [RpcWallet](_rpc_wallet_.rpcwallet.md).[getAccounts](_rpc_wallet_.rpcwallet.md#getaccounts)* - -*Overrides void* - -Defined in wallet-remote/lib/remote-wallet.d.ts:27 - -Get a list of accounts in the remote wallet - -**Returns:** *Address[]* - -___ - -### hasAccount - -▸ **hasAccount**(`address?`: Address): *boolean* - -*Inherited from [RpcWallet](_rpc_wallet_.rpcwallet.md).[hasAccount](_rpc_wallet_.rpcwallet.md#hasaccount)* - -*Overrides void* - -Defined in wallet-remote/lib/remote-wallet.d.ts:32 - -Returns true if account is in the remote wallet - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`address?` | Address | Account to check | - -**Returns:** *boolean* - -___ - -### init - -▸ **init**(): *Promise‹void›* - -*Inherited from [RpcWallet](_rpc_wallet_.rpcwallet.md).[init](_rpc_wallet_.rpcwallet.md#init)* - -Defined in wallet-remote/lib/remote-wallet.d.ts:15 - -Discovers wallet accounts and caches results in memory -Idempotent to ensure multiple calls are benign - -**Returns:** *Promise‹void›* - -___ - -### isAccountUnlocked - -▸ **isAccountUnlocked**(`address`: string): *boolean* - -*Defined in [wallet-rpc/src/rpc-wallet.ts:54](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-rpc/src/rpc-wallet.ts#L54)* - -**Parameters:** - -Name | Type | ------- | ------ | -`address` | string | - -**Returns:** *boolean* - -___ - -### loadAccountSigners - -▸ **loadAccountSigners**(): *Promise‹Map‹string, [RpcSigner](_rpc_signer_.rpcsigner.md)››* - -*Overrides void* - -*Defined in [wallet-rpc/src/rpc-wallet.ts:25](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-rpc/src/rpc-wallet.ts#L25)* - -**Returns:** *Promise‹Map‹string, [RpcSigner](_rpc_signer_.rpcsigner.md)››* - -___ - -### removeAccount - -▸ **removeAccount**(`_address`: string): *void* - -*Inherited from [RpcWallet](_rpc_wallet_.rpcwallet.md).[removeAccount](_rpc_wallet_.rpcwallet.md#removeaccount)* - -Defined in wallet-base/lib/wallet-base.d.ts:23 - -Removes the account with the given address. Needs to be implemented by subclass, otherwise throws error - -**Parameters:** - -Name | Type | ------- | ------ | -`_address` | string | - -**Returns:** *void* - -___ - -### signPersonalMessage - -▸ **signPersonalMessage**(`address`: Address, `data`: string): *Promise‹string›* - -*Inherited from [RpcWallet](_rpc_wallet_.rpcwallet.md).[signPersonalMessage](_rpc_wallet_.rpcwallet.md#signpersonalmessage)* - -*Overrides void* - -Defined in wallet-remote/lib/remote-wallet.d.ts:43 - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`address` | Address | Address of the account to sign with | -`data` | string | Hex string message to sign | - -**Returns:** *Promise‹string›* - -Signature hex string (order: rsv) - -___ - -### signTransaction - -▸ **signTransaction**(`txParams`: CeloTx): *Promise‹EncodedTransaction›* - -*Overrides void* - -*Defined in [wallet-rpc/src/rpc-wallet.ts:64](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-rpc/src/rpc-wallet.ts#L64)* - -Gets the signer based on the 'from' field in the tx body - -**`dev`** overrides WalletBase.signTransaction - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`txParams` | CeloTx | Transaction to sign | - -**Returns:** *Promise‹EncodedTransaction›* - -___ - -### signTypedData - -▸ **signTypedData**(`address`: Address, `typedData`: EIP712TypedData): *Promise‹string›* - -*Inherited from [RpcWallet](_rpc_wallet_.rpcwallet.md).[signTypedData](_rpc_wallet_.rpcwallet.md#signtypeddata)* - -*Overrides void* - -Defined in wallet-remote/lib/remote-wallet.d.ts:49 - -**Parameters:** - -Name | Type | Description | ------- | ------ | ------ | -`address` | Address | Address of the account to sign with | -`typedData` | EIP712TypedData | the typed data object | - -**Returns:** *Promise‹string›* - -Signature hex string (order: rsv) - -___ - -### unlockAccount - -▸ **unlockAccount**(`address`: string, `passphrase`: string, `duration`: number): *Promise‹boolean›* - -*Defined in [wallet-rpc/src/rpc-wallet.ts:49](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-rpc/src/rpc-wallet.ts#L49)* - -**Parameters:** - -Name | Type | ------- | ------ | -`address` | string | -`passphrase` | string | -`duration` | number | - -**Returns:** *Promise‹boolean›* diff --git a/packages/docs/developer-resources/wallet-rpc/reference/enums/_rpc_wallet_.rpcwalleterrors.md b/packages/docs/developer-resources/wallet-rpc/reference/enums/_rpc_wallet_.rpcwalleterrors.md deleted file mode 100644 index d257fc249d6..00000000000 --- a/packages/docs/developer-resources/wallet-rpc/reference/enums/_rpc_wallet_.rpcwalleterrors.md +++ /dev/null @@ -1,24 +0,0 @@ -# Enumeration: RpcWalletErrors - -## Index - -### Enumeration members - -* [AccountAlreadyExists](_rpc_wallet_.rpcwalleterrors.md#accountalreadyexists) -* [FetchAccounts](_rpc_wallet_.rpcwalleterrors.md#fetchaccounts) - -## Enumeration members - -### AccountAlreadyExists - -• **AccountAlreadyExists**: = "RpcWallet: account already exists" - -*Defined in [wallet-rpc/src/rpc-wallet.ts:10](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-rpc/src/rpc-wallet.ts#L10)* - -___ - -### FetchAccounts - -• **FetchAccounts**: = "RpcWallet: failed to fetch accounts from server" - -*Defined in [wallet-rpc/src/rpc-wallet.ts:9](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-rpc/src/rpc-wallet.ts#L9)* diff --git a/packages/docs/developer-resources/wallet-rpc/reference/globals.md b/packages/docs/developer-resources/wallet-rpc/reference/globals.md deleted file mode 100644 index 89685260cb4..00000000000 --- a/packages/docs/developer-resources/wallet-rpc/reference/globals.md +++ /dev/null @@ -1,10 +0,0 @@ -# @celo/wallet-rpc - -## Index - -### Modules - -* ["rpc-signer"](modules/_rpc_signer_.md) -* ["rpc-wallet"](modules/_rpc_wallet_.md) -* ["test-utils/ganache.setup"](modules/_test_utils_ganache_setup_.md) -* ["test-utils/ganache.teardown"](modules/_test_utils_ganache_teardown_.md) diff --git a/packages/docs/developer-resources/wallet-rpc/reference/modules/_rpc_signer_.md b/packages/docs/developer-resources/wallet-rpc/reference/modules/_rpc_signer_.md deleted file mode 100644 index 7fc9c438293..00000000000 --- a/packages/docs/developer-resources/wallet-rpc/reference/modules/_rpc_signer_.md +++ /dev/null @@ -1,7 +0,0 @@ -# Module: "rpc-signer" - -## Index - -### Classes - -* [RpcSigner](../classes/_rpc_signer_.rpcsigner.md) diff --git a/packages/docs/developer-resources/wallet-rpc/reference/modules/_rpc_wallet_.md b/packages/docs/developer-resources/wallet-rpc/reference/modules/_rpc_wallet_.md deleted file mode 100644 index a0b92a7b512..00000000000 --- a/packages/docs/developer-resources/wallet-rpc/reference/modules/_rpc_wallet_.md +++ /dev/null @@ -1,11 +0,0 @@ -# Module: "rpc-wallet" - -## Index - -### Enumerations - -* [RpcWalletErrors](../enums/_rpc_wallet_.rpcwalleterrors.md) - -### Classes - -* [RpcWallet](../classes/_rpc_wallet_.rpcwallet.md) diff --git a/packages/docs/developer-resources/wallet-rpc/reference/modules/_test_utils_ganache_setup_.md b/packages/docs/developer-resources/wallet-rpc/reference/modules/_test_utils_ganache_setup_.md deleted file mode 100644 index 4d5dfbea527..00000000000 --- a/packages/docs/developer-resources/wallet-rpc/reference/modules/_test_utils_ganache_setup_.md +++ /dev/null @@ -1,17 +0,0 @@ -# Module: "test-utils/ganache.setup" - -## Index - -### Functions - -* [setup](_test_utils_ganache_setup_.md#setup) - -## Functions - -### setup - -▸ **setup**(): *Promise‹void›* - -*Defined in [wallet-rpc/src/test-utils/ganache.setup.ts:4](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/wallets/wallet-rpc/src/test-utils/ganache.setup.ts#L4)* - -**Returns:** *Promise‹void›* diff --git a/packages/docs/developer-resources/wallet-rpc/reference/modules/_test_utils_ganache_teardown_.md b/packages/docs/developer-resources/wallet-rpc/reference/modules/_test_utils_ganache_teardown_.md deleted file mode 100644 index 769a0cbaa88..00000000000 --- a/packages/docs/developer-resources/wallet-rpc/reference/modules/_test_utils_ganache_teardown_.md +++ /dev/null @@ -1,3 +0,0 @@ -# Module: "test-utils/ganache.teardown" - - diff --git a/packages/docs/getting-started/alfajores-testnet.md b/packages/docs/getting-started/alfajores-testnet.md deleted file mode 100644 index 531a0aa9e04..00000000000 --- a/packages/docs/getting-started/alfajores-testnet.md +++ /dev/null @@ -1,24 +0,0 @@ -# Alfajores Testnet - -The **Alfajores Testnet** is a Celo test network for developers building on the Celo platform. You can use it to try out the [Celo Wallet](https://celo.org/build/wallet) or the [Celo CLI](../command-line-interface/introduction.md) \(by sending transfers to yourself or other users of the testnet\). You can also assist in running the network by operating a [full node](running-a-full-node-in-mainnet.md) on your machine \(or on a cloud or hosting provider\). - -The [Baklava Testnet](baklava-testnet.md) is focused on building operational experience and best practices for node operators. - -Please refer to [Key Concepts](../overview.md#background-and-key-concepts) for background on blockchains and an explanation of terms used in the section. - -{% hint style="warning" %} -The Alfajores Testnet is designed for testing and experimentation by developers. Its tokens hold no real world economic value. The testnet software will be upgraded and the entirety of its data reset on a regular basis. This will erase your accounts, their balance and your transaction history. The testnet software will be upgraded on a regular basis. You may encounter bugs and limitations with the software and documentation. -{% endhint %} - -Please help the community to improve Celo by asking questions on the [Forum](https://forum.celo.org/c/alfajores-testnet)! - -{% hint style="info" %} -Your use of the Alfajores Testnet is subject to the [Alfajores Testnet Disclaimer](../important-information/alfajores-testnet-disclaimer.md). -{% endhint %} - -## Useful links - -- [Alfajores Testnet Faucet](https://celo.org/build/faucet) - get testnet tokens to experiment with -- [Celo Wallet for Alfajores](https://celo.org/build/wallet) - download the Android wallet app for the testnet from the Play Store -- [Alfajores Network Status](https://alfajores-celostats.celo-testnet.org) - to check the current availability of the testnet -- [Alfajores Testnet Block Explorer](https://alfajores-blockscout.celo-testnet.org) - explore the history of the blockchain and view transaction details diff --git a/packages/docs/getting-started/baklava-testnet.md b/packages/docs/getting-started/baklava-testnet.md deleted file mode 100644 index b06adedf73a..00000000000 --- a/packages/docs/getting-started/baklava-testnet.md +++ /dev/null @@ -1,23 +0,0 @@ -# Baklava Testnet - -The Baklava Testnet is a non-production Testnet for the Validator community. It serves several purposes: - -- **Operational excellence**: Build familiarity with the processes used on Mainnet, and to verify the security and stability of your infrastructure with the new software. -- **Detecting vulnerabilities**: Discover bugs in new software releases before they reach Mainnet. -- **Testing ground**: Experiment with new infrastructure configurations in a low-risk environment. - -{% hint style="warning" %} -The Baklava Testnet is designed for testing and experimentation by developers. Its tokens hold no real world economic value. The testnet software will be upgraded and the entirety of its data reset on a regular basis. This will erase your accounts, their balance and your transaction history. The testnet software will be upgraded on a regular basis. You may encounter bugs and limitations with the software and documentation. -{% endhint %} - -Please help the community to improve Celo by asking questions on [Discord](https://chat.celo.org) the [Forum](https://forum.celo.org/c/baklava-testnet)! - -{% hint style="info" %} -Your use of the Baklava Testnet is subject to the [Baklava Testnet Disclaimer](../important-information/baklava-testnet-disclaimer.md). -{% endhint %} - -## Useful links - -- [Baklava Faucet Request Form](https://forms.gle/JTYkMAJWTAUQp1sv9) - to request faucetted funds to become a Validator on the Baklava network. -- [Baklava Network Status](https://baklava-celostats.celo-testnet.org) - to check the current availability of the testnet -- [Baklava Network Block Explorer](https://baklava-blockscout.celo-testnet.org) - explore the history of the blockchain and view transaction details diff --git a/packages/docs/getting-started/choosing-a-network.md b/packages/docs/getting-started/choosing-a-network.md deleted file mode 100644 index d780cd66d87..00000000000 --- a/packages/docs/getting-started/choosing-a-network.md +++ /dev/null @@ -1,10 +0,0 @@ -# Choosing a network - -The best place to start exploring Celo depends on your interests and objectives: - -* **[Alfajores](alfajores-testnet.md), the Developer Testnet**: If you're a developer considering building on the Celo platform, or want to try out the [Celo Wallet](https://celo.org/build/wallet), start with [Alfajores](alfajores-testnet.md). You can [obtain a balance](https://celo.org/build/faucet) immediately and use it for experimenting with. The [SDK tutorials](../developer-resources/start.md) assume you are using Alfajores. The network is managed by cLabs, who operate all of its validators, and its software and deployed contracts will track mainnet. - -* **[Baklava](baklava-testnet.md), the Node Operator Testnet**: If you're interested in operating one or more nodes that make up Celo's infrastructure, start with [Baklava](baklava-testnet.md). Baklava's validators and full nodes are operated by the community. It is intended to provide a venue to test new builds of the Celo Blockchain software, trial on-chain governance proposals, and for node operators to build operational best practices. Support for developers and users of the Wallet is not the primary focus. - -* **[Mainnet](mainnet.md):** The production Celo network, Mainnet was previously known as the Release Candidate 1 network. Deployed by the Celo community starting 4/22/20, the network is currently working towards enabling the Celo stability mechansim. Much of the activity is being driven by the validator organisations that featured on the leaderboard of [The Great Celo Stake Off](https://forum.celo.org/t/the-great-celo-stake-off-the-details/136). - diff --git a/packages/docs/getting-started/faucet.md b/packages/docs/getting-started/faucet.md deleted file mode 100644 index c8ff246653d..00000000000 --- a/packages/docs/getting-started/faucet.md +++ /dev/null @@ -1,61 +0,0 @@ -# Getting an Account and Funds - -## Try the Celo Wallet with a Funded Account - -To start experimenting with the Alfajores Testnet, you will first need to get a funded account. - -{% hint style="warning" %} -Alfajores Testnet accounts hold no real world economic value. The testnet's data may be reset on a regular basis. This will erase your accounts, their balance and your transaction history. -{% endhint %} - -Getting an account is really being given or generating a public-private keypair. This gives you control of balances accessible with the address corresponding to that key. For CELO, this is a native balance stored at the account whose address matches your key. For Celo Dollars, an ERC-20 token, the StableCoin smart contract maintains in its storage a mapping of the balance of each address. - -### Get an Invitation Code - -If you have access to an Android device and would like to try the Celo Wallet, the fastest way to get started is to get an invitation code, pre-funded with 10 Celo Dollars. - -Visit the [Celo Wallet Page](https://celo.org/build/wallet) and enter your phone number to be messaged an invitation. Following this personalized URL will download the [Celo Wallet App](https://play.google.com/store/apps/details?id=org.celo.mobile.alfajores) from the Play Store, generate an account only you have access to, and transfer escrowed funds into it. - -### Restore from backup - -If you already have an account and the corresponding seed phrase, you can follow the instructions in the [Celo Wallet App](https://play.google.com/store/apps/details?id=org.celo.mobile.alfajores) to regain access to your account. You can also receive a seed phrase for a new, funded account by visiting the [Celo Wallet Page](https://celo.org/build/wallet). - -## Creating an empty account with the Celo Client - -You can also use the Celo Blockchain client to create and manage account keypairs. - -#### **Prerequisites** - -- **You have Docker installed.** If you don’t have it already, follow the instructions here: [Get Started with Docker](https://www.docker.com/get-started). It will involve creating or signing in with a Docker account, downloading a desktop app, and then launching the app to be able to use the Docker CLI. If you are running on a Linux server, follow the instructions for your distro [here](https://docs.docker.com/install/#server). You may be required to run Docker with sudo depending on your installation environment. - -Create and cd into the directory where you want to store the keypair. You can name this whatever you’d like, but here’s a default you can use: - -```bash -mkdir celo-data-dir $ cd celo-data-dir -``` - -Create an account by running this command: - -```bash -docker run -v `pwd`:/root/.celo --rm -it us.gcr.io/celo-org/geth:alfajores account new -``` - -It will prompt you for a passphrase, ask you to confirm it, and then will output your account address: - -`Address: ` - -This creates a keypair and stores it. Save this address to an environment variable, so that you can reference it later: - -```bash -export CELO_ACCOUNT_ADDRESS= -``` - -## **Add funds to an existing account with the Faucet** - -The Alfajores Testnet Faucet is an easy way to get more funds deposited to an account, however it was created. - -Visit [celo.org/build/faucet](https://celo.org/build/faucet), and enter your account address. If you are using the Celo Wallet, you can find your account address in the Settings page. Complete the Captcha, and click 'Add Funds'. - -Each time you complete a faucet request, your account is funded with an additional 10 Celo Dollars and 5 CELO. - -You may do this multiple times if you require more funds. diff --git a/packages/docs/getting-started/hosted-nodes.md b/packages/docs/getting-started/hosted-nodes.md deleted file mode 100644 index 13540fdf1ef..00000000000 --- a/packages/docs/getting-started/hosted-nodes.md +++ /dev/null @@ -1,42 +0,0 @@ -# Hosted nodes - -This page explains how to get a preconfigured Celo blockchain node running on one of the major cloud providers. cLabs currently provides machine images for launching full and lightest nodes on Alfajores and Mainnet, these prebuilt images are updated with every release of the Celo blockchain client and available on Amazon Web Services and Google Cloud Platform. - -Before proceeding with a hosted Celo blockchain node, you'll need to have an account with your cloud provider of choice and basic knowledge of networking. - -{% hint style="info" %} -If you would like to keep up-to-date with all the news happening in the Celo community, including validation, node operation and governance, please sign up to our [Celo Signal mailing list](https://celo.activehosted.com/f/15). - -You can add the [Celo Signal public calendar](https://calendar.google.com/calendar/u/0/embed?src=c_9su6ich1uhmetr4ob3sij6kaqs@group.calendar.google.com) as well which has relevant dates. -{% endhint %} - -Currently cLabs provides the following machine images: - -- `celo-alfajores-full-node-latest` -- `celo-alfajores-lightest-node-latest` -- `celo-mainnet-full-node-latest` -- `celo-mainnet-lightest-node-latest` - -Please note that the time taken to sync a full node could be significant. - -## Amazon Web Services - -To get started with a Celo blockchain node on AWS, ensure you're in the North Virginia region (us-east-1). You'll need to navigate to the AMIs tab of the EC2 page. From there you can change your search to only include `Public images` and enter `celo-`. - -{% hint style="info" %} -The cLabs AWS owner ID is `243983831780`, if you're new to Celo or cloud providers, ensure the `Owner` of an AMI you launch matches `243983831780`. -{% endhint %} - -For more information if you're not familiar with launching EC2 instances from machine images, please check the excellent [AWS documentation](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AMIs.html). - -## Google Cloud Platform - -GCP by default won't display public machine images when you search for them in your console. This means you'll need to go via the API or [gcloud](https://cloud.google.com/sdk/gcloud) command line to launch a node. - -Depending on the type of node you'd like to launch (see the above list), the `gcloud` command to use may look a bit like this: - -```bash -gcloud compute instances create --image --image-project celo-testnet --project -``` - -For more information please check the excellent [GCP documentation](https://cloud.google.com/compute/docs/images) on how to launch a compute instance from a public image. diff --git a/packages/docs/getting-started/mainnet.md b/packages/docs/getting-started/mainnet.md deleted file mode 100644 index 9f7b83befc7..00000000000 --- a/packages/docs/getting-started/mainnet.md +++ /dev/null @@ -1,11 +0,0 @@ -# Mainnet - -The **Mainnet** network, previously known as the Release Candidate 1 network, is Celo's production network. - -Please refer to [Key Concepts](../overview.md#background-and-key-concepts) for background on blockchains and an explanation of terms used in the section. - -## Useful links - -- [Mainnet Validator Explorer](https://validators.celo.org/) - to view the current status of Validator elections -- [Mainnet Network Status](https://stats.celo.org/) - to check the current availability of the network -- [Mainnet Network Block Explorer](http://explorer.celo.org/) - explore the history of the blockchain and view transaction details diff --git a/packages/docs/getting-started/running-a-full-node-in-alfajores.md b/packages/docs/getting-started/running-a-full-node-in-alfajores.md deleted file mode 100644 index 88990bcc58c..00000000000 --- a/packages/docs/getting-started/running-a-full-node-in-alfajores.md +++ /dev/null @@ -1,121 +0,0 @@ -# Running a Full Node - -This section explains how to get a full node running on the [Alfajores Network](alfajores-testnet.md), using a Docker image that was built for this purpose. - -If you'd prefer a simple, one click hosted setup for running a node on one of the major cloud providers (AWS and GCP), checkout our [hosted nodes](hosted-nodes.md) documentation. - -{% hint style="info" %} -If you would like to keep up-to-date with all the news happening in the Celo community, including validation, node operation and governance, please sign up to our [Celo Signal mailing list](https://celo.activehosted.com/f/15). - -You can add the [Celo Signal public calendar](https://calendar.google.com/calendar/u/0/embed?src=c_9su6ich1uhmetr4ob3sij6kaqs@group.calendar.google.com) as well which has relevant dates. -{% endhint %} - -Full nodes play a special purpose in the Celo ecosystem, acting as a bridge between the mobile wallets \(running as light clients\) and the validator nodes. To make sure that full nodes are rewarded for this service, the Celo protocol includes [full node incentives](../celo-codebase/protocol/transactions/full-node-incentives.md). - -When a light client sends transactions, they may include a gateway fee to be paid to the node that gossips transactions to the other full nodes and validators. - -For this reason, despite the fact that Celo uses a proof-of-stake protocol, users can earn cryptocurrency without first having to own any, simply by running a full node. - -{% hint style="warning" %} -Full node incentives have not been enabled yet because the mechanism for negotiating a gateway fee is still under development. Currently, light clients are configured to send a gateway fee of 0 and full nodes are set to accept a minimum gateway fee of 0. -{% endhint %} - -## Prerequisites - -- **You have Docker installed.** If you don’t have it already, follow the instructions here: [Get Started with Docker](https://www.docker.com/get-started). It will involve creating or signing in with a Docker account, downloading a desktop app, and then launching the app to be able to use the Docker CLI. If you are running on a Linux server, follow the instructions for your distro [here](https://docs.docker.com/install/#server). You may be required to run Docker with `sudo` depending on your installation environment. - -{% hint style="info" %} -Code you'll see on this page is bash commands and their output. - -When you see text in angle brackets <>, replace them and the text inside with your own value of what it refers to. Don't include the <> in the command. -{% endhint %} - -## Celo Networks - -First we are going to setup the environment variables required for `Alfajores` network. Run: - -```bash -export CELO_IMAGE=us.gcr.io/celo-org/geth:alfajores -``` - -## Pull the Celo Docker image - -We're going to use a Docker image containing the Celo node software in this tutorial. - -If you are re-running these instructions, the Celo Docker image may have been updated, and it's important to get the latest version. - -```bash -docker pull $CELO_IMAGE -``` - -## Set up a data directory - -First, create the directory that will store your node's configuration and its copy of the blockchain. This directory can be named anything you'd like, but here's a default you can use. The commands below create a directory and then navigate into it. The rest of the steps assume you are running the commands from inside this directory. - -```bash -mkdir celo-data-dir -cd celo-data-dir -``` - -## Create an account and get its address - -In this step, you'll create an account on the network. If you've already done this and have an account address, you can skip this and move on to configuring your node. - -Run the command to create a new account: - -```bash -docker run -v $PWD:/root/.celo --rm -it $CELO_IMAGE account new -``` - -It will prompt you for a passphrase, ask you to confirm it, and then will output your account address: `Public address of the key: ` - -Save this address to an environment variables, so that you can reference it below (don't include the braces): - -```bash -export CELO_ACCOUNT_ADDRESS= -``` - -{% hint style="info" %} -This environment variable will only persist while you have this terminal window open. If you want this environment variable to be available in the future, you can add it to your `~/.bash_profile` -{% endhint %} - -## Start the node - -This command specifies the settings needed to run the node, and gets it started. - -```bash -docker run --name celo-fullnode -d --restart unless-stopped --stop-timeout 300 -p 127.0.0.1:8545:8545 -p 127.0.0.1:8546:8546 -p 30303:30303 -p 30303:30303/udp -v $PWD:/root/.celo $CELO_IMAGE --verbosity 3 --syncmode full --rpc --rpcaddr 0.0.0.0 --rpcapi eth,net,web3,debug,admin,personal --light.serve 90 --light.maxpeers 1000 --maxpeers 1100 --etherbase $CELO_ACCOUNT_ADDRESS --nousb --alfajores --datadir /root/.celo -``` - -You'll start seeing some output. After a few minutes, you should see lines that look like this. This means your node has started syncing with the network and is receiving blocks. - -```text -INFO [07-16|14:04:24.924] Imported new chain segment blocks=139 txs=319 mgas=61.987 elapsed=8.085s mgasps=7.666 number=406 hash=9acf16…4fddc8 age=6h58m44s cache=1.51mB -INFO [07-16|14:04:32.928] Imported new chain segment blocks=303 txs=179 mgas=21.837 elapsed=8.004s mgasps=2.728 number=709 hash=8de06a…77bb92 age=6h33m37s cache=1.77mB -INFO [07-16|14:04:40.918] Imported new chain segment blocks=411 txs=0 mgas=0.000 elapsed=8.023s mgasps=0.000 number=1120 hash=3db22a…9fa95a age=5h59m30s cache=1.92mB -INFO [07-16|14:04:48.941] Imported new chain segment blocks=335 txs=0 mgas=0.000 elapsed=8.023s mgasps=0.000 number=1455 hash=7eb3f8…32ebf0 age=5h31m43s cache=2.09mB -INFO [07-16|14:04:56.944] Imported new chain segment blocks=472 txs=0 mgas=0.000 elapsed=8.003s mgasps=0.000 number=1927 hash=4f1010…1414c1 age=4h52m31s cache=2.34mB -``` - -You will have fully synced with the network once you have pulled the latest block number, which you can lookup by visiting at the [Alfajores Network Stats](https://alfajores-celostats.celo-testnet.org/) or [Alfajores Block Explorer]](https://alfajores-blockscout.celo-testnet.org/) pages. - -{% hint style="danger" %} -**Security**: The command line above includes the parameter `--rpcaddr 0.0.0.0` which makes the Celo Blockchain software listen for incoming RPC requests on all network adaptors. Exercise extreme caution in doing this when running outside Docker, as it means that any unlocked accounts and their funds may be accessed from other machines on the Internet. In the context of running a Docker container on your local machine, this together with the `docker -p` flags allows you to make RPC calls from outside the container, i.e from your local host, but not from outside your machine. Read more about [Docker Networking](https://docs.docker.com/network/network-tutorial-standalone/#use-user-defined-bridge-networks) here. -{% endhint %} - -## Command Line Interface - -Once the full node is running, it can serve the [Command Line Interface](../command-line-interface/introduction.md) tool `celocli`. For example: - -```bash -$ npm install -g @celo/celocli -... -$ celocli node:synced -true -$ celocli account:new -... -``` - -## Light Client Serving - -Light clients may connect to you as people run the [Celo Mobile Wallet](using-the-mobile-wallet.md) and you will start earning gateway fees for any transactions that these users initiate, which you can read more about in the [Full Node Incentives](../celo-codebase/protocol/transactions/full-node-incentives.md) document. The account that this node advertises for light clients to use for these fees is given by the `etherbase` parameter. The `light.serve` parameter defines the percentage of time this node should spend serving light clients. Valid values are 0-100. If this node is having trouble catching up to the current block, dropping this to a lower percentage may help. The `light.maxpeers` and `maxpeers` parameters set limits on the number of light clients and full node peers that the node will accept. diff --git a/packages/docs/getting-started/running-a-full-node-in-baklava.md b/packages/docs/getting-started/running-a-full-node-in-baklava.md deleted file mode 100644 index a00ba493124..00000000000 --- a/packages/docs/getting-started/running-a-full-node-in-baklava.md +++ /dev/null @@ -1,129 +0,0 @@ -# Running a Full Node - -This section explains how to get a full node running on the [Baklava Network](baklava-testnet.md), using a Docker image that was built for this purpose. - -{% hint style="info" %} -If you would like to keep up-to-date with all the news happening in the Celo community, including validation, node operation and governance, please sign up to our [Celo Signal mailing list here](https://celo.activehosted.com/f/15). - -You can add the [Celo Signal public calendar](https://calendar.google.com/calendar/u/0/embed?src=c_9su6ich1uhmetr4ob3sij6kaqs@group.calendar.google.com) as well which has relevant dates. -{% endhint %} - - -Full nodes play a special purpose in the Celo ecosystem, acting as a bridge between the mobile wallets \(running as light clients\) and the validator nodes. To make sure that full nodes are rewarded for this service, the Celo protocol includes [full node incentives](../celo-codebase/protocol/transactions/full-node-incentives.md). - -When a light client sends transactions, they may include a gateway fee to be paid to the node that gossips transactions to the other full nodes and validators. - -For this reason, despite the fact that Celo uses a proof-of-stake protocol, users can earn cryptocurrency without first having to own any, simply by running a full node. - -{% hint style="warning" %} -Full node incentives have not been enabled yet because the mechanism for negotiating a gateway fee is still under development. Currently, light clients are configured to send a gateway fee of 0 and full nodes are set to accept a minimum gateway fee of 0. -{% endhint %} - -{% hint style="info" %} -If you are transitioning from the Baklava network prior to the June 24 reset, you will need to start with a fresh chain database. You can either shut down your existing node, delete the `celo` folder, and continue by following the guide below or create a new node following these directions. - -Key differences are: -* New network ID is `62320` -* A new image has been pushed to `us.gcr.io/celo-org/geth:baklava` -* A new genesis block and bootnode enode are included in the Docker image -* `ReleaseGold` contracts are available for all previously faucetted addresses [here](https://gist.github.com/nategraf/245232883a34cbb162eb599e34afd7c0) -{% endhint %} - -## Prerequisites - -- **You have Docker installed.** If you don’t have it already, follow the instructions here: [Get Started with Docker](https://www.docker.com/get-started). It will involve creating or signing in with a Docker account, downloading a desktop app, and then launching the app to be able to use the Docker CLI. If you are running on a Linux server, follow the instructions for your distro [here](https://docs.docker.com/install/#server). You may be required to run Docker with `sudo` depending on your installation environment. - -{% hint style="info" %} -Code you'll see on this page is bash commands and their output. - -When you see text in angle brackets <>, replace them and the text inside with your own value of what it refers to. Don't include the <> in the command. -{% endhint %} - -## Celo Networks - -First we are going to setup the environment variables required for `Baklava` network. Run: - -```bash -export CELO_IMAGE=us.gcr.io/celo-org/geth:baklava -``` - -## Pull the Celo Docker image - -We're going to use a Docker image containing the Celo node software in this tutorial. - -If you are re-running these instructions, the Celo Docker image may have been updated, and it's important to get the latest version. - -```bash -docker pull $CELO_IMAGE -``` - -## Set up a data directory - -First, create the directory that will store your node's configuration and its copy of the blockchain. This directory can be named anything you'd like, but here's a default you can use. The commands below create a directory and then navigate into it. The rest of the steps assume you are running the commands from inside this directory. - -```bash -mkdir celo-data-dir -cd celo-data-dir -``` - -## Create an account and get its address - -In this step, you'll create an account on the network. If you've already done this and have an account address, you can skip this and move on to configuring your node. - -Run the command to create a new account: - -```bash -docker run -v $PWD:/root/.celo --rm -it $CELO_IMAGE account new -``` - -It will prompt you for a passphrase, ask you to confirm it, and then will output your account address: `Public address of the key: ` - -Save this address to an environment variables, so that you can reference it below (don't include the braces): - -```bash -export CELO_ACCOUNT_ADDRESS= -``` - -{% hint style="info" %} -This environment variable will only persist while you have this terminal window open. If you want this environment variable to be available in the future, you can add it to your `~/.bash_profile` -{% endhint %} - -## Start the node - -This command specifies the settings needed to run the node, and gets it started. - -```bash -docker run --name celo-fullnode -d --restart unless-stopped --stop-timeout 300 -p 127.0.0.1:8545:8545 -p 127.0.0.1:8546:8546 -p 30303:30303 -p 30303:30303/udp -v $PWD:/root/.celo $CELO_IMAGE --verbosity 3 --syncmode full --rpc --rpcaddr 0.0.0.0 --rpcapi eth,net,web3,debug,admin,personal --light.serve 90 --light.maxpeers 1000 --maxpeers 1100 --etherbase $CELO_ACCOUNT_ADDRESS --nousb --baklava --datadir /root/.celo -``` - -You'll start seeing some output. After a few minutes, you should see lines that look like this. This means your node has started syncing with the network and is receiving blocks. - -```text -INFO [07-16|14:04:24.924] Imported new chain segment blocks=139 txs=319 mgas=61.987 elapsed=8.085s mgasps=7.666 number=406 hash=9acf16…4fddc8 age=6h58m44s cache=1.51mB -INFO [07-16|14:04:32.928] Imported new chain segment blocks=303 txs=179 mgas=21.837 elapsed=8.004s mgasps=2.728 number=709 hash=8de06a…77bb92 age=6h33m37s cache=1.77mB -INFO [07-16|14:04:40.918] Imported new chain segment blocks=411 txs=0 mgas=0.000 elapsed=8.023s mgasps=0.000 number=1120 hash=3db22a…9fa95a age=5h59m30s cache=1.92mB -INFO [07-16|14:04:48.941] Imported new chain segment blocks=335 txs=0 mgas=0.000 elapsed=8.023s mgasps=0.000 number=1455 hash=7eb3f8…32ebf0 age=5h31m43s cache=2.09mB -INFO [07-16|14:04:56.944] Imported new chain segment blocks=472 txs=0 mgas=0.000 elapsed=8.003s mgasps=0.000 number=1927 hash=4f1010…1414c1 age=4h52m31s cache=2.34mB -``` - -You will have fully synced with the network once you have pulled the latest block number, which you can lookup by visiting at the [Baklava Network Stats](https://baklava-celostats.celo-testnet.org/) or [Baklava Block Explorer]](https://baklava-blockscout.celo-testnet.org/) pages. - -{% hint style="danger" %} -**Security**: The command line above includes the parameter `--rpcaddr 0.0.0.0` which makes the Celo Blockchain software listen for incoming RPC requests on all network adaptors. Exercise extreme caution in doing this when running outside Docker, as it means that any unlocked accounts and their funds may be accessed from other machines on the Internet. In the context of running a Docker container on your local machine, this together with the `docker -p` flags allows you to make RPC calls from outside the container, i.e from your local host, but not from outside your machine. Read more about [Docker Networking](https://docs.docker.com/network/network-tutorial-standalone/#use-user-defined-bridge-networks) here. -{% endhint %} - -## Command Line Interface - -Once the full node is running, it can serve the [Command Line Interface](../command-line-interface/introduction.md) tool `celocli`. For example: -```bash -$ npm install -g @celo/celocli -... -$ celocli node:synced -true -$ celocli account:new -... -``` - -## Light Client Serving - -Light clients may connect to you as people run the [Celo Mobile Wallet](using-the-mobile-wallet.md) and you will start earning gateway fees for any transactions that these users initiate, which you can read more about in the [Full Node Incentives](../celo-codebase/protocol/transactions/full-node-incentives.md) document. The account that this node advertises for light clients to use for these fees is given by the `etherbase` parameter. The `light.serve` parameter defines the percentage of time this node should spend serving light clients. Valid values are 0-100. If this node is having trouble catching up to the current block, dropping this to a lower percentage may help. The `light.maxpeers` and `maxpeers` parameters set limits on the number of light clients and full node peers that the node will accept. diff --git a/packages/docs/getting-started/running-a-full-node-in-mainnet.md b/packages/docs/getting-started/running-a-full-node-in-mainnet.md deleted file mode 100644 index 10109eded25..00000000000 --- a/packages/docs/getting-started/running-a-full-node-in-mainnet.md +++ /dev/null @@ -1,121 +0,0 @@ -# Running a Full Node - -This section explains how to get a full node running on the [Mainnet Network](mainnet.md), using a Docker image that was built for this purpose. - -If you'd prefer a simple, one click hosted setup for running a node on one of the major cloud providers (AWS and GCP), checkout our [hosted nodes](hosted-nodes.md) documentation. - -{% hint style="info" %} -If you would like to keep up-to-date with all the news happening in the Celo community, including validation, node operation and governance, please sign up to our [Celo Signal mailing list here](https://celo.activehosted.com/f/15). - -You can add the [Celo Signal public calendar](https://calendar.google.com/calendar/u/0/embed?src=c_9su6ich1uhmetr4ob3sij6kaqs@group.calendar.google.com) as well which has relevant dates. -{% endhint %} - -Full nodes play a special purpose in the Celo ecosystem, acting as a bridge between the mobile wallets \(running as light clients\) and the validator nodes. To make sure that full nodes are rewarded for this service, the Celo protocol includes [full node incentives](../celo-codebase/protocol/transactions/full-node-incentives.md). - -When a light client sends transactions, they may include a gateway fee to be paid to the node that gossips transactions to the other full nodes and validators. - -For this reason, despite the fact that Celo uses a proof-of-stake protocol, users can earn cryptocurrency without first having to own any, simply by running a full node. - -{% hint style="warning" %} -Full node incentives have not been enabled yet because the mechanism for negotiating a gateway fee is still under development. Currently, light clients are configured to send a gateway fee of 0 and full nodes are set to accept a minimum gateway fee of 0. -{% endhint %} - -## Prerequisites - -- **You have Docker installed.** If you don’t have it already, follow the instructions here: [Get Started with Docker](https://www.docker.com/get-started). It will involve creating or signing in with a Docker account, downloading a desktop app, and then launching the app to be able to use the Docker CLI. If you are running on a Linux server, follow the instructions for your distro [here](https://docs.docker.com/install/#server). You may be required to run Docker with `sudo` depending on your installation environment. - -{% hint style="info" %} -Code you'll see on this page is bash commands and their output. - -When you see text in angle brackets <>, replace them and the text inside with your own value of what it refers to. Don't include the <> in the command. -{% endhint %} - -## Celo Networks - -First we are going to setup the environment variables required for the `mainnet` network. Run: - -```bash -export CELO_IMAGE=us.gcr.io/celo-org/geth:mainnet -``` - -## Pull the Celo Docker image - -We're going to use a Docker image containing the Celo node software in this tutorial. - -If you are re-running these instructions, the Celo Docker image may have been updated, and it's important to get the latest version. - -```bash -docker pull $CELO_IMAGE -``` - -## Set up a data directory - -First, create the directory that will store your node's configuration and its copy of the blockchain. This directory can be named anything you'd like, but here's a default you can use. The commands below create a directory and then navigate into it. The rest of the steps assume you are running the commands from inside this directory. - -```bash -mkdir celo-data-dir -cd celo-data-dir -``` - -## Create an account and get its address - -In this step, you'll create an account on the network. If you've already done this and have an account address, you can skip this and move on to configuring your node. - -Run the command to create a new account: - -```bash -docker run -v $PWD:/root/.celo --rm -it $CELO_IMAGE account new -``` - -It will prompt you for a passphrase, ask you to confirm it, and then will output your account address: `Public address of the key: ` - -Save this address to an environment variables, so that you can reference it below (don't include the braces): - -```bash -export CELO_ACCOUNT_ADDRESS= -``` - -{% hint style="info" %} -This environment variable will only persist while you have this terminal window open. If you want this environment variable to be available in the future, you can add it to your `~/.bash_profile` -{% endhint %} - -## Start the node - -This command specifies the settings needed to run the node, and gets it started. - -```bash -docker run --name celo-fullnode -d --restart unless-stopped --stop-timeout 300 -p 127.0.0.1:8545:8545 -p 127.0.0.1:8546:8546 -p 30303:30303 -p 30303:30303/udp -v $PWD:/root/.celo $CELO_IMAGE --verbosity 3 --syncmode full --rpc --rpcaddr 0.0.0.0 --rpcapi eth,net,web3,debug,admin,personal --light.serve 90 --light.maxpeers 1000 --maxpeers 1100 --etherbase $CELO_ACCOUNT_ADDRESS --datadir /root/.celo --nousb -``` - -You'll start seeing some output. After a few minutes, you should see lines that look like this. This means your node has started syncing with the network and is receiving blocks. - -```text -INFO [07-16|14:04:24.924] Imported new chain segment blocks=139 txs=319 mgas=61.987 elapsed=8.085s mgasps=7.666 number=406 hash=9acf16…4fddc8 age=6h58m44s cache=1.51mB -INFO [07-16|14:04:32.928] Imported new chain segment blocks=303 txs=179 mgas=21.837 elapsed=8.004s mgasps=2.728 number=709 hash=8de06a…77bb92 age=6h33m37s cache=1.77mB -INFO [07-16|14:04:40.918] Imported new chain segment blocks=411 txs=0 mgas=0.000 elapsed=8.023s mgasps=0.000 number=1120 hash=3db22a…9fa95a age=5h59m30s cache=1.92mB -INFO [07-16|14:04:48.941] Imported new chain segment blocks=335 txs=0 mgas=0.000 elapsed=8.023s mgasps=0.000 number=1455 hash=7eb3f8…32ebf0 age=5h31m43s cache=2.09mB -INFO [07-16|14:04:56.944] Imported new chain segment blocks=472 txs=0 mgas=0.000 elapsed=8.003s mgasps=0.000 number=1927 hash=4f1010…1414c1 age=4h52m31s cache=2.34mB -``` - -You will have fully synced with the network once you have pulled the latest block number, which you can lookup by visiting the [Network Stats](https://stats.celo.org) or [Block Explorer](https://explorer.celo.org/) pages. - -{% hint style="danger" %} -**Security**: The command line above includes the parameter `--rpcaddr 0.0.0.0` which makes the Celo Blockchain software listen for incoming RPC requests on all network adaptors. Exercise extreme caution in doing this when running outside Docker, as it means that any unlocked accounts and their funds may be accessed from other machines on the Internet. In the context of running a Docker container on your local machine, this together with the `docker -p` flags allows you to make RPC calls from outside the container, i.e from your local host, but not from outside your machine. Read more about [Docker Networking](https://docs.docker.com/network/network-tutorial-standalone/#use-user-defined-bridge-networks) here. -{% endhint %} - -## Command Line Interface - -Once the full node is running, it can serve the [Command Line Interface](../command-line-interface/introduction.md) tool `celocli`. For example: - -```bash -$ npm install -g @celo/celocli -... -$ celocli node:synced -true -$ celocli account:new -... -``` - -## Light Client Serving - -Light clients may connect to you as people run the [Celo Mobile Wallet](using-the-mobile-wallet.md) and you will start earning gateway fees for any transactions that these users initiate, which you can read more about in the [Full Node Incentives](../celo-codebase/protocol/transactions/full-node-incentives.md) document. The account that this node advertises for light clients to use for these fees is given by the `etherbase` parameter. The `light.serve` parameter defines the percentage of time this node should spend serving light clients. Valid values are 0-100. If this node is having trouble catching up to the current block, dropping this to a lower percentage may help. The `light.maxpeers` and `maxpeers` parameters set limits on the number of light clients and full node peers that the node will accept. diff --git a/packages/docs/getting-started/running-a-validator-in-baklava.md b/packages/docs/getting-started/running-a-validator-in-baklava.md deleted file mode 100644 index a5e134321bf..00000000000 --- a/packages/docs/getting-started/running-a-validator-in-baklava.md +++ /dev/null @@ -1,965 +0,0 @@ -# Running a Validator in Baklava - -The Baklava Testnet is a non-production Testnet for the Validator community. It serves several purposes: - -- **Operational excellence**: Build familiarity with the processes used on Mainnet, and to verify the security and stability of your infrastructure with the new software. -- **Detecting vulnerabilities**: Discover bugs in new software releases before they reach Mainnet. -- **Testing ground**: Experiment with new infrastructure configurations in a low-risk environment. - -{% hint style="info" %} -If you would like to keep up-to-date with all the news happening in the Celo community, including validation, node operation and governance, please sign up to our [Celo Signal mailing list here](https://celo.activehosted.com/f/15). - -You can add the [Celo Signal public calendar](https://calendar.google.com/calendar/u/0/embed?src=c_9su6ich1uhmetr4ob3sij6kaqs@group.calendar.google.com) as well which has relevant dates. -{% endhint %} - -The Baklava testnet is the best place to get started running a validator, or test out new validator configurations before deploying to [Mainnet](mainnet.md). - -{% hint style="info" %} -If you are transitioning from the Baklava network prior to the June 24 reset, you will need to start with a fresh chain database. You can create new nodes from fresh machines, as described in this guide, or you may delete your chaindata folder, which is named `celo` in the node data directory, and start over by running the provided `init` commands for each node described below. All on-chain registration steps, the commands completed with `celocli`, will need to be run on the new network. - -Key differences are: -* New network ID is `62320` -* A new image has been pushed to `us.gcr.io/celo-org/geth:baklava` -* A new genesis block, bootnode enode, and the new network ID are included in the Docker image -* `ReleaseGold` contracts are available for all previously faucetted addresses [here](https://gist.github.com/nategraf/245232883a34cbb162eb599e34afd7c0) -{% endhint %} - -This page also has separate steps for both ReleaseGold and non-ReleaseGold steps for validating. - -{% hint style="info" %} -If you are new to validating on Celo, please follow the Non-ReleaseGold instructions for validating. -{% endhint %} - -## Prerequisites - -### Staking Requirements - -Celo uses a [proof-of-stake](../celo-codebase/protocol/proof-of-stake) consensus mechanism, which requires Validators to have locked CELO to participate in block production. The current requirement is 10,000 CELO to register a Validator, and 10,000 CELO _per member validator_ to register a Validator Group. - -Participating in the Baklava testnet requires testnet units of CELO, which can only be used in the Baklava testnet. You can request a distribution of testnet CELO by filling out [the faucet request form](https://forms.gle/JTYkMAJWTAUQp1sv9). If you need any help getting started, please join the discussion on [Discord](https://chat.celo.org) or email community@celo.org. - -Faucetted funds come two different ways, depending on whether you're using a ReleaseGold smart contract or you are validating the non-ReleaseGold way. For every new validator, we encourage going the non-ReleaseGold route. - -#### ReleaseGold - -Faucetted funds will come as two `ReleaseGold` contracts. At a high level, `ReleaseGold` holds a balance for scheduled release, while allowing the held balance to be used for certain actions such as validating and voting, depending on the configuration of the contract. [Read more about `ReleaseGold`](../celo-holder-guide/release-gold.md). - -#### Non-ReleaseGold -{% hint style="info" %} -If you are new to validating on Celo, please follow the Non-ReleaseGold instructions for validating. -{% endhint %} - -Faucetted funds will come as 2 transactions, one for your validator address and another for your validator group address. - -### Hardware requirements - -The recommended Celo Validator setup involves continually running three instances: - -- 1 **Validator node**: should be deployed to single-tenant hardware in a secure, high availability data center -- 1 **Validator Proxy node**: can be a VM or container in a multi-tenant environment (e.g. a public cloud), but requires high availability -- 1 **Attestation node**: can be a VM or container in a multi-tenant environment (e.g. a public cloud), and has moderate availability requirements - -Celo is a proof-of-stake network, which has different hardware requirements than a Proof of Work network. proof-of-stake consensus is less CPU intensive, but is more sensitive to network connectivity and latency. Below is a list of standard requirements for running Validator and Proxy nodes on the Celo Network: - -- Memory: 8 GB RAM -- CPU: Quad core 3GHz (64-bit) -- Disk: 256 GB of SSD storage, plus a secondary HDD desirable -- Network: At least 1 GB input/output Ethernet with a fiber Internet connection, ideally redundant connections and HA switches - -Attestation Service nodes consume less resources and can run on machines with less memory and compute. - -In addition, to get things started, it will be useful to run a node on your local machine that you can issue CLI commands against. - -### Networking requirements - -In order for your Validator to participate in consensus and complete attestations, it is **critically** important to configure your network correctly. - -Your Proxy and Attestations nodes must have static, external IP addresses, and your Validator node must be able to communicate with the Proxy, either via an internal network or via the Proxy's external IP address. - -On the Validator machine, port 30503 should accept TCP connections from the IP address of your Proxy machine. This port is used by the Validator to communicate with the Proxy. - -On the Proxy machine, port 30503 should accept TCP connections from the IP address of your Validator machine. This port is used by the Proxy to communicate with the Validator. - -On the Proxy and Attestations machines, port 30303 should accept TCP and UDP connections from all IP addresses. This port is used to communicate with other nodes in the network. - -On the Attestations machine, port 80 should accept TCP connections from all IP addresses. This port is used by users to request attestations from you. - -To illustrate this, you may refer to the following table: - -| Machine \\ IPs open to | 0\.0\.0\.0/0 \(all\) | your\-validator\-ip | your\-proxy\-ip | -|------------------------|----------------------|-----------------------|-------------------| -| Validator | | | tcp:30503 | -| Proxy | tcp:30303, udp:30303 | tcp:30503 | | -| Attestation | tcp:80 | | | - -### Software requirements - -#### On each machine - -- **You have Docker installed.** - - If you don’t have it already, follow the instructions here: [Get Started with Docker](https://www.docker.com/get-started). It will involve creating or signing in with a Docker account, downloading a desktop app, and then launching the app to be able to use the Docker CLI. If you are running on a Linux server, follow the instructions for your distro [here](https://docs.docker.com/install/#server). You may be required to run Docker with `sudo` depending on your installation environment. - You can check you have Docker installed and running if the command `docker info` works properly. - -#### On your local machine - -- **You have celocli installed.** - - See [Command Line Interface \(CLI\) ](../command-line-interface/introduction.md)for instructions on how to get set up. - -- **You are using the latest Node.js v12.x** - - Some users have reported issues using the most recent version of node. Use the LTS for greater reliability. - -{% hint style="info" %} -A note about conventions: -The code snippets you'll see on this page are bash commands and their output. - -When you see text in angle brackets <>, replace them and the text inside with your own value of what it refers to. Don't include the <> in the command. -{% endhint %} - -### Key Management - -Private keys are the central primitive of any cryptographic system and need to be handled with extreme care. Loss of your private key can lead to irreversible loss of value. - -This guide contains a large number of keys, so it is important to understand the purpose of each key. [Read more about key management.](../validator-guide/key-management/summary.md) - -#### Unlocking - -Celo nodes store private keys encrypted on disk with a password, and need to be "unlocked" before use. Private keys can be unlocked in two ways: - -1. By running the `celocli account:unlock` command. Note that the node must have the "personal" RPC API enabled in order for this command to work. -2. By setting the `--unlock` flag when starting the node. - -It is important to note that when a key is unlocked you need to be particularly careful about enabling access to the node's RPC APIs. - -### Environment variables - -There are a number of environment variables in this guide, and you may use this table as a reference. - -| Variable | Explanation | -| ------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | -| CELO_IMAGE | The Docker image used for the Validator and proxy containers | -| CELO_VALIDATOR_GROUP_ADDRESS | The account address for the Validator Group; the `ReleaseGold` beneficiary address for the Validator Group | -| CELO_VALIDATOR_ADDRESS | The account address for the Validator; the `ReleaseGold` beneficiary address for the Validator | -| CELO_VALIDATOR_GROUP_RG_ADDRESS | The `ReleaseGold` contract address for the Validator Group (Not Applicable for New Validators) | -| CELO_VALIDATOR_RG_ADDRESS | The `ReleaseGold` contract address for the Validator (Not Applicable for New Validators) | -| CELO_VALIDATOR_GROUP_SIGNER_ADDRESS | The validator (group) signer address authorized by the Validator Group account. -| CELO_VALIDATOR_GROUP_SIGNER_SIGNATURE | The proof-of-possession of the Validator Group signer key | -| CELO_VALIDATOR_SIGNER_ADDRESS | The validator signer address authorized by the Validator Account -| CELO_VALIDATOR_SIGNER_PUBLIC_KEY | The ECDSA public key associated with the Validator signer address | -| CELO_VALIDATOR_SIGNER_SIGNATURE | The proof-of-possession of the Validator signer key | -| CELO_VALIDATOR_SIGNER_BLS_PUBLIC_KEY | The BLS public key for the Validator instance | -| CELO_VALIDATOR_SIGNER_BLS_SIGNATURE | A proof-of-possession of the BLS public key | -| CELO_VALIDATOR_GROUP_VOTE_SIGNER_ADDRESS | The address of the Validator Group vote signer | -| CELO_VALIDATOR_GROUP_VOTE_SIGNER_PUBLIC_KEY | The ECDSA public key associated with the Validator Group vote signer address | -| CELO_VALIDATOR_GROUP_VOTE_SIGNER_SIGNATURE | The proof-of-possession of the Validator Group vote signer key | -| CELO_VALIDATOR_VOTE_SIGNER_ADDRESS | The address of the Validator vote signer | -| CELO_VALIDATOR_VOTE_SIGNER_PUBLIC_KEY | The ECDSA public key associated with the Validator vote signer address | -| CELO_VALIDATOR_VOTE_SIGNER_SIGNATURE | The proof-of-possession of the Validator vote signer key | -| PROXY_ENODE | The enode address for the Validator proxy | -| PROXY_INTERNAL_IP | (Optional) The internal IP address over which your Validator can communicate with your proxy | -| PROXY_EXTERNAL_IP | The external IP address of the proxy. May be used by the Validator to communicate with the proxy if PROXY_INTERNAL_IP is unspecified | -| CELO_ATTESTATION_SIGNER_ADDRESS | The address of the attestation signer authorized by the Validator Account | -| CELO_ATTESTATION_SIGNER_SIGNATURE | The proof-of-possession of the attestation signer key | -| CELO_ATTESTATION_SERVICE_URL | The URL to access the deployed Attestation Service | -| METADATA_URL | The URL to access the metadata file for your Attestation Service | -| DATABASE_URL | The URL under which your database is accessible, currently supported are `postgres://`, `mysql://` and `sqlite://` | -| APP_SIGNATURE | The hash with which clients can auto-read SMS messages on android | -| SMS_PROVIDERS | A comma-separated list of providers you want to configure, Celo currently supports `nexmo` & `twilio` | - -## Validator Node Setup - -This section outlines the steps needed to configure your Proxy and Validator nodes so that they are ready to sign blocks once elected. - -### Environment Variables - -First we are going to set up the main environment variables related to the Baklava network. Run these on both your **Validator** and **Proxy** machines: - -```bash -export CELO_IMAGE=us.gcr.io/celo-org/geth:baklava -``` - -### Pull the Celo Docker image - -In all the commands we are going to see the `CELO_IMAGE` variable to refer to the Docker image to use. Now we can get the Docker image on your Validator and Proxy machines: - -```bash -docker pull $CELO_IMAGE -``` - -The `us.gcr.io/celo-org/geth:baklava` image contains the [genesis block](https://github.com/celo-org/celo-monorepo/tree/master/packages/celotool/genesis_baklava.json) in addition to the Celo Blockchain binary. - -#### Account Creation (For non-ReleaseGold) -{% hint style="info" %} -Please complete this section if you are new to validating on Celo. -{% endhint %} - -If you're a new validator, then you are going to follow the non-ReleaseGold flow method for this step to create your account keys. - -##### Account and Signer keys - -Running a Celo Validator node requires the management of several different keys, each with different privileges. Keys that need to be accessed frequently (e.g. for signing blocks) are at greater risk of being compromised, and thus have more limited permissions, while keys that need to be accessed infrequently (e.g. for locking CELO) are less onerous to store securely, and thus have more expansive permissions. Below is a summary of the various keys that are used in the Celo network, and a description of their permissions. - -| Name of the key | Purpose | -| ---------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| Account key | This is the key with the highest level of permissions, and is thus the most sensitive. It can be used to lock and unlock CELO, and authorize vote, validator, and attestation keys. Note that the account key also has all of the permissions of the other keys. | -| Validator signer key | This is the key that has permission to register and manage a Validator or Validator Group, and participate in BFT consensus. | -| Vote signer key | This key can be used to vote in Validator elections and on-chain governance. | -| Attestation signer key | This key is used to sign attestations in Celo's lightweight identity protocol. | - -Note that Account and all the signer keys must be unique and may not be reused. - -##### Generating Validator and Validator Group Keys - -First, you'll need to generate account keys for your Validator and Validator Group. - -{% hint style="danger" %} -These keys will control your locked CELO, and thus should be handled with care. -Store and back these keys up in a secure manner, as there will be no way to recover them if lost or stolen. -{% endhint %} - -```bash -# On your local machine -mkdir celo-accounts-node -cd celo-accounts-node -docker run -v $PWD:/root/.celo --rm -it $CELO_IMAGE account new -docker run -v $PWD:/root/.celo --rm -it $CELO_IMAGE account new -``` - -This will create a new keystore in the current directory with two new accounts. -Copy the addresses from the terminal and set the following environment variables: -```bash -# On your local machine -export CELO_VALIDATOR_GROUP_ADDRESS= -export CELO_VALIDATOR_ADDRESS= -``` - -### Start your Accounts node - -Next, we'll run a node on your local machine so that we can use these accounts to lock CELO and authorize the keys needed to run your validator. - -To run the node: - -```bash -# On your local machine -mkdir celo-accounts-node -cd celo-accounts-node -docker run --name celo-accounts -it --restart always --stop-timeout 300 -p 127.0.0.1:8545:8545 -v $PWD:/root/.celo $CELO_IMAGE --verbosity 3 --syncmode full --rpc --rpcaddr 0.0.0.0 --rpcapi eth,net,web3,debug,admin,personal --baklava --light.serve 0 --datadir /root/.celo -``` - -{% hint style="danger" %} -**Security**: The command line above includes the parameter `--rpcaddr 0.0.0.0` which makes the Celo Blockchain software listen for incoming RPC requests on all network adaptors. Exercise extreme caution in doing this when running outside Docker, as it means that any unlocked accounts and their funds may be accessed from other machines on the Internet. In the context of running a Docker container on your local machine, this together with the `docker -p 127.0.0.1:localport:containerport` flags allows you to make RPC calls from outside the container, i.e from your local host, but not from outside your machine. Read more about [Docker Networking](https://docs.docker.com/network/network-tutorial-standalone/#use-user-defined-bridge-networks) here. -{% endhint %} - -### Deploy a Validator -To actually register as a validator, we'll need to generate a validating signer key. On your Validator machine (which should not be accessible from the public internet), follow very similar steps: - -```bash -# On the validator machine -# Note that you have to export $CELO_IMAGE on this machine -export CELO_IMAGE=us.gcr.io/celo-org/geth:baklava -mkdir celo-validator-node -cd celo-validator-node -docker run -v $PWD:/root/.celo --rm -it $CELO_IMAGE account new -export CELO_VALIDATOR_SIGNER_ADDRESS= -``` - -#### Proof-of-Possession (Non-ReleaseGold Step) -{% hint style="info" %} -Please complete this step if you are running a validator on Celo for the first time. -{% endhint %} - -In order to authorize our Validator signer, we need to create a proof that we have possession of the Validator signer private key. We do so by signing a message that consists of the Validator account address. To generate the proof-of-possession, run the following command: -```bash -# On the validator machine -# Note that you have to export CELO_VALIDATOR_ADDRESS on this machine -export CELO_VALIDATOR_ADDRESS= -docker run -v $PWD:/root/.celo --rm -it $CELO_IMAGE account proof-of-possession $CELO_VALIDATOR_SIGNER_ADDRESS $CELO_VALIDATOR_ADDRESS -``` - -Save the signer address, public key, and proof-of-possession signature to your local machine: -```bash -# On your local machine -export CELO_VALIDATOR_SIGNER_ADDRESS= -export CELO_VALIDATOR_SIGNER_SIGNATURE= -export CELO_VALIDATOR_SIGNER_PUBLIC_KEY= -``` - -Validators on the Celo network use BLS aggregated signatures to create blocks in addition to the Validator signer (ECDSA) key. While an independent BLS key can be specified, the simplest thing to do is to derive the BLS key from the Validator signer key. When we register our Validator, we'll need to prove possession of the BLS key as well, which can be done by running the following command: -```bash -# On the validator machine -docker run -v $PWD:/root/.celo --rm -it $CELO_IMAGE account proof-of-possession $CELO_VALIDATOR_SIGNER_ADDRESS $CELO_VALIDATOR_ADDRESS --bls -``` - -Save the resulting signature and public key to your local machine: - -```bash -# On your local machine -export CELO_VALIDATOR_SIGNER_BLS_SIGNATURE= -export CELO_VALIDATOR_SIGNER_BLS_PUBLIC_KEY= -``` - -We'll get back to this machine later, but for now, let's give it a proxy. - -### Deploy a proxy - -```bash -# On the proxy machine -mkdir celo-proxy-node -cd celo-proxy-node -export CELO_VALIDATOR_SIGNER_ADDRESS= -``` - -You can then run the proxy with the following command. Be sure to replace `` with the name you'd like to appear on Celostats. The validator name shown in [Celostats](https://baklava-celostats.celo-testnet.org/) will be the name configured in the proxy. - -Additionally, you need to unlock the account configured in the `etherbase` option. It is recommended to create a new account and independent account only for this purpose. Be sure to write a new password to `./.password` for this account (different to the Validator Signer password) - -```bash -# On the proxy machine -# First, we create a new account for the proxy -docker run --name celo-proxy-password -it --rm -v $PWD:/root/.celo $CELO_IMAGE account new --password /root/.celo/.password -``` - -Notice the public address returned by this command, that can be exported and used for running the proxy node: - -```bash -# On the proxy machine -export PROXY_ADDRESS= -docker run --name celo-proxy -it --restart unless-stopped --stop-timeout 300 -p 30303:30303 -p 30303:30303/udp -p 30503:30503 -p 30503:30503/udp -v $PWD:/root/.celo $CELO_IMAGE --verbosity 3 --nousb --syncmode full --proxy.proxy --proxy.proxiedvalidatoraddress $CELO_VALIDATOR_SIGNER_ADDRESS --proxy.internalendpoint :30503 --etherbase $PROXY_ADDRESS --unlock $PROXY_ADDRESS --password /root/.celo/.password --allow-insecure-unlock --baklava --datadir /root/.celo --celostats=@baklava-celostats-server.celo-testnet.org -``` - -{% hint style="info" %} -You can detach from the running container by pressing `ctrl+p ctrl+q`, or start it with `-d` instead of `-it` to start detached. Access the logs for a container in the background with the `docker logs` command. -{% endhint %} - -**NOTES** -* For the proxy to be able to send stats to [Celostats](https://baklava-celostats.celo-testnet.org/), both the proxy and the validator should set the `celostats` flag -* If you are deploying multiple proxies for the same validator, the `celostats` flag should be added in only one of them - -### Get your Proxy's connection info - -Once the Proxy is running, we will need to retrieve its enode and IP address so that the Validator will be able to connect to it. - -```bash -# On the proxy machine, retrieve the proxy enode -docker exec celo-proxy geth --exec "admin.nodeInfo['enode'].split('//')[1].split('@')[0]" attach | tr -d '"' -``` - -Now we need to set the Proxy enode and Proxy IP address in environment variables on the Validator machine. - -If you don't have an internal IP address over which the Validator and Proxy can communicate, you can set the internal IP address to the external IP address. - -If you don't know your proxy's external IP address, you can get it by running the following command: - -```bash -# On the proxy machine -dig +short myip.opendns.com @resolver1.opendns.com -``` - -Then, export the variables on your Validator machine. - -```bash -# On the Validator machine -export PROXY_ENODE= -export PROXY_EXTERNAL_IP= -export PROXY_INTERNAL_IP= -``` - -You will also need to export `PROXY_EXTERNAL_IP` on your local machine. - -```bash -# On your local machine -export PROXY_EXTERNAL_IP= -``` - -### Connect the Validator to the Proxy - -When your Validator starts up it will attempt to create a network connection with the proxy machine. You will need to make sure that your proxy machine has the appropriate firewall settings to allow the Validator to connect to it. - -Specifically, on the proxy machine, port 30303 should allow TCP and UDP connections from all IP addresses. And port 30503 should allow TCP connections from the IP address of your Validator machine. - -Test that your network is configured correctly by running the following commands: - -```bash -# On your local machine, test that your proxy is accepting TCP connections over port 30303. -# Note that it will also need to be accepting UDP connections over this port. -nc -vz $PROXY_EXTERNAL_IP 30303 -``` - -```bash -# On your Validator machine, test that your proxy is accepting TCP connections over port 30503. -nc -vz $PROXY_INTERNAL_IP 30503 -``` - -Once that is completed, go ahead and run the Validator. Be sure to write your Validator signer password to `./.password` for the following command to work, or provide your password another way. - -```bash -# On the Validator machine -cd celo-validator-node -docker run --name celo-validator -it --restart unless-stopped --stop-timeout 300 -p 30303:30303 -p 30303:30303/udp -v $PWD:/root/.celo $CELO_IMAGE --verbosity 3 --syncmode full --mine --etherbase $CELO_VALIDATOR_SIGNER_ADDRESS --nodiscover --nousb --proxy.proxied --proxy.proxyenodeurlpairs=enode://$PROXY_ENODE@$PROXY_INTERNAL_IP:30503\;enode://$PROXY_ENODE@$PROXY_EXTERNAL_IP:30303 --unlock=$CELO_VALIDATOR_SIGNER_ADDRESS --password /root/.celo/.password --celostats=@baklava-celostats-server.celo-testnet.org --baklava --datadir /root/.celo -``` - -At this point your Validator and Proxy machines should be configured, and both should be syncing to the network. You should see `Imported new chain segment` in your node logs, about once every 5 seconds once the node is synced to the latest block which you can find on the [Baklava Network Stats](https://baklava-celostats.celo-testnet.org/) page. - -{% hint style="info" %} -You can run multiple proxies by deploying additional proxies per the instructions in the [Deploy a proxy](running-a-validator-in-baklava.md#deploy-a-proxy) section. Then add all of the proxies' enodes as a comma seperated list using the `--proxy.proxyenodeurlpairs` option. E.g. if there are two proxies, that option's usage would look like `--proxy.proxyenodeurlpairs=enode://$PROXY_ENODE_1@$PROXY_INTERNAL_IP_1:30503\;enode://$PROXY_ENODE_1@$PROXY_EXTERNAL_IP_1:30303,enode://$PROXY_ENODE_2@$PROXY_INTERNAL_IP_2:30503\;enode://$PROXY_ENODE_2@$PROXY_EXTERNAL_IP_2:30303` -{% endhint %} - - -## Registering as a Validator (ReleaseGold Registration) - -In order to operate as a Validator, you must register on-chain and be elected. Elections will run on each epoch boundary, approximately every 24 hours, after elections have been unfrozen by on-chain governance. Eligible validator groups will be considered in an Election mechanism that will select Validator based on the [D'Hondt method](https://en.wikipedia.org/wiki/D%27Hondt_method). - -In the following steps, this guide will assume your CELO is held in a `ReleaseGold` contract, if this is not the case, the commands will need to be adjusted. At a high level, `ReleaseGold` holds a balance for scheduled release, while allowing the held balance to be used for certain actions such as validating and voting, depending on the configuration of the contract. [Read more about `ReleaseGold`.](../celo-holder-guide/release-gold.md) - -The following sections outline the actions you will need to take. On a high level, we will: - -- Create Accounts and lock up the balance of each `ReleaseGold` contract -- Register a Validator -- Register a Validator Group -- Add the registered Validator to the Validator Group -- Vote for the group with funds from each `ReleaseGold` contract - -### Create Accounts from the `ReleaseGold` contracts - -In order to participate on the network (lock gold, vote, validate) from a `ReleaseGold` contract, we need to create a registered Account with the address of the `ReleaseGold` contract. - -```bash -# On your local machine -export CELO_VALIDATOR_GROUP_RG_ADDRESS= -export CELO_VALIDATOR_RG_ADDRESS= -``` - -Show the configuration and balance of your `ReleaseGold` contracts: - -```bash -# On your local machine -celocli releasegold:show --contract $CELO_VALIDATOR_GROUP_RG_ADDRESS -celocli releasegold:show --contract $CELO_VALIDATOR_RG_ADDRESS -``` - -{% hint style="info" %} -When running the following commands, the Beneficiary keys should be [unlocked](#unlocking). -{% endhint %} - -Create a registered Account for each of the Validator and Validator Group's `ReleaseGold` contracts: - -```bash -# On your local machine -celocli releasegold:create-account --contract $CELO_VALIDATOR_GROUP_RG_ADDRESS -celocli releasegold:create-account --contract $CELO_VALIDATOR_RG_ADDRESS -``` - -By running the following commands, you can see that the `ReleaseGold` contract addresses are now also associated with a registered Account. - -```bash -# On your local machine -celocli account:show $CELO_VALIDATOR_GROUP_RG_ADDRESS -celocli account:show $CELO_VALIDATOR_RG_ADDRESS -``` - -Lock CELO from your `ReleaseGold` contracts to fulfill the lock-up requirements to register a Validator and Validator Group. The current requirement is any value strictly greater than 10,000 CELO to register a Validator, and any value strictly greater than 10,000 CELO _per member validator_ to register a Validator Group. Here we lock up 10000.1 CELO for each. - -```bash -celocli releasegold:locked-gold --contract $CELO_VALIDATOR_GROUP_RG_ADDRESS --action lock --value 100001e17 -celocli releasegold:locked-gold --contract $CELO_VALIDATOR_RG_ADDRESS --action lock --value 100001e17 -``` - -Check that your CELO was successfully locked with the following commands: - -```bash -# On your local machine -celocli lockedgold:show $CELO_VALIDATOR_GROUP_RG_ADDRESS -celocli lockedgold:show $CELO_VALIDATOR_RG_ADDRESS -``` - -### Register as a Validator - -In order to perform Validator actions with the Account created in the previous step, you will need to authorize a [Validator signer](../validator-guide/key-management/detailed.md#authorized-validator-signers) for the `ReleaseGold` contract account. - -```bash -# On the Validator machine -export CELO_VALIDATOR_RG_ADDRESS= -export CELO_VALIDATOR_SIGNER_ADDRESS= -docker run -v $PWD:/root/.celo --rm -it $CELO_IMAGE --nousb account proof-of-possession $CELO_VALIDATOR_SIGNER_ADDRESS $CELO_VALIDATOR_RG_ADDRESS -``` - -Save the signer address, public key, and proof-of-possession signature to your local machine: - -```bash -# On your local machine -export CELO_VALIDATOR_SIGNER_ADDRESS= -export CELO_VALIDATOR_SIGNER_SIGNATURE= -export CELO_VALIDATOR_SIGNER_PUBLIC_KEY= -``` - -Validators on the Celo network use BLS aggregated signatures to create blocks in addition to the Validator signer (ECDSA) key. While an independent BLS key can be specified, the simplest thing to do is to derive the BLS key from the Validator signer. When we register our Validator, we'll need to prove possession of the BLS key as well, which can be done by running the following command. - -If you were part of the genesis validator set, you will have already generated this key and submitted it via Gist. Note that if you are planning to run more than one validator, each validator will need a distinct BLS key. - -```bash -# On the Validator machine -docker run -v $PWD:/root/.celo --rm -it $CELO_IMAGE --nousb account proof-of-possession $CELO_VALIDATOR_SIGNER_ADDRESS $CELO_VALIDATOR_RG_ADDRESS --bls -``` - -Save the resulting signature and public key to your local machine: - -```bash -# On your local machine -export CELO_VALIDATOR_SIGNER_BLS_SIGNATURE= -export CELO_VALIDATOR_SIGNER_BLS_PUBLIC_KEY= -``` - -In order to validate we need to authorize the Validator signer: - -```bash -# On your local machine -celocli releasegold:authorize --contract $CELO_VALIDATOR_RG_ADDRESS --role validator --signature 0x$CELO_VALIDATOR_SIGNER_SIGNATURE --signer $CELO_VALIDATOR_SIGNER_ADDRESS --blsKey $CELO_VALIDATOR_SIGNER_BLS_PUBLIC_KEY --blsPop $CELO_VALIDATOR_SIGNER_BLS_SIGNATURE -``` - -{% hint style="info" %} The first time you authorize a validator signer for a ReleaseGold account the signer address is funded 1 CELO to cover transaction fees. Any subsequent signer keys you authorize will not be funded, and you will need to transfer a nominal amount of CELO to them from other accounts. {% endhint %} - -Using the newly authorized Validator signer, register a validator on behalf of the registered Account: - -{% hint style="info" %} -Running the following command requires the keys for the validator signer address. This command can be run on the validator machine, or if the keys are also available on your local machine, it can be run there. -{% endhint %} - -```bash -# On a machine with CELO_VALIDATOR_SIGNER_ADDRESS unlocked. -celocli validator:register --blsKey $CELO_VALIDATOR_SIGNER_BLS_PUBLIC_KEY --blsSignature $CELO_VALIDATOR_SIGNER_BLS_SIGNATURE --ecdsaKey $CELO_VALIDATOR_SIGNER_PUBLIC_KEY --from $CELO_VALIDATOR_SIGNER_ADDRESS -``` - -You can view information about your Validator by running the following command: - -```bash -# On your local machine -celocli validator:show $CELO_VALIDATOR_RG_ADDRESS -``` - -### Register as a Validator Group - -In order to register a Validator Group, you will need to authorize a validator (group) signer on behalf of the `ReleaseGold` registered Account. In these steps you will create a new key on your local machine for this purpose. - -```bash -# On your local machine -docker run -v $PWD:/root/.celo --rm -it $CELO_IMAGE account new -``` - -And save this new address: - -```bash -export CELO_VALIDATOR_GROUP_SIGNER_ADDRESS= -``` - -In order to authorize our Validator Group signer, we need to create a proof that we have possession of the Validator Group signer private key. We do so by signing a message that consists of the authorizing registered Account address, in this case, the `ReleaseGold` contract address. - -To generate the proof-of-possession, run the following command: - -```bash -# On your local machine -docker run -v $PWD:/root/.celo --rm -it $CELO_IMAGE --nousb account proof-of-possession $CELO_VALIDATOR_GROUP_SIGNER_ADDRESS $CELO_VALIDATOR_GROUP_RG_ADDRESS -``` - -Save the signer address, public key, and proof-of-possession signature to your local machine: - -```bash -export CELO_VALIDATOR_GROUP_SIGNER_SIGNATURE= -``` - -Authorize your Validator Group signer: - -```bash -# On your local machine -celocli releasegold:authorize --contract $CELO_VALIDATOR_GROUP_RG_ADDRESS --role validator --signature 0x$CELO_VALIDATOR_GROUP_SIGNER_SIGNATURE --signer $CELO_VALIDATOR_GROUP_SIGNER_ADDRESS -``` - -With this newly authorized signer, you can register a Validator Group on behalf of the registered Account: - -```bash -# On your local machine -celocli validatorgroup:register --from $CELO_VALIDATOR_GROUP_SIGNER_ADDRESS --commission 0.1 -``` - -You can view information about your Validator Group by running the following command: - -```bash -# On your local machine -celocli validatorgroup:show $CELO_VALIDATOR_GROUP_RG_ADDRESS -``` - -### Affiliate the Validator with the group - -Now that the Validator and the group are registered, you can affiliate the Validator with the group, indicating that Validator's desire to join the group. - -```bash -# On the Validator machine -celocli validator:affiliate $CELO_VALIDATOR_GROUP_RG_ADDRESS --from $CELO_VALIDATOR_SIGNER_ADDRESS -``` - -The Validator Group can then accept the Validator as a member: - -```bash -# On your local machine -celocli validatorgroup:member --accept $CELO_VALIDATOR_RG_ADDRESS --from $CELO_VALIDATOR_GROUP_SIGNER_ADDRESS -``` - -Verify that your Validator is now a member of your Validator Group: - -```bash -# On your local machine -celocli validator:show $CELO_VALIDATOR_RG_ADDRESS -celocli validatorgroup:show $CELO_VALIDATOR_GROUP_RG_ADDRESS -``` - -### Vote in the Election - -In order to get elected as a Validator, you will need to use the balance of your `ReleaseGold` contracts to vote for your group. - -#### Authorize vote signer - -In order to vote on behalf of the `ReleaseGold` registered Accounts you will need to authorize vote signers. - -Create the vote signer keys: - -```bash -# On your local machine -docker run -v $PWD:/root/.celo --rm -it $CELO_IMAGE account new -export CELO_VALIDATOR_VOTE_SIGNER_ADDRESS= - -docker run -v $PWD:/root/.celo --rm -it $CELO_IMAGE account new -export CELO_VALIDATOR_GROUP_VOTE_SIGNER_ADDRESS= -``` - -Produce the proof-of-possessions needed to authorize the vote signers: - -```bash -# On your local machine -docker run -v $PWD:/root/.celo --rm -it $CELO_IMAGE --nousb account proof-of-possession $CELO_VALIDATOR_VOTE_SIGNER_ADDRESS $CELO_VALIDATOR_RG_ADDRESS -export CELO_VALIDATOR_VOTE_SIGNER_SIGNATURE= - -docker run -v $PWD:/root/.celo --rm -it $CELO_IMAGE --nousb account proof-of-possession $CELO_VALIDATOR_GROUP_VOTE_SIGNER_ADDRESS $CELO_VALIDATOR_GROUP_RG_ADDRESS -export CELO_VALIDATOR_GROUP_VOTE_SIGNER_SIGNATURE= -``` - -Authorize the vote signing keys: - -```bash -# On your local machine -celocli releasegold:authorize --contract $CELO_VALIDATOR_RG_ADDRESS --role vote --signature 0x$CELO_VALIDATOR_VOTE_SIGNER_SIGNATURE --signer $CELO_VALIDATOR_VOTE_SIGNER_ADDRESS -celocli releasegold:authorize --contract $CELO_VALIDATOR_GROUP_RG_ADDRESS --role vote --signature 0x$CELO_VALIDATOR_GROUP_VOTE_SIGNER_SIGNATURE --signer $CELO_VALIDATOR_GROUP_VOTE_SIGNER_ADDRESS -``` - -#### Submit your votes - -Now the newly authorized vote signers can be used to vote for your validator group: - -```bash -# On your local machine -celocli election:vote --from $CELO_VALIDATOR_VOTE_SIGNER_ADDRESS --for $CELO_VALIDATOR_GROUP_RG_ADDRESS --value 10000e18 -celocli election:vote --from $CELO_VALIDATOR_GROUP_VOTE_SIGNER_ADDRESS --for $CELO_VALIDATOR_GROUP_RG_ADDRESS --value 10000e18 -``` - -Verify that your votes were cast successfully: - -```bash -# On your local machine -celocli election:show $CELO_VALIDATOR_GROUP_RG_ADDRESS --group -celocli election:show $CELO_VALIDATOR_GROUP_RG_ADDRESS --voter -celocli election:show $CELO_VALIDATOR_RG_ADDRESS --voter -``` - -Users in the Celo protocol receive epoch rewards for voting in Validator Elections only after submitting a special transaction to enable rewards. This must be done every time new votes are cast, and can only be made after the most recent epoch has ended. For convenience, we can use the following command, which will wait until the epoch has ended before sending a transaction: - -{% hint style="info" %} -Epoch lengths in the Baklava network are set to be the number of blocks produced in a day. As a result, votes may need to be activated up to 24 hours after they are cast. -{% endhint %} - -```bash -# On your local machine -# Note that this command will wait for the next epoch transition, which may be up to 24 hours in the future. -celocli election:activate --from $CELO_VALIDATOR_VOTE_SIGNER_ADDRESS --wait && celocli election:activate --from $CELO_VALIDATOR_GROUP_VOTE_SIGNER_ADDRESS --wait -``` - -Check that your votes were activated by re-running the following commands: - -```bash -# On your local machine -celocli election:show $CELO_VALIDATOR_GROUP_RG_ADDRESS --voter -celocli election:show $CELO_VALIDATOR_RG_ADDRESS --voter -``` - -If your Validator Group elects validators, you will receive epoch rewards in the form of additional Locked CELO voting for your Validator Group. You can see these rewards accumulate with the commands in the previous set, as well as: - -```bash -# On your local machine -celocli lockedgold:show $CELO_VALIDATOR_GROUP_RG_ADDRESS -celocli lockedgold:show $CELO_VALIDATOR_RG_ADDRESS -``` - -You're all set! Elections are finalized at the end of each epoch, roughly once a day in the Baklava testnet. If you get elected, your node will start participating in BFT consensus and validating blocks. After the first epoch in which your Validator participates in BFT, you should receive your first set of epoch rewards. - -You can inspect the current state of the Validator elections by running: - -```bash -# On your local machine -celocli election:list -``` - -You can check the status of your Validator, including whether it is elected and signing blocks, at [baklava-celostats.celo-testnet.org](https://baklava-celostats.celo-testnet.org) or by running: - -```bash -# On your local machine -celocli validator:status --validator $CELO_VALIDATOR_RG_ADDRESS -``` - -You can see additional information about your Validator, including uptime score, by running: - -```bash -# On your local machine -celocli validator:show $CELO_VALIDATOR_RG_ADDRESS -``` - -## Registering as a Validator (Non-ReleaseGold) - -If you are new to validating on Baklava, then you most likely need to be following the Non-ReleaseGold steps for getting your validator up and running. ReleaseGold is done in the previous section and only concerns those who are generating accounts with ReleaseGold smart contract. - -### Register the Accounts - -You've now done all the infrastructure setup to get a validator and proxy running. The cLabs team will review your submission to receive funds and send you 12,000 Baklava testnet CELO to each of your Validator and Validator Group account addresses. These funds have no real world value but will allow you to submit transactions to the network via [`celocli`](https://docs.celo.org/command-line-interface/introduction) and put up a stake to register as a validator and validator group. - -You can view your CELO balances by running the following commands: - -```bash -# On your local machine -celocli account:balance $CELO_VALIDATOR_GROUP_ADDRESS -celocli account:balance $CELO_VALIDATOR_ADDRESS -``` - -At some point the output of these commands will change from `0` to `12e12`, indicating you have received the testnet CELO. This process involves a human, so please be patient. If you haven't received a balance within 24 hours, please get in touch again. - -You can also look at an account's current balance and transaction history on [Blockscout](https://baklava-blockscout.celo-testnet.org/). Enter the address into the search bar. - -Once these accounts have a balance, unlock them so that we can sign transactions. Then, we will register the accounts with the Celo core smart contracts: - -```bash -# On your local machine -celocli account:unlock $CELO_VALIDATOR_GROUP_ADDRESS -celocli account:unlock $CELO_VALIDATOR_ADDRESS -celocli account:register --from $CELO_VALIDATOR_GROUP_ADDRESS --name -celocli account:register --from $CELO_VALIDATOR_ADDRESS --name -``` - -Check that your accounts were registered successfully with the following commands: - -```bash -# On your local machine -celocli account:show $CELO_VALIDATOR_GROUP_ADDRESS -celocli account:show $CELO_VALIDATOR_ADDRESS` -``` - -### Lock up CELO - -Lock up testnet CELO for both accounts in order to secure the right to register a Validator and Validator Group. The current requirement is 10,000 CELO to register a validator, and 10,000 CELO _per member validator_ to register a Validator Group. For Validators, this gold remains locked for approximately 60 days following deregistration. For groups, this gold remains locked for approximately 60 days following the removal of the Nth validator from the group. - -```bash -# On your local machine -celocli lockedgold:lock --from $CELO_VALIDATOR_GROUP_ADDRESS --value 10000000000000000000000 -celocli lockedgold:lock --from $CELO_VALIDATOR_ADDRESS --value 10000000000000000000000 -``` - -This amount (10,000 CELO) represents the minimum amount needed to be locked in order to register a Validator and Validator group. Since your balance is in fact higher than this, you may wish to lock more with these accounts. Note that you will want to be sure to leave enough CELO unlocked to be able to continue to pay transaction fees for future transactions (such as those issued by running some CLI commands). - -Check that your CELO was successfully locked with the following commands: - -```bash -# On your local machine -celocli lockedgold:show $CELO_VALIDATOR_GROUP_ADDRESS -celocli lockedgold:show $CELO_VALIDATOR_ADDRESS -``` - -### Run for election - -In order to be elected as a Validator, you will first need to register your group and Validator. Note that when registering a Validator Group, you need to specify a [commission](../celo-codebase/protocol/proof-of-stake/validator-groups.md#group-share), which is the fraction of epoch rewards paid to the group by its members. - -We don't want to use our account key for validating, so first let's authorize the validator signing key: - -```bash -# On your local machine -celocli account:authorize --from $CELO_VALIDATOR_ADDRESS --role validator --signature 0x$CELO_VALIDATOR_SIGNER_SIGNATURE --signer 0x$CELO_VALIDATOR_SIGNER_ADDRESS -``` - -Confirm by checking the authorized Validator signer for your Validator: - -```bash -# On your local machine -celocli account:show $CELO_VALIDATOR_ADDRESS -``` - -Then, register your Validator Group by running the following command. Note that because we did not authorize a Validator signer for our Validator Group account, we register the Validator Group with the account key. - -```bash -# On your local machine -celocli validatorgroup:register --from $CELO_VALIDATOR_GROUP_ADDRESS --commission 0.1 -``` - -You can view information about your Validator Group by running the following command: - -```bash -# On your local machine -celocli validatorgroup:show $CELO_VALIDATOR_GROUP_ADDRESS -``` - -Next, register your Validator by running the following command. Note that because we have authorized a Validator signer, this step could also be performed on the Validator machine. Running it on the local machine allows us to avoid needing to install the [`celocli`](https://docs.celo.org/command-line-interface/introduction) on the Validator machine. - -```bash -# On your local machine -celocli validator:register --from $CELO_VALIDATOR_ADDRESS --ecdsaKey $CELO_VALIDATOR_SIGNER_PUBLIC_KEY --blsKey $CELO_VALIDATOR_SIGNER_BLS_PUBLIC_KEY --blsSignature $CELO_VALIDATOR_SIGNER_BLS_SIGNATURE -``` - -Affiliate your Validator with your Validator Group. Note that you will not be a member of this group until the Validator Group accepts you. This command could also be run from the Validator signer, if running on the validator machine. - -```bash -# On your local machine -celocli validator:affiliate $CELO_VALIDATOR_GROUP_ADDRESS --from $CELO_VALIDATOR_ADDRESS -``` - -Accept the affiliation: - -```bash -# On your local machine -celocli validatorgroup:member --accept $CELO_VALIDATOR_ADDRESS --from $CELO_VALIDATOR_GROUP_ADDRESS -``` - -Next, double check that your Validator is now a member of your Validator Group: - -```bash -# On your local machine -celocli validator:show $CELO_VALIDATOR_ADDRESS -celocli validatorgroup:show $CELO_VALIDATOR_GROUP_ADDRESS -``` - -Use both accounts to vote for your Validator Group. Note that because we have not authorized a vote signer for either account, these transactions must be sent from the account keys. Since you're likely to need to place additional votes throughout the course of the stake-off, consider creating and authorizing vote signers for additional operational security. - -```bash -# On your local machine -celocli election:vote --from $CELO_VALIDATOR_ADDRESS --for $CELO_VALIDATOR_GROUP_ADDRESS --value 10000000000000000000000 -celocli election:vote --from $CELO_VALIDATOR_GROUP_ADDRESS --for $CELO_VALIDATOR_GROUP_ADDRESS --value 10000000000000000000000 -``` - -Double check that your votes were cast successfully: - -```bash -# On your local machine -celocli election:show $CELO_VALIDATOR_GROUP_ADDRESS --group -celocli election:show $CELO_VALIDATOR_GROUP_ADDRESS --voter -celocli election:show $CELO_VALIDATOR_ADDRESS --voter -``` - -Users in the Celo protocol receive epoch rewards for voting in Validator Elections only after submitting a special transaction to enable them. This must be done every time new votes are cast, and can only be made after the most recent epoch has ended. For convenience, we can use the following command, which will wait until the epoch has ended before sending a transaction: - -```bash -# On your local machine -# Note that this may take some time, as the epoch needs to end before votes can be activated -celocli election:activate --from $CELO_VALIDATOR_ADDRESS --wait && celocli election:activate --from $CELO_VALIDATOR_GROUP_ADDRESS --wait -``` - -Check that your votes were activated by re-running the following commands: - -```bash -# On your local machine -celocli election:show $CELO_VALIDATOR_GROUP_ADDRESS --voter -celocli election:show $CELO_VALIDATOR_ADDRESS --voter -``` - -If your Validator Group elects validators, you will receive epoch rewards in the form of additional Locked CELO voting for your Validator Group from your account addresses. You can see these rewards accumulate with the commands in the previous set, as well as: - -```bash -# On your local machine -celocli lockedgold:show $CELO_VALIDATOR_GROUP_ADDRESS -celocli lockedgold:show $CELO_VALIDATOR_ADDRESS -``` - -You're all set! Elections are finalized at the end of each epoch, roughly once an hour in the Alfajores or Baklava Testnets. After that hour, if you get elected, your node will start participating BFT consensus and validating blocks. After the first epoch in which your Validator participates in BFT, you should receive your first set of epoch rewards. - -{% hint style="info" %} -**Roadmap**: Different parameters will govern elections in a Celo production network. Epochs are likely to be daily, rather than hourly. Running a Validator will also include setting up proxy nodes to protect against DDoS attacks, and using hardware wallets to secure the key used to sign blocks. We plan to update these instructions with more details soon. -{% endhint %} - -You can inspect the current state of the validator elections by running: - -```bash -# On your local machine -celocli election:list -``` - -If you find your Validator still not getting elected you may need to faucet yourself more funds and lock more gold in order to be able to cast more votes for your Validator Group! - -You can check the status of your validator, including whether it is elected and signing blocks, at [baklava-ethstats.celo-testnet.org](https://baklava-ethstats.celo-testnet.org) or by running: - -```bash -# On your local machine with celocli >= 0.0.30-beta9 -celocli validator:status --validator $CELO_VALIDATOR_ADDRESS -``` - -You can see additional information about your validator, including uptime score, by running: - -```bash -# On your local machine -celocli validator:show $CELO_VALIDATOR_ADDRESS -``` - - -## Running the Attestation Service - -Validators are expected to run an [Attestation Service](../validator-guide/attestation-service.md) to provide attestations that allow users to map their phone number to an account on Celo. Follow the instructions now to [set up the service](../validator-guide/attestation-service.md). - -## Deployment Tips - -### Running the Docker containers in the background - -There are different options for executing Docker containers in the background. The most typical one is to use in your docker run commands the `-d` option. Also for long running processes, especially when you run in on a remote machine, you can use a tool like [screen](https://ss64.com/osx/screen.html). It allows you to connect and disconnect from running processes providing an easy way to manage long running processes. - -It's out of the scope of this documentation to go through the `screen` options, but you can use the following command format with your `docker` commands: - -```bash -screen -S -d -m -``` - -For example: - -```bash -screen -S celo-validator -d -m docker run --name celo-validator -it --restart unless-stopped --stop-timeout 300 -p 127.0.0.1:8545:8545 ....... -``` - -You can list your existing `screen` sessions: - -```bash -screen -ls -``` - -And re-attach to any of the existing sessions: - -```bash -screen -r -S celo-validator -``` - -### Stopping containers - -You can stop the Docker containers at any time without problem. If you stop your containers that means those containers stop providing service. -The data directory of the Validator and the proxy are Docker volumes mounted in the containers from the `celo-*-dir` you created at the very beginning. So if you don't remove that folder, you can stop or restart the containers without losing any data. - -It is recommended to use the Docker stop timeout parameter `-t` when stopping the containers. This allows time, in this case 60 seconds, for the Celo nodes to flush recent chain data it keeps in memory into the data directories. Omitting this may cause your blockchain data to corrupt, requiring the node to start syncing from scratch. - -You can stop the `celo-validator` and `celo-proxy` containers running: - -```bash -docker stop celo-validator celo-proxy -t 60 -``` - -And you can remove the containers (not the data directory) by running: - -```bash -docker rm -f celo-validator celo-proxy -``` diff --git a/packages/docs/getting-started/running-a-validator-in-mainnet.md b/packages/docs/getting-started/running-a-validator-in-mainnet.md deleted file mode 100644 index 4550c208346..00000000000 --- a/packages/docs/getting-started/running-a-validator-in-mainnet.md +++ /dev/null @@ -1,965 +0,0 @@ -# Running a Validator in Mainnet - -This section explains how to get a Validator node running on [Mainnet](mainnet.md). - -{% hint style="info" %} -If you would like to keep up-to-date with all the news happening in the Celo community, including validation, node operation and governance, please sign up to our [Celo Signal mailing list here](https://celo.activehosted.com/f/15). - -You can add the [Celo Signal public calendar](https://calendar.google.com/calendar/u/0/embed?src=c_9su6ich1uhmetr4ob3sij6kaqs@group.calendar.google.com) as well which has relevant dates. -{% endhint %} - -Validators help secure the Celo network by participating in Celo’s proof-of-stake protocol. Validators are organized into Validator Groups, analogous to parties in representative democracies. A Validator Group is essentially an ordered list of Validators. - -Just as anyone in a democracy can create their own political party, or seek to get selected to represent a party in an election, any Celo user can create a Validator group and add themselves to it, or set up a potential Validator and work to get an existing Validator group to include them. - -While other Validator Groups will exist on the Celo Network, the fastest way to get up and running with a Validator will be to register a Validator Group, register a Validator, and affliate that Validator with your Validator Group. The addresses used to register Validator Groups and Validators must be unique, which will require that you create two accounts in the step-by-step guide below. - -Because of the importance of Validator security and availability, Validators are expected to run a "proxy" node in front of each Validator node. In this setup, the Proxy node connects with the rest of the network, and the Validator node communicates only with the Proxy, ideally via a private network. - -Additionally, Validators are expected to run an [Attestation Service](https://github.com/celo-org/celo-monorepo/tree/master/packages/attestation-service) as part of the [lightweight identity protocol](../celo-codebase/protocol/identity), to provide attestations that allow users to map their phone number to a Celo address. - -[Read more about Celo's mission and why you may want to become a Validator.](https://medium.com/celoorg/calling-all-chefs-become-a-celo-validator-c75d1c2909aa) - -This page also has separate steps for both ReleaseGold and non-ReleaseGold steps for validating. - -{% hint style="info" %} -If you are new to validating on Celo, please follow the Non-ReleaseGold instructions for validating. -{% endhint %} - -## Prerequisites - -### Staking Requirements - -Celo uses a [proof-of-stake](../celo-codebase/protocol/proof-of-stake) consensus mechanism, which requires Validators to have locked CELO to participate in block production. The current requirement is 10,000 CELO to register a Validator, and 10,000 CELO _per member validator_ to register a Validator Group. - -If you do not have the required CELO to lock up, you can try out of the process of creating a validator on the Baklava network by following the [Running a Validator in Baklava guide](running-a-validator-in-baklava.md) - -We will not discuss obtaining CELO here, but it is a prerequisite that you obtain the required CELO, and it is assumed in this guide that your gold is held in two `ReleaseGold` contracts, one for the Validator and one for the Validator Group. If that is not the case, the provided commands will need to be adjusted, but the guide will still provide the required steps. - -At a high level, `ReleaseGold` holds a balance for scheduled release, while allowing the held balance to be used for certain actions such as validating and voting, depending on the configuration of the contract. [Read more about `ReleaseGold`](../celo-holder-guide/release-gold.md). - -#### Non-ReleaseGold -{% hint style="info" %} -If you are new to validating on Celo, please follow the Non-ReleaseGold instructions for validating. -{% endhint %} - -### Hardware requirements - -The recommended Celo Validator setup involves continually running three instances: - -- 1 **Validator node**: should be deployed to single-tenant hardware in a secure, high availability data center -- 1 **Validator Proxy node**: can be a VM or container in a multi-tenant environment (e.g. a public cloud), but requires high availability -- 1 **Attestation node**: can be a VM or container in a multi-tenant environment (e.g. a public cloud), and has moderate availability requirements - -Celo is a proof-of-stake network, which has different hardware requirements than a Proof of Work network. proof-of-stake consensus is less CPU intensive, but is more sensitive to network connectivity and latency. Below is a list of standard requirements for running Validator and Proxy nodes on the Celo Network: - -- Memory: 8 GB RAM -- CPU: Quad core 3GHz (64-bit) -- Disk: 256 GB of SSD storage, plus a secondary HDD desirable -- Network: At least 1 GB input/output Ethernet with a fiber Internet connection, ideally redundant connections and HA switches - -Attestation Service nodes consume less resources and can run on machines with less memory and compute. - -In addition, to get things started, it will be useful to run a node on your local machine that you can issue CLI commands against. - -### Networking requirements - -In order for your Validator to participate in consensus and complete attestations, it is **critically** important to configure your network correctly. - -Your Proxy and Attestations nodes must have static, external IP addresses, and your Validator node must be able to communicate with the Proxy, either via an internal network or via the Proxy's external IP address. - -On the Validator machine, port 30503 should accept TCP connections from the IP address of your Proxy machine. This port is used by the Validator to communicate with the Proxy. - -On the Proxy machine, port 30503 should accept TCP connections from the IP address of your Validator machine. This port is used by the Proxy to communicate with the Validator. - -On the Proxy and Attestations machines, port 30303 should accept TCP and UDP connections from all IP addresses. This port is used to communicate with other nodes in the network. - -On the Attestations machine, port 80 should accept TCP connections from all IP addresses. This port is used by users to request attestations from you. - -To illustrate this, you may refer to the following table: - -| Machine \\ IPs open to | 0\.0\.0\.0/0 \(all\) | your\-validator\-ip | your\-proxy\-ip | -|------------------------|----------------------|-----------------------|-------------------| -| Validator | | | tcp:30503 | -| Proxy | tcp:30303, udp:30303 | tcp:30503 | | -| Attestation | tcp:80 | | | - -### Software requirements - -#### On each machine - -- **You have Docker installed.** - - If you don’t have it already, follow the instructions here: [Get Started with Docker](https://www.docker.com/get-started). It will involve creating or signing in with a Docker account, downloading a desktop app, and then launching the app to be able to use the Docker CLI. If you are running on a Linux server, follow the instructions for your distro [here](https://docs.docker.com/install/#server). You may be required to run Docker with `sudo` depending on your installation environment. - You can check you have Docker installed and running if the command `docker info` works properly. - -#### On your local machine - -- **You have celocli installed.** - - See [Command Line Interface \(CLI\) ](../command-line-interface/introduction.md)for instructions on how to get set up. - -- **You are using the latest Node.js v12.x** - - Some users have reported issues using the most recent version of node. Use the LTS for greater reliability. - -{% hint style="info" %} -A note about conventions: -The code snippets you'll see on this page are bash commands and their output. - -When you see text in angle brackets <>, replace them and the text inside with your own value of what it refers to. Don't include the <> in the command. -{% endhint %} - -### Key Management - -Private keys are the central primitive of any cryptographic system and need to be handled with extreme care. Loss of your private key can lead to irreversible loss of value. - -This guide contains a large number of keys, so it is important to understand the purpose of each key. [Read more about key management.](../validator-guide/key-management/summary.md) - -#### Unlocking - -Celo nodes store private keys encrypted on disk with a password, and need to be "unlocked" before use. Private keys can be unlocked in two ways: - -1. By running the `celocli account:unlock` command. Note that the node must have the "personal" RPC API enabled in order for this command to work. -2. By setting the `--unlock` flag when starting the node. - -It is important to note that when a key is unlocked you need to be particularly careful about enabling access to the node's RPC APIs. - -### Environment variables - -There are a number of environment variables in this guide, and you may use this table as a reference. - -| Variable | Explanation | -| ------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | -| CELO_IMAGE | The Docker image used for the Validator and proxy containers | -| CELO_VALIDATOR_GROUP_ADDRESS | The account address for the Validator Group; the `ReleaseGold` beneficiary address for the Validator Group | -| CELO_VALIDATOR_ADDRESS | The account address for the Validator; the `ReleaseGold` beneficiary address for the Validator | -| CELO_VALIDATOR_GROUP_RG_ADDRESS | The `ReleaseGold` contract address for the Validator Group | -| CELO_VALIDATOR_RG_ADDRESS | The `ReleaseGold` contract address for the Validator | -| CELO_VALIDATOR_GROUP_SIGNER_ADDRESS | The validator (group) signer address authorized by the Validator Group account. -| CELO_VALIDATOR_GROUP_SIGNER_SIGNATURE | The proof-of-possession of the Validator Group signer key | -| CELO_VALIDATOR_SIGNER_ADDRESS | The validator signer address authorized by the Validator Account -| CELO_VALIDATOR_SIGNER_PUBLIC_KEY | The ECDSA public key associated with the Validator signer address | -| CELO_VALIDATOR_SIGNER_SIGNATURE | The proof-of-possession of the Validator signer key | -| CELO_VALIDATOR_SIGNER_BLS_PUBLIC_KEY | The BLS public key for the Validator instance | -| CELO_VALIDATOR_SIGNER_BLS_SIGNATURE | A proof-of-possession of the BLS public key | -| CELO_VALIDATOR_GROUP_VOTE_SIGNER_ADDRESS | The address of the Validator Group vote signer | -| CELO_VALIDATOR_GROUP_VOTE_SIGNER_PUBLIC_KEY | The ECDSA public key associated with the Validator Group vote signer address | -| CELO_VALIDATOR_GROUP_VOTE_SIGNER_SIGNATURE | The proof-of-possession of the Validator Group vote signer key | -| CELO_VALIDATOR_VOTE_SIGNER_ADDRESS | The address of the Validator vote signer | -| CELO_VALIDATOR_VOTE_SIGNER_PUBLIC_KEY | The ECDSA public key associated with the Validator vote signer address | -| CELO_VALIDATOR_VOTE_SIGNER_SIGNATURE | The proof-of-possession of the Validator vote signer key | -| PROXY_ENODE | The enode address for the Validator proxy | -| PROXY_INTERNAL_IP | (Optional) The internal IP address over which your Validator can communicate with your proxy | -| PROXY_EXTERNAL_IP | The external IP address of the proxy. May be used by the Validator to communicate with the proxy if PROXY_INTERNAL_IP is unspecified | -| CELO_ATTESTATION_SIGNER_ADDRESS | The address of the attestation signer authorized by the Validator Account | -| CELO_ATTESTATION_SIGNER_SIGNATURE | The proof-of-possession of the attestation signer key | -| CELO_ATTESTATION_SERVICE_URL | The URL to access the deployed Attestation Service | -| METADATA_URL | The URL to access the metadata file for your Attestation Service | -| DATABASE_URL | The URL under which your database is accessible, currently supported are `postgres://`, `mysql://` and `sqlite://` | -| SMS_PROVIDERS | A comma-separated list of providers you want to configure, Celo currently supports `nexmo` & `twilio` | - -## Network Deployment Timeline - -The setup of mainnet is similar to the new Baklava network and the deployment timeline is as follows (all dates are subject to change): - -Done: -* 4/19 00:00 UTC: Docker image with genesis block distributed -* 4/19 - 4/22: Infrastructure setup -* 4/22 16:00 UTC: Block production begins -* 4/22: Celo Core Contracts and `ReleaseGold` contracts are deployed -* 4/27: Governance proposals submitted to unfreeze validator elections and validator epoch rewards -* 5/1: Elections and validator rewards enabled if governance proposals pass; validators have been registered and affiliated with a Validator Group for first election -* 5/14: Governance proposals submitted to enable voter rewards and enable CELO transfers -* 5/18: RC1 is declared Mainnet and CELO transfers are enabled, if governance proposals pass - -Upcoming: -* ~5/25: Deployment of CELO/USD Oracles -* ~5/31: Governance proposal submitted to unfreeze stability protocol -* ~6/3: Stability protocol goes live if governance proposal passes - -{% hint style="info" %} -A [timeline](https://forum.celo.org/t/release-candidate-1-rc1-timeline-and-details/428) of the Release Candidate 1 and Mainnet networks is available to provide further context. -{% endhint %} - -## Validator Node Setup - -This section outlines the steps needed to configure your Proxy and Validator nodes so that they are ready to sign blocks once elected. - -### Environment Variables - -First we are going to set up the main environment variables related to the mainnet network. Run these on both your **Validator** and **Proxy** machines: - -```bash -export CELO_IMAGE=us.gcr.io/celo-org/geth:mainnet -``` - -### Pull the Celo Docker image - -In all the commands we are going to see the `CELO_IMAGE` variable to refer to the Docker image to use. Now we can get the Docker image on your Validator and Proxy machines: - -```bash -docker pull $CELO_IMAGE -``` - -#### Account Creation (For non-ReleaseGold) -{% hint style="info" %} -Please complete this section if you are new to validating on Celo. -{% endhint %} - -If you're a new validator, then you are going to follow the non-ReleaseGold flow method for this step to create your account keys. - -##### Account and Signer keys - -Running a Celo Validator node requires the management of several different keys, each with different privileges. Keys that need to be accessed frequently (e.g. for signing blocks) are at greater risk of being compromised, and thus have more limited permissions, while keys that need to be accessed infrequently (e.g. for locking CELO) are less onerous to store securely, and thus have more expansive permissions. Below is a summary of the various keys that are used in the Celo network, and a description of their permissions. - -| Name of the key | Purpose | -| ---------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| Account key | This is the key with the highest level of permissions, and is thus the most sensitive. It can be used to lock and unlock CELO, and authorize vote, validator, and attestation keys. Note that the account key also has all of the permissions of the other keys. | -| Validator signer key | This is the key that has permission to register and manage a Validator or Validator Group, and participate in BFT consensus. | -| Vote signer key | This key can be used to vote in Validator elections and on-chain governance. | -| Attestation signer key | This key is used to sign attestations in Celo's lightweight identity protocol. | - -Note that Account and all the signer keys must be unique and may not be reused. - -##### Generating Validator and Validator Group Keys - -First, you'll need to generate account keys for your Validator and Validator Group. - -{% hint style="danger" %} -These keys will control your locked CELO, and thus should be handled with care. -Store and back these keys up in a secure manner, as there will be no way to recover them if lost or stolen. -{% endhint %} - -```bash -# On your local machine -mkdir celo-accounts-node -cd celo-accounts-node -docker run -v $PWD:/root/.celo --rm -it $CELO_IMAGE account new -docker run -v $PWD:/root/.celo --rm -it $CELO_IMAGE account new -``` - -This will create a new keystore in the current directory with two new accounts. -Copy the addresses from the terminal and set the following environment variables: -```bash -# On your local machine -export CELO_VALIDATOR_GROUP_ADDRESS= -export CELO_VALIDATOR_ADDRESS= -``` - -### Start your Accounts node - -Next, we'll run a node on your local machine so that we can use these accounts to lock CELO and authorize the keys needed to run your validator. To do this, we need to run the following command to run the node. - -```bash -# On your local machine -mkdir celo-accounts-node -cd celo-accounts-node -docker run --name celo-accounts -it --restart always --stop-timeout 300 -p 127.0.0.1:8545:8545 -v $PWD:/root/.celo $CELO_IMAGE --verbosity 3 --syncmode full --rpc --rpcaddr 0.0.0.0 --rpcapi eth,net,web3,debug,admin,personal --datadir /root/.celo -``` - -{% hint style="danger" %} -**Security**: The command line above includes the parameter `--rpcaddr 0.0.0.0` which makes the Celo Blockchain software listen for incoming RPC requests on all network adaptors. Exercise extreme caution in doing this when running outside Docker, as it means that any unlocked accounts and their funds may be accessed from other machines on the Internet. In the context of running a Docker container on your local machine, this together with the `docker -p 127.0.0.1:localport:containerport` flags allows you to make RPC calls from outside the container, i.e from your local host, but not from outside your machine. Read more about [Docker Networking](https://docs.docker.com/network/network-tutorial-standalone/#use-user-defined-bridge-networks) here. -{% endhint %} - -### Deploy a Validator Machine -To actually register as a validator, we'll need to generate a validating signer key. On your Validator machine (which should not be accessible from the public internet), follow very similar steps: - -```bash -# On the validator machine -# Note that you have to export $CELO_IMAGE on this machine -export CELO_IMAGE=us.gcr.io/celo-org/geth:mainnet -mkdir celo-validator-node -cd celo-validator-node -docker run -v $PWD:/root/.celo --rm -it $CELO_IMAGE account new -export CELO_VALIDATOR_SIGNER_ADDRESS= -``` -#### Proof-of-Possession (Non-ReleaseGold Step) -{% hint style="info" %} -Please complete this step if you are running a validator on Celo for the first time. -{% endhint %} - -In order to authorize our Validator signer, we need to create a proof that we have possession of the Validator signer private key. We do so by signing a message that consists of the Validator account address. To generate the proof-of-possession, run the following command: -```bash -# On the validator machine -# Note that you have to export CELO_VALIDATOR_ADDRESS on this machine -export CELO_VALIDATOR_ADDRESS= -docker run -v $PWD:/root/.celo --rm -it $CELO_IMAGE account proof-of-possession $CELO_VALIDATOR_SIGNER_ADDRESS $CELO_VALIDATOR_ADDRESS -``` - -Save the signer address, public key, and proof-of-possession signature to your local machine: -```bash -# On your local machine -export CELO_VALIDATOR_SIGNER_ADDRESS= -export CELO_VALIDATOR_SIGNER_SIGNATURE= -export CELO_VALIDATOR_SIGNER_PUBLIC_KEY= -``` - -Validators on the Celo network use BLS aggregated signatures to create blocks in addition to the Validator signer (ECDSA) key. While an independent BLS key can be specified, the simplest thing to do is to derive the BLS key from the Validator signer key. When we register our Validator, we'll need to prove possession of the BLS key as well, which can be done by running the following command: -```bash -# On the validator machine -docker run -v $PWD:/root/.celo --rm -it $CELO_IMAGE account proof-of-possession $CELO_VALIDATOR_SIGNER_ADDRESS $CELO_VALIDATOR_ADDRESS --bls -``` - -Save the resulting signature and public key to your local machine: - -```bash -# On your local machine -export CELO_VALIDATOR_SIGNER_BLS_SIGNATURE= -export CELO_VALIDATOR_SIGNER_BLS_PUBLIC_KEY= -``` - -We'll get back to this machine later, but for now, let's give it a proxy. - -### Deploy a proxy - -```bash -# On the proxy machine -mkdir celo-proxy-node -cd celo-proxy-node -export CELO_VALIDATOR_SIGNER_ADDRESS= -``` - -You can then run the proxy with the following command. Be sure to replace `` with the name you'd like to appear on Celostats. The validator name shown in [Celostats](https://stats.celo.org/) will be the name configured in the proxy. - -Additionally, you need to unlock the account configured in the `etherbase` option. It is recommended to create a new account and independent account only for this purpose. Be sure to write a new password to `./.password` for this account (different to the Validator Signer password) - -```bash -# On the proxy machine -# First, we create a new account for the proxy -docker run --name celo-proxy-password -it --rm -v $PWD:/root/.celo $CELO_IMAGE account new --password /root/.celo/.password -``` - -Notice the public address returned by this command, that can be exported and used for running the proxy node: - -```bash -# On the proxy machine -export PROXY_ADDRESS= -docker run --name celo-proxy -it --restart unless-stopped --stop-timeout 300 -p 30303:30303 -p 30303:30303/udp -p 30503:30503 -p 30503:30503/udp -v $PWD:/root/.celo $CELO_IMAGE --verbosity 3 --nousb --syncmode full --proxy.proxy --proxy.proxiedvalidatoraddress $CELO_VALIDATOR_SIGNER_ADDRESS --proxy.internalendpoint :30503 --etherbase $PROXY_ADDRESS --unlock $PROXY_ADDRESS --password /root/.celo/.password --allow-insecure-unlock --light.serve 0 --datadir /root/.celo --celostats=@stats-server.celo.org -``` - -Hint: If you are running into trouble peering with the full nodes, one of the first things to check is whether your container's ports are properly configured (i.e. specifically, `-p 30303:30303 -p 30303:30303/udp` - which is set in the proxy node's command, but not the account node's command). - -{% hint style="info" %} -You can detach from the running container by pressing `ctrl+p ctrl+q`, or start it with `-d` instead of `-it` to start detached. Access the logs for a container in the background with the `docker logs` command. -{% endhint %} - -**NOTES** -* For the proxy to be able to send stats to [Celostats](https://stats.celo.org/), both the proxy and the validator should set the `celostats` flag -* If you are deploying multiple proxies for the same validator, the `celostats` flag should be added in only one of them - -### Get your Proxy's connection info - -Once the Proxy is running, we will need to retrieve its enode and IP address so that the Validator will be able to connect to it. - -```bash -# On the proxy machine, retrieve the proxy enode -docker exec celo-proxy geth --exec "admin.nodeInfo['enode'].split('//')[1].split('@')[0]" attach | tr -d '"' -``` - -Now we need to set the Proxy enode and Proxy IP address in environment variables on the Validator machine. - -If you don't have an internal IP address over which the Validator and Proxy can communicate, you can set the internal IP address to the external IP address. - -If you don't know your proxy's external IP address, you can get it by running the following command: - -```bash -# On the proxy machine -dig +short myip.opendns.com @resolver1.opendns.com -``` - -Then, export the variables on your Validator machine. - -```bash -# On the Validator machine -export PROXY_ENODE= -export PROXY_EXTERNAL_IP= -export PROXY_INTERNAL_IP= -``` - -You will also need to export `PROXY_EXTERNAL_IP` on your local machine. - -```bash -# On your local machine -export PROXY_EXTERNAL_IP= -``` - -### Connect the Validator to the Proxy - -When your Validator starts up it will attempt to create a network connection with the proxy machine. You will need to make sure that your proxy machine has the appropriate firewall settings to allow the Validator to connect to it. - -Specifically, on the proxy machine, port 30303 should allow TCP and UDP connections from all IP addresses. And port 30503 should allow TCP connections from the IP address of your Validator machine. - -Test that your network is configured correctly by running the following commands: - -```bash -# On your local machine, test that your proxy is accepting TCP connections over port 30303. -# Note that it will also need to be accepting UDP connections over this port. -nc -vz $PROXY_EXTERNAL_IP 30303 -``` - -```bash -# On your Validator machine, test that your proxy is accepting TCP connections over port 30503. -nc -vz $PROXY_INTERNAL_IP 30503 -``` - -Once that is completed, go ahead and run the Validator. Be sure to write your Validator signer password to `./.password` for the following command to work, or provide your password another way. - -```bash -# On the Validator machine -cd celo-validator-node -docker run --name celo-validator -it --restart unless-stopped --stop-timeout 300 -p 30303:30303 -p 30303:30303/udp -v $PWD:/root/.celo $CELO_IMAGE --verbosity 3 --syncmode full --mine --etherbase $CELO_VALIDATOR_SIGNER_ADDRESS --nodiscover --nousb --proxy.proxied --proxy.proxyenodeurlpairs=enode://$PROXY_ENODE@$PROXY_INTERNAL_IP:30503\;enode://$PROXY_ENODE@$PROXY_EXTERNAL_IP:30303 --unlock=$CELO_VALIDATOR_SIGNER_ADDRESS --password /root/.celo/.password --light.serve 0 --celostats=@stats-server.celo.org -``` - -At this point your Validator and Proxy machines should be configured, and both should be syncing to the network. You should see `Imported new chain segment` in your node logs, about once every 5 seconds once the node is synced to the latest block which you can find on the [Network Stats](https://stats.celo.org) page. - -{% hint style="info" %} -You can run multiple proxies by deploying additional proxies per the instructions in the [Deploy a proxy](running-a-validator-in-mainnet.md#deploy-a-proxy) section. Then add all of the proxies' enodes as a comma seperated list using the `--proxy.proxyenodeurlpairs` option. E.g. if there are two proxies, that option's usage would look like `--proxy.proxyenodeurlpairs=enode://$PROXY_ENODE_1@$PROXY_INTERNAL_IP_1:30503\;enode://$PROXY_ENODE_1@$PROXY_EXTERNAL_IP_1:30303,enode://$PROXY_ENODE_2@$PROXY_INTERNAL_IP_2:30503\;enode://$PROXY_ENODE_2@$PROXY_EXTERNAL_IP_2:30303` -{% endhint %} - -## Registering as a Validator (ReleaseGold Registration) - -In order to operate as a Validator, you must register on-chain and be elected. Elections will run on each epoch boundary, approximatly every 24 hours, after elections have been unfrozen by on-chain governance. Eligible validator groups will be considered in an Election mechanism that will select Validator based on the [D'Hondt method](https://en.wikipedia.org/wiki/D%27Hondt_method). - -In the following steps, this guide will assume your CELO is held in a `ReleaseGold` contract, if this is not the case, the commands will need to be adjusted. At a high level, `ReleaseGold` holds a balance for scheduled release, while allowing the held balance to be used for certain actions such as validating and voting, depending on the configuration of the contract. [Read more about `ReleaseGold`.](../celo-holder-guide/release-gold.md) - -**Once elections are running, the genesis validators will be replaced by the elected validators, so it is important to register and vote even if you are in the genesis set.** - -The following sections outline the actions you will need to take. On a high level, you will: - -- Create Accounts and lock up the balance of each `ReleaseGold` contract -- Register a Validator -- Register a Validator Group -- Add the registered Validator to the Validator Group -- Vote for the group with funds from each `ReleaseGold` contract - -### Create Accounts from the `ReleaseGold` contracts - -In order to participate on the network (lock gold, vote, validate) from a `ReleaseGold` contract, we need to create a registered Account with the address of the `ReleaseGold` contract. - -```bash -# On your local machine -export CELO_VALIDATOR_GROUP_RG_ADDRESS= -export CELO_VALIDATOR_RG_ADDRESS= -``` - -Show the configuration and balance of your `ReleaseGold` contracts: - -```bash -# On your local machine -celocli releasegold:show --contract $CELO_VALIDATOR_GROUP_RG_ADDRESS -celocli releasegold:show --contract $CELO_VALIDATOR_RG_ADDRESS -``` - -{% hint style="info" %} -When running the following commands, the Beneficiary keys should be [unlocked](#unlocking). -{% endhint %} - -Create a registered Account for each of the Validator and Validator Group's `ReleaseGold` contracts: - -```bash -# On your local machine -celocli releasegold:create-account --contract $CELO_VALIDATOR_GROUP_RG_ADDRESS -celocli releasegold:create-account --contract $CELO_VALIDATOR_RG_ADDRESS -``` - -By running the following commands, you can see that the `ReleaseGold` contract addresses are now also associated with a registered Account. - -```bash -# On your local machine -celocli account:show $CELO_VALIDATOR_GROUP_RG_ADDRESS -celocli account:show $CELO_VALIDATOR_RG_ADDRESS -``` - -Lock CELO from your `ReleaseGold` contracts to fulfill the lock-up requirements to register a Validator and Validator Group. The current requirement is any value equal or greater than 10,000 CELO to register a Validator, and any value equal or greater than 10,000 CELO _per member validator_ to register a Validator Group. Here we lock up 10000 CELO for each. - -```bash -celocli releasegold:locked-gold --contract $CELO_VALIDATOR_GROUP_RG_ADDRESS --action lock --value 10000e18 -celocli releasegold:locked-gold --contract $CELO_VALIDATOR_RG_ADDRESS --action lock --value 10000e18 -``` - -Check that your CELO was successfully locked with the following commands: - -```bash -# On your local machine -celocli lockedgold:show $CELO_VALIDATOR_GROUP_RG_ADDRESS -celocli lockedgold:show $CELO_VALIDATOR_RG_ADDRESS -``` - -### Register as a Validator - -In order to perform Validator actions with the Account created in the previous step, you will need to authorize a [Validator signer](../validator-guide/key-management/detailed.md#authorized-validator-signers) for the `ReleaseGold` contract account. - -```bash -# On the Validator machine -export CELO_VALIDATOR_RG_ADDRESS= -export CELO_VALIDATOR_SIGNER_ADDRESS= -docker run -v $PWD:/root/.celo --rm -it $CELO_IMAGE --nousb account proof-of-possession $CELO_VALIDATOR_SIGNER_ADDRESS $CELO_VALIDATOR_RG_ADDRESS -``` - -Save the signer address, public key, and proof-of-possession signature to your local machine: - -```bash -# On your local machine -export CELO_VALIDATOR_SIGNER_ADDRESS= -export CELO_VALIDATOR_SIGNER_SIGNATURE= -export CELO_VALIDATOR_SIGNER_PUBLIC_KEY= -``` - -Validators on the Celo network use BLS aggregated signatures to create blocks in addition to the Validator signer (ECDSA) key. While an independent BLS key can be specified, the simplest thing to do is to derive the BLS key from the Validator signer. When we register our Validator, we'll need to prove possession of the BLS key as well, which can be done by running the following command. - -If you were part of the genesis validator set, you will have already generated this key and submitted it via Gist. Note that if you are planning to run more than one validator, each validator will need a distinct BLS key. - -```bash -# On the Validator machine -docker run -v $PWD:/root/.celo --rm -it $CELO_IMAGE --nousb account proof-of-possession $CELO_VALIDATOR_SIGNER_ADDRESS $CELO_VALIDATOR_RG_ADDRESS --bls -``` - -Save the resulting signature and public key to your local machine: - -```bash -# On your local machine -export CELO_VALIDATOR_SIGNER_BLS_SIGNATURE= -export CELO_VALIDATOR_SIGNER_BLS_PUBLIC_KEY= -``` - -In order to validate we need to authorize the Validator signer: - -```bash -# On your local machine -celocli releasegold:authorize --contract $CELO_VALIDATOR_RG_ADDRESS --role validator --signature 0x$CELO_VALIDATOR_SIGNER_SIGNATURE --signer $CELO_VALIDATOR_SIGNER_ADDRESS --blsKey $CELO_VALIDATOR_SIGNER_BLS_PUBLIC_KEY --blsPop $CELO_VALIDATOR_SIGNER_BLS_SIGNATURE -``` - -{% hint style="info" %} The first time you authorize a validator signer for a ReleaseGold account the signer address is funded 1 CELO to cover tx fees. Any subsequent validator signers you authorize will not be funded. {% endhint %} - -Using the newly authorized Validator signer, register a validator on behalf of the registered Account: - -{% hint style="info" %} -Running the following command requires the keys for the validator signer address. This command can be run on the validator machine, or if the keys are also available on your local machine, it can be run there. -{% endhint %} - -```bash -# On a machine with CELO_VALIDATOR_SIGNER_ADDRESS unlocked. -celocli validator:register --blsKey $CELO_VALIDATOR_SIGNER_BLS_PUBLIC_KEY --blsSignature $CELO_VALIDATOR_SIGNER_BLS_SIGNATURE --ecdsaKey $CELO_VALIDATOR_SIGNER_PUBLIC_KEY --from $CELO_VALIDATOR_SIGNER_ADDRESS -``` - -You can view information about your Validator by running the following command: - -```bash -# On your local machine -celocli validator:show $CELO_VALIDATOR_RG_ADDRESS -``` - -### Register as a Validator Group - -In order to register a Validator Group, you will need to authorize a validator (group) signer on behalf of the `ReleaseGold` registered Account. In these steps you will create a new key on your local machine for this purpose. - -```bash -# On your local machine -docker run -v $PWD:/root/.celo --rm -it $CELO_IMAGE account new -``` - -And save this new address: - -```bash -export CELO_VALIDATOR_GROUP_SIGNER_ADDRESS= -``` - -In order to authorize our Validator Group signer, we need to create a proof that we have possession of the Validator Group signer private key. We do so by signing a message that consists of the authorizing registered Account address, in this case, the `ReleaseGold` contract address. - -To generate the proof-of-possession, run the following command: - -```bash -# On your local machine -docker run -v $PWD:/root/.celo --rm -it $CELO_IMAGE --nousb account proof-of-possession $CELO_VALIDATOR_GROUP_SIGNER_ADDRESS $CELO_VALIDATOR_GROUP_RG_ADDRESS -``` - -Save the signer address, public key, and proof-of-possession signature to your local machine: - -```bash -export CELO_VALIDATOR_GROUP_SIGNER_SIGNATURE= -``` - -Authorize your Validator Group signer: - -```bash -# On your local machine -celocli releasegold:authorize --contract $CELO_VALIDATOR_GROUP_RG_ADDRESS --role validator --signature 0x$CELO_VALIDATOR_GROUP_SIGNER_SIGNATURE --signer $CELO_VALIDATOR_GROUP_SIGNER_ADDRESS -``` - -With this newly authorized signer, you can register a Validator Group on behalf of the regsitered Account: - -```bash -# On your local machine -celocli validatorgroup:register --from $CELO_VALIDATOR_GROUP_SIGNER_ADDRESS --commission 0.1 -``` - -You can view information about your Validator Group by running the following command: - -```bash -# On your local machine -celocli validatorgroup:show $CELO_VALIDATOR_GROUP_RG_ADDRESS -``` - -### Affiliate the Validator with the group - -Now that the Validator and the group are registered, you can affiliate the Validator with the group, indicating that Validator's desire to join the group. - -```bash -# On the Validator machine -celocli validator:affiliate $CELO_VALIDATOR_GROUP_RG_ADDRESS --from $CELO_VALIDATOR_SIGNER_ADDRESS -``` - -The Validator Group can then accept the Validator as a member: - -```bash -# On your local machine -celocli validatorgroup:member --accept $CELO_VALIDATOR_RG_ADDRESS --from $CELO_VALIDATOR_GROUP_SIGNER_ADDRESS -``` - -Verify that your Validator is now a member of your Validator Group: - -```bash -# On your local machine -celocli validator:show $CELO_VALIDATOR_RG_ADDRESS -celocli validatorgroup:show $CELO_VALIDATOR_GROUP_RG_ADDRESS -``` - -### Vote in the Election - -In order to get elected as a Validator, you will need to use the balance of your `ReleaseGold` contracts to vote for your group. - -#### Authorize vote signer - -In order to vote on behalf of the `ReleaseGold` registered Accounts you will need to authorize vote signers. - -Create the vote signer keys: - -```bash -# On your local machine -docker run -v $PWD:/root/.celo --rm -it $CELO_IMAGE account new -export CELO_VALIDATOR_VOTE_SIGNER_ADDRESS= - -docker run -v $PWD:/root/.celo --rm -it $CELO_IMAGE account new -export CELO_VALIDATOR_GROUP_VOTE_SIGNER_ADDRESS= -``` - -Produce the proof-of-possessions needed to authorize the vote signers: - -```bash -# On your local machine -docker run -v $PWD:/root/.celo --rm -it $CELO_IMAGE --nousb account proof-of-possession $CELO_VALIDATOR_VOTE_SIGNER_ADDRESS $CELO_VALIDATOR_RG_ADDRESS -export CELO_VALIDATOR_VOTE_SIGNER_SIGNATURE= - -docker run -v $PWD:/root/.celo --rm -it $CELO_IMAGE --nousb account proof-of-possession $CELO_VALIDATOR_GROUP_VOTE_SIGNER_ADDRESS $CELO_VALIDATOR_GROUP_RG_ADDRESS -export CELO_VALIDATOR_GROUP_VOTE_SIGNER_SIGNATURE= -``` - -Authorize the vote signing keys: - -```bash -# On your local machine -celocli releasegold:authorize --contract $CELO_VALIDATOR_RG_ADDRESS --role vote --signature 0x$CELO_VALIDATOR_VOTE_SIGNER_SIGNATURE --signer $CELO_VALIDATOR_VOTE_SIGNER_ADDRESS -celocli releasegold:authorize --contract $CELO_VALIDATOR_GROUP_RG_ADDRESS --role vote --signature 0x$CELO_VALIDATOR_GROUP_VOTE_SIGNER_SIGNATURE --signer $CELO_VALIDATOR_GROUP_VOTE_SIGNER_ADDRESS -``` - -#### Submit your votes - -Now the newly authorized vote signers can be used to vote for your validator group: - -```bash -# On your local machine -celocli election:vote --from $CELO_VALIDATOR_VOTE_SIGNER_ADDRESS --for $CELO_VALIDATOR_GROUP_RG_ADDRESS --value 10000e18 -celocli election:vote --from $CELO_VALIDATOR_GROUP_VOTE_SIGNER_ADDRESS --for $CELO_VALIDATOR_GROUP_RG_ADDRESS --value 10000e18 -``` - -Verify that your votes were cast successfully: - -```bash -# On your local machine -celocli election:show $CELO_VALIDATOR_GROUP_RG_ADDRESS --group -celocli election:show $CELO_VALIDATOR_GROUP_RG_ADDRESS --voter -celocli election:show $CELO_VALIDATOR_RG_ADDRESS --voter -``` - -Users in the Celo protocol receive epoch rewards for voting in Validator Elections only after submitting a special transaction to enable rewards. This must be done every time new votes are cast, and can only be made after the most recent epoch has ended. For convenience, we can use the following command, which will wait until the epoch has ended before sending a transaction: - -{% hint style="info" %} -Epoch lengths in the mainnet network are set to be the number of blocks produced in a day. As a result, votes may need to be activated up to 24 hours after they are cast. -{% endhint %} - -```bash -# On your local machine -# Note that this command will wait for the next epoch transition, which may be up to 24 hours in the future. -celocli election:activate --from $CELO_VALIDATOR_VOTE_SIGNER_ADDRESS --wait && celocli election:activate --from $CELO_VALIDATOR_GROUP_VOTE_SIGNER_ADDRESS --wait -``` - -Check that your votes were activated by re-running the following commands: - -```bash -# On your local machine -celocli election:show $CELO_VALIDATOR_GROUP_RG_ADDRESS --voter -celocli election:show $CELO_VALIDATOR_RG_ADDRESS --voter -``` - -If your Validator Group elects validators, you will receive epoch rewards in the form of additional Locked Gold voting for your Validator Group. You can see these rewards accumulate with the commands in the previous set, as well as: - -```bash -# On your local machine -celocli lockedgold:show $CELO_VALIDATOR_GROUP_RG_ADDRESS -celocli lockedgold:show $CELO_VALIDATOR_RG_ADDRESS -``` - -You're all set! Elections are finalized at the end of each epoch, roughly once a day in the Mainnet network. If you get elected, your node will start participating in BFT consensus and validating blocks. After the first epoch in which your Validator participates in BFT, you should receive your first set of epoch rewards. - -You can inspect the current state of the Validator elections by running: - -```bash -# On your local machine -celocli election:list -``` - -You can check the status of your Validator, including whether it is elected and signing blocks, at [stats.celo.org/](https://stats.celo.org/) or by running: - -```bash -# On your local machine -celocli validator:status --validator $CELO_VALIDATOR_RG_ADDRESS -``` - -You can see additional information about your Validator, including uptime score, by running: - -```bash -# On your local machine -celocli validator:show $CELO_VALIDATOR_RG_ADDRESS -``` - -## Registering as a Validator (Non-ReleaseGold) - -If you are new to validating on Mainnet, then you most likely need to be following the Non-ReleaseGold steps for getting your validator up and running. ReleaseGold is done in the previous section and only concerns those who are generating accounts with ReleaseGold smart contract. - -### Register the Accounts - -You've now done all the infrastructure setup to get a validator and proxy running. To run a validator on Mainnet, you must lock CELO to participate in block production. Once you have CELO in you validator and validation group accounts, you can view their balances: - -```bash -# On your local machine -celocli account:balance $CELO_VALIDATOR_GROUP_ADDRESS -celocli account:balance $CELO_VALIDATOR_ADDRESS -``` - -You can also look at an account's current balance and transaction history on [Celo Explorer](https://explorer.celo.org/). Enter the address into the search bar. - -Once these accounts have a balance, unlock them so that we can sign transactions. Then, we will register the accounts with the Celo core smart contracts: - -```bash -# On your local machine -celocli account:unlock $CELO_VALIDATOR_GROUP_ADDRESS -celocli account:unlock $CELO_VALIDATOR_ADDRESS -celocli account:register --from $CELO_VALIDATOR_GROUP_ADDRESS --name -celocli account:register --from $CELO_VALIDATOR_ADDRESS --name -``` - -Check that your accounts were registered successfully with the following commands: - -```bash -# On your local machine -celocli account:show $CELO_VALIDATOR_GROUP_ADDRESS -celocli account:show $CELO_VALIDATOR_ADDRESS` -``` - -### Lock up CELO - -Lock up CELO for both accounts in order to secure the right to register a Validator and Validator Group. The current requirement is 10,000 CELO to register a validator, and 10,000 CELO _per member validator_ to register a Validator Group. For Validators, this gold remains locked for approximately 60 days following deregistration. For groups, this gold remains locked for approximately 60 days following the removal of the Nth validator from the group. - -```bash -# On your local machine -celocli lockedgold:lock --from $CELO_VALIDATOR_GROUP_ADDRESS --value 10000000000000000000000 -celocli lockedgold:lock --from $CELO_VALIDATOR_ADDRESS --value 10000000000000000000000 -``` - -This amount (10,000 CELO) represents the minimum amount needed to be locked in order to register a Validator and Validator group. **Note that you will want to be sure to leave enough CELO unlocked to be able to continue to pay transaction fees for future transactions (such as those issued by running some CLI commands)**. - -Check that your CELO was successfully locked with the following commands: - -```bash -# On your local machine -celocli lockedgold:show $CELO_VALIDATOR_GROUP_ADDRESS -celocli lockedgold:show $CELO_VALIDATOR_ADDRESS -``` - -### Run for election - -In order to be elected as a Validator, you will first need to register your group and Validator. Note that when registering a Validator Group, you need to specify a [commission](../celo-codebase/protocol/proof-of-stake/validator-groups.md#group-share), which is the fraction of epoch rewards paid to the group by its members. - -We don't want to use our account key for validating, so first let's authorize the validator signing key: - -```bash -# On your local machine -celocli account:authorize --from $CELO_VALIDATOR_ADDRESS --role validator --signature 0x$CELO_VALIDATOR_SIGNER_SIGNATURE --signer 0x$CELO_VALIDATOR_SIGNER_ADDRESS -``` - -Confirm by checking the authorized Validator signer for your Validator: - -```bash -# On your local machine -celocli account:show $CELO_VALIDATOR_ADDRESS -``` - -Then, register your Validator Group by running the following command. Note that because we did not authorize a Validator signer for our Validator Group account, we register the Validator Group with the account key. - -```bash -# On your local machine -celocli validatorgroup:register --from $CELO_VALIDATOR_GROUP_ADDRESS --commission 0.1 -``` - -You can view information about your Validator Group by running the following command: - -```bash -# On your local machine -celocli validatorgroup:show $CELO_VALIDATOR_GROUP_ADDRESS -``` - -Next, register your Validator by running the following command. Note that because we have authorized a Validator signer, this step could also be performed on the Validator machine. Running it on the local machine allows us to avoid needing to install the [`celocli`](https://docs.celo.org/command-line-interface/introduction) on the Validator machine. - -```bash -# On your local machine -celocli validator:register --from $CELO_VALIDATOR_ADDRESS --ecdsaKey $CELO_VALIDATOR_SIGNER_PUBLIC_KEY --blsKey $CELO_VALIDATOR_SIGNER_BLS_PUBLIC_KEY --blsSignature $CELO_VALIDATOR_SIGNER_BLS_SIGNATURE -``` - -Affiliate your Validator with your Validator Group. Note that you will not be a member of this group until the Validator Group accepts you. This command could also be run from the Validator signer, if running on the validator machine. - -```bash -# On your local machine -celocli validator:affiliate $CELO_VALIDATOR_GROUP_ADDRESS --from $CELO_VALIDATOR_ADDRESS -``` - -Accept the affiliation: - -```bash -# On your local machine -celocli validatorgroup:member --accept $CELO_VALIDATOR_ADDRESS --from $CELO_VALIDATOR_GROUP_ADDRESS -``` - -Next, double check that your Validator is now a member of your Validator Group: - -```bash -# On your local machine -celocli validator:show $CELO_VALIDATOR_ADDRESS -celocli validatorgroup:show $CELO_VALIDATOR_GROUP_ADDRESS -``` - -Use both accounts to vote for your Validator Group. Note that because we have not authorized a vote signer for either account, these transactions must be sent from the account keys. - -```bash -# On your local machine -celocli election:vote --from $CELO_VALIDATOR_ADDRESS --for $CELO_VALIDATOR_GROUP_ADDRESS --value 10000000000000000000000 -celocli election:vote --from $CELO_VALIDATOR_GROUP_ADDRESS --for $CELO_VALIDATOR_GROUP_ADDRESS --value 10000000000000000000000 -``` - -Double check that your votes were cast successfully: - -```bash -# On your local machine -celocli election:show $CELO_VALIDATOR_GROUP_ADDRESS --group -celocli election:show $CELO_VALIDATOR_GROUP_ADDRESS --voter -celocli election:show $CELO_VALIDATOR_ADDRESS --voter -``` - -Users in the Celo protocol receive epoch rewards for voting in Validator Elections only after submitting a special transaction to enable them. This must be done every time new votes are cast, and can only be made after the most recent epoch has ended. For convenience, we can use the following command, which will wait until the epoch has ended before sending a transaction: - -```bash -# On your local machine -# Note that this may take some time, as the epoch needs to end before votes can be activated -celocli election:activate --from $CELO_VALIDATOR_ADDRESS --wait && celocli election:activate --from $CELO_VALIDATOR_GROUP_ADDRESS --wait -``` - -Check that your votes were activated by re-running the following commands: - -```bash -# On your local machine -celocli election:show $CELO_VALIDATOR_GROUP_ADDRESS --voter -celocli election:show $CELO_VALIDATOR_ADDRESS --voter -``` - -If your Validator Group elects validators, you will receive epoch rewards in the form of additional Locked CELO voting for your Validator Group from your account addresses. You can see these rewards accumulate with the commands in the previous set, as well as: - -```bash -# On your local machine -celocli lockedgold:show $CELO_VALIDATOR_GROUP_ADDRESS -celocli lockedgold:show $CELO_VALIDATOR_ADDRESS -``` - -You're all set! Elections are finalized at the end of each epoch, roughly once a day in the Mainnet network. After that hour, if you get elected, your node will start participating BFT consensus and validating blocks. After the first epoch in which your Validator participates in BFT, you should receive your first set of epoch rewards. - -You can inspect the current state of the validator elections by running: - -```bash -# On your local machine -celocli election:list -``` - -You can check the status of your validator, including whether it is elected and signing blocks, at [stats.celo.org](https://stats.celo.org/) or by running: - -```bash -celocli validator:status --validator $CELO_VALIDATOR_ADDRESS -``` - -You can see additional information about your validator, including uptime score, by running: - -```bash -# On your local machine -celocli validator:show $CELO_VALIDATOR_ADDRESS -``` - -## Running the Attestation Service - -Validators are expected to run an [Attestation Service](../validator-guide/attestation-service.md) to provide attestations that allow users to map their phone number to an account on Celo. Follow the instructions now to [set up the service](../validator-guide/attestation-service.md). - -## Deployment Tips - -### Running the Docker containers in the background - -There are different options for executing Docker containers in the background. The most typical one is to use in your docker run commands the `-d` option. Also for long running processes, especially when you run in on a remote machine, you can use a tool like [screen](https://ss64.com/osx/screen.html). It allows you to connect and disconnect from running processes providing an easy way to manage long running processes. - -It's out of the scope of this documentation to go through the `screen` options, but you can use the following command format with your `docker` commands: - -```bash -screen -S -d -m -``` - -For example: - -```bash -screen -S celo-validator -d -m docker run --name celo-validator -it --restart unless-stopped --stop-timeout 300 -p 127.0.0.1:8545:8545 ....... -``` - -You can list your existing `screen` sessions: - -```bash -screen -ls -``` - -And re-attach to any of the existing sessions: - -```bash -screen -r -S celo-validator -``` - -### Stopping containers - -You can stop the Docker containers at any time without problem. If you stop your containers that means those containers stop providing service. -The data directory of the Validator and the proxy are Docker volumes mounted in the containers from the `celo-*-dir` you created at the very beginning. So if you don't remove that folder, you can stop or restart the containers without losing any data. - -It is recommended to use the Docker stop timeout parameter `-t` when stopping the containers. This allows time, in this case 60 seconds, for the Celo nodes to flush recent chain data it keeps in memory into the data directories. Omitting this may cause your blockchain data to corrupt, requiring the node to start syncing from scratch. - -You can stop the `celo-validator` and `celo-proxy` containers running: - -```bash -docker stop celo-validator celo-proxy -t 60 -``` - -And you can remove the containers (not the data directory) by running: - -```bash -docker rm -f celo-validator celo-proxy -``` diff --git a/packages/docs/getting-started/using-metamask-with-celo/README.md b/packages/docs/getting-started/using-metamask-with-celo/README.md deleted file mode 100644 index cafcc79322b..00000000000 --- a/packages/docs/getting-started/using-metamask-with-celo/README.md +++ /dev/null @@ -1,32 +0,0 @@ -# Using MetaMask with Celo - -{% hint style="warning" %} -MetaMask is primarily used for interacting with the Ethereum blockchain, and does not natively support Celo compatibility. As such, we recommend only sophisticated users and developers use it, at your own risk. Please check out options for Celo native wallets [here](https://docs.celo.org/getting-started/wallets). -{% endhint %} - -{% hint style="danger" %} -Do not send ETH to your Celo address. Do not send CELO assets to your Ethereum address. -{% endhint %} - -[MetaMask](https://metamask.io/) is a crypto wallet that can be used in-browser and on mobile to interact with the Ethereum blockchain. Many dApps in the space integrate with MetaMask, and we're excited to bring its functionality to the Celo ecosystem. - -With the Celo network's [Donut Hardfork](https://github.com/celo-org/celo-proposals/blob/master/CIPs/cip-0027.md), which was activated on Mainnet on May 19th, 2021, the protocol now supports [Ethereum-compatible transactions](https://github.com/celo-org/celo-proposals/blob/master/CIPs/cip-0035.md). This means that users are now able to use MetaMask to interact with the Celo blockchain and dApp developers can more easily port over Ethereum dApps onto Celo. The following guide aims to detail step-by-step how to do that. - -## **Things to Keep in Mind** - -As mentioned above, MetaMask does not natively support Celo compatibility. Because of this, some features won't work perfectly; the following are some things to be aware of: - -### **Importing via Private Key** - -* Celo and Ethereum use different derivation paths for generating seed phrases. Because MetaMask does not let you specify a derivation path to use: - * You can't import an existing Celo account into the MetaMask wallet using its seed phrase, as you'd get the Ethereum version of it. Instead, you have to import it using the associated private key. - * Similarly, if you want to import the Celo account you made on MetaMask to a different Celo wallet \(e.g. [Valora](https://valoraapp.com/)\) you'd have to import it using the private key itself, NOT the seed phrase that MetaMask gives you. - * See these guides if you accidentally sent [ETH to CELO addresses](https://docs.celo.org/celo-owner-guide/celo-recovery) or [CELO to ETH addresses.](https://docs.celo.org/celo-owner-guide/eth-recovery)\*\*\*\* - -### Gas Fee Currency - -* While gas on Celo can usually be paid in [many different currencies](https://docs.celo.org/celo-codebase/protocol/transactions/erc20-transaction-fees), when using Metamask, gas fees will automatically be paid in CELO. This is because MetaMask will be using the [Ethereum-compatible Celo transaction format](https://github.com/celo-org/celo-proposals/blob/master/CIPs/cip-0035.md), which doesn't include the `feecurrency` field. - -### Logo - -* The MetaMask UI might show the ETH logo in places where it's meant to show the CELO logo or no logo at all. diff --git a/packages/docs/getting-started/using-metamask-with-celo/manual-setup.md b/packages/docs/getting-started/using-metamask-with-celo/manual-setup.md deleted file mode 100644 index 321225d681c..00000000000 --- a/packages/docs/getting-started/using-metamask-with-celo/manual-setup.md +++ /dev/null @@ -1,81 +0,0 @@ ---- -description: >- - Use this guide if you'd like to manually add in a Celo network to your - existing MetaMask wallet. If you're a dApp developer and want to do this - programmatically, go to the next page. ---- - -# Manual Setup - -## **Setup** - -Make sure to have MetaMask installed. See [here](https://metamask.io/download.html) to download. Then, follow the instructions to create an account. Make sure to save your seed phrase safely! - -## **Adding a Celo Network to MetaMask** - -1. Open MetaMask, click your profile image on the top right corner, and then click "Settings". Next, scroll down to "Networks" and click. Finally, press the "Add Network" button. -2. Fill in the following values depending on which Celo network you would like to connect to: Alfajores, Baklava, or Mainnet. - -{% tabs %} -{% tab title="Celo Mainnet" %} -```text - Network Name: Celo (Mainnet) - New RPC URL: https://forno.celo.org - Chain ID: 42220 - Currency Symbol (Optional): CELO - Block Explorer URL (Optional): https://explorer.celo.org -``` -{% endtab %} - -{% tab title="Alfajores Testnet" %} -```text - Network Name: Celo (Alfajores Testnet) - New RPC URL: https://alfajores-forno.celo-testnet.org - Chain ID: 44787 - Currency Symbol (Optional): CELO - Block Explorer URL (Optional): https://alfajores-blockscout.celo-testnet.org -``` -{% endtab %} - -{% tab title="Baklava Testnet" %} -```text - Network Name: Celo (Baklava Testnet) - New RPC URL: https://baklava-forno.celo-testnet.org - Chain ID: 62320 - Currency Symbol (Optional): CELO - Block Explorer URL (Optional): https://baklava-blockscout.celo-testnet.org -``` -{% endtab %} -{% endtabs %} - -3. Press "Save". The Celo network you just configured should now show up under MetaMask's "Networks" dropdown list. - -## **Adding Tokens \(e.g. cUSD, cEUR\)** - -1. From MetaMask's Home screen, click on "Add Token" in the "Assets" tab. -2. Click "Custom Token", and fill in the value for "Token Contract Address" for the token you'd like to add. The "Token Symbol" and "Decimals of Precision" should be filled in automatically. - -The following are examples for cUSD and cEUR. - -{% tabs %} -{% tab title="Celo Mainnet" %} -* Token Contract Address for cUSD: `0x765de816845861e75a25fca122bb6898b8b1282a` -* Token Contract Address for cEUR: `0xd8763cba276a3738e6de85b4b3bf5fded6d6ca73` -{% endtab %} - -{% tab title="Alfajores Testnet" %} -* Token Contract Address for cUSD: `0x874069fa1eb16d44d622f2e0ca25eea172369bc1` -* Token Contract Address for cEUR: `0x10c892a6ec43a53e45d0b916b4b7d383b1b78c0f` -{% endtab %} - -{% tab title="Baklava Testnet" %} -* Token Contract Address for cUSD: `0x62492A644A588FD904270BeD06ad52B9abfEA1aE` -* Token Contract Address for cEUR: `0xf9ecE301247aD2CE21894941830A2470f4E774ca` -{% endtab %} -{% endtabs %} - -3. Press "Next", then "Add Tokens". Now, you should be able to see your token in the home screen of your MetaMask wallet, under "Assets". - -{% hint style="info" %} -To double-check that the above values are up-to-date, please verify using the `celocli network:contracts` command \([see documentation](https://docs.celo.org/command-line-interface/commands/network#celocli-network-contracts)\). -{% endhint %} diff --git a/packages/docs/getting-started/using-metamask-with-celo/programmatic-setup.md b/packages/docs/getting-started/using-metamask-with-celo/programmatic-setup.md deleted file mode 100644 index 8a8f6e5bf7c..00000000000 --- a/packages/docs/getting-started/using-metamask-with-celo/programmatic-setup.md +++ /dev/null @@ -1,124 +0,0 @@ ---- -description: >- - See this guide if you're a dApp developer and want your users to use MetaMask - to interact with the Celo network. ---- - -# Programmatic Setup - -## **Summary** - -For dApp Developers interested in using MetaMask with Celo, we encourage doing the following 3 things, which are described in detail in the below sections. - -1. Add the Network -2. Add Celo tokens \(e.g. cUSD, cEUR\) -3. Handle cases where MetaMask is connected to a different network - -## **Adding a Celo Network to MetaMask** - -To add a Celo Network to your dApp, you can use MetaMask's RPC API's `wallet_addEthereumChain` method. \([See documentation](https://docs.metamask.io/guide/rpc-api.html#wallet-addethereumchain)\). - -Here is a JavaScript snippet you can use: - -```jsx - await window.ethereum.request({ - method: 'wallet_addEthereumChain', - params: [], - }); -``` - -Where it says `INSERT_NETWORK_PARAMS_HERE`, please replace with any of the following constants, depending on which network you'd like to connect to. - -{% tabs %} -{% tab title="Celo Mainnet" %} -```javascript -const CELO_PARAMS = { - chainId: '0xa4ec', - chainName: 'Celo', - nativeCurrency: { name: 'Celo', symbol: 'CELO', decimals: 18 }, rpcUrls: ['https://forno.celo.org'], - blockExplorerUrls: ['https://explorer.celo.org/'], - iconUrls: ['future'], - }; -``` -{% endtab %} - -{% tab title="Alfajores Testnet" %} -```javascript -const ALFAJORES_PARAMS = { - chainId: '0xaef3', - chainName: 'Alfajores Testnet', - nativeCurrency: { name: "Alfajores Celo", symbol: 'A-CELO', decimals: 18 }, - rpcUrls: ['https://alfajores-forno.celo-testnet.org'], - blockExplorerUrls: ['https://alfajores-blockscout.celo-testnet.org/'], - iconUrls: ['future'], - }; -``` -{% endtab %} - -{% tab title="Baklava Testnet" %} -```javascript - const BAKLAVA_PARAMS = { - chainId: '0xf370', - chainName: 'Baklava Testnet', - nativeCurrency: { name: "Baklava Celo", symbol: 'B-CELO', decimals: 18 }, - rpcUrls: ['https://baklava-forno.celo-testnet.org'], - blockExplorerUrls: ['https://baklava-blockscout.celo-testnet.org/'], - iconUrls: ['future'], - }; -``` -{% endtab %} -{% endtabs %} - -## **Adding Tokens \(e.g. cUSD, cEUR\)** - -To watch an asset on a Celo netowork \(e.g. cUSD, cEUR\) in your dApp, you can use MetaMask's RPC API's `wallet_watchAsset` method. \([See documentation](https://docs.metamask.io/guide/rpc-api.html#wallet-watchasset)\). - -Here is a JavaScript snippet you can use: - -```jsx - await window.ethereum.request({ - method: 'wallet_watchAsset', - params: { - type: 'ERC20', - options: { - address: '', - 'symbol': '', - decimals: 18, - }, - iconUrls: ['future'], - }, - }); -``` - -Where it says `INSERT_ADDRESS_HERE`, please replace with any of the following constants, depending on which network and which asset you'd like to connect to. - -The following are examples for cUSD and cEUR. - -{% tabs %} -{% tab title="Celo Mainnet" %} -* Token Contract Address for cUSD: `0x765de816845861e75a25fca122bb6898b8b1282a` -* Token Contract Address for cEUR: `0xd8763cba276a3738e6de85b4b3bf5fded6d6ca73` -{% endtab %} - -{% tab title="Alfajores Testnet" %} -* Token Contract Address for cUSD: `0x874069fa1eb16d44d622f2e0ca25eea172369bc1` -* Token Contract Address for cEUR: `0x10c892a6ec43a53e45d0b916b4b7d383b1b78c0f` -{% endtab %} - -{% tab title="Baklava Testnet" %} -* Token Contract Address for cUSD: `0x62492A644A588FD904270BeD06ad52B9abfEA1aE` -* Token Contract Address for cEUR: `0xf9ecE301247aD2CE21894941830A2470f4E774ca` -{% endtab %} -{% endtabs %} - -{% hint style="info" %} -To double-check that the above values are up-to-date, please verify using the `celocli network:contracts` command __\([see documentation](https://docs.celo.org/command-line-interface/commands/network#celocli-network-contracts)\). -{% endhint %} - -* Where it says `INSERT_SYMBOL_HERE`, please replace with the correct symbol for the asset you'd like to watch. For Celo Dollars, it's `cUSD` and for Celo Euros, it's `cEUR`. - -## **Handling cases where MetaMask is connected to a different network** - -We strongly suggest that you disable your dApp's functionality when MetaMask is connected to a non-Celo network. - -MetaMask has an API for determining what network/chain you're connected to. [See here](https://docs.metamask.io/guide/ethereum-provider.html#methods) for more documentation around that. diff --git a/packages/docs/getting-started/using-metamask-with-celo/using-a-ledger-with-metamask.md b/packages/docs/getting-started/using-metamask-with-celo/using-a-ledger-with-metamask.md deleted file mode 100644 index ccd025e1ee6..00000000000 --- a/packages/docs/getting-started/using-metamask-with-celo/using-a-ledger-with-metamask.md +++ /dev/null @@ -1,10 +0,0 @@ -# Using a Ledger with MetaMask - -Here are some things to keep in mind when using a Ledger hardware wallet with MetaMask to connect to the Celo network. - -* When using MetaMask with a Ledger, users should open the Ethereum app on their Ledger hardware device, not the Celo app. - - \(Users using a Celo-specific wallet with the Ledger should still use the Celo app though\) - -* When recovering [Celo sent to an Eth address](https://docs.celo.org/celo-owner-guide/eth-recovery), use Metamask with the Ethereum app on the Ledger device. -* When recovering [Eth sent to a Celo address](https://docs.celo.org/celo-owner-guide/celo-recovery), use the Celo app on the Ledger device with any Celo wallet. diff --git a/packages/docs/getting-started/using-the-mobile-wallet.md b/packages/docs/getting-started/using-the-mobile-wallet.md deleted file mode 100644 index 5152e695c72..00000000000 --- a/packages/docs/getting-started/using-the-mobile-wallet.md +++ /dev/null @@ -1,21 +0,0 @@ -# Using the Mobile Wallet - -One easy way to experiment with the Alfajores Testnet is to install the Celo Mobile Wallet. This section explains how to download the wallet and how to get invited onto the network. - -### Getting Started - -Since verifying your phone number costs gas, you have to be invited to the platform to have the funds to pay for the verification process. To do so, please visit [celo.org/build/wallet](https://celo.org/build/wallet) and enter your phone number to be messaged an invitation code. - -If you already have an account \(and the corresponding seed phrase\), you can download the Celo wallet from the [play store](https://play.google.com/store/apps/details?id=org.celo.mobile.alfajores) and follow instructions in the app to import your wallet using the seed phrase. - -If you need more funds, you can always visit [celo.org/build/faucet](https://celo.org/build/faucet) and enter your address to get more Celo Dollars. - -![Verifying your phone number with an invitation code](https://storage.googleapis.com/celo-website/docs/celo-onboarding.gif) - -For more information on how to run a build of the Celo Wallet and develop on it, please refer to the [Running the Wallet Locally](../celo-codebase/wallet/intro.md) section. - -For more detailed information on how to get an account please refer to the [Getting an Account and Funds](faucet.md) section. - -### Report a Bug - -To report a bug, navigate to the settings screen of the Celo Wallet and tap 'Send an Issue Report'. As always, please reach out on [forum.celo.org](https://forum.celo.org) if you have any questions. diff --git a/packages/docs/getting-started/using-the-wallet.md b/packages/docs/getting-started/using-the-wallet.md deleted file mode 100644 index 722e35c87ee..00000000000 --- a/packages/docs/getting-started/using-the-wallet.md +++ /dev/null @@ -1,25 +0,0 @@ -# Using the Wallet - -This section explains how to use the Alfajores Testnet Celo Wallet. You will need either an account or an invitation in order to get the Celo Wallet in order to verify your phone number. - -### Getting an Invitation Code - -#### Get an SMS Invite Code - -If you don’t have an account, please visit [celo.org/build/wallet](https://celo.org/build/wallet) and enter your phone number to be messaged an invitation code. Please note that the Celo Wallet is presently only available for Android, with iOS coming soon. - -#### Restore from Backup - -If you already have an account \(and the corresponding seed phrase\), you can download the Celo wallet from the [play store](https://play.google.com/store/apps/details?id=org.celo.mobile.alfajores) and follow in-app instructions to import your wallet using the seed phrase. - -### Downloading the Celo Wallet - -To download the app on the Play Store, go [here](https://play.google.com/apps/testing/org.celo.mobile.alfajores). Note that you will need an account or an invitation code to use the wallet. - -### Running the Celo Wallet Locally - -For more information on how to run the Celo Wallet locally, please refer to the [mobile wallet setup instructions](../celo-codebase/wallet/intro.md) - -### Get More Funds! - -If you need more funds, you can always visit [celo.org/build/faucet](https://celo.org/build/faucet) and enter your address to get more Celo Dollars. You can find your address in the settings page within the wallet diff --git a/packages/docs/getting-started/validator-troubleshooting-faq.md b/packages/docs/getting-started/validator-troubleshooting-faq.md deleted file mode 100644 index 2161f0f369e..00000000000 --- a/packages/docs/getting-started/validator-troubleshooting-faq.md +++ /dev/null @@ -1,42 +0,0 @@ -# Validator Troubleshooting FAQ - -This is a living document. Please contribute if you have a solution to a common problem. - -## How do I reset my local celo state? -You may desire to reset your local chain state when updating parameters or wishing to perform a clean reset. Note that this will cause the node to resync from the genesis block which will take a couple hours. -```bash -# Remove the celo state directory -sudo rm -rf celo -``` -## How do I backup a local Celo private key? -It's important that local accounts are properly backed up for disaster recovery. The local keystore files are encrypted with the specified account password and stored in the keystore directory. To copy this file to your local machine you may use ssh: - -```bash -ssh USERNAME@IPADDRESS "sudo cat /root/.celo/keystore/" > ./nodeIdentity -``` - -You can then back this file up to a cloud storage for redundancy. - -{% hint style="warning" %} -**Warning**: It's important that you use a strong password to encrypt this file since it will be held in potentially insecure environments. -{% endhint %} - -## How do I install and use celocli on my node? - -To install celocli on a Linux machine, run the following: -``` bash -sudo apt-get update -sudo apt-get install libusb-1.0-0 -y -sudo npm install -g @celo/celocli --unsafe-perm -``` - -To install celocli on a Mac/Windows machine, run the following: -```bash -npm install @celo/celocli -``` - -You can then run celocli and point it to your local geth.ipc file: -``` bash -# Check if node is synced using celocli -sudo celocli node:synced --node geth.ipc -``` diff --git a/packages/docs/getting-started/wallets.md b/packages/docs/getting-started/wallets.md deleted file mode 100644 index 7f72a6808f0..00000000000 --- a/packages/docs/getting-started/wallets.md +++ /dev/null @@ -1,69 +0,0 @@ -# Digital Wallets for Celo - -## Choosing a Wallet - -Wallets are tools that create accounts, manage keys, and help users transact on the Celo network. - -It's important to be careful when choosing a wallet because they manage your secret account keys. You should only use reputable wallets that are well maintained by organizations/people that you trust. - -The [Celo Native Wallets](#celo-native-wallets) section shows some popular wallets that were built specifically for the Celo network. They often include features that more general wallets do not, like paying for fees with cUSD. The [Celo Compatible Wallets](#celo-compatible-wallets) section has wallets that can work with Celo but were built for other networks (like Ethereum) or through company partnerships (like Pesabase). - -## Celo Native Wallets - -### Valora - -Valora is a mobile wallet focused on making global peer-to-peer payments simple and accessible to anyone. It supports the Celo Identity Protocol which allows users to verify their phone number and send payments to their contacts. - -- [valoraapp.com](https://valoraapp.com) -- Platforms: iOS, Android -- Maintainers: [cLabs](https://clabs.co) -- Ledger support: No - -### CeloWallet.app - -CeloWallet is a lightweight, mobile-friendly wallet for both web and desktop. It supports core Celo functionality like payments, exchanges, staking, and governance. - -- [celowallet.app](https://celowallet.app) -- Platforms: Web, MacOS, Linux, Windows -- Maintainers: [J M Rossy](https://twitter.com/RossyWrote) -- Ledger support: Yes - -### Celo Terminal - -Celo Terminal is a wallet and DApp platform. It aims to be a hub for installing and running Celo DApps locally on your desktop. - -- [celoterminal.com](https://celoterminal.com) -- Platforms: MacOS, Linux, Windows -- Maintainers: [WOTrust](https://twitter.com/wotrust1) -- Ledger support: Yes - -### CeloExtensionWallet - -Celo Extension Wallet is a fork of Metamask for the Celo Network. It's a browser extension for Chrome. - -- [chrome.google.com/webstore](https://chrome.google.com/webstore/detail/celoextensionwallet/kkilomkmpmkbdnfelcpgckmpcaemjcdh) -- Platforms: Chrome Browser -- Maintainers: [DSRV Labs](https://www.dsrvlabs.com/en/) -- Ledger support: Yes - -### Steakwallet - -Steakwallet is a non-custodial, multi chain staking wallet. It aims to be the hub for mobile DeFi, supporting Celo from the very start. - -- [steakwallet.fi](https://steakwallet.fi) -- Platforms: Android, iOS -- Maintainers: [Steakwallet LLC](https://steakwallet.fi) - -## Celo Compatible Wallets - -There are currently a few other compatible wallets. When the upcoming [Donut hard-fork](https://github.com/celo-org/celo-proposals/issues/94) is live, Celo transactions will become compatible with Ethereum transactions. This will allow some Ethereum wallets to work with Celo. More updates on this coming soon. - -### Dove Wallet - -- [dovewallet.com](https://dovewallet.com) -- Platforms: Web - -### Pesabase - -- [pesabase.com](https://pesabase.com/) -- Platforms: iOS, Android diff --git a/packages/docs/important-information/alfajores-testnet-disclaimer.md b/packages/docs/important-information/alfajores-testnet-disclaimer.md deleted file mode 100644 index 6e035234478..00000000000 --- a/packages/docs/important-information/alfajores-testnet-disclaimer.md +++ /dev/null @@ -1,13 +0,0 @@ -# Alfajores Testnet Disclaimer - -By using, and contributing to, the Celo Alfajores Testnet, you \(the User\) agree to these terms and acknowledge and agree that the Celo protocol and platform is in development and that use of the Alfajores Testnet is entirely at the User’s sole risk. You also agree to adhere to the [Celo Community Code of Conduct](https://celo.org/code-of-conduct). - -The User acknowledges and agrees that they have an adequate understanding of the risks associated with use of the Celo Alfajores Testnet and that all information and materials published, distributed or otherwise made available on the Celo Alfajores Testnet are provided for non-commercial, personal use only. This includes test CELO, test Celo Dollars, and any other stable value asset test units, which have no economic value and are provided only for the purpose of testing on the Celo Alfajores Testnet. - -All content provided on the Celo Alfajores Testnet is subject to the License included and is provided on an ‘AS IS’ and ‘AS AVAILABLE’ basis, without any representations or warranties of any kind. All implied terms are excluded to the fullest extent permitted by law. No party involved in, or having contributed to the development of, the Celo Alfajores Testnet including any of their affiliates, directors, employees, contractors, service providers or agents \(the Parties Involved\) accepts any responsibility or liability to the User or any third parties in relation to any materials or information accessed or downloaded via the Celo Alfajores Testnet. The User acknowledges and agrees that the Parties Involved are not responsible for any damage to the User’s computer systems, loss of data, or any other loss or damage resulting \(directly or indirectly\) from use of the Celo Alfajores Testnet. - -To the fullest extent permitted by law, in no event shall the Parties Involved have any liability whatsoever to any person for any direct or indirect loss, liability, cost, claim, expense or damage of any kind, whether in contract or in tort, including negligence or otherwise, arising out of or related to the use of all or part of the Celo Alfajores Testnet. - -The Celo Labs software is not subject to the EAR based on Section 734.7 of the U.S. Export Administration Regulations \("EAR", 15 CFR Parts 730-774\) and Section 742.15\(b\) of the EAR, which applies to software containing or designed for use with encryption software that is publicly available as open-source. However, products developed using the Celo Labs software may be subject to the EAR or local laws/regulations. The User is responsible for compliance with U.S. and local country export/import laws and regulations. - -Celo Labs software may not be exported/reexported, either directly or indirectly, to any destination subject to U.S. embargoes or trade sanctions unless formally authorized by the U.S. Government. The embargoed destinations are subject to change and the scope of what is included in the embargo is specific to each embargoed country. For the most current information on U.S. embargoed and sanctioned countries, see the [Treasury Department regulations](https://www.treasury.gov/resource-center/sanctions/Programs/Pages/Programs.aspx). diff --git a/packages/docs/important-information/baklava-testnet-disclaimer.md b/packages/docs/important-information/baklava-testnet-disclaimer.md deleted file mode 100644 index e8bb5f3daa9..00000000000 --- a/packages/docs/important-information/baklava-testnet-disclaimer.md +++ /dev/null @@ -1,13 +0,0 @@ -# Baklava Testnet Disclaimer - -By using, and contributing to, the Celo Baklava Testnet, you \(the User\) agree to these terms and acknowledge and agree that the Celo protocol and platform is in development and that use of the Baklava Testnet is entirely at the User’s sole risk. You also agree to adhere to the [Celo Code of Conduct](https://celo.org/code-of-conduct). - -The User acknowledges and agrees that they have an adequate understanding of the risks associated with use of the Celo Baklava Testnet and that all information and materials published, distributed or otherwise made available on the Celo Baklava Testnet are provided for non-commercial, personal use only. This includes test CELO, test Celo Dollars, and any other stable value asset test units, which have no economic value and are provided only for the purpose of testing on the Celo Baklava Testnet. - -All content provided on the Celo Baklava Testnet is subject to the License included and is provided on an ‘AS IS’ and ‘AS AVAILABLE’ basis, without any representations or warranties of any kind. All implied terms are excluded to the fullest extent permitted by law. No party involved in, or having contributed to the development of, the Celo Baklava Testnet including any of their affiliates, directors, employees, contractors, service providers or agents \(the Parties Involved\) accepts any responsibility or liability to the User or any third parties in relation to any materials or information accessed or downloaded via the Celo Baklava Testnet. The User acknowledges and agrees that the Parties Involved are not responsible for any damage to the User’s computer systems, loss of data, or any other loss or damage resulting \(directly or indirectly\) from use of the Celo Baklava Testnet. - -To the fullest extent permitted by law, in no event shall the Parties Involved have any liability whatsoever to any person for any direct or indirect loss, liability, cost, claim, expense or damage of any kind, whether in contract or in tort, including negligence or otherwise, arising out of or related to the use of all or part of the Celo Baklava Testnet. - -The Celo Labs software is not subject to the EAR based on Section 734.7 of the U.S. Export Administration Regulations \("EAR", 15 CFR Parts 730-774\) and Section 742.15\(b\) of the EAR, which applies to software containing or designed for use with encryption software that is publicly available as open-source. However, products developed using the Celo Labs software may be subject to the EAR or local laws/regulations. The User is responsible for compliance with U.S. and local country export/import laws and regulations. - -Celo Labs software may not be exported/reexported, either directly or indirectly, to any destination subject to U.S. embargoes or trade sanctions unless formally authorized by the U.S. Government. The embargoed destinations are subject to change and the scope of what is included in the embargo is specific to each embargoed country. For the most current information on U.S. embargoed and sanctioned countries, see the [Treasury Department regulations](https://www.treasury.gov/resource-center/sanctions/Programs/Pages/Programs.aspx). diff --git a/packages/docs/important-information/mainnet-network-disclaimer.md b/packages/docs/important-information/mainnet-network-disclaimer.md deleted file mode 100644 index 2488ef57410..00000000000 --- a/packages/docs/important-information/mainnet-network-disclaimer.md +++ /dev/null @@ -1,13 +0,0 @@ -# Mainnet Network Disclaimer - -By using, and contributing to, Celo blockchain and cryptographic network (Celo), you (the User) agree to these terms and acknowledge that the use of Celo, including any and all release candidates, is entirely at the User’s sole risk. You also agree to adhere to the [Celo Code of Conduct](https://celo.org/code-of-conduct). - -All content provided on Celo is subject to the License included and is provided on an ‘AS IS’ and ‘AS AVAILABLE’ basis, without any representations or warranties of any kind. All implied terms are excluded to the fullest extent permitted by law. No party involved in, or having contributed to the development of, Celo including any of their affiliates, directors, employees, contractors, service providers or agents (the Parties Involved) accepts any responsibility or liability to the User or any third parties in relation to any materials or information accessed or downloaded via Celo. The User acknowledges and agrees that the Parties Involved are not responsible for any damage to the User’s computer systems, loss of data, or any other loss or damage resulting (directly or indirectly) from use of Celo. - -Users also understand that release candidates may be replaced, in which event the network may cease to operate, all on-chain data may be destroyed and any rewards or other benefits may be lost and the cliff for ReleaseGold contracts reset. - -To the fullest extent permitted by law, in no event shall the Parties Involved have any liability whatsoever to any person for any direct or indirect loss, liability, cost, claim, expense or damage of any kind, whether in contract or in tort, including negligence or otherwise, arising out of or related to the use of all or part of Celo. - -The Celo software is not subject to the EAR based on Section 734.7 of the U.S. Export Administration Regulations ("EAR", 15 CFR Parts 730-774) and Section 742.15(b) of the EAR, which applies to software containing or designed for use with encryption software that is publicly available as open-source. However, products developed using Celo may be subject to the EAR or local laws/regulations. The User is responsible for compliance with U.S. and local country export/import laws and regulations. - -Celo software may not be exported/reexported, either directly or indirectly, to any destination subject to U.S. embargoes or trade sanctions unless formally authorized by the U.S. Government. The embargoed destinations are subject to change and the scope of what is included in the embargo is specific to each embargoed country. For the most current information on U.S. embargoed and sanctioned countries, see the [Treasury Department regulations](https://www.treasury.gov/resource-center/sanctions/Programs/Pages/Programs.aspx). diff --git a/packages/docs/overview.md b/packages/docs/overview.md deleted file mode 100644 index fe71f116dd2..00000000000 --- a/packages/docs/overview.md +++ /dev/null @@ -1,145 +0,0 @@ -# Celo Overview - -Celo’s aim is to empower anyone with a smartphone anywhere in the world to have access to financial services, send money to phone numbers, and pay merchants -- on a decentralized platform that is operated by a community of users. - -To achieve this, Celo is a complete stack of new blockchain software, core libraries that run on that blockchain, and end user applications including a Wallet app that communicate with that logic. - -This page provides some background on blockchain technology and explores the Celo software stack. - -### Background and Key Concepts - -A **blockchain** or **cryptographic network** is a broad term used to describe a database maintained by a distributed set of computers that do not share a trust relationship or common ownership. This arrangement is referred to as **decentralized**. The content of a blockchain's database, or **ledger**, is authenticated using cryptographic techniques, preventing its contents from being added to, edited or removed except according to a protocol operated by the network as a whole. - -The code of the Celo Blockchain has shared ancestry with [Ethereum](https://www.ethereum.org), blockchain software for building general-purpose decentralized applications. Celo differs from Ethereum in several important areas as described in the following sections. However, it inherits a number of key concepts. - -{% hint style="warning" %} -Despite its similarity to Ethereum, Celo is a completely different blockchain and protocol, and Celo assets **cannot** be accessed on the Ethereum network. -{% endhint %} - -Ethereum applications are built using **smart contracts**. Smart contracts are programs written in languages like [Solidity](https://solidity.readthedocs.io/en/v0.5.10/) that produce bytecode for the **Ethereum Virtual Machine** or **EVM**, a runtime environment. Programs encoded in smart contracts receive messages and manipulate the blockchain ledger and are termed **on-chain**. - -Celo has a native unit of accounting, the cryptocurrency **CELO**, comparable to Ether on Ethereum. Celo's ledger consists of **accounts**, identified by an **address**. There are two types of accounts. **Externally owned accounts** have an associated CELO balance and are controlled by a user holding the associated public-private keypair. **Contract accounts** contain the code and data of a single smart contract which can be called and manipulate its own stored data. - -**ERC-20** is a standard interface for implementing cryptocurrencies or **tokens** as contracts, rather than via account balances. For additional information on this, see [Celo for Ethereum Developers](https://docs.celo.org/developer-guide/celo-for-eth-devs). In Celo, CELO has a duality as both the native currency and an ERC-20 compliant token on the Celo blockchain. - -{% hint style="warning" %} -Celo assets exist on an independent blockchain, and cannot be accessed through wallets that connect to the Ethereum network. Only use wallets designed to work with the Celo network. Do **not** send your Celo assets to your Ethereum wallet or send your Ethereum assets to your Celo wallet. -{% endhint %} - -Users interact with the blockchain by creating signed **transactions.** These are requests to make a change to the ledger. They can: transfer value between accounts; execute a function in a smart contract and pass in arguments \(perhaps causing other smart contracts to be called, update their storage, or transfer value\); or create a new smart contract. - -The blockchain is updated by a protocol that takes the current state of the ledger, applies a number of transactions in turn, each of which may execute code and result in updates to the global state. This creates a new **block** that consists of a **header**, identifying the previous block and other metadata, and a data structure that describes the new state. - -To avoid Denial-of-Service attacks and ensure termination of calls to smart contract code, the account sending a transaction pays **transaction fees** for its execution steps using its own balance. Transactions specify a **maximum gas** which bounds the steps of execution before a transaction is reverted. A **gas price** determines the unit price for each step, and is used to prioritize which transactions the network applies. \(In Celo transaction fees can be paid in ERC-20 currencies and gas pricing works differently from Ethereum\). - -For a more in depth explanation of Ethereum, see the [Ethereum White Paper](https://github.com/ethereum/wiki/wiki/White-Paper) or [documentation](http://ethdocs.org/en/latest/introduction/what-is-ethereum.html#learn-about-ethereum). - -### The Celo Stack - -Celo is oriented around providing the simplest possible experience for end users, who may have no familiarity with cryptocurrencies, and may be using low cost devices with limited connectivity. To achieve this, Celo takes a full-stack approach, where each layer of the stack is designed with the end user in mind while considering other stakeholders \(e.g. operators of nodes in the network\) involved in enabling the end user experience. - -The Celo stack is structured into the following logical layers: - -![](https://storage.googleapis.com/celo-website/docs/full-stack-diagram.jpg) - -- **Celo Blockchain**: An open cryptographic protocol that allows applications to make transactions with and run smart contracts in a secure and decentralized fashion. The Celo Blockchain code has shared ancestry with [Ethereum](https://www.ethereum.org), and maintains full EVM compatibility for smart contracts. However it uses a [Byzantine Fault Tolerant](http://pmg.csail.mit.edu/papers/osdi99.pdf) \(BFT\) consensus mechanism rather than Proof of Work, and has different block format, transaction format, client synchronization protocols, and gas payment and pricing mechanisms. -- **Celo Core Contracts**: A set of smart contracts running on the Celo Blockchain that comprise much of the logic of the platform features including ERC-20 stable currencies, identity attestations, proof-of-stake and governance. These smart contracts are upgradeable and managed by the decentralized governance process. -- **Applications:** Applications for end users built on the Celo platform. The Celo Wallet app, the first of an ecosystem of applications, allows end users to manage accounts and make payments securely and simply by taking advantage of the innovations in the Celo protocol. Applications take the form of external mobile or backend software: they interact with the Celo Blockchain to issue transactions and invoke code that forms the Celo Core Contracts’ API. Third parties can also deploy custom smart contracts that their own applications can invoke, which in turn can leverage Celo Core Contracts. Applications may use centralized cloud services to provide some of their functionality: in the case of the Celo Wallet, push notifications and a transaction activity feed. - -The Celo Blockchain and Celo Core Contracts together comprise the **Celo Protocol**. - -### Topology of a Celo Network - -The topology of a Celo network consists of machines running the Celo Blockchain software in several distinct configurations: - -![](https://storage.googleapis.com/celo-website/docs/network.png) - -- **Validators:** Validators gather transactions received from other nodes and execute any associated smart contracts to form new blocks, then participate in a Byzantine Fault Tolerant \(BFT\) consensus protocol to advance the state of the network. Since BFT protocols can scale only to a few hundred participants, and can tolerate at most a third of the participants acting maliciously, a proof-of-stake mechanism admits only a limited set of nodes to this role. -- **Full Nodes:** Most machines running the Celo Blockchain software are either not configured to be, or not elected as, validators. Celo nodes do not do "mining" as in Proof of Work networks. Their primary role is to serve requests from light clients and forward their transactions, for which they receive the fees associated with those transactions. These payments create a ‘permissionless onramp’ for individuals in the community to earn currency. Full nodes maintain at least partial history of the blockchain by transferring new blocks between themselves, and can join or leave the network at any time. -- **Light Clients:** Applications including the Celo Wallet will also run on each user's device an instance of the Celo Blockchain software operating as a ‘light client’. Light clients connect to full nodes to make requests for account and transaction data and to sign and submit new transactions, but they do not receive or retain the full state of the blockchain. - -The Celo Wallet application is a fully unmanaged wallet that allows users to self custody their funds using their own keys and accounts. All critical features such as sending transactions and checking balances can be done in a trustless manner using the peer-to-peer light client protocol. However, the wallet does use a few centralized cloud services to improve the user experience where possible, e.g.: - -- **Google Play Services:** to pre-load invitations in the app -- **Celo Wallet Notification Service:** sends device push notifications when a user receives a payment or requests for payment -- **Celo Wallet Blockchain API:** provides a GraphQL API to query transactions on the blockchain on a per-account basis, used to implement a users' activity feed. - -When an end user downloads the Celo Wallet from, for example, the Google Play Store, users are trusting both cLabs (or the entity that has made the application available in the Play Store) and Google to deliver a correct binary, and most users would feel that relying on these centralized services to provide this additional functionality is worthwhile. - -## The Celo Protocol - -The Celo Blockchain and Celo Core Contracts together comprise the **Celo Protocol**. This term describes both what services the decentralized Celo network provide to applications and the way in which nodes in the network cooperate to achieve this. This section introduces some of these services. - -### Consensus and Proof-of-Stake - -Celo is a proof-of-stake blockchain. In comparison to Proof of Work systems like Bitcoin and Ethereum, this eliminates the negative environmental impact and means that users can make transactions that are cheaper, faster, and whose outcome cannot be changed once complete. - -The Celo Blockchain implements a Byzantine Fault Tolerant \(BFT\) consensus algorithm in which a well-defined set of validator nodes broadcast signed messages between themselves in a sequence of steps to reach agreement even when up to a third of the total nodes are offline, faulty or malicious. When a quorum of validators have reached agreement, that decision is final. - -Celo uses a proof-of-stake mechanism for selecting the validator set for a fixed period termed an epoch. Anyone can earn rewards by locking CELO and by participating in validator elections and governance proposals. Initially, the number of validators will be capped to one hundred nodes elected by CELO holders. Validators earn additional fixed rewards in Celo Dollars to cover their costs plus margin. - -{% hint style="success" %} -**Roadmap**: Celo is pioneering a [highly scalable, permissionless BFT consensus algorithm](https://medium.com/celohq/bftree-scaling-hotstuff-to-millions-of-validators-7d6930ee046a) that in the long term will result in substantial changes to the proof-of-stake mechanism described here. -{% endhint %} - -### On-Chain Governance - -Celo uses an on-chain governance mechanism to manage and upgrade aspects of the protocol that reside in the Celo Core Contracts, and for a number of parameters used by the Celo Blockchain. This includes operations like upgrading smart contracts, adding new stable currencies, modifying the reserve target asset allocation, and changing how validator elections are decided. - -The Governance contract is set as “owner” for all of the Celo Core Contracts. This allows the protocol to carry out agreed governance proposals by executing code in the context of the Governance contract. Proposals are selected for consideration and voted on by CELO holders using a weighted vote based on the same Locked CELO commitment used to vote to elect validators. - -### Ultralight Synchronization - -Celo provides extremely fast, secure synchronization to enable light clients to begin to track the current state of the Celo blockchain ledger almost immediately. This means that even wallet users with high latency, low bandwidth, or high cost data tariffs can use Celo. - -In Ethereum, verifying whether data received from an untrusted full node really does represent the current state of a blockchain requires fetching every block header ever produced to confirm they form a cryptographically secure chain. A consequence of Celo using a BFT consensus algorithm is that it can do that verification by building a chain only of changes in the validator set, not each individual block. - -{% hint style="success" %} -**Roadmap**: Synchronization performance will be further improved with BLS signature aggregation and succinct zero-knowledge proofs, via zk-SNARKs. -{% endhint %} - -### Incentives for Operating Full Nodes - -In Ethereum, there are few incentives to run a full node that is not mining. Few nodes serve light clients, and this results in a poor experience for mobile wallets. - -Celo introduces a scheme that incentivizes users to operate regular nodes. Light clients pay transaction fees to full nodes. Clients include in every transaction the address of a node which, when the transaction is processed, receives the fee. While a full node provides other services for which they receive no specific fee, it is expected that failing to service these requests will cause clients to seek other full nodes that do, who will then receive fees when they next make a transaction. - -Since light clients need not trust full nodes, as they can verify their work, this also provides the 'permissionless on-ramp' for users to receive CELO or Celo Dollars without already holding it that is missing in other proof-of-stake networks. - -### Stable Cryptocurrencies - -Celo enables a family of stable-value tokens whose values can track the value of any asset, including fiat currencies, commodities, and even natural resources. Stablecoins supported include the Celo Dollar (cUSD) and the Celo Euro (cEUR), which track the value of the U.S. Dollar and Euro respectively. CELO and a basket of other assets including BTC and ETH serves as the collateral for these stablecoins. These stablecoins are redeemable for CELO, ensuring that transactions can occur quickly, cheaply and reliably on-chain. - -Celo's stability mechanism allows users to create a new cUSD and cEUR by sending CELO to the reserve, or burn cUSD and cEUR by redeeming it for their equivalent value in CELO. - -This mechanism relies on a series of Oracles, or information feeds from exchanges external to the network, to report the CELO to US Dollar or Euro market rate. To minimize the risk of a run on CELO collateral when these reported values are inaccurate or out-of-date, Celo uses an on-chain constant-product-market-maker model, inspired by the [Uniswap](https://uniswap.io/) system. This mechanism adjusts the redemption price of CELO until either arbitrage occurs (so that the on-chain price dynamically adjusts until the offered rate meets the external rate) or Oracles reset the on-chain price. - -The Celo protocol ensures that there is sufficient CELO collateral to redeem the amount of CELO in circulation through several sources. These include a [stability fee](celo-codebase/protocol/stability/stability-fees.md) levied on Celo Dollar balances, a transfer from [epoch rewards](celo-codebase/protocol/proof-of-stake/community-fund.md#bolstering-the-reserve), plus the proceeds from the spread when interacting with the on-chain market-maker mechanism. - -In addition, a back-up reserve of cryptocurrencies is held off-chain. This off-chain reserve is managed to preserve value and minimize volatility by maintaining a diversified portfolio of cryptocurrencies through algorithmic rebalancing trading and periodically "topping-up" the CELO collateral available to ensure it exceeds the amount required to redeem Celo Dollars in circulation. The approved cryptocurrencies, distribution ratios, and rebalancing period are all subject to on-chain governance. - -{% hint style="success" %} -**Roadmap**: Celo envisages a number of stable currencies pegged to different fiat currencies as well as natural resources such as forests. In addition, once bridges between other chains and the Celo blockchain are fully developed, and liquid trading on decentralized exchanges occurs, the rebalancing can be handled transparently on-chain. -{% endhint %} - -### Lightweight Identity - -Celo offers a lightweight identity layer that allows users of applications including Celo Wallet to identify and securely transact with other users via their contacts' phone numbers. Celo Wallet enables payments directly to users listed in their device's contacts list. - -The Attestations contract allows a user to request attestations to their phone number for a small fee. A secure decentralized source of randomness is used to pick a number of validators that will produce and send via SMS signed secret messages that act as attestations of ownership of the phone number. The user then submits these back to the Attestations contract which verifies them and installs a mapping for the phone number to the user's account. - -### Richer Transactions - -Celo provides a number of enhancements to regular transactions as familiar to Ethereum developers. - -The Celo native asset has a duality as both the native currency and is also an ERC-20 token, simplifying the work of application developers. - -{% hint style="warning" %} -Celo assets exist on an independent blockchain, and cannot be accessed through wallets that connect to the Ethereum network. Only use wallets designed to work with the Celo network. -{% endhint %} - -In Celo, transaction fees can be paid in stable cryptocurrencies. A user sending Celo Dollars will be able to pay their transaction fee out of their Celo Dollar balance, so they do not need to hold a separate balance of CELO in order to make transactions. The protocol maintains a list of currencies which can be used to pay for transaction fees. These smart contracts implement an extension of the ERC-20 interface, with additional functions that allow the protocol to debit and credit transaction fees. - -The Escrow contract allows users to send payments to other users who can be identified by a phone number but don’t yet have an account. These payments are stored in this contract itself and can be either withdrawn by the intended recipient after creating an account and attesting their identity, or reclaimed by the sender. - -Transfers between two accounts with associated identities support end-to-end encrypted comments. A comment encrypted to the identity's public key is passed when making the transfer, and included in an event that can be located on the blockchain ledger. diff --git a/packages/docs/package.json b/packages/docs/package.json deleted file mode 100644 index 289c0984c61..00000000000 --- a/packages/docs/package.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "name": "docs", - "version": "1.0.0", - "description": "Package for Celo Documentation", - "devDependencies": { - "gitbook-cli": "^2.3.2", - "remark-cli": "^8.0.0", - "remark-validate-links": "^10.0.0", - "gitbook-plugin-fontsettings": "^2.0.0", - "gitbook-plugin-highlight": "^2.0.3", - "gitbook-plugin-hints": "^1.0.2", - "gitbook-plugin-lunr": "^1.2.0", - "gitbook-plugin-page-ref": "^0.0.6", - "gitbook-plugin-search": "^2.2.1", - "gitbook-plugin-sharing": "^1.0.2", - "gitbook-plugin-theme-default": "^1.0.7", - "gitbook-plugin-youtube": "^2.0.0" - }, - "scripts": { - "build": "gitbook install && gitbook build", - "lint": "remark -qf -u validate-links --ignore-pattern developer-resources/base/reference --ignore-pattern developer-resources/connect/reference --ignore-pattern developer-resources/contractkit/reference --ignore-pattern developer-resources/explorer/reference --ignore-pattern developer-resources/governance/reference --ignore-pattern developer-resources/identity/reference --ignore-pattern developer-resources/keystores/reference --ignore-pattern developer-resources/network-utils/reference --ignore-pattern developer-resources/transactions-uri/reference --ignore-pattern developer-resources/utils/reference --ignore-pattern developer-resources/wallet-base/reference --ignore-pattern developer-resources/wallet-hsm/reference --ignore-pattern developer-resources/wallet-hsm-aws/reference --ignore-pattern developer-resources/wallet-hsm-azure/reference --ignore-pattern developer-resources/wallet-ledger/reference --ignore-pattern developer-resources/wallet-local/reference --ignore-pattern developer-resources/wallet-remote/reference --ignore-pattern developer-resources/wallet-rpc/reference --ignore-pattern _book .", - "preview": "gitbook install && gitbook serve" - }, - "author": "", - "license": "Apache-2.0" -} diff --git a/packages/docs/validator-guide/attestation-service.md b/packages/docs/validator-guide/attestation-service.md deleted file mode 100644 index 0860b413036..00000000000 --- a/packages/docs/validator-guide/attestation-service.md +++ /dev/null @@ -1,376 +0,0 @@ -# Attestation Service - -Celo Validators are strongly encouraged to operate an [Attestation Service](https://github.com/celo-org/celo-monorepo/tree/master/packages/attestation-service) instance. If you are a recipient of or considering applying to receive [votes from the Celo Foundation](celo-foundation-voting-policy.md), running a reliable Attestation Service is a requirement for eligibility. - -The Attestation Service is part of the [Celo identity protocol](../celo-codebase/protocol/identity/README.md). It sends SMS on behalf of users to allow them to attest to having access to a phone number and to map that to a Celo account, securely and privately. This is shown as Steps 3 and 4 in this diagram: - -![](https://storage.googleapis.com/celo-website/docs/attestations-flow.jpg) - -Validators receive a fee (set by [on-chain governance](../celo-holder-guide/voting-governance.md), currently 0.05 cUSD) for every attestation that they process and that is then successfully redeemed on-chain by the user. In a future release, validators will be able claim and withdraw this fee. - -## Outline - -This guide steps you through setting up an Attestation Service: - -* Follow the instructions to set up a validator on [mainnet](../getting-started/running-a-validator-in-mainnet.md) or [baklava](../getting-started/running-a-validator-in-baklava.md) -* Configure Twilio, MessageBird and Nexmo, the SMS providers used by Attestation Service -* Generate and register an attestation signer key -* Deploy a Celo full node, with the attestation signer key unlocked -* Deploy the attestation service -* Configure and publish validator metadata so that clients can find your attestation service -* Configure monitoring for the full node and attestation service - -## Recent releases - -* [Attestation Service v1.2.0](https://github.com/celo-org/celo-monorepo/releases/tag/attestation-service-v1.2.0) (latest production release) -* [Attestation Service v1.1.0](https://github.com/celo-org/celo-monorepo/releases/tag/attestation-service-v1.1.0) - -## Deployment Architecture - -Attestation Service needs to expose a HTTP or HTTPS endpoint to the public Internet. This means it should not be deployed on the same physical host as a Validator, which should be firewalled to allow incoming connections only from its proxy. - -The `PORT` environment variable sets the listening port for the service on the local instance. Note that depending on your setup, this may be different from the port exposed to the public Internet. - -Attestation Service exposes a HTTP endpoint, but it is strongly recommended that you adopt a setup that implements TLS. Attestation Service must expose the following routes to the public Internet: POST `/attestations`, POST `/test_attestations`, GET `/get_attestations`, POST `/delivery_status_twilio`, POST `/delivery_status_nexmo`, and (from version 1.2.0) GET (not POST) `/delivery_status_messagebird`. It should also expose GET `/status`. Optionally you may choose to expose GET `/healthz` and GET `/metrics`. Note that the URL provided in the validator metadata should not include any of these suffixes. - -An Attestation Service is usually deployed alongside a Celo full node instance, which needs to have the attestation signer key unlocked. This can be either deployed on the same physical machine, or in a VM or container on a different host. It is possible but not recommended to use a proxy node as the associated full node, but in this case ensure RPC access is locked down only to the Attestation Service. - -Attestation Service is a stateless service that uses a database to persist status of current and recently completed SMS delivery attempts. The most straightforward deployment architecture is to have a single machine or VM running three containers: one the attestation service, a Celo Blockchain node, and a single database instance. - -For a high availability setup, multiple instances can be deployed behind a load balancer and sharing a single database service. The load balancer should be configured with a round robin routing policy using the instances' `/healthz` endpoint as a healthcheck. Deploying a high availability database setup is beyond the scope of these instructions, but is straightforward with most cloud providers. In this setup, if a delivery report for an SMS issued by one instance is received by another instance, that instance can identify the matching record in the shared database and act on the receipt to resend if necessary. - -Every record in the database includes the issuer (i.e. validator) in its key, so a single setup like the above can be used to provide attestations for multiple validators. - -## SMS Providers - -Currently the Attestation Service supports three SMS providers: - -* [Twilio](https://www.twilio.com/try-twilio) -* [Nexmo](https://dashboard.nexmo.com/sign-up) -* [MessageBird](https://messagebird.com/en/) (from version 1.2.0 and later) - -It is recommended that you sign up with all three. - -See the [Configuration](#configuration) section for information about how to specify configuration options. - -### Twilio - -After you sign up for Twilio at [https://www.twilio.com/try-twilio](https://www.twilio.com/try-twilio), you should see your `ACCOUNT SID` and your `AUTH_TOKEN` in the top right of the console. You'll also want to enter in a credit card to fund the account. For most text messages, the costs are typically very low (and significantly lower than the attestation fee paid by the user). Find a more comprehensive price list at [https://www.twilio.com/sms/pricing](https://www.twilio.com/sms/pricing). If there are countries that you do not want to serve, you can specify them with the `TWILIO_UNSUPPORTED_REGIONS` configuration option. - -Next, adjust the Geo settings to serve phone numbers globally under [https://www.twilio.com/console/sms/settings/geo-permissions](https://www.twilio.com/console/sms/settings/geo-permissions). Otherwise, the service will not be able to send SMS to Celo's global user base and your validator will negatively impact the Celo user experience. - -To actually be able to send SMS, you need to create a messaging service under [Programmable SMS > SMS](https://www.twilio.com/console/sms/services). Provide the resulting `SID` in the `TWILIO_MESSAGING_SERVICE_SID` configuration variable. - -Now that you have provisioned your messaging service, you need to buy at least 1 phone number to send SMS from. You can do so under the `Numbers` option of the messaging service page. It is strongly recommended that you purchase at least a US (`+1`) number which seem to provide high delivery success rates. If you purchase numbers in other locales, Twilio will intelligently select the best number to send each SMS. - -### Nexmo - -After signing up for [Nexmo](https://dashboard.nexmo.com/sign-up), click the balance in the top-left to go to [Billing and Payments](https://dashboard.nexmo.com/billing-and-payments), where you can add funds. It is strongly recommended that you use a credit or debit card (as opposed to other forms of payment) as you will then be able to enable `Auto reload`. You should also enable `Low balance alerts`. Both of these will help avoid failing to deliver SMS when your funds are exhausted. It appears that these options may not be immediately available for all new accounts due to fraud checks: try sending a few SMS, checking back after a few days, or raising a support ticket. - -Under [Your Numbers](https://dashboard.nexmo.com/your-numbers), create a US number and ensure that is enabled for SMS. Note that Nexmo numbers appear to have a rate limit of 250 SMS per day. - -Under [Settings](https://dashboard.nexmo.com/settings), copy the API key into the environment variable `NEXMO_KEY`, and API secret into `NEXMO_SECRET`. - -If you wish to partition the numbers used within this account, you may choose to create and configure a [Nexmo application](https://dashboard.nexmo.com/applications/) for each one. In each application, enable messaging (labeled as `Communicate with WhatsApp, Facebook Messenger, MMS and Viber`) and assign a number. Copy each application's `Application Id` value into the appropriate instance's `NEXMO_APPLICATION` configuration value. There is no need to generate or use a public/private keypair. By default an Attestation Service will pick a number from the global pool of numbers not linked to a specific Nexmo application. The only effect of supplying `NEXMO_APPLICATION` is to select numbers from those linked to that application. - -Note that Attestation Service from version 1.2.0 no longer requires callback URLs to be supplied in the Nexmo dashboard, so supports using a single account for multiple Attestation Services. - -### MessageBird - -MessageBird support is introduced in version 1.2.0 and later. After signing up for [MessageBird](https://messagebird.com/en/), locate the `Your API Keys` section on the [Dashboard](https://dashboard.messagebird.com/en/user/index), click `Show` next to the `Live` key, and copy its value into the `MESSAGEBIRD_API_KEY` configuration variable. Click `Top Up` to add credit. MessageBird requires a dedicated number and/or KYC approval to send SMS to certain countries that validators must support. Click `Numbers` then [Buy Number](https://dashboard.messagebird.com/en/numbers/buy/search) to purchase a number. You will need to purchase separate numbers for both the USA and Canada. Then visit [SMS Settings](https://dashboard.messagebird.com/en/settings/sms) and request approval to send to these countries. - -## Installation - -This section uses several environment variables defined during the validator setup. You'll need to export `CELO_IMAGE` and `CELO_VALIDATOR_RG_ADDRESS` on this machine. - -Setting up an Attestation Service first requires an [Attestation Signer key](key-management/detailed.md#authorized-attestation-signers) to be registered (Similar to Validator and Vote signer keys). For that let's start our node on the Attestations machine (keep track of the password you use for this account): - -```bash -# On the Attestation machine -docker run -v $PWD:/root/.celo --rm -it $CELO_IMAGE account new -export CELO_ATTESTATION_SIGNER_ADDRESS= -``` - -Let's generate the proof-of-possession for the attestation signer: - -```bash -# On the Attestation machine -docker run -v $PWD:/root/.celo --rm -it $CELO_IMAGE account proof-of-possession $CELO_ATTESTATION_SIGNER_ADDRESS $CELO_VALIDATOR_RG_ADDRESS -``` - -With this proof, authorize the attestation signer on your local machine: - -```bash -# On your local machine -export CELO_ATTESTATION_SIGNER_SIGNATURE= -export CELO_ATTESTATION_SIGNER_ADDRESS= -celocli releasegold:authorize --contract $CELO_VALIDATOR_RG_ADDRESS --role attestation --signature 0x$CELO_ATTESTATION_SIGNER_SIGNATURE --signer $CELO_ATTESTATION_SIGNER_ADDRESS -``` - -You can now run the node for the attestation service in the background with the following command. Remember to specify the password you used during the creation of the `CELO_ATTESTATION_SIGNER_ADDRESS`. And, if you want to run the attestation service for Baklava, add the `--baklava` flag. - -```bash -# On the Attestation machine -echo > .password -docker run --name celo-attestations -it --restart always --stop-timeout 300 -p 127.0.0.1:8545:8545 -v $PWD:/root/.celo $CELO_IMAGE --verbosity 3 --syncmode full --rpc --rpcaddr 0.0.0.0 --rpcapi eth,net,web3,debug,admin --unlock $CELO_ATTESTATION_SIGNER_ADDRESS --password /root/.celo/.password --allow-insecure-unlock -``` - -### Database Configuration - -For storing and retrieving the attestation requests the service needs a database to persist that information. Currently `sqlite`, `postgres` and `mysql` are supported. For testing purposes you can use `sqlite` but it's recommended to run a stand-alone database server using `mysql` or `postgres` if your intention is running the Attestation Service in a production environment. If you are running on a popular cloud provider, consider using their hosted SQL services. - -Depending on your database technology you need to create a database with the access for a specific user and password. - -For specifying the database url you need to setup the `DATABASE_URL` variable in one of these ways: - -```bash -# On the Attestation machine -export DATABASE_URL="sqlite://db/attestation.db" -export DATABASE_URL="mysql://user:password@mysql.example.com:3306/attestation-service" -export DATABASE_URL="postgres://user:password@postgres.example.com:5432/attestation-service" -``` - -**Example of setting up a local postgres database on Ubuntu**: - -```bash -apt install postgresql -sudo -u postgres createdb attestation-service -sudo -u postgres psql -c "ALTER USER postgres PASSWORD '';" -export DATABASE_URL="postgres://postgres:@localhost:5432/attestation-service" -``` - -## Configuration - -Attestation Service can use its config from a file that can be specified using `CONFIG` environment variable. It is recommended that you start using the [template Attestation Service config file](https://github.com/celo-org/celo-monorepo/blob/master/packages/attestation-service/config/.env.development): - -```bash -# Choose a location for the config and fetch the defaults -export CONFIG=/path/to/attestation-service-config -curl https://raw.githubusercontent.com/celo-org/celo-monorepo/master/packages/attestation-service/config/.env.development >$CONFIG -``` - -Lines beginning `#` are treated as comments. In addition, any options specified as environment variables override values provided in this file. - -Required options: - -| Variable | Explanation | -|--------------------------------|-------------------------------------------------------------------------------------------------| -| `DATABASE_URL` | The URL to access the local database, e.g. `sqlite://db/attestations.db` | -| `CELO_PROVIDER` | The node URL for your local full node at which your attestation signer key is unlocked. e.g. `http://localhost:8545`. Do not expose this port to the public internet! | -| `CELO_VALIDATOR_ADDRESS` | Address of the Validator account. If Validator is deployed via a `ReleaseGold` contract, this is the contract's address (i.e. `$CELO_VALIDATOR_RG_ADDRESS`), not the beneficiary. | -| `ATTESTATION_SIGNER_ADDRESS` | Address of the Validator's attestation signer key | -| `SMS_PROVIDERS` | Comma-separated list of all enabled SMS providers. Can include `twilio`, `nexmo`. From v1.2.0, can include `messagebird`. Providers are tried from first to last, unless `SMS_PROVIDERS_RANDOMIZED` is set to `1`, in which case they are tried in a random order. | - | - -Optional environment variables: - -| Variable | Explanation | -|--------------------------------|-------------------------------------------------------------------------------------------------| -| `PORT` | Port to listen on. Default `3000`. | -| `RATE_LIMIT_REQS_PER_MIN` | (v1.2.0+) Requests per minute over all endpoints before new requests are rate limited. Default `100`. | -| `SMS_PROVIDERS_` | Override to set SMS providers and order for a specific country code (e.g `SMS_PROVIDERS_MX=nexmo,twilio`) | -| `SMS_PROVIDERS_RANDOMIZED` | (v1.2.0+) If set to `1` and no country-specific providers are configured for the country of the number being requested, randomize the order of the default providers. Default `0`. | -| `MAX_DELIVERY_ATTEMPTS` | Number of total delivery attempts when sending SMS. Each attempt tries the next available provider in the order specified. If omitted, the deprecated `MAX_PROVIDER_RETRIES` option will be used. Default value is `3`. | -| `MAX_REREQUEST_MINS` | Number of minutes during which the client can rerequest the same attestation. Default value is `55`. -| `EXTERNAL_CALLBACK_HOSTPORT` | Provide the full external URL at which the service can be reached, usually the same as the value of the `ATTESTATION_SERVICE_URL` claim in your metadata. This value, plus a suffix e.g. `/delivery_status_twilio` will be the URL at which service can receive delivery receipt callbacks. If this value is not set, and `VERIFY_CONFIG_ON_STARTUP=1` (the default), the URL will be taken from the validator metadata. Otherwise, it must be supplied. | -| `VERIFY_CONFIG_ON_STARTUP` | Refuse to start if signer or metadata is misconfigured. Default `1`. If you disable this, you must specify `EXTERNAL_CALLBACK_HOSTPORT`. | -| `MAX_AGE_LATEST_BLOCK_SECS` | (v1.2.0+) Maximum age of the latest received block, in seconds, before the health check reports failure. Default is `20`. | -| `DB_RECORD_EXPIRY_MINS` | Time in minutes before a record of an attestation in the database may be deleted. Default 60 minutes. | -| `LOG_LEVEL` | One of `fatal`, `error`, `warn`, `info`, `debug`, `trace` | -| `LOG_FORMAT` | One of `json`, `human`, `stackdriver` | -| `APP_SIGNATURE` | A value that is shown under the key `appSignature` field in the `/status` endpoint that you can use to identify multiple instances. | - -Twilio configuration options: - -| Variable | Explanation | -| ------------------------------ | --------------------------------------------------------------- | -| `TWILIO_ACCOUNT_SID` | The Twilio account ID | -| `TWILIO_MESSAGING_SERVICE_SID` | The Twilio Message Service ID. Starts with `MG` | -| `TWILIO_AUTH_TOKEN` | The API authentication token | -| `TWILIO_UNSUPPORTED_REGIONS` | Optional. A comma-separated list of country codes to not serve, recommended value `CU,SY,KP,IR,SD` | - -Nexmo configuration options: - -| Variable | Explanation | -| --------------------------- | --------------------------------------------------------------- | -| `NEXMO_KEY` | The API key to the Nexmo API | -| `NEXMO_SECRET` | The API secret to the Nexmo API | -| `NEXMO_APPLICATION` | Optional. Use only numbers linked to the Nexmo application with matching ID, rather than the global pool. | -| `NEXMO_UNSUPPORTED_REGIONS` | Optional. A comma-separated list of country codes to not serve, recommended value `CU,SY,KP,IR,SD` | -| `NEXMO_ACCOUNT_BALANCE_METRIC` | Optional. Disabled by default. If set to `1`, Nexmo balances will be published under the `attestation_provider_balance` metric. | - -MessageBird configuration options (v1.2.0+): - -| Variable | Explanation | -| --------------------------- | --------------------------------------------------------------- | -| `MESSAGEBIRD_API_KEY` | The API key to the MessageBird API | -| `MESSAGEBIRD_UNSUPPORTED_REGIONS` | Optional. A comma-separated list of country codes to not serve, recommended value `CU,SY,KP,IR,SD` | - -## Registering Metadata - -Celo uses [Metadata](../celo-codebase/protocol/identity/metadata.md) to allow accounts to make certain claims without having to do so on-chain. Users can use any authorized signer address to make claims on behalf of the registered Account. For convenience this guide uses the `CELO_ATTESTATION_SIGNER_ADDRESS`, but any authorized signer will work. Note that metadata needs recreating if the key signing it is changed; it is recommended not to use the validator signer address since that key is typically rotated more regularly. - -To complete the metadata process, we have to claim which URL users can request attestations from. Run the following commands on your local machine. This section uses several environment variables defined during the validator setup. - -```bash -# On your local machine -celocli account:create-metadata ./metadata.json --from $CELO_VALIDATOR_RG_ADDRESS -``` - -The `CELO_ATTESTATION_SERVICE_URL` variable stores the URL to access the Attestation Service deployed. In the following command we specify the URL where this Attestation Service is. Note that the URL provided in the validator metadata should be the base path at which the serice is accessible; it should NOT include `/attestations`. - -```bash -# On your local machine -celocli account:claim-attestation-service-url ./metadata.json --url $CELO_ATTESTATION_SERVICE_URL --from $CELO_ATTESTATION_SIGNER_ADDRESS -``` - -You should now host your metadata somewhere reachable via HTTPS. You can use a service like [gist.github.com](https://gist.github.com). Create a gist with the contents of the file and then click on the `Raw` button to receive the permalink to the machine-readable file. - -Now we can register this url for others to see. To do this, we must have the `beneficiary` address of the `ReleaseGold` contract (`CELO_VALIDATOR_ADDRESS`) unlocked. - -(Note: If you used a Ledger to create the `beneficiary` address, add the ```--useLedger``` flag and possibly the ```--ledgerAddresses=N``` flag to the below command. The latter flag will have the ledger check N number of addresses, e.g. ```--ledgerAddresses=5``` would have the Ledger check 5 addresses. Don't forget to confirm the transaction on your Ledger after initiating it via the CLI.) - -```bash -# On your local machine -celocli releasegold:set-account --contract $CELO_VALIDATOR_RG_ADDRESS --property metaURL --value -``` - -If everything goes well users should be able to see your claims by running: - -```bash -# On your local machine -celocli account:get-metadata $CELO_VALIDATOR_RG_ADDRESS -``` - -## Running the Attestation Service - -Before running the attestation service, ensure that your local node is fully synced and that the metadata has been registered. - -```bash -# On the Attestation machine -sudo celocli node:synced --node geth.ipc -``` - -The following command for running the Attestation Service uses `--network host` to access a local database (only works on Linux), and listens for connections on port 80. - -It assumes all of the configuration options needed have been added to the config file located under `$CONFIG` which Docker will process. Alternatively, you can pass the config file for the service to read on startup using `-e CONFIG=`, and other environment variables directly by adding arguments of the form `-e DATABASE_URL=$DATABASE_URL`. - -Set the `TAG` environment variable to determine which image to install. Use `attestation-service-mainnet` for the latest image suitable for mainnet (as below), `attestation-service-baklava` for the latest image suitable for baklava, or specify a specific build as given in the release notes linked above. - -```bash -# On the Attestation machine -export TAG=attestation-service-mainnet -docker run --name celo-attestation-service -it --restart always --entrypoint /bin/bash --network host --env-file $CONFIG -e PORT=80 -p 80:80 us.gcr.io/celo-testnet/celo-monorepo:$TAG -c " cd /celo-monorepo/packages/attestation-service && yarn run db:migrate && yarn start " -``` - -### Delivery Receipts - -Attestation Services supports delivery receipts so that SMS providers can callback to provide delivery information. This triggers retries as needed, even between providers, and enables delivery success and timing metrics to be logged and made accessible to the client. - -There is no configuration necessary to enable Twilio or Nexmo delivery receipts. The Attestation Service uses the URL in the validator metadata, provided that `VERIFY_CONFIG_ON_STARTUP` is enabled. The URL for callbacks can always be specified with the `EXTERNAL_CALLBACK_HOSTPORT` configuration option. The service appends `/delivery_status_{twilio, nexmo}` on to the URL, and supplies that to the provider through its API. - -For MessageBird, provide the callback URL (be sure to include `/delivery_status_messagebird`) in the MessageBird dashboard's [API Settings](https://dashboard.messagebird.com/en/developers/settings) page. - -If you are using a load balancer in front of Attestation Service with a URL based routing configuration, be careful to prevent these routes being filtered. - -### Test Endpoint - -Attestation Service provides a test endpoint. - -You can run the following command ([reference]("../command-line-interface/identity.md#celocli identity:test-attestation-service")) to test an Attestation Service and send an SMS to yourself: - -```bash -celocli identity:test-attestation-service --from $CELO_ATTESTATION_SIGNER_ADDRESS --phoneNumber --message [--provider ] -``` - -You need the attestation signer key available and unlocked on your local machine. - -You may wish to do this once for each provider you have configured (`--provider=twilio`, `--provider=nexmo` etc). (If this option is not recognized, try upgrading `celocli`). - -Note that this does not use an identical code path to real attestations (since those require specific on-chain state) so this endpoint should not be used in place of monitoring logs and metrics. - -You should receive an SMS, and the Attestation Service should log messages indicating that the message was `Sent` and then, if delivery reports can be made successfully, `Delivered`. Depending on the provider, you may receive several callbacks as the message progresses through the network. - -If this works then your attestation service should be successfully deployed! - -## Monitoring - -It is important to monitor the Attestation Service and also [monitor the full node](monitoring.md) that it depends on. - -### Logging - -The Attestation Service provides JSON-format structured logs. - -### Healthcheck - -The `/healthz` endpoint will respond with status `200` when all of the following are true: the attestation signer key is available and unlocked, the node is not syncing, the latest block is recent, and the database is accessible. Otherwise it will respond with status `500`. - -Use this endpoint when configuring a load balancer in front of multiple instances. The results of the last healthcheck are reported via the `attestation_service_healthy` metric. - -Attestation Service also has a `/status` endpoint for configuration information. - -### Metrics - -Attestation Service exposes the following Prometheus format metrics at `/metrics` for attestations made. Please note that metrics are per instance. - -Please note that monitoring endpoints including metrics are exposed as a path on the usual host port. This means they are public by default. If you want metrics to be internal only, you will need to configure a load balancer appropriately. - -Metrics for the service: - -- `attestation_service_healthy`: Gauge with value `0` or `1` indicating whether the instance failed or passed its last [healthcheck](#healthcheck). Calls to `/healthz` update this gauge, and the process also runs a background healthcheck every minute. It is strongly recommended that you monitor this metric. - -Metrics for attestation requests: - -- `attestation_requests_total`: Counter for the number of attestation requests. - -- `attestation_requests_rerequest`: Counter for the number of attestation re-requests. A client that rerequests the same attestation is similar to the service receiving a delivery failure notification. - -- `attestation_requests_already_sent`: Counter for the number of attestation requests that were received but dropped because the local database records that they have already been completed. - -- `attestation_requests_wrong_issuer`: Counter for the number of attestation requests that were received but dropped because they specified the incorrect validator. - -- `attestation_requests_without_incomplete_attestation`: Counter for the number of attestation requests that were received but when querying the blockchain no matching incomplete attestation could be found. - -- `attestation_requests_valid`: Counter for the number of requests received that are for the correct issuer and an incomplete attestation exists. - -- `attestation_requests_attestation_errors`: Counter for the number of requests for which producing the attestation failed. This could be due to phone number or salt that does not match the hash, or the attestation was recorded fewer than 4 blocks ago. - -- `attestation_requests_unable_to_serve`: Counters for the number of requests that could not be served because no SMS provider was configured for the phone number in the request. Label `country` breaks down the count by country code. - -- `attestation_requests_number_type`: Counter for attestation requests by the type of the phone number. Label `country` breaks down the counny by country code. Label `type` has values including: `fixed_line`, `mobile`, `fixed_line_or_mobile`, `toll_free`, `premium_rate`, `shared_cost`, `voip`, `personal_number`, `pager`, `uan`, `voicemail`, `unknown`. - -- `attestation_requests_sent_sms`: Counter for the number of SMS successfully sent. - -- `attestation_requests_failed_to_send_sms`: Counter for the number of SMS that failed to send. - -- `attestation_requests_believed_delivered_sms`: Counter for the number of SMS that were eventually delivered, or believed to be delivered after a timeout without hearing about delivery failure. - -- `attestation_requests_unexpected_errors`: Counter for the number of unexpected errors. - -The following metrics track each delivery attempt. Each client request for an attestation may result in several delivery attempts, at most `MAX_DELIVERY_ATTEMPTS` configured for that country: - -- `attestation_attempts_delivery_status`: Counter for delivery attempts made. Label `country` breaks down the count by country code. Label `provider` identifies the provider. Label `status` identifies the outcome: - - - `Created`: The request was accepted by the provider. - - - `Queued`: The SMS is buffered or queued, but still in flight. - - - `Upstream`: The SMS was passed to an upstream carrier. - - - `Delivered`: A final delivery receipt was received indicating the SMS was succesfully delivered. - -- `attestation_attempts_delivery_error_codes`: Counter for delivery attempts made. Label `country` breaks down the count by country code. Label `provider` identifies the provider. Label `code` identifies the provider-specific error codes: see [Twilio error codes](https://www.twilio.com/docs/api/errors#3-anchor) and [Nexmo error codes](https://developer.nexmo.com/messaging/sms/guides/delivery-receipts#dlr-error-codes) for more details. - -Administrative metrics: - -- The `attestation_provider_balance` tracks the value of the balance of accounts at supported providers. Label `provider` identifies the provider. This is currently only supported for Nexmo, and is off by default but can be enabled by setting `NEXMO_ACCOUNT_BALANCE_METRIC`. The metric is populated as a value in the account currency, e.g USD, and only once a successful SMS has been delivered by that provider. - -### Blockchain - -The number of requested and entirely completed attestations is in effect recorded on the blockchain. The values can be seen at [Celo Explorer](https://explorer.celo.org): enter the Validator's address and click the 'Celo Info' tab. - -[TheCelo](https://thecelo.com/?tab=attestations) tracks global attestation counts and success rates, and shows detailed information about recent attestation attempts. - -### Attestation Service Dashboard - -After your service is up and running, you can monitor its performance using the public [Attestation Service Dashboard](https://metabase.celo-networks-dev.org/public/dashboard/b0a27650-1d62-4645-81d7-26ff7546ff0d?date_filter=past2weeks~). Enter your validator address in the top right search bar to view your service's stats. This dashboard can also be useful for troubleshooting various issues that will arise with certain geographic regions or providers. diff --git a/packages/docs/validator-guide/celo-foundation-voting-policy.md b/packages/docs/validator-guide/celo-foundation-voting-policy.md deleted file mode 100644 index 9acbff01c63..00000000000 --- a/packages/docs/validator-guide/celo-foundation-voting-policy.md +++ /dev/null @@ -1,136 +0,0 @@ -# Celo Foundation Validator Voting Policy - -The following describes how the Celo Foundation anticipates allocating its votes to validator groups, with special attention to the first allocated groups at the Celo Mainnet release and the months thereafter. - -{% hint style="info" %} -The policy described here can change at any time as determined by the Foundation Board. -{% endhint %} - -## Policy Objectives - -The Foundation voting policy aims to: -* Be fair by avoiding preferential treatment to certain groups; -* Vote in-line with the Foundation’s purpose, which is to encourage financial inclusion and prosperity for all; -* Encourage professional, secure, and reliable validators; -* Be equal opportunity by enabling new groups to have validators elected; and -* Promote network stability by encouraging a gradual turnover in elected validators instead of abrupt election changes - -## Process - -Every 3 months, the Foundation, through its Board, will distribute a portion of its total available votes to a cohort of validator groups. These validators must meet certain basic standards (details below) and alignment with the Foundation’s purpose. The total number of validator groups in a cohort can vary. - -Validator groups who will be selected for a cohort (and will thus receive a portion of the Foundation’s votes) will be informed by the following (non-exhaustive) considerations: - -1. The number of elected validators in earlier cohorts; -2. Network stability; -3. CELO governance participation (e.g., how many CELO holders are actively participating in voting); and -4. The quality of validator group applicants - -Each validator group selected in the cohort will receive a portion of the Foundation votes for a period of 9 months. During this period, so long as a validator in the group is not slashed or otherwise engages in misbehavior, the validator group will continue to receive these votes. If the validator group is slashed or engages in misbehavior, however, the votes for that validator group will be withdrawn for the remainder of the period. If the validator group is slashed, it may reapply to the Foundation after a 6 month period. In addition, the Foundation may also withdraw its votes if the validator group or the validators in the group fail to meet other standards, including running an attestation service. - -![](https://storage.googleapis.com/celo-website/docs/celo-foundation-cohorts.jpg) - -## Eligibility Criteria - -### Standard Criteria - -To support effective and responsible validators, the Foundation considers the following, basic criteria, which must be met by all applicants who receive Foundation votes: - -* **Zero Slashing Incidents.** The validator members of any applying group must not have been slashed within the last 6 months of application. (Note, there are a variety of reasons for slashing, including downtime, security issues, etc. At the outset, and because groups can re-apply at 6 months and 1 day of the slashing, all slashing will be considered equal at this stage) - -* **Audit Checklist and Self Reporting.** As part of the application process, the Foundation will publish a list of recommended validator settings. The members of every group applying will self attest to complying with the recommended checklist. - -* **Education.** An effective validator must be secure. Applicants’ members will take an education course. The course must be completed annually. - -* **Basic Diligence.** Because the Foundation holds a substantial number of votes, and its voting may determine whether a validator is elected, the Foundation will conduct a basic diligence process for voted groups. The diligence would include name, location, entity information. This diligence would occur on an annual basis for any group receiving votes. - -* **Attestation Service.** Ability and commitment to running attestation services. - -* **Performance.** Performance uptime score over the past 30 days on Mainnet (or Baklava if not elected on Mainnet) - -* **Attestation Performance.** Attestation Performance (attestations fulfilled / requests served) over the past 30 days on Mainnet (or Baklava if not elected Mainnet) - -### Additional Criteria - -In addition to meeting the standard criteria, outlined above, the Foundation anticipates prioritizing validator groups who are mission aligned and/or will provide greater network resilience. These criteria may include: - -* The geographical location of the validator group - -* Non-profit organizations - -* Organizations who commit to donating a percentage of rewards to non-profit organizations - -* The likelihood of the validator group having substantial network support from other voters - -#### Notes On Improving Your Standard Criteria - -* More points are given to those who have performed an external security audit on their infrastructure over those who have self-audited. - -* If you are NOT ELECTED on Mainnet, you must be validating on Baklava testnet for at least 30 days. If you are ELECTED you must run validators and attestation service for at least one month (30 days) on Mainnet. If you are ELECTED on mainnet but for less than 30 days, you must be validating on Baklava for 30 days at least. - -* Mission statement and community contributions may make a big difference in whether your application is approved or not. - -## Application - -{% hint style="danger" %} -Make sure to complete all prerequisites before applying. -{% endhint %} - -{% hint style="info" %} -Note: Application for Cohort 7 is now closed. -{% endhint %} - -### Timings -Cohort 7 application deadline: **April 10, 2021 at 23:59 UTC** - -Anticipated vote date for selected applicants in Cohort 7: **May 1, 2021** - -{% hint style="danger" %} -Note: The anticipated vote date for new cohorts is a best-guess estimate given the requirements and coordination when it comes to voting for new applicants. -{% endhint %} - - - -### Application Prerequisites -Before applying all validator group members should have: -* Completed the [Mastering the Art of Validating](https://youtu.be/3UIudzzCb8o) and [Validator Group Marketing](https://www.youtube.com/watch?v=0_veGIugCGQ) courses -* Completed the [Security Self Assessment Audit](https://docs.google.com/presentation/d/e/2PACX-1vRdKNpXI2mvqwQF6L5LRrxPW2qRK-5MDce5EhqXqLC1MSYmupZMFnhp6YEP0gLYuRKW-FF0fcAqhEAp/pub?start=true&loop=false&delayms=10000&slide=id.g76d52a0216_0_333), which includes completing this [checklist](https://docs.google.com/spreadsheets/d/1FqmUfleCoyNIUep7PoVu3ujHd-OkHZJ8o6p7Affr93w/edit?usp=sharing) -* Run at least one Validator and Validator Group on Mainnet or Baklava -* Run an Attestation Service on either Mainnet or Baklava - -### Application Details -Before applying be ready to share the following: -* A personal statement telling the Foundation why your group should get votes (max 1,500 characters) -* Validator Group details: email, name, website, address on Mainnet and Baklava, and geographic location -* Information about your team: full names, link to professional profiles such as LinkedIn or GitHub, and an explanation of the team’s relevant experience -* Whether your Group: - * Is validating or has validated in the past 1 month on the Celo Mainnet - * Is currently receiving Foundation votes - * Has been slashed in the past 6 months and if so why - * Members have all completed the online training (see prerequisites) - * Members have all completed the self-audit (see prerequisites) - * Is a non-profit organization or donates to such organizations - * Is a Foundation grant recipient - * Is running or has run in the past 1 month a Validator on the Baklava testnet -* Optional: - * The list of contributions made to the Celo ecosystem - * Date, audit firm name, and report of your last security audit if your Group has been audited by an external firm in the past 12 months - -### Cohort Information - -Past Foundation votes recipients: -* **Cohort 1:** The Great Celo Stake Off [leaderboard](https://docs.google.com/spreadsheets/d/1Me56YkCHYmsN23gSMgDb1hZ_ezN0sTjNW4kyGbAO9vc/edit#gid=1970613133) participants at ranking 26-50 -- votes expired on Aug 1, 2020 -* **Cohort 2:** The Great Celo Stake Off [leaderboard](https://docs.google.com/spreadsheets/d/1Me56YkCHYmsN23gSMgDb1hZ_ezN0sTjNW4kyGbAO9vc/edit#gid=1970613133) participants at ranking 1-25 -- votes expired on Nov 1, 2020 -* **Cohort 3:** [6 validator groups](https://docs.google.com/spreadsheets/d/1OkWnr6EOeFn4pIv0zxmXFNtHLmKWf_qCJOJ4iacov-A/edit?usp=sharing) -- votes will expire on Feb 1, 2021 -* **Cohort 4:** [22 validator groups](https://docs.google.com/spreadsheets/d/1bp2nJUxqhWner-uOffBohKQc3N93e--eMpP7XOBrbGI/edit?usp=sharing) -- votes expired on May 1, 2021 - -Currently receiving Foundation votes: -* **Cohort 5:** [24 validator groups](https://docs.google.com/spreadsheets/d/1n2lwFsAsFaohng4Bo_FEWcoXzZl5CrLFxA6EK0nuFSA/edit#gid=0) -- votes expired on Aug 1, 2021 -* **Cohort 6:** [7 validator groups](https://docs.google.com/spreadsheets/d/1HT_fN-mSAL2etF0Po_h122jeU1zpEtdpb_khogOfBCg/edit?usp=sharing) -- votes will expire on Nov 1, 2021 -* **Cohort 7:** [23 validator groups](https://docs.google.com/spreadsheets/d/1eYBzQMObTAy-WKs5CHHFnGGl_k1rQo0MBHinV3OgSik/edit#gid=1466530578) -- votes will expire on Feb 1, 2022 - -{% hint style="info" %} -If you would like to keep up-to-date with all the news happening in the Celo community, including validation, node operation and governance, please sign up to our [Celo Signal mailing list here](https://celo.activehosted.com/f/15). - -You can add the [Celo Signal public calendar](https://calendar.google.com/calendar/u/0/embed?src=c_9su6ich1uhmetr4ob3sij6kaqs@group.calendar.google.com) as well which has relevant dates. -{% endhint %} diff --git a/packages/docs/validator-guide/celo-signal.md b/packages/docs/validator-guide/celo-signal.md deleted file mode 100644 index 0e17020e42a..00000000000 --- a/packages/docs/validator-guide/celo-signal.md +++ /dev/null @@ -1,26 +0,0 @@ -# Celo Signal - -Celo Signal is a mailing list for everything that involves the core community of Celo as well as Celo owners who participate in governance. - -If you are a: -* Validator -* Node Operator -* Dapp Running Its Own Node -* Exchange or Custodian -* Owner who is Staking + Participating in Governance -* Core Developer or Contributor - -Then Celo Signal Mailing List is a great way to keep up with everything happening in Celo's core community. - -Updates include information on following events: -* Celo All-Core Dev Call (where Celo Platform enhancements and proposals are discussed in the community) -* Celo Governance Call (where governance proposals are discussed prior to submission on-chain) -* Celo Foundation Voting Program updates -* celo-blockchain node and attestation service release updates -* Hardfork Updates -* Celo Core Contract Release schedule -* Core Community Happy Hour - -If you would like to keep up-to-date with all the news happening in the Celo community, including validation, node operation and governance, please sign up to our [Celo Signal mailing list here](https://celo.activehosted.com/f/15). - -You can add the [Celo Signal public calendar](https://calendar.google.com/calendar/u/0/embed?src=c_9su6ich1uhmetr4ob3sij6kaqs@group.calendar.google.com) as well which has relevant dates. diff --git a/packages/docs/validator-guide/devops-best-practices.md b/packages/docs/validator-guide/devops-best-practices.md deleted file mode 100644 index 6576c9af055..00000000000 --- a/packages/docs/validator-guide/devops-best-practices.md +++ /dev/null @@ -1,25 +0,0 @@ -# DevOps Best Practices - -## Cloud Infrastructure Best Practices - -### Node Redundancy - -If you are running your celo-blockchain nodes for mainnet in the cloud as a validator, then we recommend having more than one node running. - -You can use the redundant validator node as a backup node. It's important that it should only be used as a backup node so you must not enable block-signing with it (to avoid double signing). - -In case your primary validator node fails for some reason, then having the redundant node is extremely valuable as you can add the validator keys to it and point it to your proxy to continue signing blocks. - - -### Snapshotting - -Another useful thing you can do is enabling snapshotting on your redundant node. - -There's no best answer on cadence for snapshotting your redundant node, but one snapshot a week is a good estimate, depending on budget and how the cloud provider charges for snapshotting. - -That way, in the event of a node or instance failure on your validator box, which can potentially lead to database failure and requiring you to resync your validator node, then you can use your snapshot as a starting point for syncing and don't have to wait too long to sync. - - -### Kubernetes - -We are working on getting a Kubernetes recommended specification and will update this section once we have a recommended spec. If you are using Kubernetes with your validator node, feel free to submit a PR to update this section with your setup. diff --git a/packages/docs/validator-guide/key-management/detailed.md b/packages/docs/validator-guide/key-management/detailed.md deleted file mode 100644 index d5443c830f4..00000000000 --- a/packages/docs/validator-guide/key-management/detailed.md +++ /dev/null @@ -1,148 +0,0 @@ -# Detailed Description of Celo Account Roles - -This page provides a detailed description of the various account roles found in the Celo protocol, as well as small examples of how to designate an account as playing a particular role. - -## Celo Accounts - -Any private key generated for use in the Celo protocol has a corresponding address. The account address is the last 20 bytes of the hash of the corresponding public key, just as in Ethereum. Celo account keys can be used to sign and send transactions on the Celo network. - -Celo Accounts can be designated as Locked Gold Accounts or authorized as signer keys on behalf of a Locked Gold Account by sending special transactions using [celocli](../../command-line-interface/introduction.md). Note that Celo accounts that have not been designated as Locked Gold Accounts or authorized signers may not be able to send certain transactions related to proof-of-stake. - -## Locked Gold Accounts - -[Locked Gold](../../celo-codebase/protocol/proof-of-stake/locked-gold.md) Account keys have the highest level of privilege in the Celo protocol. These keys can be used to lock and unlock CELO in order to be used in proof-of-stake. Furthermore, Locked Gold Account keys can be used to authorize other keys to sign transactions and messages on behalf of the Locked Gold Account. - -In *most* cases, the Locked Gold Account key has all the privileges as any authorized signers. For example, if a voter signer is authorized, a user can place votes on behalf of the Locked Gold Account with both the authorized vote signer *and* the Locked Gold Account. - -Because of the significant priveleges afforded to the Locked Gold Account, it is best to store this key securely and access it as infrequently as is possible. Authorizing other signers is one way to minimize how frequently you need to access your Locked Gold Account key. The Locked Gold Account key will only be used to send transactions and **can be stored on a Ledger hardware wallet.** - -### Creating a Locked Gold Account - -A Celo account may be designated as a Locked Gold Account by running the following command: - -```shell -# Designate the Celo account as a Locked Gold Account -celocli account:register --from $ADDRESS_TO_DESIGNATE --useLedger - -# Confirm the address was designated as a Locked Gold Account -celocli account:show $ADDRESS_TO_DESIGNATE -``` - -Note that [ReleaseGold](../../celo-holder-guide/release-gold.md) beneficiary keys are considered vanilla Celo accounts with respect to proof-of-stake, and that the `ReleaseGold` contract address is what ultimately gets designated as a Locked Gold Account. - -## Authorized Vote Signers - -Any Locked Gold Account may optionally authorize a Celo account as a vote signer. Authorized vote signers can vote for validator groups and for on-chain governance proposals on behalf of the Locked Gold Account. - -Note that the vote signer must first generate a "proof-of-possession" indicating that signer's willingness to be authorized on behalf of the Locked Gold Account. - -Authorized vote signers can only be used to send voting transactions and **can be stored on a Ledger hardware wallet**. - - -### Authorizing a Vote Signer -A Celo account may be authorized as a vote signer on behalf of a Locked Gold Account by running the following commands: - -```shell -# Create a proof-of-possession. Note that the signer private key must be available. -celocli account:proof-of-possession --account $LOCKED_GOLD_ACCOUNT --signer $SIGNER_TO_AUTHORIZE --useLedger - -# Authorize the vote signer. Note that the Locked Gold Account private key must be available. -celocli account:authorize --from $LOCKED_GOLD_ACCOUNT --role vote --signer $SIGNER_TO_AUTHORIZE --signature $SIGNER_PROOF_OF_POSSESSION --useLedger - -# Confirm that the vote signer was authorized -celocli account:show $LOCKED_GOLD_ACCOUNT - -# You can also look up account info via the authorized signer -celocli account:show $SIGNER_TO_AUTHORIZE -``` - -## Authorized Validator Signers - -Any Locked Gold Account may optionally authorize a Celo account as a validator signer. Authorized validator signers can be used to register and manage a validator or validator group on behalf of the Locked Gold Account. If the authorized validator signer is used to register and run a validator, the signer key is also used to sign consensus messages. - -### Authorized Validator Signers for Validator Groups -An authorized validator signer key that will be used to register a validator group can be used to send group management transactions (e.g. register, add member A, queue commission update to 0.25, etc.) Because this key does not participate directly in consensus it **can be stored on a Ledger hardware wallet.** - -### Authorized Validator Signers for Validators -An authorized validator signer key that will be used to register a validator can be used to send validator management transactions (e.g. register, affiliate with group A, etc.) This key will also be used to sign consensus messages and thus **cannot be stored on a Ledger hardware wallet** as signing consensus messages is not currently supported by the Celo Ledger App. - -Note that the validator signer must first generate a "proof-of-possession" indicating the signer's willingness to be authorized on behalf of the Locked Gold Account. - -### Authorizing a Validator Signer -A Celo account may be authorized as a validator signer on behalf of a Locked Gold Account by running the following commands: - -```shell -# Create a proof-of-possession. Note that the signer private key must be available. -# Note that the signing key can be kept on a Ledger if it will be used to run a Validator Group. -celocli account:proof-of-possession --account $LOCKED_GOLD_ACCOUNT --signer $SIGNER_TO_AUTHORIZE - -# Authorize the validator signer. Note that the Locked Gold Account private key must be available. -# Note that if a Validator has previously been registered on behalf of the Locked Gold Account it -# may be desirable to include the BLS key here as well. Please see the documentation on -# validator key rotation for more information. -celocli account:authorize --from $LOCKED_GOLD_ACCOUNT --role validator --signer $SIGNER_TO_AUTHORIZE --signature $SIGNER_PROOF_OF_POSSESSION --useLedger - -# Confirm that the vote signer was authorized -celocli account:show $LOCKED_GOLD_ACCOUNT - -# You can also look up account info via the authorized signer -celocli account:show $SIGNER_TO_AUTHORIZE -``` - -## Authorized Validator BLS Signers - -The Celo protocol uses BLS signatures in consensus to ultimately determine whether or not a particular block is valid. Many BLS signatures over the same content can be combined into a single "aggregated signature", allowing several kilobytes of signatures to be compressed into fewer than 100 bytes, ensuring that the block headers remain compact and light client friendly. - -When registering a Validator on behalf of a Locked Gold Account, users must provide a BLS public key, as well as a proof-of-possession to protect against [rogue key attacks](https://crypto.stanford.edu/~dabo/pubs/papers/BLSmultisig.html). - -By default users can derive the BLS key directly from their authorized validator signer key. From a key management and security perspective, this means that the authorized BLS signer key is **exactly the same** as the authorized validator signer key. - -Most users will only need to think about BLS signer keys when registering a validator, or when authorizing a new validator signer *after* registering a validator. It follows that when a validator authorizes a new validator signer, the BLS public key and proof-of-possession for the new authorized validator signer should be provided as well. - -Advanced users may optionally derive their BLS key separately, but that is out of the scope of this documentation. - -### Deriving a BLS public key - -To derive a BLS public key and proof-of-possession from the authorized validator signer key, and use that information to register a validator, run the following commands: -```shell -# Derive the BLS public key and create a proof-of-possession. Note that the signer private key must be available. -# Also note that BLS proof-of-possessions are not currently supported by celocli -docker run -v $PWD:/root/.celo --rm -it $CELO_IMAGE --nousb account proof-of-possession $AUTHORIZED_VALIDATOR_SIGNER $LOCKED_GOLD_ACCOUNT --bls - -# Register the Validator with the authorized validator signer on behalf of the Locked Gold Account -celocli validator:register --from $AUTHORIZED_VALIDATOR_SIGNER --blsKey $BLS_SIGNER_PUBLIC_KEY --blsSignature $BLS_SIGNER_PROOF_OF_POSSESSION - -# Confirm that the validator was registered -celocli validator:show $LOCKED_GOLD_ACCOUNT - -# You can also look up the validator via the authorized signer -celocli validator:show $AUTHORIZED_VALIDATOR_SIGNER -``` - -## Authorized Attestation Signers - -Any Locked Gold Account may optionally authorize a Celo account as an attestation signer. Authorized attestation signers can sign attestation messages on behalf of the Locked Gold Account in Celo's [lightweight identity protocol](../../celo-codebase/protocol/identity/). - -Note that the Celo Ledger App does yet not support signing attestation messages and as such attestation signer keys **cannot be stored on a Ledger hardware wallet**. - -Note that the attestation signer must first be used to generate a "proof-of-possession" indicating the signer's willingness to be authorized on behalf of the Locked Gold Account. - - -### Authorizing an Attestation Signer -A Celo account may be authorized as a vote signer on behalf of a Locked Gold Account by running the following commands: - -```shell -# Create a proof-of-possession. Note that the signer private key must be available. -celocli account:proof-of-possession --account $LOCKED_GOLD_ACCOUNT --signer $SIGNER_TO_AUTHORIZE -# If celocli is unavailable on the attestations node, the proof-of-possession can be generated with celo-blockchain -docker run -v $PWD:/root/.celo --rm -it $CELO_IMAGE account proof-of-possession $SIGNER_TO_AUTHORIZE $LOCKED_GOLD_ACCOUNT - -# Authorize the attestation signer. Note that the Locked Gold Account private key must be available. -celocli account:authorize --from $LOCKED_GOLD_ACCOUNT --role attestations --signer $SIGNER_TO_AUTHORIZE --signature $SIGNER_PROOF_OF_POSSESSION --useLedger - -# Confirm that the vote signer was authorized -celocli account:show $LOCKED_GOLD_ACCOUNT - -# You can also look up account info via the authorized signer -celocli account:show $SIGNER_TO_AUTHORIZE -``` diff --git a/packages/docs/validator-guide/key-management/key-rotation.md b/packages/docs/validator-guide/key-management/key-rotation.md deleted file mode 100644 index dd8a7584bbe..00000000000 --- a/packages/docs/validator-guide/key-management/key-rotation.md +++ /dev/null @@ -1,53 +0,0 @@ -## Key Rotation - -As detailed in [the Celo account roles description page](./detailed.md), Celo Locked Gold accounts can authorize separate signer keys for various roles such as voting or validating. This way, if an authorized signer key is lost or compromised, the Locked Gold account can authorize a new signer to replace the old one, without risking the key that custodies funds. This prevents losing an authorized signer key from becoming a catastrophic event. In fact, it is recommended as an operational best practice to regularly rotate keys to limit the impact of keys being silently compromised. - -### Validator Signer Rotation - -Because the Validator signer key is constantly in use to sign consensus messages, special care must be taken when authorizing a new Validator signer key. The following steps detail the recommended procedure for rotating the validator signer key of an active and elected validator: - -1. Create a new Validator instance as detailed in the [Deploy a Validator](../../getting-started/running-a-validator-in-mainnet.md#deploy-a-validator-machine) section of the getting started documentation. When using a proxy, additionally create a new proxy and peer it with the new validator instance, as described in the same document. Wait for the new instances to sync before proceeding. Please note that when running the proxy, the `--proxy.proxiedvalidatoraddress` flag should reflect the new validator signer address. Otherwise, the proxy will not be able to peer with the validator. - - {% hint style="warning" %} - Before proceeding to step 2 ensure there is sufficient time until the end of the epoch to complete key rotation. - {% endhint %} - -2. Authorize the new Validator signer key with the Locked Gold Account to overwrite the old Validator signer key. - - ```bash - # With $SIGNER_TO_AUTHORIZE as the new validator signer: - - # On the new validator node which contains the new $SIGNER_TO_AUTHORIZE key - docker run -v $PWD:/root/.celo --rm -it $CELO_IMAGE --nousb account proof-of-possession $SIGNER_TO_AUTHORIZE $VALIDATOR_ACCOUNT_ADDRESS - docker run -v $PWD:/root/.celo --rm -it $CELO_IMAGE --nousb account proof-of-possession $SIGNER_TO_AUTHORIZE $VALIDATOR_ACCOUNT_ADDRESS --bls - ``` - - 1. If `VALIDATOR_ACCOUNT_ADDRESS` corresponds to a key you possess: - ```bash - # From a node with access to the key for VALIDATOR_ACCOUNT_ADDRESS - celocli account:authorize --from $VALIDATOR_ACCOUNT_ADDRESS --role validator --signer $SIGNER_TO_AUTHORIZE --signature 0x$SIGNER_PROOF_OF_POSSESSION --blsKey $BLS_PUBLIC_KEY --blsPop $BLS_PROOF_OF_POSSESSION - ``` - - 2. If `VALIDATOR_ACCOUNT_ADDRESS` is a `ReleaseGold` contract: - ```bash - # From a node with access to the beneficiary key of VALIDATOR_ACCOUNT_ADDRESS - celocli releasegold:authorize --contract $VALIDATOR_ACCOUNT_ADDRESS --role validator --signer $SIGNER_TO_AUTHORIZE --signature 0x$SIGNER_PROOF_OF_POSSESSION --blsKey $BLS_PUBLIC_KEY --blsPop $BLS_PROOF_OF_POSSESSION - ``` - - {% hint style="warning" %} - Please note that the BLS key will change along with the validator signer ECDSA key on the node. If the new BLS key is not authorized, then the validator will be unable to process aggregated signatures during consensus, **resulting in downtime**. For more details, please read [the BLS key section of the Celo account role descriptions](./detailed.md#authorized-validator-bls-signers). - {% endhint %} - -3. **Leave all validator and proxy nodes running** until the next epoch change. At the start the next epoch, the new Validator signer should take over participation in consensus. - -4. Verify that key rotation was successful. Here are some ways to check: - - * Open `baklava-blockscout.celo-testnet.org/address//validations` to confirm that blocks are being proposed. - * Open `baklava-celostats.celo-testnet.org` to confirm that your node is signing blocks. - * Run `celocli validator:signed-blocks --signer $SIGNER_TO_AUTHORIZE` with the new validator signer address to further confirm that your node is signing blocks. - - {% hint style="warning" %} - The newly authorized keys will only take effect in the next epoch, so the instance operating with the old key must remain running until the end of the current epoch to avoid downtime. - {% endhint %} - -5. Shut down the validator instance with the now obsolete signer key. diff --git a/packages/docs/validator-guide/key-management/summary.md b/packages/docs/validator-guide/key-management/summary.md deleted file mode 100644 index f63412f42c0..00000000000 --- a/packages/docs/validator-guide/key-management/summary.md +++ /dev/null @@ -1,32 +0,0 @@ -# Key management - -> Crypto is a tool for turning a whole swathe of problems into key management problems. Key management problems are way harder than (virtually all) cryptographers think. -> -> [@LeaKissner on Twitter](https://twitter.com/LeaKissner/status/1198595109756887040) - - -## Philosophy - -The Celo protocol was designed with the understanding that there is often an inherent tradeoff between the convenience of accessing a private key and the security with which that private key can be custodied. In general Celo is unopinionated about how keys are custodied, but also allows users to authorize private keys with specific, limited privileges. This allows users to custody each private key according to its sensitivity (i.e. what is the impact of this key being lost or stolen?) and usage patterns (i.e. how often and under which circumstances will this key need to be accessed). - -## Summary - -The table below outlines a summary of the various account roles in the Celo protocol. Note that these roles are often *mutually exclusive*. An account that has been designated as one role can often not be used for a different purpose. Also note that under the hood, all of these accounts) are based on secp256k1 ECDSA private keys with the exception of the BLS signer. The different account roles are simply a concept encoded into the Celo proof-of-stake smart contracts, specifically [Accounts.sol](https://github.com/celo-org/celo-monorepo/blob/master/packages/protocol/contracts/common/Accounts.sol). - -For more details on a specific key type, please see the more detailed sections below. - - -| Role | Description | Ledger compatible | -| ----------------------------------- |--------------------------------------------------------------------------------------------------|-----| -| Celo Account | An account used to send transactions in the Celo protocol | Yes | -| Locked Gold Account | Used to lock and unlock CELO and authorize signers | Yes | -| Authorized vote signer | Can vote on behalf of a Locked Gold Account | Yes | -| Authorized validator (group) signer | Can register and manage a validator group on behalf of a Locked Gold Account | Yes | -| Authorized validator signer | Can register, manage a validator, and sign consensus messages on behalf of a Locked Gold Account | No | -| Authorized validator BLS signer | Used to sign blocks as a validator | No | -| Authorized attestation signer | Can sign attestation messages on behalf of a Locked Gold account | No | - - -{% hint style="warning" %} -A Locked Gold Account may have at most one authorized signer of each type at any time. Once a signer is authorized, the only way to deauthorize that signer is to authorize a new signer that has never previously been used as an authorized signer or Locked Gold Account. It follows then that a newly deauthorized signer cannot be reauthorized. -{% endhint %} diff --git a/packages/docs/validator-guide/monitoring.md b/packages/docs/validator-guide/monitoring.md deleted file mode 100644 index 4a73407f50c..00000000000 --- a/packages/docs/validator-guide/monitoring.md +++ /dev/null @@ -1,151 +0,0 @@ -# Monitoring - -## Monitoring Validators and Proxies - -### Logging - -Several command line options control logging: - -- `--verbosity`: Sets logging verbosity. `3` outputs logs up to `INFO` level and is recommended. `4` outputs up to `DEBUG` level; `5` is `TRACE`. - -- `--vmodule`: Overrides this verblosity in specific modules. For example, to configure `TRACE` level logging of consensus activity, use `consensus/istanbul/*=5`. - -- `--consoleoutput`: Sends output to the given path, or to `stdout`. - -- `--consoleformat`: Formats logs for easy viewing in a terminal (`term`), or as structured JSON (`json`). - -Useful messages to record or set up log-based metrics on: - -- `msg="Validator Election Results"`: When the last block of any epoch (`number`) has been agreed, `elected` shows whether the validator was selected in the validator election. - -- `msg="Elected but didn't sign block"`: This validator was elected but did not have its signature included in the block given by `number` (in fact, in the child's parent seal). This block could count towards downtime if 12 successive blocks are missed. - -### Metrics - -Celo Blockchain inherits [go-ethereum's metrics](https://github.com/ethereum/go-ethereum/wiki/Metrics-and-Monitoring) system, but additional Celo-specific metrics have been added. - -Metrics reporting is enabled with the `--metrics` flag. - -Pull-based metrics are available using the ` --pprof` flag. This enables the `pprof` debugging HTTP server, by default on `http://localhost:6060`. The `--pprofaddr` and `--pprofport` options can be used to configure the interface and port respectively. If the node is running inside a Docker container, you will need to set `--pprofaddr 0.0.0.0`, then on your Docker command line add `-p 127.0.0.1:6060:6060`. - -{% hint style="warning" %} -Be sure never to expose the `pprof` service to the public internet. -{% endhint %} - -[Prometheus](https://prometheus.io) format metrics are available at `http://localhost:6060/debug/metrics/prometheus`. - -[ExpVar](https://golang.org/pkg/expvar/) format metrics are available at `http://localhost:6060/debug/metrics`. - -Support for pushing metrics to [InfluxDB](https://www.influxdata.com/products/influxdb-overview/) is available via `--metrics.influxdb` and related flags. This works without the `pprof` server. - -Note that metric name separators differ between these endpoints. - -All metrics are soft-state and are cleared when the process is restarted. - -### Memory metrics - -Memory metrics derived from [mstats](https://godoc.org/github.com/go-graphite/carbonzipper/mstats): - -- `system_memory_held`: Gauge of virtual address space allocated by the Celo Blockchain process, measured in bytes. -- `system_memory_used`: Gauge of Memory in use by the Celo Blockchain process, measured as bytes of allocated heap objects. -- `system_memory_allocs`: Counter for memory allocations made, measured in bytes. Consider monitoring the rate. -- `system_memory_pauses`: Counter for stop-the-world Garbage Collection pauses, measured in nanoseconds. Consider monitoring the rate. - -### CPU metrics - -- `system_cpu_sysload`: Gauge of load average for the system. -- `system_cpu_syswait`: Gauge of IO wait time for the system. -- `system_cpu_procload`: Gauge of load average for the Celo Blockchain process. - -### Network metrics - -- `p2p_peers`: The number of connected peers. This should remain at exactly `1` for a proxied validator (just its proxy). It should remain at a relatively steady level for proxy nodes. - -- `p2p_ingress`: Counter for total inbound traffic, measured in bytes. Consider monitoring the rate. - -- `p2p_egress`: Counter for total outbound traffic, measured in bytes. Consider monitoring the rate. - -- `p2p_dials`: Counter for outbound connection attempts. Consider monitoring the rate. - -- `p2p_serves`: Counter for accepted inbound connection attempts. Consider monitoring the rate. - -### Blockchain metrics - -- `chain_inserts_count`: The count of insertions of new blocks into this node's chain. The rate of this metric should be close to constant at `0.2` /second. - -### Validator health metrics - -A number of metrics are tracked for the parent of the last sealed block received (i.e. this is always two fewer than the current consensus sequence): - -- `consensus_istanbul_blocks_elected`: Counts the number of blocks for which this validator has been elected - -- `consensus_istanbul_blocks_signedbyus`: Counts the blocks for which this validator was elected and its signature was included in the seal. This means the validator completed consensus correctly, sent a `COMMIT`, its commit was received in time to make the seal of the parent received by the next proposer, or was received directly by the next proposer itself, and so the block will not count as downtime. Consider monitoring the rate. - -- `consensus_istanbul_blocks_missedbyus`: Counts the blocks for which this validator was elected but not included in the child's parent seal (this block could count towards downtime if 12 successive blocks are missed). Consider monitoring the rate. - -- `consensus_istanbul_blocks_missedbyusinarow`: (_since 1.0.2_) Counts the blocks for which this validator was elected but not included in the child's parent seal in a row. Consider monitoring the gauge. - -- `consensus_istanbul_blocks_proposedbyus`: (_since 1.0.2_) Counts the blocks for which this validator was elected and for which a block it proposed was succesfully included in the chain. Consider monitoring the rate. - -- `consensus_istanbul_blocks_downtimeevent`: (_since 1.0.2_) Counts the blocks for which this validator was elected and for blocks where it is considered down (occurs when `missedbyusinarow` is >= 12). Consider monitoring the rate. - -### Consensus metrics - -- `consensus_istanbul_core_desiredround`: Current desired round for this validator, i.e the round we are waiting to see a quorum of validators send `RoundChange` messages for. Usually this value should be `0`. Desired rounds increment with each timeout, which backoff exponentially. A value of `5` indicates consensus has stalled for more than 30 seconds. Values above that means the validator is unable to participate in quorum (either because it is disconnected, out of sync, etc, or because of network partition or failure of other validators). - -- `consensus_istanbul_core_round`: : Current consensus round for this validator, i.e the round for which this validator has received a quorum of `RoundChange` messages. Usually this value should be `0`. If this value is less than `consensus_istanbul_core_desiredround` the validator is not connected to a quorum of other validators that are also unable to participate (for instance, they did see a proposed block, but this validator did not). If it is equal, it means the validator remains connected to a quorum of other validators but cannot agree on a block. - -- `consensus_istanbul_core_sequence`: Current consensus sequence number, i.e the block number currently being proposed. - -### Network consensus health metrics - -- `consensus_istanbul_blocks_totalsigs`: The number of validators whose signatures were included in the child's parent seal. This can be used to determine how many validators are up and contributing to consensus. If this number falls towards two thirds of validator set size, network block production is at risk. - -- `consensus_istanbul_blocks_missedrounds`: Sum of the `round` included in the `parentAggregatedSeal` for the blocks seen. That is, the cumulative number of consensus round changes these blocks needed to make to get to this agreed block. This metric is only incremented when a block is succesfully produced after consensus rounds fails, indicating down validators or network issues. - -- `consensus_istanbul_blocks_missedroundsasproposer`: (_since 1.0.2_) A meter noting when this validator was elected and could have proposed a block with their signature but did not. In some cases this could be required by the Istanbul BFT protocol. - -- `consensus_istanbul_blocks_validators`: (_since 1.0.2_) Total number of validators eligible to sign blocks. - -- `consensus_istanbul_core_consensus_count`: Count and timer for succesful completions of consensus (Use `quantile` tag to find percentiles: `0.5`, `0.75`, `0.95`, `0.99`, `0.999`) - -### Management APIs - -Celo blockchain inherits and extends go-ethereum's Javascript console, exposing [management APIs](https://geth.ethereum.org/docs/rpc/server) and [web3 DApp APIs](https://github.com/ethereum/wiki/wiki/JavaScript-API). - -Connect a client using a variant of the `attach` command line option: - -```bash -geth attach --datadir DATADIR -geth attach ipc:PATH/TO/geth.ipc -geth attach http://localhost:8545 -geth attach ws://localhost:8546 -``` - - - -## Monitoring Attestation Service - -It is also important to [monitor Attestation Service](attestation-service.md#monitoring) and the full node that it depends on. - -## Community Moniting Tools - -### [Pretoria Research Lab Mainnet Signed Blocks Map](https://cauldron.pretoriaresearchlab.io/rc1-block-map) - -Shows current and historic data on validator signatures collected in each block on Mainnet. - -### [Virtual Hive Celo Network Validator Exporter](https://github.com/virtualhive/celo-network-validator-exporter) - -Prometheus exporter that scrapes downtime and meta information for a specified validator signer address from the Celo blockchain. All data is collected from a blockchain node via RPC. - -_Please raise a Pull Request against [this page](https://github.com/celo-org/celo-monorepo/blob/master/packages/docs/celo-holder-guide/voting-validators.md) to add/amend details of any community services!_ - - diff --git a/packages/docs/validator-guide/node-upgrades.md b/packages/docs/validator-guide/node-upgrades.md deleted file mode 100644 index 9f2f05d61fc..00000000000 --- a/packages/docs/validator-guide/node-upgrades.md +++ /dev/null @@ -1,154 +0,0 @@ -# Node Upgrades - -When a new version of the Celo node is available, you can follow this guide to upgrade. - -## Recent Releases - -* [Blockchain Client 1.3.0](https://github.com/celo-org/celo-blockchain/releases/tag/v1.3.0) (Latest production release) - -## When an upgrade is required - -Upgrades to the Celo node software will often be optional improvements, such as improvements to performance, new useful features, and non-critical bug fixes. - -Occasionally, they may be required when the upgrade is necessary to continue operating on the network, such as hard forks, or critical bug fixes. Required upgrades are enforced by setting the via a minimum client version number stored on-chain, which may be updated via [Governance](../celo-codebase/protocol/governance.md) after the client is made available. - -## Upgrading a non-validating node - -Use these instructions to update non-validating nodes, such as your account node or your attestation node on the Baklava testnet. Also use these instructions to upgrade your proxy node, but remember not to stop the proxy of a running validator. - -### Pull the latest Docker image - -```bash -export CELO_IMAGE=us.gcr.io/celo-org/geth:mainnet -docker pull $CELO_IMAGE -``` - -### Stop and remove the existing node - -Stop and remove the existing node. Make sure to stop the node gracefully (i.e. giving it time to shut down and complete any writes to disk) or your chain data may become corrupted. - -Note: The `docker run` commands in the documentation have been updated to now include `--stop-timeout 300`, which should make the `-t 300` in `docker stop` below redundant. However, it is still recommended to include it just in case. - -```bash -docker stop -t 300 celo-fullnode -docker rm celo-fullnode -``` - -### Start the new node - -Start the new node using `docker run` as detailed in the appropriate section of the getting started guide. Remember to recover any environment variables, if using a new terminal, before running the documented commands. - -- [Full node](../getting-started/running-a-full-node-in-mainnet.md#start-the-node) -- [Accounts node](../getting-started/running-a-validator-in-mainnet.md#start-your-accounts-node) -- [Attestion node](../getting-started/running-a-validator-in-mainnet.md#running-the-attestation-service) -- [Proxy node](../getting-started/running-a-validator-in-mainnet.md#deploy-a-proxy) - -## Upgrading a Validating Node - -Upgrading a validating node is much the same, but requires extra care to be taken to prevent validator downtime. - -One option to complete a validating node upgrade is to perform a key rotation onto a new node. Pull the latest Docker image, as mentioned above, then execute a Validator signing key rotation, using the latest image as the new Validator signing node. A recommended procedure for key rotation is documented in the [Key Management](key-management/key-rotation.md) guide. - -A second option is to perform a hot-swap to switch over to a new validator node. The new validator node **must** be configured with the same set of proxies as the existing validator node. - -### Hotswapping Validator Nodes - -{% hint style="info" %} Hotswap is being introduced in version 1.2.0. When upgrading nodes that are not yet on 1.2.0 refer to the guide to perform a key rotation. {% endhint %} - -Validators can be configured as primaries or replicas. By default validators start as primaries and will persist all changes around starting or stopping. Through the istanbul management RPC API the validator can be configured to start or stop at a specified block. The validator will participate in consensus for block numbers in the range `[start, stop)`. - -{% hint style="warning" %} Note that the replica node **must** use the same set of proxies as the primary node. If it does not it will not be able to switchover without downtime due to needing to the complete the announce protocol from scratch. Replicas behind the same set of proxies as the primary node will be able to switchover without downtime. {% endhint %} - -#### RPC Methods -* `istanbul.start()` and `istanbul.startAtBlock()` start validating immediately or at a block -* `istanbul.stop()` and `istanbul.stopAtBlock()` stop validating immediately or at a block -* `istanbul.replicaState` will give you the state of the node and the start/stop blocks -* `istanbul.validating` will give you true/false if the node is validating - -{% hint style="info" %} `startAtBlock` and `stopAtBlock` must be given a block in the future. {% endhint %} - -#### Geth Flags -* `--istanbul.replica` flag which starts a validator in replica mode. - -On startup, nodes will look to see if there is a `replicastate` folder inside it's data directory. If that folder exists the node will configure itself as a validator or replica depending on the previous stored state. The stored state will take precedence over the command line flags. If the folder does not exists the node will stored it's state as configured by the command line. When RPC calls are made to start or stop validating, those changes will be persisted to the `replicastate` folder. - -{% hint style="warning" %} If reconfiguring a node to be a replica or reusing a data directory, make sure that the node was previously configured as replica or that the `replicastate` folder is removed. If there is an existing `replicastate` folder from a node that was not configured as a replica the node will attempt to start validating. {% endhint %} - -#### Steps to upgrade -1. Pull the latest docker image. -2. Start a new validator node on a second host in replica mode (`--istanbul.replica` flag). It should be otherwise configured exactly the same as the existing validator. - * It needs to connect to the exisiting proxies and the validator signing key to connect to other validators in listen mode. - * If reconfiguring a node to be a replica or reusing a data directory, make sure that the node was previously configured as replica or that the `replicastate` folder is removed. -3. Once the replica is synced and has validator enode urls for all validators, it is ready to swapped in. - * Check validator enode urls with `istanbul.valEnodeTableInfo` in the geth console. The field `enode` should be filled in for each validator peer. -4. In the geth console on the primary run `istanbul.stopAtBlock(xxxx)` - * Make sure to select a block number comfortably in the future. - * You can check what the stop block is with `istanbul.replicaState` in the geth console. - * You can run `istanbul.start()` to clear the stop block -5. In the geth console of the replica run `istanbul.startAtBlock(xxxx)` - * You can check what the start block is with `istanbul.replicaState` in the geth console. - * You can run `istanbul.stop()` to clear the start block -6. Confirm that the transition occurred with `istanbul.replicaState` - * The last block that the old primary will sign is block number `xxxx - 1` - * The first block that the new primary will sign is block number `xxxx` -7. Tear down the old primary once the transition has occurred. - -Example geth console on the old primary. -```bash -> istanbul.replicaState -{ - isPrimary: true, - startValidatingBlock: null, - state: "Primary", - stopValidatingBlock: null -} -> istanbul.stopAtBlock(21000) -null -> istanbul.replicaState -{ - isPrimary: true, - startValidatingBlock: null, - state: "Primary in given range", - stopValidatingBlock: 21000 -} -> istanbul.replicaState -{ - isPrimary: false, - startValidatingBlock: null, - state: "Replica", - stopValidatingBlock: null -} -``` - -Example geth console on the replica being promoted to primary. Not shown is confirming the node is synced and connected to validator peers. -```bash -> istanbul.replicaState -{ - isPrimary: false, - startValidatingBlock: null, - state: "Replica", - stopValidatingBlock: null -} -> istanbul.startAtBlock(21000) -null -> istanbul.replicaState -{ - isPrimary: false, - startValidatingBlock: 21000, - state: "Replica waiting to start", - stopValidatingBlock: null -} -> istanbul.replicaState -{ - isPrimary: true, - startValidatingBlock: null, - state: "Primary", - stopValidatingBlock: null -} -``` - -### Upgrading Proxy Nodes - -{% hint style="danger" %} Release 1.2.0 is backwards incompatible in the Validator and Proxy connection. Validators and proxies must be upgraded to 1.2.0 at the same time. {% endhint %} - -With multi-proxy, you can upgrade proxies one by one or can add newly synced proxies with the latest Docker image and can remove the old proxies. If upgrading the proxies in place, a rolling upgrade is recommended as the validator will re-assign direct connections as proxies are added and removed. These re-assignments will allow the validator to continue to participate in consensus. diff --git a/packages/docs/validator-guide/overview.md b/packages/docs/validator-guide/overview.md deleted file mode 100644 index 0ab3966d7f3..00000000000 --- a/packages/docs/validator-guide/overview.md +++ /dev/null @@ -1,14 +0,0 @@ -# Validator Guide Overview - -## Validator Guide - -In this section you will find information about: - -- [Attestation Service](attestation-service.md), a core piece of the Celo identity protocol -- [Key Management](key-management/summary.md) best practices for Validators -- [Securing Celo Nodes and Services](securing-nodes-and-services.md) -- [Monitoring](monitoring.md) Celo nodes -- [Upgrading a Node](node-upgrades.md) -- [Running Proxies](proxy.md) -- [Validator Explorer](validator-explorer.md) -- Information about the [Celo Foundation Voting Policy](celo-foundation-voting-policy.md) diff --git a/packages/docs/validator-guide/proxy.md b/packages/docs/validator-guide/proxy.md deleted file mode 100644 index c607033aa32..00000000000 --- a/packages/docs/validator-guide/proxy.md +++ /dev/null @@ -1,21 +0,0 @@ -# Validator proxy - -Validator uptime is essential for the health of the Celo blockchain. To help with validator uptime, operators can use the proxy node, which will provide added security for the validator. It allows the validator to run within a private network, and to communicate to the rest of the Celo network via the proxy. - -Also, starting from the Celo client 1.2 release, we will support assigning multiple proxies per validator. This provides better uptime for the validator for the case of a proxy going down. Also, it will help with making each proxy enode URL less public by only sharing it with a subset of the other validators. - -{% hint style="danger" %}The communication protocol between the validator and it's proxies implemented in release 1.2 is NOT backwards compatible to the pre-1.2 protocol. So if the proxy or validator is being upgraded to 1.2, then both needs to be upgraded to that version. Note that validators and proxies using release 1.2 are still compatible with remote nodes.{% endhint %} - -There are two ways to specify the proxy information to a validator. It can be done on validator startup via the command line argument, or by the rpc api when the validator is running. - -### Command Line - -Instructions on how to add proxies via the command line is described in the [Getting Started guide for mainnet](../getting-started/running-a-validator-in-mainnet.md#deploy-a-validator-machine). - -### RPC API - -* `istanbul.addProxy(, )` can be used on the validator to add a proxy to the validator's proxy set -* `istanbul.removeProxy()` can be used on the validator to remove a proxy from the validator's proxy set -* `istanbul.proxies` can be used on the validator to list the validator's proxy set - -* `istanbul.proxiedValidators` can be used on the proxies to list the proxied validators \ No newline at end of file diff --git a/packages/docs/validator-guide/securing-nodes-and-services.md b/packages/docs/validator-guide/securing-nodes-and-services.md deleted file mode 100644 index a502c3a94a3..00000000000 --- a/packages/docs/validator-guide/securing-nodes-and-services.md +++ /dev/null @@ -1,20 +0,0 @@ -# Securing Celo nodes and services - -Running Celo nodes and services securely, especially as part of running a validator, is of utmost importance. Failure to do so can lead to severe consequences including, but not limited to loss of funds, slashing due to double signing, etc. Here are some recommendations: - - -### RPC Endpoints - -Celo nodes can be interacted with through an RPC interface for common interactions such as querying the blockchain, inspecting network connectivity and much more. The RPC interface is exposed via HTTP, WebSockets or a local IPC socket. There are two considerations: - -1) There is no authentication in the RPC interface. Anyone with access to the interface will be able to execute any actions that are enabled with the command-line options. This includes sensitive RPC modules like `personal` which interacts with the private keys stored on the node (`admin` is another one). It is not recommended to enable RPC modules unless you explicitly need them. Other RPC modules might be less sensitive but could create unnecessary load on your machine (like the `debug` module) to execute a DoS attack. - -2) If you do need access to the RPC modules (for example to use `celocli` or the attestation service), use a firewall and similar mechanisms to restrict access to the RPC interface. You almost never want the interface to be accessible from outside the machine itself. - - -### Public Endpoints - -Beyond the RPC interface, Celo nodes and services have other interfaces that actually need to be exposed to the public internet. While varying degrees of protection exist within the software, such as validating attestation requests against the blockchain or monitoring connections in the discovery protocol, additional measures are recommended to reduce the impact of malicious traffic. Examples include, but are not limited to: - -- **DDoS protection:** Protected public endpoints from a DDoS attack is highly recommended to allow valid requests to be served -- **Whitelist endpoints:** The attestation service exposes a [limited number of paths](https://github.com/celo-org/celo-monorepo/blob/master/packages/attestation-service/src/index.ts#L34) to function correctly. You could use a reverse proxy to reject paths that don't match them. diff --git a/packages/docs/validator-guide/validator-explorer.md b/packages/docs/validator-guide/validator-explorer.md deleted file mode 100644 index 0b727950b9c..00000000000 --- a/packages/docs/validator-guide/validator-explorer.md +++ /dev/null @@ -1,96 +0,0 @@ -# Validator Explorer -You can interact with the Validator Explorer that allows you to have a complete view of how the different validators are performing. This is one resource voters may use to find validator groups to vote for. The Validator Explorer tool is available in the following address: -https://celo.org/validators/explore/ - -All of the existing validators and groups in the Celo network are included in this view. The default view shows all registered validator groups - if you click on any of the group names it will expand to show the validators affiliated with that group. You can also sort results by each column's value by clicking on the header field. - -If you are looking to see how your validator is performing, you should first find the group your validator is affiliated with. Then you can click on the group name to see your validator and the rest of the validators affiliated with this group. - -If you are running a validator group, one way to demonstrate your credibility to voters is claiming your validator badges by following the instructions [here](https://github.com/celo-org/website/blob/master/validator-badges/README.md). - -A critical element of this explorer is the Validator Group name, which can help voters recognize organizations or active community members. This name is fetched from the `account` information registered on-chain for your validator and validator group. In order to combat name impersonation, a group can register a domain claim within their metadata, which you can read more about [here](https://github.com/celo-org/celo-monorepo/blob/master/packages/docs/celo-codebase/protocol/identity/metadata.md). This verification is done by adding a [TXT record](https://en.wikipedia.org/wiki/TXT_record) to their domain which includes a signature of their domain claim signed by their associated account. This claim is then verified by the validator explorer. Individual users may also verify a claim using `celocli account:get-metdata`. - -For example, if a group was run by the owners of `example.com`, they may want to register their Validator Group with the name `Example`. The name does not need to be the same as the name of your domain, but for simplicity we do so here. To give credence to this name, they may want to add a DNS claim. They can do this by adding a DNS claim to their metadata, claiming the URL `example.com`, while simultaneously adding a `TXT Record` to `example.com` that includes this claim signed by their group address. Let’s go through this example in detail, using a `ReleaseGold` contract as our validator group. - -Assuming you have already deployed your Validator Group via a `ReleaseGold` contract, you will need these environment variables set to claim your domain. - -### Environment variables - -| Variable | Explanation | -| ------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | -| CELO_VALIDATOR_GROUP_RG_ADDRESS | The `ReleaseGold` contract address for the Validator Group | -| CELO_VALIDATOR_RG_ADDRESS | The `ReleaseGold` contract address for the Validator | -| CELO_VALIDATOR_SIGNER_ADDRESS | The address of the validator signer authorized by the validator account | -| CELO_VALIDATOR_GROUP_SIGNER_ADDRESS | The address of the validator (group) signer authorized by the validator account - -First let's create the metadata file: - -``` -# On your local machine -celocli account:create-metadata ./group_metadata.json --from $CELO_VALIDATOR_GROUP_RG_ADDRESS -``` - -Now we can set the group's name: - -``` -# On your local machine -celocli releasegold:set-account --contract $CELO_VALIDATOR_GROUP_RG_ADDRESS --property name --value Example.com -``` - -Now we can generate a claim for the domain associated with this name `example.com`: - -``` -# On your local machine -celocli account:claim-domain ./group_metadata.json --domain example.com --from $CELO_VALIDATOR_GROUP_SIGNER_ADDRESS -``` - -This will output your claim signed under the provided signer address. This output should then be recorded via a `TXT Record` on your desired domain, so in this case we should add a `TXT Record` to `example.com` with this signed output. - -You can now view and simultaneously verify the claims on your metadata: - -``` -# On your local machine -celocli account:show-metadata ./group_metadata.json -``` - -Take a look at the output and verify these claims look right to you. This tool also automatically verifies the signatures on claims you've added. - -Once that record is added, we can then register this metadata under on our `Validator Group` account for external validation. - -Before we do this, you may also want to associate some validators with this domain. The benefit of doing this is to extend your DNS claim to your validators as well, meaning your validators can also verifiably be associated with your domain. You could also do this by adding individual DNS claims for each validator, but this would require separate `TXT Record`s for each, which is inconvenient. Instead, you can simply associate the group and validators together under a single claim. - -In order to do so, you will need to claim each validator address on your group's metadata. You will also need to claim your group account on each of your validator's metadata to complete the association. We will run through an example of a single validator now: - -First lets claim the `validator` address from the `group` account: - -``` -# On your local machine -celocli account:claim-account ./group_metadata.json --address $CELO_VALIDATOR_RG_ADDRESS --from $CELO_VALIDATOR_GROUP_SIGNER_ADDRESS -``` - -Now let's submit the corresponding claim from the `validator` account on the `group` account (note: if you followed the directions to set up the attestation service, you may have already registered metadata for your validator. If that is the case, skip the steps to create the `validator`'s metadata and just add the account claim.) - -``` -# On your local machine -celocli account:create-metadata ./validator_metadata.json --from $CELO_VALIDATOR_RG_ADDRESS -celocli account:claim-account ./validator_metadata.json --address $CELO_VALIDATOR_GROUP_RG_ADDRESS --from $CELO_VALIDATOR_SIGNER_ADDRESS -``` - -And then host both metadata files somewhere reachable via HTTP. You can use a service like gist.github.com. Create two gists, each with the contents of the respective files and then click on the Raw buttton to receive the permalinks to the machine-readable file. If you had already registered a metadata URL for your `validator` you just need to update that registerd gist, so you can skip the `validator` metadata registration below. - -Now we can register these URLs on each account: - -``` -# On your local machine -celocli releasegold:set-account --contract $CELO_VALIDATOR_GROUP_RG_ADDRESS --property metaURL --value -celocli releasegold:set-account --contract $CELO_VALIDATOR_RG_ADDRESS --property metaURL --value -``` - -If everything goes well users should be able to see your claims by running: - -``` -# On your local machine -celocli account:get-metadata $CELO_VALIDATOR_GROUP_RG_ADDRESS -``` - -If everything went well, you should now have your group and validator associated with each other and with your associated domain! diff --git a/yarn.lock b/yarn.lock index f9f02e1d89e..e754a992a75 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5547,11 +5547,6 @@ resolved "https://registry.yarnpkg.com/@types/underscore/-/underscore-1.8.8.tgz#510fe1ca5e7fa87fccd405b9a8b566d420bc3d1b" integrity sha512-EquzRwzAAs04anQ8/6MYXFKvHoD+MIlF+gu87EDda7dN9zrKvQYHsc9VFAPB1xY4tUHQVvBMtjsHrvof2EE1Mg== -"@types/unist@^2.0.0", "@types/unist@^2.0.2": - version "2.0.3" - resolved "https://registry.yarnpkg.com/@types/unist/-/unist-2.0.3.tgz#9c088679876f374eb5983f150d4787aa6fb32d7e" - integrity sha512-FvUupuM3rlRsRtCN+fDudtmytGO6iHJuuRKS1Ss0pG5z8oX0diNEw94UEL7hgDbpN94rgaK5R7sWm6RrSkZuAQ== - "@types/utf8@^2.1.6": version "2.1.6" resolved "https://registry.yarnpkg.com/@types/utf8/-/utf8-2.1.6.tgz#430cabb71a42d0a3613cce5621324fe4f5a25753" @@ -7394,11 +7389,6 @@ backoff@^2.5.0: dependencies: precond "0.2" -bail@^1.0.0: - version "1.0.5" - resolved "https://registry.yarnpkg.com/bail/-/bail-1.0.5.tgz#b6fa133404a392cbc1f8c4bf63f5953351e7a776" - integrity sha512-xFbRxM1tahm08yHBP16MMjVUAvDaBMD38zsM9EMAUN61omwLmKlOpB/Zku5QkjZ8TZ4vn53pj+t518cH0S03RQ== - balanced-match@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" @@ -7444,11 +7434,6 @@ base@^0.11.1: mixin-deep "^1.2.0" pascalcase "^0.1.1" -bash-color@0.0.4: - version "0.0.4" - resolved "https://registry.yarnpkg.com/bash-color/-/bash-color-0.0.4.tgz#e9be8ce33540cada4881768c59bd63865736e913" - integrity sha1-6b6M4zVAytpIgXaMWb1jhlc26RM= - basic-auth-connect@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/basic-auth-connect/-/basic-auth-connect-1.0.0.tgz#fdb0b43962ca7b40456a7c2bb48fe173da2d2122" @@ -8380,11 +8365,6 @@ cbor@^4.1.5: json-text-sequence "^0.1" nofilter "^1.0.3" -ccount@^1.0.0: - version "1.0.5" - resolved "https://registry.yarnpkg.com/ccount/-/ccount-1.0.5.tgz#ac82a944905a65ce204eb03023157edf29425c17" - integrity sha512-MOli1W+nfbPLlKEhInaxhRdp7KVLFxLN5ykwzHgLsLI3H3gs5jjFAK4Eoj3OzzcxCtumDaI8onoVDeQyWaNTkw== - chai-as-promised@^7.1.1: version "7.1.1" resolved "https://registry.yarnpkg.com/chai-as-promised/-/chai-as-promised-7.1.1.tgz#08645d825deb8696ee61725dbf590c012eb00ca0" @@ -8471,26 +8451,6 @@ char-spinner@^1.0.1: resolved "https://registry.yarnpkg.com/char-spinner/-/char-spinner-1.0.1.tgz#e6ea67bd247e107112983b7ab0479ed362800081" integrity sha1-5upnvSR+EHESmDt6sEee02KAAIE= -character-entities-html4@^1.0.0: - version "1.1.4" - resolved "https://registry.yarnpkg.com/character-entities-html4/-/character-entities-html4-1.1.4.tgz#0e64b0a3753ddbf1fdc044c5fd01d0199a02e125" - integrity sha512-HRcDxZuZqMx3/a+qrzxdBKBPUpxWEq9xw2OPZ3a/174ihfrQKVsFhqtthBInFy1zZ9GgZyFXOatNujm8M+El3g== - -character-entities-legacy@^1.0.0: - version "1.1.4" - resolved "https://registry.yarnpkg.com/character-entities-legacy/-/character-entities-legacy-1.1.4.tgz#94bc1845dce70a5bb9d2ecc748725661293d8fc1" - integrity sha512-3Xnr+7ZFS1uxeiUDvV02wQ+QDbc55o97tIV5zHScSPJpcLm/r0DFPcoY3tYRp+VZukxuMeKgXYmsXQHO05zQeA== - -character-entities@^1.0.0: - version "1.2.4" - resolved "https://registry.yarnpkg.com/character-entities/-/character-entities-1.2.4.tgz#e12c3939b7eaf4e5b15e7ad4c5e28e1d48c5b16b" - integrity sha512-iBMyeEHxfVnIakwOuDXpVkc54HijNgCyQB2w0VfGQThle6NXn50zU6V/u+LDhxHcDUPojn6Kpga3PTAD8W1bQw== - -character-reference-invalid@^1.0.0: - version "1.1.4" - resolved "https://registry.yarnpkg.com/character-reference-invalid/-/character-reference-invalid-1.1.4.tgz#083329cda0eae272ab3dbbf37e9a382c13af1560" - integrity sha512-mKKUkUbhPpQlCOfIuZkvSEgktjPFIsZKRRbC6KWVEMvlzblj3i3asQv5ODsrwt0N3pHAEvjP8KTQPHkp0+6jOg== - chardet@^0.4.0: version "0.4.2" resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.4.2.tgz#b5473b33dc97c424e5d98dc87d55d4d8a29c8bf2" @@ -8568,7 +8528,7 @@ chokidar@^2.0.0, chokidar@^2.1.5, chokidar@^2.1.8: optionalDependencies: fsevents "^1.2.7" -chokidar@^3.0.0, chokidar@^3.0.2, chokidar@^3.4.1: +chokidar@^3.0.2, chokidar@^3.4.1: version "3.4.2" resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.4.2.tgz#38dc8e658dec3809741eb3ef7bb0a47fe424232d" integrity sha512-IZHaDeBeI+sZJRX7lGcXsdzgvZqKv6sECqsbErJA4mHWfpRrD8B97kSFN4cQz6nGBGiuFia1MKR4d6c1o8Cv7A== @@ -8960,11 +8920,6 @@ coinstring@^2.0.0: bs58 "^2.0.1" create-hash "^1.1.1" -collapse-white-space@^1.0.2: - version "1.0.6" - resolved "https://registry.yarnpkg.com/collapse-white-space/-/collapse-white-space-1.0.6.tgz#e63629c0016665792060dbbeb79c42239d2c5287" - integrity sha512-jEovNnrhMuqyCcjfEJA56v0Xq8SkIoPKDyaHahwo3POf4qcSXqMYuwNcOTzp74vTsR9Tn08z4MxWqAhcekogkQ== - collect-v8-coverage@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/collect-v8-coverage/-/collect-v8-coverage-1.0.0.tgz#150ee634ac3650b71d9c985eb7f608942334feb1" @@ -9099,11 +9054,6 @@ command-line-args@^4.0.7: find-replace "^1.0.3" typical "^2.6.1" -commander@2.11.0: - version "2.11.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.11.0.tgz#157152fd1e7a6c8d98a5b715cf376df928004563" - integrity sha512-b0553uYA5YAEGgyYIGYROzKQ7X5RAqedkfjiZxwi0kL1g3bOaBNNZfYkzt/CL0umgD5wc9Jec2FbB98CjkMRvQ== - commander@2.15.1: version "2.15.1" resolved "https://registry.yarnpkg.com/commander/-/commander-2.15.1.tgz#df46e867d0fc2aec66a34662b406a9ccafff5b0f" @@ -9881,7 +9831,7 @@ debug@3.2.6, debug@^3.0.1, debug@^3.1.0: dependencies: ms "^2.1.1" -debug@4, debug@4.1.1, debug@^4.0.0, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1: +debug@4, debug@4.1.1, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791" integrity sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw== @@ -12196,13 +12146,6 @@ fastq@^1.6.0: dependencies: reusify "^1.0.0" -fault@^1.0.0, fault@^1.0.2: - version "1.0.4" - resolved "https://registry.yarnpkg.com/fault/-/fault-1.0.4.tgz#eafcfc0a6d214fc94601e170df29954a4f842f13" - integrity sha512-CJ0HCB5tL5fYTEA7ToAq5+kTwd++Borf1/bifxd9iT70QcXr4MRrO3Llf8Ifs70q+SJcGHFtnIE/Nw6giCtECA== - dependencies: - format "^0.2.0" - faye-websocket@0.11.3: version "0.11.3" resolved "https://registry.yarnpkg.com/faye-websocket/-/faye-websocket-0.11.3.tgz#5c0e9a8968e8912c286639fde977a8b209f2508e" @@ -12779,11 +12722,6 @@ form-data@~2.3.2: combined-stream "^1.0.6" mime-types "^2.1.12" -format@^0.2.0: - version "0.2.2" - resolved "https://registry.yarnpkg.com/format/-/format-0.2.2.tgz#d6170107e9efdc4ed30c9dc39016df942b5cb58b" - integrity sha1-1hcBB+nv3E7TDJ3DkBbflCtctYs= - formidable@^1.2.0: version "1.2.1" resolved "https://registry.yarnpkg.com/formidable/-/formidable-1.2.1.tgz#70fb7ca0290ee6ff961090415f4b3df3d2082659" @@ -12847,15 +12785,6 @@ fs-exists-sync@^0.1.0: resolved "https://registry.yarnpkg.com/fs-exists-sync/-/fs-exists-sync-0.1.0.tgz#982d6893af918e72d08dec9e8673ff2b5a8d6add" integrity sha1-mC1ok6+RjnLQjeyehnP/K1qNat0= -fs-extra@3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-3.0.1.tgz#3794f378c58b342ea7dbbb23095109c4b3b62291" - integrity sha1-N5TzeMWLNC6n27sjCVEJxLO2IpE= - dependencies: - graceful-fs "^4.1.2" - jsonfile "^3.0.0" - universalify "^0.1.0" - fs-extra@6.0.1, fs-extra@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-6.0.1.tgz#8abc128f7946e310135ddc93b98bddb410e7a34b" @@ -13307,11 +13236,6 @@ get-value@^2.0.3, get-value@^2.0.6: resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" integrity sha1-3BXKHGcjh8p2vTesCjlbogQqLCg= -get-youtube-id@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/get-youtube-id/-/get-youtube-id-1.0.1.tgz#adb6f475e292d98f98ed5bfb530887656193e157" - integrity sha512-5yidLzoLXbtw82a/Wb7LrajkGn29BM6JuLWeHyNfzOGp1weGyW4+7eMz6cP23+etqj27VlOFtq8fFFDMLq/FXQ== - getopts@2.2.5: version "2.2.5" resolved "https://registry.yarnpkg.com/getopts/-/getopts-2.2.5.tgz#67a0fe471cacb9c687d817cab6450b96dde8313b" @@ -13366,78 +13290,6 @@ git-url-parse@^11.1.2: dependencies: git-up "^4.0.0" -gitbook-cli@^2.3.2: - version "2.3.2" - resolved "https://registry.yarnpkg.com/gitbook-cli/-/gitbook-cli-2.3.2.tgz#5e893582e1f743f6fa920c3c3eb36b62ea4a31a0" - integrity sha512-eyGtkY7jKHhmgpfuvgAP5fZcUob/FBz4Ld0aLRdEmiTrS1RklimN9epzPp75dd4MWpGhYvSbiwxnpyLiv1wh6A== - dependencies: - bash-color "0.0.4" - commander "2.11.0" - fs-extra "3.0.1" - lodash "4.17.4" - npm "5.1.0" - npmi "1.0.1" - optimist "0.6.1" - q "1.5.0" - semver "5.3.0" - tmp "0.0.31" - user-home "2.0.0" - -gitbook-plugin-fontsettings@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/gitbook-plugin-fontsettings/-/gitbook-plugin-fontsettings-2.0.0.tgz#835f900ae3dd111086fe7ed4425ee3de024861ab" - integrity sha1-g1+QCuPdERCG/n7UQl7j3gJIYas= - -gitbook-plugin-highlight@^2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/gitbook-plugin-highlight/-/gitbook-plugin-highlight-2.0.3.tgz#89af66a94c168f5eadde3e7674a8295b77db5987" - integrity sha1-ia9mqUwWj16t3j52dKgpW3fbWYc= - dependencies: - highlight.js "9.8.0" - -gitbook-plugin-hints@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/gitbook-plugin-hints/-/gitbook-plugin-hints-1.0.2.tgz#e6589983e3ea84749f16dc631e282fafd45ec39b" - integrity sha1-5liZg+PqhHSfFtxjHigvr9Rew5s= - -gitbook-plugin-lunr@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/gitbook-plugin-lunr/-/gitbook-plugin-lunr-1.2.0.tgz#f3e80ec76512fbdb75eb0524aa82b8dff12a50ab" - integrity sha1-8+gOx2US+9t16wUkqoK43/EqUKs= - dependencies: - gitbook-plugin-search "*" - html-entities "1.2.0" - lunr "0.5.12" - -gitbook-plugin-page-ref@^0.0.6: - version "0.0.6" - resolved "https://registry.yarnpkg.com/gitbook-plugin-page-ref/-/gitbook-plugin-page-ref-0.0.6.tgz#58e8d7bd056efe22e17e063bc01c4bc07594cc26" - integrity sha512-PSJl+IwSbjbtMxS/nrZY9uCxYsLPbzGtm4SdXhDTL4PI49VsFGPRWQPu39UwsLpQUCbc/Q/BbItlMRZTKFHuIw== - -gitbook-plugin-search@*, gitbook-plugin-search@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/gitbook-plugin-search/-/gitbook-plugin-search-2.2.1.tgz#6d25b5a776990fa98fdfdfa37de331f78e0f6b13" - integrity sha1-bSW1p3aZD6mP39+jfeMx944PaxM= - -gitbook-plugin-sharing@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/gitbook-plugin-sharing/-/gitbook-plugin-sharing-1.0.2.tgz#532b3af96fafba977ad3c047122642f1eeac6e81" - integrity sha1-Uys6+W+vupd608BHEiZC8e6sboE= - dependencies: - lodash "^3.10.1" - -gitbook-plugin-theme-default@^1.0.7: - version "1.0.7" - resolved "https://registry.yarnpkg.com/gitbook-plugin-theme-default/-/gitbook-plugin-theme-default-1.0.7.tgz#51f71fbca74a261054e9e9d141c42167afefce88" - integrity sha512-vY+8Prz58H6iu6c7KHyOISxapKnwU8P1TWNqOzESFAB40ny9D/R7GpNL2IluicrsDvtI6VfpQeCYQbBniamulw== - -gitbook-plugin-youtube@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/gitbook-plugin-youtube/-/gitbook-plugin-youtube-2.0.0.tgz#3f9e04f1a96b9b36e570ee350c7d98f854b04f8a" - integrity sha1-P54E8alrmzblcO41DH2Y+FSwT4o= - dependencies: - get-youtube-id "^1.0.0" - gitconfiglocal@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/gitconfiglocal/-/gitconfiglocal-1.0.0.tgz#41d045f3851a5ea88f03f24ca1c6178114464b9b" @@ -13450,7 +13302,7 @@ github-from-package@0.0.0: resolved "https://registry.yarnpkg.com/github-from-package/-/github-from-package-0.0.0.tgz#97fb5d96bfde8973313f20e8288ef9a167fa64ce" integrity sha1-l/tdlr/eiXMxPyDoKI75oWf6ZM4= -github-slugger@^1.0.0, github-slugger@^1.2.1: +github-slugger@^1.2.1: version "1.3.0" resolved "https://registry.yarnpkg.com/github-slugger/-/github-slugger-1.3.0.tgz#9bd0a95c5efdfc46005e82a906ef8e2a059124c9" integrity sha512-gwJScWVNhFYSRDvURk/8yhcFBee6aFjye2a7Lhb2bUyRulpIoek9p0I9Kt7PT67d/nUlZbFu8L9RLiA0woQN8Q== @@ -14381,11 +14233,6 @@ hex2dec@^1.0.1: resolved "https://registry.yarnpkg.com/hex2dec/-/hex2dec-1.1.2.tgz#8e1ce4bef36a74f7d5723c3fb3090c2860077338" integrity sha512-Yu+q/XWr2fFQ11tHxPq4p4EiNkb2y+lAacJNhAdRXVfRIcDH6gi7htWFnnlIzvqHMHoWeIsfXlNAjZInpAOJDA== -highlight.js@9.8.0: - version "9.8.0" - resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-9.8.0.tgz#38eeef40cd45eaddbec8c9e5238fb7a783a3b685" - integrity sha1-OO7vQM1F6t2+yMnlI4+3p4OjtoU= - highlight.js@^10.2.0: version "10.3.2" resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-10.3.2.tgz#135fd3619a00c3cbb8b4cd6dbc78d56bfcbc46f1" @@ -14430,7 +14277,7 @@ hosted-git-info@^2.1.4, hosted-git-info@^2.6.0, hosted-git-info@^2.7.1: resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.8.tgz#7539bd4bc1e0e0a895815a2e0262420b12858488" integrity sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg== -hosted-git-info@^3.0.0, hosted-git-info@^3.0.6: +hosted-git-info@^3.0.6: version "3.0.7" resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-3.0.7.tgz#a30727385ea85acfcee94e0aad9e368c792e036c" integrity sha512-fWqc0IcuXs+BmE9orLDyVykAG9GJtGLGuZAAqgcckPgv5xad4AcXGIv8galtQvlwutxSlaMcdw7BUtq2EIvqCQ== @@ -14444,11 +14291,6 @@ html-encoding-sniffer@^2.0.1: dependencies: whatwg-encoding "^1.0.5" -html-entities@1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/html-entities/-/html-entities-1.2.0.tgz#41948caf85ce82fed36e4e6a0ed371a6664379e2" - integrity sha1-QZSMr4XOgv7Tbk5qDtNxpmZDeeI= - html-escaper@^2.0.0: version "2.0.2" resolved "https://registry.yarnpkg.com/html-escaper/-/html-escaper-2.0.2.tgz#dfd60027da36a36dfcbe236262c00a5822681453" @@ -14667,7 +14509,7 @@ ignore@^4.0.3, ignore@^4.0.6: resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg== -ignore@^5.0.0, ignore@^5.1.4: +ignore@^5.1.4: version "5.1.4" resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.1.4.tgz#84b7b3dbe64552b6ef0eca99f6743dbec6d97adf" integrity sha512-MzbUSahkTW1u7JpKKjY7LCARd1fU5W2rLdxlM4kdkayuCwZImjkpluF9CM1aLewYJguPDqewLam18Y6AU69A8A== @@ -14759,7 +14601,7 @@ inflight@^1.0.4, inflight@~1.0.6: once "^1.3.0" wrappy "1" -inherits@2, inherits@2.0.4, inherits@^2.0.0, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.0, inherits@~2.0.1, inherits@~2.0.3, inherits@~2.0.4: +inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.0, inherits@~2.0.1, inherits@~2.0.3, inherits@~2.0.4: version "2.0.4" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== @@ -14947,24 +14789,6 @@ is-accessor-descriptor@^1.0.0: dependencies: kind-of "^6.0.0" -is-alphabetical@^1.0.0: - version "1.0.4" - resolved "https://registry.yarnpkg.com/is-alphabetical/-/is-alphabetical-1.0.4.tgz#9e7d6b94916be22153745d184c298cbf986a686d" - integrity sha512-DwzsA04LQ10FHTZuL0/grVDk4rFoVH1pjAToYwBrHSxcrBIGQuXrQMtD5U1b0U2XVgKZCTLLP8u2Qxqhy3l2Vg== - -is-alphanumeric@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-alphanumeric/-/is-alphanumeric-1.0.0.tgz#4a9cef71daf4c001c1d81d63d140cf53fd6889f4" - integrity sha1-Spzvcdr0wAHB2B1j0UDPU/1oifQ= - -is-alphanumerical@^1.0.0: - version "1.0.4" - resolved "https://registry.yarnpkg.com/is-alphanumerical/-/is-alphanumerical-1.0.4.tgz#7eb9a2431f855f6b1ef1a78e326df515696c4dbf" - integrity sha512-UzoZUr+XfVz3t3v4KyGEniVL9BDRoQtY7tOyrRybkVNjDFWyo1yhXNGrrBTQxp3ib9BLAWs7k2YKBQsFRkZG9A== - dependencies: - is-alphabetical "^1.0.0" - is-decimal "^1.0.0" - is-arguments@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/is-arguments/-/is-arguments-1.0.4.tgz#3faf966c7cba0ff437fb31f6250082fcf0448cf3" @@ -15019,7 +14843,7 @@ is-buffer@^1.0.2, is-buffer@^1.1.5: resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w== -is-buffer@^2.0.0, is-buffer@~2.0.3: +is-buffer@~2.0.3: version "2.0.4" resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-2.0.4.tgz#3e572f23c8411a5cfd9557c849e3665e0b290623" integrity sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A== @@ -15088,11 +14912,6 @@ is-date-object@^1.0.1: resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.1.tgz#9aa20eb6aeebbff77fbd33e74ca01b33581d3a16" integrity sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY= -is-decimal@^1.0.0, is-decimal@^1.0.2: - version "1.0.4" - resolved "https://registry.yarnpkg.com/is-decimal/-/is-decimal-1.0.4.tgz#65a3a5958a1c5b63a706e1b333d7cd9f630d3fa5" - integrity sha512-RGdriMmQQvZ2aqaQq3awNA6dCGtKpiDFcOzrTWrDAT2MiWrKQVPmxLGHl7Y2nNu6led0kEyoX0enY0qXYsv9zw== - is-descriptor@^0.1.0: version "0.1.6" resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-0.1.6.tgz#366d8240dde487ca51823b1ab9f07a10a78251ca" @@ -15133,11 +14952,6 @@ is-dotfile@^1.0.0, is-dotfile@^1.0.1: resolved "https://registry.yarnpkg.com/is-dotfile/-/is-dotfile-1.0.3.tgz#a6a2f32ffd2dfb04f5ca25ecd0f6b83cf798a1e1" integrity sha1-pqLzL/0t+wT1yiXs0Pa4PPeYoeE= -is-empty@^1.0.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/is-empty/-/is-empty-1.2.0.tgz#de9bb5b278738a05a0b09a57e1fb4d4a341a9f6b" - integrity sha1-3pu1snhzigWgsJpX4ftNSjQan2s= - is-equal-shallow@^0.1.3: version "0.1.3" resolved "https://registry.yarnpkg.com/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz#2238098fc221de0bcfa5d9eac4c45d638aa1c534" @@ -15242,11 +15056,6 @@ is-hex-prefixed@1.0.0: resolved "https://registry.yarnpkg.com/is-hex-prefixed/-/is-hex-prefixed-1.0.0.tgz#7d8d37e6ad77e5d127148913c573e082d777f554" integrity sha1-fY035q135dEnFIkTxXPggtd39VQ= -is-hexadecimal@^1.0.0: - version "1.0.4" - resolved "https://registry.yarnpkg.com/is-hexadecimal/-/is-hexadecimal-1.0.4.tgz#cc35c97588da4bd49a8eedd6bc4082d44dcb23a7" - integrity sha512-gyPJuv83bHMpocVYoqof5VDiZveEoGoFL8m3BXNb2VW8Xs+rz9kqO8LOQ5DH6EsuvilT1ApazU0pyl+ytbPtlw== - is-installed-globally@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/is-installed-globally/-/is-installed-globally-0.1.0.tgz#0dfd98f5a9111716dd535dda6492f67bf3d25a80" @@ -15348,7 +15157,7 @@ is-plain-obj@^1.0.0, is-plain-obj@^1.1.0: resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e" integrity sha1-caUMhCnfync8kqOQpKA7OfzVHT4= -is-plain-obj@^2.0.0, is-plain-obj@^2.1.0: +is-plain-obj@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-2.1.0.tgz#45e42e37fccf1f40da8e5f76ee21515840c09287" integrity sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA== @@ -15542,11 +15351,6 @@ is-weakset@^2.0.1: resolved "https://registry.yarnpkg.com/is-weakset/-/is-weakset-2.0.1.tgz#e9a0af88dbd751589f5e50d80f4c98b780884f83" integrity sha512-pi4vhbhVHGLxohUw7PhGsueT4vRGFoXhP7+RGN0jKIv9+8PWYCQTqtADngrxOm2g46hoH0+g8uZZBzMrvVGDmw== -is-whitespace-character@^1.0.0: - version "1.0.4" - resolved "https://registry.yarnpkg.com/is-whitespace-character/-/is-whitespace-character-1.0.4.tgz#0858edd94a95594c7c9dd0b5c174ec6e45ee4aa7" - integrity sha512-SDweEzfIZM0SJV0EUga669UTKlmL0Pq8Lno0QDQsPnvECB3IM2aP0gdx5TrU0A01MAPfViaZiI2V1QMZLaKK5w== - is-windows@^0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-0.1.1.tgz#be310715431cfabccc54ab3951210fa0b6d01abe" @@ -15562,11 +15366,6 @@ is-windows@^1.0.0, is-windows@^1.0.1, is-windows@^1.0.2: resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" integrity sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA== -is-word-character@^1.0.0: - version "1.0.4" - resolved "https://registry.yarnpkg.com/is-word-character/-/is-word-character-1.0.4.tgz#ce0e73216f98599060592f62ff31354ddbeb0230" - integrity sha512-5SMO8RVennx3nZrqtKwCGyyetPE9VDba5ugvKLaD4KopPG5kR4mQ7tNt/r7feL5yt5h3lpuBbIUmCOG2eSzXHA== - is-wsl@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-1.1.0.tgz#1f16e4aa22b04d1336b66188a66af3c600c3a66d" @@ -16332,7 +16131,7 @@ js-tokens@^3.0.2: resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" integrity sha1-mGbfOVECEw449/mWvOtlRDIJwls= -js-yaml@3.13.1, js-yaml@3.x, js-yaml@^3.12.0, js-yaml@^3.13.0, js-yaml@^3.13.1, js-yaml@^3.6.1: +js-yaml@3.13.1, js-yaml@3.x, js-yaml@^3.12.0, js-yaml@^3.13.0, js-yaml@^3.13.1: version "3.13.1" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.13.1.tgz#aff151b30bfdfa8e49e05da22e7415e9dfa37847" integrity sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw== @@ -16494,7 +16293,7 @@ json-text-sequence@^0.1: dependencies: delimit-stream "0.1.0" -json5@2.x, json5@^2.0.0, json5@^2.1.2: +json5@2.x, json5@^2.1.2: version "2.1.3" resolved "https://registry.yarnpkg.com/json5/-/json5-2.1.3.tgz#c9b0f7fa9233bfe5807fe66fcf3a5617ed597d43" integrity sha512-KXPvOm8K9IJKFM0bmdn8QXh7udDh1g/giieX0NLCaMnb4hEiVFqnop2ImTXCc5e0/oHz3LTqmHGtExn5hfMkOA== @@ -16520,13 +16319,6 @@ jsonfile@^2.1.0: optionalDependencies: graceful-fs "^4.1.6" -jsonfile@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-3.0.1.tgz#a5ecc6f65f53f662c4415c7675a0331d0992ec66" - integrity sha1-pezG9l9T9mLEQVx2daAzHQmS7GY= - optionalDependencies: - graceful-fs "^4.1.6" - jsonfile@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb" @@ -17090,11 +16882,6 @@ leven@^3.1.0: resolved "https://registry.yarnpkg.com/leven/-/leven-3.1.0.tgz#77891de834064cccba82ae7842bb6b14a13ed7f2" integrity sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A== -levenshtein-edit-distance@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/levenshtein-edit-distance/-/levenshtein-edit-distance-1.0.0.tgz#895baf478cce8b5c1a0d27e45d7c1d978a661e49" - integrity sha1-iVuvR4zOi1waDSfkXXwdl4pmHkk= - levn@^0.3.0, levn@~0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" @@ -17122,15 +16909,6 @@ libcipm@^1.6.2: rimraf "^2.6.2" worker-farm "^1.6.0" -libnpmconfig@^1.0.0: - version "1.2.1" - resolved "https://registry.yarnpkg.com/libnpmconfig/-/libnpmconfig-1.2.1.tgz#c0c2f793a74e67d4825e5039e7a02a0044dfcbc0" - integrity sha512-9esX8rTQAHqarx6qeZqmGQKBNZR5OIbl/Ayr0qQDy3oXja2iFVQQI81R6GZ2a02bSNZ9p3YOGX1O6HHCb1X7kA== - dependencies: - figgy-pudding "^3.5.1" - find-up "^3.0.0" - ini "^1.3.5" - libnpx@^10.2.0: version "10.2.4" resolved "https://registry.yarnpkg.com/libnpx/-/libnpx-10.2.4.tgz#ef0e3258e29aef2ec7ee3276115e20e67f67d4ee" @@ -17216,14 +16994,6 @@ load-json-file@^5.0.0, load-json-file@^5.2.0, load-json-file@^5.3.0: strip-bom "^3.0.0" type-fest "^0.3.0" -load-plugin@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/load-plugin/-/load-plugin-3.0.0.tgz#8f3ce57cf4e5111639911012487bc1c2ba3d0e6c" - integrity sha512-od7eKCCZ62ITvFf8nHHrIiYmgOHb4xVNDRDqxBWSaao5FZyyZVX8OmRCbwjDGPrSrgIulwPNyBsWCGnhiDC0oQ== - dependencies: - libnpmconfig "^1.0.0" - resolve-from "^5.0.0" - loader-runner@^2.4.0: version "2.4.0" resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-2.4.0.tgz#ed47066bfe534d7e84c4c7b9998c2a75607d9357" @@ -17562,7 +17332,7 @@ lodash.without@~4.4.0: resolved "https://registry.yarnpkg.com/lodash.without/-/lodash.without-4.4.0.tgz#3cd4574a00b67bae373a94b748772640507b7aac" integrity sha1-PNRXSgC2e643OpS3SHcmQFB7eqw= -lodash@4.17.14, lodash@4.17.15, lodash@4.17.4, lodash@4.x, lodash@^2.4.1, lodash@^3.10.1, lodash@^4.16.4, lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.12, lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.20, lodash@^4.17.21, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.2.1, lodash@^4.3.0, lodash@~4.17.19: +lodash@4.17.14, lodash@4.17.15, lodash@4.x, lodash@^2.4.1, lodash@^3.10.1, lodash@^4.16.4, lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.12, lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.20, lodash@^4.17.21, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.2.1, lodash@^4.3.0, lodash@~4.17.19: version "4.17.21" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== @@ -17621,11 +17391,6 @@ long@~3: resolved "https://registry.yarnpkg.com/long/-/long-3.2.0.tgz#d821b7138ca1cb581c172990ef14db200b5c474b" integrity sha1-2CG3E4yhy1gcFymQ7xTbIAtcR0s= -longest-streak@^2.0.1: - version "2.0.4" - resolved "https://registry.yarnpkg.com/longest-streak/-/longest-streak-2.0.4.tgz#b8599957da5b5dab64dee3fe316fa774597d90e4" - integrity sha512-vM6rUVCVUJJt33bnmHiZEvr7wPT78ztX7rojL+LW51bHtLh6HTjx84LA5W4+oa6aKEJA7jJu5LR6vQRBpA5DVg== - looper@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/looper/-/looper-2.0.0.tgz#66cd0c774af3d4fedac53794f742db56da8f09ec" @@ -17707,11 +17472,6 @@ ltgt@~2.1.1: resolved "https://registry.yarnpkg.com/ltgt/-/ltgt-2.1.3.tgz#10851a06d9964b971178441c23c9e52698eece34" integrity sha1-EIUaBtmWS5cReEQcI8nlJpjuzjQ= -lunr@0.5.12: - version "0.5.12" - resolved "https://registry.yarnpkg.com/lunr/-/lunr-0.5.12.tgz#a2f6b7d7801cbe2ccb1696da67f1f7788f89e0c8" - integrity sha1-ova314AcvizLFpbaZ/H3eI+J4Mg= - lunr@^2.3.9: version "2.3.9" resolved "https://registry.yarnpkg.com/lunr/-/lunr-2.3.9.tgz#18b123142832337dd6e964df1a5a7707b25d35e1" @@ -17880,28 +17640,11 @@ map-visit@^1.0.0: dependencies: object-visit "^1.0.0" -markdown-escapes@^1.0.0: - version "1.0.4" - resolved "https://registry.yarnpkg.com/markdown-escapes/-/markdown-escapes-1.0.4.tgz#c95415ef451499d7602b91095f3c8e8975f78535" - integrity sha512-8z4efJYk43E0upd0NbVXwgSTQs6cT3T06etieCMEg7dRbzCbxUCK/GHlX8mhHRDcp+OLlHkPKsvqQTCvsRl2cg== - -markdown-extensions@^1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/markdown-extensions/-/markdown-extensions-1.1.1.tgz#fea03b539faeaee9b4ef02a3769b455b189f7fc3" - integrity sha512-WWC0ZuMzCyDHYCasEGs4IPvLyTGftYwh6wIEOULOF0HXcqZlhwRzrK0w2VUlxWA98xnvb/jszw4ZSkJ6ADpM6Q== - markdown-table@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/markdown-table/-/markdown-table-1.1.3.tgz#9fcb69bcfdb8717bfd0398c6ec2d93036ef8de60" integrity sha512-1RUZVgQlpJSPWYbFSpmudq5nHY1doEIv89gBtF0s4gW1GF2XorxcA/70M5vq7rLv0a6mhOUccRsqkwhwLCIQ2Q== -markdown-table@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/markdown-table/-/markdown-table-2.0.0.tgz#194a90ced26d31fe753d8b9434430214c011865b" - integrity sha512-Ezda85ToJUBhM6WGaG6veasyym+Tbs3cMAw/ZhOPqXiYsr0jgocBV3j3nx+4lk47plLlIqjwuTm/ywVI+zjJ/A== - dependencies: - repeat-string "^1.0.0" - marked-terminal@^3.3.0: version "3.3.0" resolved "https://registry.yarnpkg.com/marked-terminal/-/marked-terminal-3.3.0.tgz#25ce0c0299285998c7636beaefc87055341ba1bd" @@ -17962,18 +17705,6 @@ md5.js@^1.3.4: inherits "^2.0.1" safe-buffer "^5.1.2" -mdast-util-compact@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/mdast-util-compact/-/mdast-util-compact-2.0.1.tgz#cabc69a2f43103628326f35b1acf735d55c99490" - integrity sha512-7GlnT24gEwDrdAwEHrU4Vv5lLWrEer4KOkAiKT9nYstsTad7Oc1TwqT2zIMKRdZF7cTuaf+GA1E4Kv7jJh8mPA== - dependencies: - unist-util-visit "^2.0.0" - -mdast-util-to-string@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/mdast-util-to-string/-/mdast-util-to-string-1.1.0.tgz#27055500103f51637bd07d01da01eb1967a43527" - integrity sha512-jVU0Nr2B9X3MU4tSK7JP1CMkSvOj7X5l/GboG1tKRw52lLF1x2Ju92Ms9tNetCcbfX3hzlM73zYo2NKkWSfF/A== - meant@~1.0.1: version "1.0.3" resolved "https://registry.yarnpkg.com/meant/-/meant-1.0.3.tgz#67769af9de1d158773e928ae82c456114903554c" @@ -18548,7 +18279,7 @@ minimist-options@^3.0.1: arrify "^1.0.1" is-plain-obj "^1.1.0" -minimist@0.0.5, minimist@0.0.8, minimist@^1.1.0, minimist@^1.1.1, minimist@^1.1.3, minimist@^1.2.0, minimist@^1.2.5, minimist@~0.0.1, minimist@~1.2.0: +minimist@0.0.5, minimist@0.0.8, minimist@^1.1.0, minimist@^1.1.1, minimist@^1.1.3, minimist@^1.2.0, minimist@^1.2.5, minimist@~1.2.0: version "1.2.5" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== @@ -19667,7 +19398,7 @@ npm-user-validate@~1.0.0: resolved "https://registry.yarnpkg.com/npm-user-validate/-/npm-user-validate-1.0.0.tgz#8ceca0f5cea04d4e93519ef72d0557a75122e951" integrity sha1-jOyg9c6gTU6TUZ73LQVXp1Ei6VE= -npm@5.1.0, npm@^5.10.0: +npm@^5.10.0: version "5.10.0" resolved "https://registry.yarnpkg.com/npm/-/npm-5.10.0.tgz#3bec62312c94a9b0f48f208e00b98bf0304b40db" integrity sha512-lvjvjgR5wG2RJ2uqak1xtZcVAWMwVOzN5HkUlUj/n8rU1f3A0fNn+7HwOzH9Lyf0Ppyu9ApgsEpHczOSnx1cwA== @@ -19780,7 +19511,7 @@ npm@5.1.0, npm@^5.10.0: wrappy "~1.0.2" write-file-atomic "^2.3.0" -npmi@1.0.1, npmi@^4.0.0: +npmi@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/npmi/-/npmi-4.0.0.tgz#02b669a79ef475578461811e4f51aac808169068" integrity sha512-qNyW7pgCNbdhDFl3WmEEIZwp87RKwD9Y9SiJ/eZPGCUM7iwgvXXNVby+3JEYAfV6KxONnitDNFXuZlr2fSpV/g== @@ -20079,14 +19810,6 @@ openzeppelin-solidity@^2.5.0: resolved "https://registry.yarnpkg.com/openzeppelin-solidity/-/openzeppelin-solidity-2.5.0.tgz#829a9bcfc928619dd96c44bd893b180044ff51aa" integrity sha512-I0yRC3nff9Kn2LDWuz02fuw0EuomVQ9Z8lHzdqh8P9BiOUzIk8frQRxn/a1Kva3StF6hwPP+Dh3/SQ2ily1Pow== -optimist@0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.6.1.tgz#da3ea74686fa21a19a111c326e90eb15a0196686" - integrity sha1-2j6nRob6IaGaERwybpDrFaAZZoY= - dependencies: - minimist "~0.0.1" - wordwrap "~0.0.2" - optionator@^0.8.1, optionator@^0.8.2: version "0.8.3" resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.3.tgz#84fa1d036fe9d3c7e21d99884b601167ec8fb495" @@ -20184,7 +19907,7 @@ os-name@^3.0.0, os-name@^3.1.0: macos-release "^2.2.0" windows-release "^3.1.0" -os-tmpdir@^1.0.0, os-tmpdir@^1.0.1, os-tmpdir@~1.0.1, os-tmpdir@~1.0.2: +os-tmpdir@^1.0.0, os-tmpdir@^1.0.1, os-tmpdir@~1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ= @@ -20443,18 +20166,6 @@ parse-code-context@^1.0.0: resolved "https://registry.yarnpkg.com/parse-code-context/-/parse-code-context-1.0.0.tgz#718c295c593d0d19a37f898473268cc75e98de1e" integrity sha512-OZQaqKaQnR21iqhlnPfVisFjBWjhnMl5J9MgbP8xC+EwoVqbXrq78lp+9Zb3ahmLzrIX5Us/qbvBnaS3hkH6OA== -parse-entities@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/parse-entities/-/parse-entities-2.0.0.tgz#53c6eb5b9314a1f4ec99fa0fdf7ce01ecda0cbe8" - integrity sha512-kkywGpCcRYhqQIchaWqZ875wzpS/bMKhz5HnN3p7wveJTkTtyAB/AlnS0f8DFSqYW1T82t6yEAkEcB+A1I3MbQ== - dependencies: - character-entities "^1.0.0" - character-entities-legacy "^1.0.0" - character-reference-invalid "^1.0.0" - is-alphanumerical "^1.0.0" - is-decimal "^1.0.0" - is-hexadecimal "^1.0.0" - parse-filepath@^0.6.1: version "0.6.3" resolved "https://registry.yarnpkg.com/parse-filepath/-/parse-filepath-0.6.3.tgz#38e17a73e5e4e6776bae9506fc3ccb14bc3a2b80" @@ -21319,13 +21030,6 @@ proper-lockfile@^3.0.2: retry "^0.12.0" signal-exit "^3.0.2" -propose@0.0.5: - version "0.0.5" - resolved "https://registry.yarnpkg.com/propose/-/propose-0.0.5.tgz#48a065d9ec7d4c8667f4050b15c4a2d85dbca56b" - integrity sha1-SKBl2ex9TIZn9AULFcSi2F28pWs= - dependencies: - levenshtein-edit-distance "^1.0.0" - proto-list@~1.2.1: version "1.2.4" resolved "https://registry.yarnpkg.com/proto-list/-/proto-list-1.2.4.tgz#212d5bfe1318306a420f6402b8e26ff39647a849" @@ -21536,11 +21240,6 @@ pvutils@latest: resolved "https://registry.yarnpkg.com/pvutils/-/pvutils-1.0.17.tgz#ade3c74dfe7178944fe44806626bd2e249d996bf" integrity sha512-wLHYUQxWaXVQvKnwIDWFVKDJku9XDCvyhhxoq8dc5MFdIlRenyPI9eSfEtcvgHgD7FlvCyGAlWgOzRnZD99GZQ== -q@1.5.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/q/-/q-1.5.0.tgz#dd01bac9d06d30e6f219aecb8253ee9ebdc308f1" - integrity sha1-3QG6ydBtMObyGa7LglPunr3DCPE= - q@2.0.x: version "2.0.3" resolved "https://registry.yarnpkg.com/q/-/q-2.0.3.tgz#75b8db0255a1a5af82f58c3f3aaa1efec7d0d134" @@ -22211,80 +21910,6 @@ relay-provider@^2.0.0-beta.0: dependencies: "@json-rpc-tools/types" "^2.0.0-beta.1" -remark-cli@^8.0.0: - version "8.0.0" - resolved "https://registry.yarnpkg.com/remark-cli/-/remark-cli-8.0.0.tgz#0cb405080d320de539656b181908b796c369f37d" - integrity sha512-5iRrk8ad+dU4espDl60H7ANhXqoaEXYsIyL8Mau0lDN6pP7QMAZsZTCX2XdoCfKfKEpiOggA7CHv43HkyVEppA== - dependencies: - markdown-extensions "^1.1.0" - remark "^12.0.0" - unified-args "^8.0.0" - -remark-parse@^8.0.0: - version "8.0.2" - resolved "https://registry.yarnpkg.com/remark-parse/-/remark-parse-8.0.2.tgz#5999bc0b9c2e3edc038800a64ff103d0890b318b" - integrity sha512-eMI6kMRjsAGpMXXBAywJwiwAse+KNpmt+BK55Oofy4KvBZEqUDj6mWbGLJZrujoPIPPxDXzn3T9baRlpsm2jnQ== - dependencies: - ccount "^1.0.0" - collapse-white-space "^1.0.2" - is-alphabetical "^1.0.0" - is-decimal "^1.0.0" - is-whitespace-character "^1.0.0" - is-word-character "^1.0.0" - markdown-escapes "^1.0.0" - parse-entities "^2.0.0" - repeat-string "^1.5.4" - state-toggle "^1.0.0" - trim "0.0.1" - trim-trailing-lines "^1.0.0" - unherit "^1.0.4" - unist-util-remove-position "^2.0.0" - vfile-location "^3.0.0" - xtend "^4.0.1" - -remark-stringify@^8.0.0: - version "8.0.0" - resolved "https://registry.yarnpkg.com/remark-stringify/-/remark-stringify-8.0.0.tgz#33423ab8bf3076fb197f4cf582aaaf866b531625" - integrity sha512-cABVYVloFH+2ZI5bdqzoOmemcz/ZuhQSH6W6ZNYnLojAUUn3xtX7u+6BpnYp35qHoGr2NFBsERV14t4vCIeW8w== - dependencies: - ccount "^1.0.0" - is-alphanumeric "^1.0.0" - is-decimal "^1.0.0" - is-whitespace-character "^1.0.0" - longest-streak "^2.0.1" - markdown-escapes "^1.0.0" - markdown-table "^2.0.0" - mdast-util-compact "^2.0.0" - parse-entities "^2.0.0" - repeat-string "^1.5.4" - state-toggle "^1.0.0" - stringify-entities "^3.0.0" - unherit "^1.0.4" - xtend "^4.0.1" - -remark-validate-links@^10.0.0: - version "10.0.0" - resolved "https://registry.yarnpkg.com/remark-validate-links/-/remark-validate-links-10.0.0.tgz#a76f14dc9150d9af061115adbfe3efc6e54c1424" - integrity sha512-BLVKPCoF8BLZCgJyDNw8rEL9++ohx+lpc6eZl7GNmHxJi3SR5tA7JYNcEVmcDj7M6Kl04wmc6BaeJ1FYNQDaIQ== - dependencies: - github-slugger "^1.0.0" - hosted-git-info "^3.0.0" - mdast-util-to-string "^1.0.0" - propose "0.0.5" - to-vfile "^6.0.0" - trough "^1.0.0" - unist-util-visit "^2.0.0" - xtend "^4.0.0" - -remark@^12.0.0: - version "12.0.0" - resolved "https://registry.yarnpkg.com/remark/-/remark-12.0.0.tgz#d1c145c07341c9232f93b2f8539d56da15a2548c" - integrity sha512-oX4lMIS0csgk8AEbzY0h2jdR0ngiCHOpwwpxjmRa5TqAkeknY+tkhjRJGZqnCmvyuWh55/0SW5WY3R3nn3PH9A== - dependencies: - remark-parse "^8.0.0" - remark-stringify "^8.0.0" - unified "^9.0.0" - remix-lib@>=0.4.1: version "0.4.6" resolved "https://registry.yarnpkg.com/remix-lib/-/remix-lib-0.4.6.tgz#7d78fd07988eb6fcb0e8d9e2cbb65873f236b28e" @@ -22327,7 +21952,7 @@ repeat-element@^1.1.2: resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.2.tgz#ef089a178d1483baae4d93eb98b4f9e4e11d990a" integrity sha1-7wiaF40Ug7quTZPrmLT55OEdmQo= -repeat-string@^1.0.0, repeat-string@^1.5.0, repeat-string@^1.5.2, repeat-string@^1.5.4, repeat-string@^1.6.1: +repeat-string@^1.5.2, repeat-string@^1.6.1: version "1.6.1" resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" integrity sha1-jcrkcOHIirwtYA//Sndihtp15jc= @@ -22344,7 +21969,7 @@ replace-ext@0.0.1: resolved "https://registry.yarnpkg.com/replace-ext/-/replace-ext-0.0.1.tgz#29bbd92078a739f0bcce2b4ee41e837953522924" integrity sha1-KbvZIHinOfC8zitO5B6DeVNSKSQ= -replace-ext@1.0.0, replace-ext@^1.0.0: +replace-ext@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/replace-ext/-/replace-ext-1.0.0.tgz#de63128373fcbf7c3ccfa4de5a480c45a67958eb" integrity sha1-3mMSg3P8v3w8z6TeWkgMRaZ5WOs= @@ -22949,11 +22574,6 @@ semver@4.3.2: resolved "https://registry.yarnpkg.com/semver/-/semver-4.3.2.tgz#c7a07158a80bedd052355b770d82d6640f803be7" integrity sha1-x6BxWKgL7dBSNVt3DYLWZA+AO+c= -semver@5.3.0, semver@~5.3.0: - version "5.3.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f" - integrity sha1-myzl094C0XxgEq0yaqa00M9U+U8= - semver@5.5.0: version "5.5.0" resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.0.tgz#dc4bbc7a6ca9d916dee5d43516f0092b58f7b8ab" @@ -22974,6 +22594,11 @@ semver@^6.0.0, semver@^6.2.0, semver@^6.3.0: resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== +semver@~5.3.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f" + integrity sha1-myzl094C0XxgEq0yaqa00M9U+U8= + semver@~5.4.1: version "5.4.1" resolved "https://registry.yarnpkg.com/semver/-/semver-5.4.1.tgz#e059c09d8571f0540823733433505d3a2f00b18e" @@ -23758,11 +23383,6 @@ starts-with@^1.0.0, starts-with@^1.0.2: resolved "https://registry.yarnpkg.com/starts-with/-/starts-with-1.0.2.tgz#16793a729d89d4cf3d4fb2eda2f908ae357f196f" integrity sha1-Fnk6cp2J1M89T7LtovkIrjV/GW8= -state-toggle@^1.0.0: - version "1.0.3" - resolved "https://registry.yarnpkg.com/state-toggle/-/state-toggle-1.0.3.tgz#e123b16a88e143139b09c6852221bc9815917dfe" - integrity sha512-d/5Z4/2iiCnHw6Xzghyhb+GcmF89bxwgXG60wjIiZaxnymbyOmI8Hk4VqHXiVVp6u2ysaskFfXg3ekCj4WNftQ== - static-extend@^0.1.1: version "0.1.2" resolved "https://registry.yarnpkg.com/static-extend/-/static-extend-0.1.2.tgz#60809c39cbff55337226fd5e0b520f341f1fb5c6" @@ -24016,17 +23636,6 @@ string_decoder@~1.1.1: dependencies: safe-buffer "~5.1.0" -stringify-entities@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/stringify-entities/-/stringify-entities-3.0.0.tgz#455abe501f8b7859ba5726a25a8872333c65b0a7" - integrity sha512-h7NJJIssprqlyjHT2eQt2W1F+MCcNmwPGlKb0bWEdET/3N44QN3QbUF/ueKCgAssyKRZ3Br9rQ7FcXjHr0qLHw== - dependencies: - character-entities-html4 "^1.0.0" - character-entities-legacy "^1.0.0" - is-alphanumerical "^1.0.0" - is-decimal "^1.0.2" - is-hexadecimal "^1.0.0" - strip-ansi@^3.0.0, strip-ansi@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" @@ -24224,7 +23833,7 @@ supports-color@6.0.0: dependencies: has-flag "^3.0.0" -supports-color@6.1.0, supports-color@^6.0.0, supports-color@^6.1.0: +supports-color@6.1.0, supports-color@^6.1.0: version "6.1.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-6.1.0.tgz#0764abc69c63d5ac842dd4867e8d025e880df8f3" integrity sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ== @@ -24790,13 +24399,6 @@ tiny-secp256k1@^1.1.3: elliptic "^6.4.0" nan "^2.13.2" -tmp@0.0.31: - version "0.0.31" - resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.31.tgz#8f38ab9438e17315e5dbd8b3657e8bfb277ae4a7" - integrity sha1-jzirlDjhcxXl29izZX6L+yd65Kc= - dependencies: - os-tmpdir "~1.0.1" - tmp@0.0.33, tmp@^0.0.33: version "0.0.33" resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" @@ -24921,14 +24523,6 @@ to-through@^2.0.0: dependencies: through2 "^2.0.3" -to-vfile@^6.0.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/to-vfile/-/to-vfile-6.1.0.tgz#5f7a3f65813c2c4e34ee1f7643a5646344627699" - integrity sha512-BxX8EkCxOAZe+D/ToHdDsJcVI4HqQfmw0tCkp31zf3dNP/XWIAjU4CmeuSwsSoOzOTqHPOL0KUzyZqJplkD0Qw== - dependencies: - is-buffer "^2.0.0" - vfile "^4.0.0" - toidentifier@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.0.tgz#7e1be3470f1e77948bc43d94a3c8f4d7752ba553" @@ -25023,26 +24617,11 @@ trim-right@^1.0.1: resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003" integrity sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM= -trim-trailing-lines@^1.0.0: - version "1.1.3" - resolved "https://registry.yarnpkg.com/trim-trailing-lines/-/trim-trailing-lines-1.1.3.tgz#7f0739881ff76657b7776e10874128004b625a94" - integrity sha512-4ku0mmjXifQcTVfYDfR5lpgV7zVqPg6zV9rdZmwOPqq0+Zq19xDqEgagqVbc4pOOShbncuAOIs59R3+3gcF3ZA== - -trim@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/trim/-/trim-0.0.1.tgz#5858547f6b290757ee95cccc666fb50084c460dd" - integrity sha1-WFhUf2spB1fulczMZm+1AITEYN0= - triple-beam@^1.2.0, triple-beam@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/triple-beam/-/triple-beam-1.3.0.tgz#a595214c7298db8339eeeee083e4d10bd8cb8dd9" integrity sha512-XrHUvV5HpdLmIj4uVMxHggLbFSZYIn7HEWsqePZcI50pco+MPqJ50wMGY794X7AOOhxOBAjbkqfAbEe/QMp2Lw== -trough@^1.0.0: - version "1.0.5" - resolved "https://registry.yarnpkg.com/trough/-/trough-1.0.5.tgz#b8b639cefad7d0bb2abd37d433ff8293efa5f406" - integrity sha512-rvuRbTarPXmMb79SmzEp8aqXNKcK+y0XaB298IXueQ8I2PsrATcPBCSPyK/dDNa2iWOhKlfNnOjdAOTBU/nkFA== - truffle-artifactor@^4.0.30: version "4.0.30" resolved "https://registry.yarnpkg.com/truffle-artifactor/-/truffle-artifactor-4.0.30.tgz#c06448fbf3406f8f697dae86c281e0f8cd7e5f69" @@ -25713,14 +25292,6 @@ undertaker@^1.2.1: object.reduce "^1.0.0" undertaker-registry "^1.0.0" -unherit@^1.0.4: - version "1.1.3" - resolved "https://registry.yarnpkg.com/unherit/-/unherit-1.1.3.tgz#6c9b503f2b41b262330c80e91c8614abdaa69c22" - integrity sha512-Ft16BJcnapDKp0+J/rqFC3Rrk6Y/Ng4nzsC028k2jdDII/rdZ7Wd3pPT/6+vIIxRagwRc9K0IUX0Ra4fKvw+WQ== - dependencies: - inherits "^2.0.0" - xtend "^4.0.0" - unicode-canonical-property-names-ecmascript@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz#2619800c4c825800efdd8343af7dd9933cbe2818" @@ -25744,55 +25315,6 @@ unicode-property-aliases-ecmascript@^1.0.4: resolved "https://registry.yarnpkg.com/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-1.0.4.tgz#5a533f31b4317ea76f17d807fa0d116546111dd0" integrity sha512-2WSLa6OdYd2ng8oqiGIWnJqyFArvhn+5vgx5GTxMbUYjCYKUcuKS62YLFF0R/BDGlB1yzXjQOLtPAfHsgirEpg== -unified-args@^8.0.0: - version "8.0.0" - resolved "https://registry.yarnpkg.com/unified-args/-/unified-args-8.0.0.tgz#c74d92a2b2ab43ed95c22c61d0ef81b4eed1bd80" - integrity sha512-224jfXOL0Xu0e52fJTfxmAaNTuW1zopPmnXh/5GDAxx4Z6NbcZpjgQPBmo1xoLAhGih0rWVG2+a2kodzrEHfHw== - dependencies: - camelcase "^5.0.0" - chalk "^3.0.0" - chokidar "^3.0.0" - fault "^1.0.2" - json5 "^2.0.0" - minimist "^1.2.0" - text-table "^0.2.0" - unified-engine "^8.0.0" - -unified-engine@^8.0.0: - version "8.0.0" - resolved "https://registry.yarnpkg.com/unified-engine/-/unified-engine-8.0.0.tgz#e3996ff6eaecc6ca3408af92b70e25691192d17d" - integrity sha512-vLUezxCnjzz+ya4pYouRQVMT8k82Rk4fIj406UidRnSFJdGXFaQyQklAnalsQHJrLqAlaYPkXPUa1upfVSHGCA== - dependencies: - concat-stream "^2.0.0" - debug "^4.0.0" - fault "^1.0.0" - figures "^3.0.0" - glob "^7.0.3" - ignore "^5.0.0" - is-buffer "^2.0.0" - is-empty "^1.0.0" - is-plain-obj "^2.0.0" - js-yaml "^3.6.1" - load-plugin "^3.0.0" - parse-json "^5.0.0" - to-vfile "^6.0.0" - trough "^1.0.0" - unist-util-inspect "^5.0.0" - vfile-reporter "^6.0.0" - vfile-statistics "^1.1.0" - -unified@^9.0.0: - version "9.0.0" - resolved "https://registry.yarnpkg.com/unified/-/unified-9.0.0.tgz#12b099f97ee8b36792dbad13d278ee2f696eed1d" - integrity sha512-ssFo33gljU3PdlWLjNp15Inqb77d6JnJSfyplGJPT/a+fNRNyCBeveBAYJdO5khKdF6WVHa/yYCC7Xl6BDwZUQ== - dependencies: - bail "^1.0.0" - extend "^3.0.0" - is-buffer "^2.0.0" - is-plain-obj "^2.0.0" - trough "^1.0.0" - vfile "^4.0.0" - union-value@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.0.tgz#5c71c34cb5bad5dcebe3ea0cd08207ba5aa1aea4" @@ -25839,49 +25361,6 @@ unique-string@^2.0.0: dependencies: crypto-random-string "^2.0.0" -unist-util-inspect@^5.0.0: - version "5.0.1" - resolved "https://registry.yarnpkg.com/unist-util-inspect/-/unist-util-inspect-5.0.1.tgz#168c8770a99902318ca268f8c391e294bcf44540" - integrity sha512-fPNWewS593JSmg49HbnE86BJKuBi1/nMWhDSccBvbARfxezEuJV85EaARR9/VplveiwCoLm2kWq+DhP8TBaDpw== - dependencies: - is-empty "^1.0.0" - -unist-util-is@^4.0.0: - version "4.0.2" - resolved "https://registry.yarnpkg.com/unist-util-is/-/unist-util-is-4.0.2.tgz#c7d1341188aa9ce5b3cff538958de9895f14a5de" - integrity sha512-Ofx8uf6haexJwI1gxWMGg6I/dLnF2yE+KibhD3/diOqY2TinLcqHXCV6OI5gFVn3xQqDH+u0M625pfKwIwgBKQ== - -unist-util-remove-position@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/unist-util-remove-position/-/unist-util-remove-position-2.0.1.tgz#5d19ca79fdba712301999b2b73553ca8f3b352cc" - integrity sha512-fDZsLYIe2uT+oGFnuZmy73K6ZxOPG/Qcm+w7jbEjaFcJgbQ6cqjs/eSPzXhsmGpAsWPkqZM9pYjww5QTn3LHMA== - dependencies: - unist-util-visit "^2.0.0" - -unist-util-stringify-position@^2.0.0: - version "2.0.3" - resolved "https://registry.yarnpkg.com/unist-util-stringify-position/-/unist-util-stringify-position-2.0.3.tgz#cce3bfa1cdf85ba7375d1d5b17bdc4cada9bd9da" - integrity sha512-3faScn5I+hy9VleOq/qNbAd6pAx7iH5jYBMS9I1HgQVijz/4mv5Bvw5iw1sC/90CODiKo81G/ps8AJrISn687g== - dependencies: - "@types/unist" "^2.0.2" - -unist-util-visit-parents@^3.0.0: - version "3.0.2" - resolved "https://registry.yarnpkg.com/unist-util-visit-parents/-/unist-util-visit-parents-3.0.2.tgz#d4076af3011739c71d2ce99d05de37d545f4351d" - integrity sha512-yJEfuZtzFpQmg1OSCyS9M5NJRrln/9FbYosH3iW0MG402QbdbaB8ZESwUv9RO6nRfLAKvWcMxCwdLWOov36x/g== - dependencies: - "@types/unist" "^2.0.0" - unist-util-is "^4.0.0" - -unist-util-visit@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/unist-util-visit/-/unist-util-visit-2.0.2.tgz#3843782a517de3d2357b4c193b24af2d9366afb7" - integrity sha512-HoHNhGnKj6y+Sq+7ASo2zpVdfdRifhTgX2KTU3B/sO/TTlZchp7E3S4vjRzDJ7L60KmrCPsQkVK3lEF3cz36XQ== - dependencies: - "@types/unist" "^2.0.0" - unist-util-is "^4.0.0" - unist-util-visit-parents "^3.0.0" - universal-analytics@^0.4.16: version "0.4.16" resolved "https://registry.yarnpkg.com/universal-analytics/-/universal-analytics-0.4.16.tgz#c567eced53cc99ae40d88668464da0950a713731" @@ -26077,13 +25556,6 @@ use@^3.1.0: dependencies: kind-of "^6.0.2" -user-home@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/user-home/-/user-home-2.0.0.tgz#9c70bfd8169bc1dcbf48604e0f04b8b49cde9e9f" - integrity sha1-nHC/2Babwdy/SGBODwS4tJzenp8= - dependencies: - os-homedir "^1.0.0" - utf-8-validate@^5.0.2: version "5.0.2" resolved "https://registry.yarnpkg.com/utf-8-validate/-/utf-8-validate-5.0.2.tgz#63cfbccd85dc1f2b66cf7a1d0eebc08ed056bfb3" @@ -26274,52 +25746,6 @@ verror@1.10.0: core-util-is "1.0.2" extsprintf "^1.2.0" -vfile-location@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/vfile-location/-/vfile-location-3.0.1.tgz#d78677c3546de0f7cd977544c367266764d31bb3" - integrity sha512-yYBO06eeN/Ki6Kh1QAkgzYpWT1d3Qln+ZCtSbJqFExPl1S3y2qqotJQXoh6qEvl/jDlgpUJolBn3PItVnnZRqQ== - -vfile-message@^2.0.0: - version "2.0.4" - resolved "https://registry.yarnpkg.com/vfile-message/-/vfile-message-2.0.4.tgz#5b43b88171d409eae58477d13f23dd41d52c371a" - integrity sha512-DjssxRGkMvifUOJre00juHoP9DPWuzjxKuMDrhNbk2TdaYYBNMStsNhEOt3idrtI12VQYM/1+iM0KOzXi4pxwQ== - dependencies: - "@types/unist" "^2.0.0" - unist-util-stringify-position "^2.0.0" - -vfile-reporter@^6.0.0: - version "6.0.1" - resolved "https://registry.yarnpkg.com/vfile-reporter/-/vfile-reporter-6.0.1.tgz#45d4dc11df2e312196ea2ceb95e42a67fc8ce814" - integrity sha512-0OppK9mo8G2XUpv+hIKLVSDsoxJrXnOy73+vIm0jQUOUFYRduqpFHX+QqAQfvRHyX9B0UFiRuNJnBOjQCIsw1g== - dependencies: - repeat-string "^1.5.0" - string-width "^4.0.0" - supports-color "^6.0.0" - unist-util-stringify-position "^2.0.0" - vfile-sort "^2.1.2" - vfile-statistics "^1.1.0" - -vfile-sort@^2.1.2: - version "2.2.2" - resolved "https://registry.yarnpkg.com/vfile-sort/-/vfile-sort-2.2.2.tgz#720fe067ce156aba0b411a01bb0dc65596aa1190" - integrity sha512-tAyUqD2R1l/7Rn7ixdGkhXLD3zsg+XLAeUDUhXearjfIcpL1Hcsj5hHpCoy/gvfK/Ws61+e972fm0F7up7hfYA== - -vfile-statistics@^1.1.0: - version "1.1.4" - resolved "https://registry.yarnpkg.com/vfile-statistics/-/vfile-statistics-1.1.4.tgz#b99fd15ecf0f44ba088cc973425d666cb7a9f245" - integrity sha512-lXhElVO0Rq3frgPvFBwahmed3X03vjPF8OcjKMy8+F1xU/3Q3QU3tKEDp743SFtb74PdF0UWpxPvtOP0GCLheA== - -vfile@^4.0.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/vfile/-/vfile-4.1.0.tgz#d79248957f43225d57ff67a56effc67bef08946e" - integrity sha512-BaTPalregj++64xbGK6uIlsurN3BCRNM/P2Pg8HezlGzKd1O9PrwIac6bd9Pdx2uTb0QHoioZ+rXKolbVXEgJg== - dependencies: - "@types/unist" "^2.0.0" - is-buffer "^2.0.0" - replace-ext "1.0.0" - unist-util-stringify-position "^2.0.0" - vfile-message "^2.0.0" - vinyl-fs@2.4.3: version "2.4.3" resolved "https://registry.yarnpkg.com/vinyl-fs/-/vinyl-fs-2.4.3.tgz#3d97e562ebfdd4b66921dea70626b84bde9d2d07" @@ -28656,11 +28082,6 @@ wordwrap@^1.0.0: resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" integrity sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus= -wordwrap@~0.0.2: - version "0.0.3" - resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107" - integrity sha1-o9XabNXAvAAI03I0u68b7WMFkQc= - worker-farm@^1.6.0, worker-farm@^1.7.0: version "1.7.0" resolved "https://registry.yarnpkg.com/worker-farm/-/worker-farm-1.7.0.tgz#26a94c5391bbca926152002f69b84a4bf772e5a8"