Skip to content
This repository has been archived by the owner on Jan 5, 2024. It is now read-only.

Commit

Permalink
Merge branch 'main' of https://github.com/thirdweb-dev/docs into paym…
Browse files Browse the repository at this point in the history
…ents
  • Loading branch information
gerrysaporito committed Nov 28, 2023
2 parents 06dfbd3 + d5e2c24 commit 966773d
Show file tree
Hide file tree
Showing 947 changed files with 149,023 additions and 114,838 deletions.
353 changes: 168 additions & 185 deletions docs/example-repos.json

Large diffs are not rendered by default.

11 changes: 11 additions & 0 deletions docs/feature_snippets_react.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
{
"": [
{
"name": "shortenAddress",
"summary": "This function shortens an address if it is a valid EVM address.\n\n",
"remarks": "\n\nNote that this function will not check if the address is an ENS.\n\n",
"examples": {
"tyepscript": "const address = shortenIfAddress(\"0x1234567890123456789012345678901234567890\", true); // result will be \"0x1234...890\""
},
"reference": {
"javascript": "https://docs.thirdweb.com/react/react.shortenaddress"
}
},
{
"name": "useAcceptDirectListingOffer",
"summary": "Accept a specific offer on a direct listing\n\n",
Expand Down
24 changes: 23 additions & 1 deletion docs/feature_snippets_sdk.json
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,17 @@
}
],
"AccountFactory": [
{
"name": "createAccount",
"summary": "Create a account\n\n",
"remarks": "\n\nCreate a account for an admin. The admin will have complete authority over the account.\n\n",
"examples": {
"javascript": "const tx = await contract.accountFactory.createAccount(admin, extraData);\nconst receipt = tx.receipt();\nconst accountAddress = tx.address;"
},
"reference": {
"javascript": "https://docs.thirdweb.com/typescript/sdk.utils.byteslike"
}
},
{
"name": "getAllAccounts",
"summary": "Get all accounts\n\n",
Expand Down Expand Up @@ -2109,7 +2120,7 @@
"summary": "Update the metadata of an NFT\n\n",
"remarks": "\n\nUpdate the metadata of an NFT\n\n",
"examples": {
"javascript": "// The token ID of the NFT whose metadata you want to update\nconst tokenId = 0;\n// The new metadata\nconst metadata = { name: \"My NFT\", description: \"My NFT description\"\"}\n\nawait contract.erc721.update(tokenId, metadata);"
"javascript": "// The token ID of the NFT whose metadata you want to update\nconst tokenId = 0;\n// The new metadata\nconst metadata = { name: \"My NFT\", description: \"My NFT description\" }\n\nawait contract.erc721.update(tokenId, metadata);"
},
"reference": {
"javascript": "https://docs.thirdweb.com/typescript/sdk.bignumberish"
Expand Down Expand Up @@ -2354,6 +2365,17 @@
"javascript": "https://docs.thirdweb.com/typescript/sdk.marketplacev3directlistings.gettotalcount"
}
},
{
"name": "isBuyerApprovedForListing",
"summary": "Check if a buyer is approved for a specific direct listing\n\n",
"remarks": null,
"examples": {
"javascript": "const listingId = 0;\nconst isBuyerApproved = await contract.directListings.isBuyerApprovedForListing(listingId, \"{{wallet_address}}\");"
},
"reference": {
"javascript": "https://docs.thirdweb.com/typescript/sdk.marketplacev3directlistings.isbuyerapprovedforlisting"
}
},
{
"name": "isCurrencyApprovedForListing",
"summary": "Check if a currency is approved for a specific direct listing\n\n",
Expand Down
4 changes: 2 additions & 2 deletions docs/onboarding/0 1 Platform Overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ build, launch, and manage web3 applications and games across any EVM-compatible
## Architecture

Whether you're developing decentralized applications from scratch or enhancing existing ones,
Our tool suite accelerates your development workflow across the smart contract, application, and infrastructure layers.
our tool suite accelerates your development workflow across the smart contract, application, and infrastructure layers.

<ThemedImage
sources={{
Expand Down Expand Up @@ -70,7 +70,7 @@ A full list of the available contracts can be found [in the pre-built contracts
### 3. Deploy Smart Contracts

- [**Deploy CLI**](/cli): deploy your smart contract without using a private key.
- [**Deploy using the SDK**](/sdk): deploy your smart contract using the [**TypeScript SDK**](/typescript/sdk.contractdeployer), [**GO SDK**](/go/contract_deployer), [**Python SDK**](/python/python.contractdeployer) or [**Unity SDK**](/unity/contractdeployer) from an application e.g. a script.
- [**Deploy using the SDK**](/sdk): deploy your smart contract using the [**TypeScript SDK**](/typescript/sdk.contractdeployer), [**GO SDK**](/go/contract_deployer), [**Python SDK**](/python/python.contractdeployer) or [**Unity SDK**](/unity/contractdeployer) from an application e.g., a script.
- [**Import Contract**](/import-contract): import an already deployed contract.
- [**Deploy from Explore**](https://thirdweb.com/explore): explore pre-built contracts and deploy them to your blockchain of choice.

Expand Down
2 changes: 1 addition & 1 deletion docs/onboarding/0 Getting Started/API Keys.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ API Keys allow you to:
- Upload and download assets to IPFS using Storage via dashboard, CLI, or SDKs
- Use a dedicated RPC Edge service in your application
- Use Bundler & Paymaster services for your Smart Wallets
- Enable various services such as signing in with Google, Email, and Custom JWT when using Embedded wallets.
- Enable various services such as signing in with Google, Facebook, Apple, Email, and Custom JWT when using Embedded wallets.

API Keys consists of two components:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ This contract inherits from the [`BaseAccountFactory`](/solidity/extensions/base
This factory smart contract is intended to be used to distribute ['DynamicAccounts`](/solidity/base-contracts/dynamic-account) programmatically.

<ViewContractCodeButton
link="https://github.com/thirdweb-dev/contracts/blob/main/contracts/smart-wallet/dynamic/DynamicAccount.sol"
name="DynamicAccount"
link="https://github.com/thirdweb-dev/contracts/blob/main/contracts/prebuilts/account/dynamic/DynamicAccountFactory.sol"
name="DynamicAccountFactory"
/>

<br />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ The difference between `DynamicAccount` smart wallet and [`Account`](/solidity/b
The admin of a given `DynamicAccount` smart wallet is allowed to make upgrades to their **own** smart wallets. This is the right wallet for developers who anticipate providing **opt-in upgrades** to their users’ wallets.

<ViewContractCodeButton
link="https://github.com/thirdweb-dev/contracts/blob/main/contracts/smart-wallet/dynamic/DynamicAccount.sol"
link="https://github.com/thirdweb-dev/contracts/blob/main/contracts/prebuilts/account/dynamic/DynamicAccount.sol"
name="DynamicAccount"
/>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ This contract inherits from the [`BaseAccountFactory`](/solidity/extensions/base
This factory smart contract is intended to be used to distribute ['ManagedAccounts`](/solidity/base-contracts/managed-account) programmatically.

<ViewContractCodeButton
link="https://github.com/thirdweb-dev/contracts/blob/main/contracts/smart-wallet/managed/ManagedAccountFactory.sol"
link="https://github.com/thirdweb-dev/contracts/blob/main/contracts/prebuilts/account/managed/ManagedAccountFactory.sol"
name="ManagedAccountFactory"
/>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ The admin of the [`ManagedAccountFactory`](/solidity/base-contracts/managed-acco
An upgrade to the features of `ManagedAccount` applies to **all** `ManagedAccount` smart wallets created by the factory. This is the right wallet for developers who anticipate **pushing upgrades** to their users’ wallets.

<ViewContractCodeButton
link="https://github.com/thirdweb-dev/contracts/blob/main/contracts/smart-wallet/managed/ManagedAccount.sol"
link="https://github.com/thirdweb-dev/contracts/blob/main/contracts/prebuilts/account/managed/ManagedAccount.sol"
name="ManagedAccount"
/>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ This contract inherits from the [`BaseAccountFactory`](/solidity/extensions/base
This factory smart contract is intended to be used to distribute ['Accounts`](/solidity/base-contracts/account) programmatically.

<ViewContractCodeButton
link="https://github.com/thirdweb-dev/contracts/blob/main/contracts/smart-wallet/non-upgradable/AccountFactory.sol"
link="https://github.com/thirdweb-dev/contracts/blob/main/contracts/prebuilts/account/non-upgradeable/AccountFactory.sol"
name="AccountFactory"
/>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Developers should use this wallet if they do not anticipate making any future up
App developers can issue `Account` smart wallets programmatically by deploying an [`AccountFactory`](/solidity/base-contracts/account-factory) smart contract.

<ViewContractCodeButton
link="https://github.com/thirdweb-dev/contracts/blob/main/contracts/smart-wallet/non-upgradeable/Account.sol"
link="https://github.com/thirdweb-dev/contracts/blob/main/contracts/prebuilts/account/non-upgradeable/Account.sol"
name="Account"
/>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ It includes the default logic for creating a smart account smart contract includ
<br />

<ViewContractCodeButton
link="https://github.com/thirdweb-dev/contracts/smart-wallet/utils/AccountExtension.sol"
link="https://github.com/thirdweb-dev/contracts/blob/main/contracts/prebuilts/account/utils/AccountExtension.sol"
name="AccountExtension"
/>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ This smart contract extension conforms to the `IAccount` interface which is dete
<br />

<ViewContractCodeButton
link="https://github.com/thirdweb-dev/contracts/smart-wallet/utils/BaseAccount.sol"
link="https://github.com/thirdweb-dev/contracts/blob/main/contracts/prebuilts/account/utils/BaseAccount.sol"
name="BaseAccount"
/>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ This smart contract extension conforms to the `IAccountFactory` interface which
<br />

<ViewContractCodeButton
link="https://github.com/thirdweb-dev/contracts/smart-wallet/utils/BaseAccountFactory.sol"
link="https://github.com/thirdweb-dev/contracts/blob/main/contracts/prebuilts/account/utils/BaseAccountFactory.sol"
name="BaseAccountFactory"
/>

Expand Down
8 changes: 0 additions & 8 deletions docs/onboarding/11 Storage/4 FAQ.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,6 @@ For a custom Enterprise rate, please [contact our sales team](https://thirdweb.c

Unlimited IPFS storage gateway requests are provided for free.

### Where can I manage my stored data?

We are building IPFS management into the dashboard, which will be available soon.

### How can I unpin items to free up my IPFS storage?

We are building IPFS unpinning into the dashboard, which will be available soon.

### Can I bring my own IPFS service for my app?

Yes, thirdweb is completely interoperable. Learn more about how to [add your own storage pinning and gateway service](https://portal.thirdweb.com/typescript/storage#configuration) through our documentation.
39 changes: 39 additions & 0 deletions docs/onboarding/12 Wallet/0 Overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,45 @@ The Wallet SDK comes out of the box with support for the most popular wallets th
description="Connect with OKX Wallet"
/>
</div>

{" "}
<div className="col col--4" style={{ padding: 8 }}>
<QuickstartCard
name="Core Wallet"
link="/wallet/core-wallet"
image="/assets/wallets/core.png"
description="Connect with Core Wallet"
/>
</div>

{" "}
<div className="col col--4" style={{ padding: 8 }}>
<QuickstartCard
name="Coin98 Wallet"
link="/wallet/coin98-wallet"
image="/assets/wallets/coin98.png"
description="Connect with Coin98 Wallet"
/>
</div>

{" "}
<div className="col col--4" style={{ padding: 8 }}>
<QuickstartCard
name="Rabby Wallet"
link="/wallet/rabby-wallet"
image="/assets/wallets/rabby.svg"
description="Connect with Rabby Wallet"
/>
</div>

<div className="col col--4" style={{ padding: 8 }}>
<QuickstartCard
name="Defi Wallet"
link="/wallet/defi-wallet"
image="/assets/wallets/defiwallet.png"
description="Connect with Defi Wallet"
/>
</div>
</div>

<br />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
slug: /wallet/build-a-wallet
title: Building a Wallet
title: Building a Wallet Connector
---

import Tabs from "@theme/Tabs";
Expand All @@ -11,7 +11,7 @@ import ViewRepoButton from "@components/ViewRepoButton";

The `@thirdweb-dev/wallets` package provides a set of pre-built components and functionality for creating and managing cryptocurrency wallets.

The following will guide you through how you can create your own wallet in a few simple steps:
The following will guide you through how you can create your own wallet connector in a few simple steps:

1. Implement your own `Connector` class
2. Implement your own `AbstractClientWallet` class
Expand Down Expand Up @@ -488,7 +488,7 @@ A function that returns a React component that renders the UI for selecting your

Instead of the default icon + name in wallet selector screen, you can render a custom UI for your wallet.

Take [Embedded wallet](https://github.com/thirdweb-dev/js/blob/main/packages/react/src/wallet/wallets/embeddedWallet/embeddedWallet.tsx) for example, It renders an Sign in with Google + Email Input.
Take [Embedded wallet](https://github.com/thirdweb-dev/js/blob/main/packages/react/src/wallet/wallets/embeddedWallet/embeddedWallet.tsx) for example, It renders an Social Icons + Email Input.

:::info

Expand Down Expand Up @@ -717,7 +717,7 @@ function MyWalletConnectionUI(props: ConnectUIProps<MyWallet>) {

Instead of the default icon + name in the wallet selector screen, you can render a custom UI for your wallet.

Take [Embedded wallet](https://github.com/thirdweb-dev/js/blob/main/packages/react/src/wallet/wallets/embeddedWallet/embeddedWallet.tsx) for example, It renders an Sign in with Google + Email Input.
Take [Embedded wallet](https://github.com/thirdweb-dev/js/blob/main/packages/react/src/wallet/wallets/embeddedWallet/embeddedWallet.tsx) for example, It renders Social Icons + Email Input.

<img src="/assets/connect-wallet/connect-wallet-embedded-compact.png" />

Expand Down
68 changes: 68 additions & 0 deletions docs/onboarding/12 Wallet/4 Wallets/Coin98 Wallet.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
---
slug: /wallet/coin98-wallet
title: Coin98 Wallet
---

import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";
import CodeBlock from "@theme/CodeBlock";

Prompt users to connect to their [Coin98 wallet](https://coin98.com/).

## Usage

```javascript
import { Coin98Wallet } from "@thirdweb-dev/wallets";

const wallet = new Coin98Wallet();

wallet.connect();
```

## Configuration

Optionally, provide a configuration object when instantiating the `Coin98Wallet` class.

<details>
<summary>projectId (recommended) </summary>
<div>

This is only relevant if you want to use [WalletConnect](https://walletconnect.com/) for connecting to Coin98 wallet mobile app when MetaMask is not injected.

This `projectId` can be obtained at [cloud.walletconnect.com](https://cloud.walletconnect.com/). It is highly recommended to use your own project id and only use the default one for testing purposes.

```javascript
import { Coin98Wallet } from "@thirdweb-dev/wallets";

const wallet = new Coin98Wallet(
// highlight-start
{
projectId: "YOUR_WALLET_CONNECT_PROJECT_ID",
},
// highlight-end
);
```

</div>
</details>

<details>
<summary>recommended (optional) </summary>
<div>

Show this wallet as "recommended" in the [ConnectWallet Modal](/react/react.connectwallet).

```ts
Coin98Wallet({
// highlight-start
recommended: true,
// highlight-end
});
```

</div>
</details>

## Methods

Inherits all the public methods from the [`AbstractClientWallet`](interfaces/abstract-client-wallet) class.
Loading

0 comments on commit 966773d

Please sign in to comment.