Skip to content

Commit

Permalink
updated API links (#52)
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesLawton authored Apr 12, 2024
1 parent bf898df commit 84c84d4
Show file tree
Hide file tree
Showing 32 changed files with 216 additions and 108 deletions.
2 changes: 1 addition & 1 deletion docs/components/Landing/GuidesSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const GuidesSection = () => (
<div className="flex flex-wrap gap-4">
<GuideCard
title="Build a web3 game with WebGL"
body="Follow a step by step guide to build a web-based game demo that leverages Sequence In-Game Wallet with custom in-game achievement tokens."
body="Follow a step by step guide to build a web-based game demo that leverages Sequence Embedded Wallet with custom in-game achievement tokens."
link="/guides/webgl-guide/#integrate-sequencekit-with-waas"
/>
<GuideCard
Expand Down
4 changes: 2 additions & 2 deletions docs/components/Landing/SolutionsSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ export const SolutionsSection = () => (
},
{
icon: 'WalletIcon',
title: 'In-Game Wallet',
title: 'Embedded Wallet',
body: 'Gasless Transactions. No popups. Deliver a seamless experience for both web2 and web3 players with Sequence Wallet-as-a-Service embedded into your game or app.',
link: '/solutions/wallets/in-game-wallet/01-overview',
link: '/solutions/wallets/embedded-wallet/01-overview',
},
{
icon: 'CollectiblesIcon',
Expand Down
12 changes: 6 additions & 6 deletions docs/pages/guides/custom-marketplace-guide.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ The tools will enable you to perform:
- [4. Multi-Wallet types](/guides/custom-marketplace-guide#4-multi-wallet-types): Allow users to either use a Sequence Wallet or an EOA
- [5. Request creation](/guides/custom-marketplace-guide#5-request-creation): Creation of sell listing requests on the Sequence Market Protocol
- [6. Order accepting](/guides/custom-marketplace-guide#6-order-accepting): Accepting of top orders from the Marketplace
- [7. (Optional) Integrate In-Game Wallet into Sequence Kit](/guides/custom-marketplace-guide#7-optional-integrate-in-game-wallet-into-sequence-kit): Add a more seamless UX experience with no-confirmation transactions
- [7. (Optional) Integrate Embedded Wallet into Sequence Kit](/guides/custom-marketplace-guide#7-optional-integrate-in-game-wallet-into-sequence-kit): Add a more seamless UX experience with no-confirmation transactions

## 1. Minting

Expand All @@ -22,9 +22,9 @@ The first step is to create a collectible from the sequence Builder and mint a f

For your project, you'll need a way to authenticate your user with a wallet.

Your choice from the Sequence stack is to use either an [In-Game Wallet](/solutions/wallets/in-game-wallet/overview) for headless and web2-like UX, or a [Universal Wallet](/solutions/wallets/universal-wallet/overview) with [Sequence Kit](/sdk/sequence-kit/overview) to reach more types of wallets.
Your choice from the Sequence stack is to use either an [Embedded Wallet](/solutions/wallets/embedded-wallet/overview) for headless and web2-like UX, or a [Universal Wallet](/solutions/wallets/universal-wallet/overview) with [Sequence Kit](/sdk/sequence-kit/overview) to reach more types of wallets.

For this guide we'll use an `Universal Sequence Wallet` with `Sequence Kit` connector (with an option for an `In-Game Wallet`) which can authenticate users using Google or Apple auth, in addition to user brought wallets like Coinbase or Metamask.
For this guide we'll use an `Universal Sequence Wallet` with `Sequence Kit` connector (with an option for an `Embedded Wallet`) which can authenticate users using Google or Apple auth, in addition to user brought wallets like Coinbase or Metamask.

### Install packages

Expand Down Expand Up @@ -668,11 +668,11 @@ useEffect(() => {
Great, everything is complete if you add the function click handler attached to a button
## 7. (Optional) Integrate In-Game Wallet into Sequence Kit
## 7. (Optional) Integrate Embedded Wallet into Sequence Kit
In order to make your sequence kit connector as [In-Game Wallet](/solutions/wallets/in-game-wallet/overview) enabled, we'll need to install a few package version and update our `config.ts` we used at the beginning of the guide
In order to make your sequence kit connector as [Embedded Wallet](/solutions/wallets/embedded-wallet/overview) enabled, we'll need to install a few package version and update our `config.ts` we used at the beginning of the guide
The In-Game Wallet feature allows no-confirmation transactions, which can create a smoother UX
The Embedded Wallet feature allows no-confirmation transactions, which can create a smoother UX
```
pnpm i @0xsequence/kit@2.0.5-beta.9 @0xsequence/kit-connectors@2.0.5-beta.9
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@ The Sequence Relayer can be implemented on a serverless [Cloudflare](https://clo

The following steps will guide you through how to build your hosted minter API in 4 steps:

1. [Setup Cloudflare environment with wrangler cli and deploy a test](/guides/templates/mint-collectibles-serverless#1-setup-cloudflare-environment-with-wrangler-cli--deploy-a-test)
2. [Deploy, sponsor and update Metadata for an ERC1155 contract with Builder](/guides/templates/mint-collectibles-serverless#2-deploy-sponsor-and-update-metadata-for-an-erc1155-contract-with-builder)
3. [Use EthAuthProof to prevent EOA DDoS](/guides/templates/mint-collectibles-serverless#3-use-ethauthproof-to-prevent-eoa-ddos)
4. [Mint a collectible to wallet](/guides/templates/mint-collectibles-serverless#4-mint-a-collectible-to-wallet)
1. [Setup Cloudflare environment with wrangler cli and deploy a test](/guides/mint-collectibles-serverless#1-setup-cloudflare-environment-with-wrangler-cli--deploy-a-test)
2. [Deploy, sponsor and update Metadata for an ERC1155 contract with Builder](/guides/mint-collectibles-serverless#2-deploy-sponsor-and-update-metadata-for-an-erc1155-contract-with-builder)
3. [Use EthAuthProof to prevent EOA DDoS](/guides/mint-collectibles-serverless#3-use-ethauthproof-to-prevent-eoa-ddos)
4. [Mint a collectible to wallet](/guides/mint-collectibles-serverless#4-mint-a-collectible-to-wallet)

The result, a secure API with the following specs:

- HTTPS GET: returns blockNumber
- HTTPS POST(proof, address): mints a collectible & returns transaction hash

:::info Difficulty
:::info
You need basic knowledge of wrangler cli, npm, and Sequence Builder in order to complete this implementation.
:::

Expand Down Expand Up @@ -335,7 +335,7 @@ Press the `connect` button and then `copy to clipboard`.

It should be noted, it is best not to share this `ETHAuthProof` with anyone as this means someone can prove ownership of your wallet and interact with specific APIs.

Finally, replace the `url` with your app from [this step](/guides/templates/mint-collectibles-serverless#deploy-test), the `<some_proof>` with the generated value copied from the viewer dapp, and `<some_address>` with your wallet address and it should return just the mocked `0x` string.
Finally, replace the `url` with your app from [this step](/guides/mint-collectibles-serverless#deploy-test), the `<some_proof>` with the generated value copied from the viewer dapp, and `<some_address>` with your wallet address and it should return just the mocked `0x` string.

```
curl -X POST https://your-worker.your-subdomain.workers.dev \
Expand Down Expand Up @@ -421,6 +421,6 @@ const callContract = async (request: Request, env: Env, address: string, tokenId
}
```

Once these steps are complete, you can redeploy and test with the steps outlined in this [prior step](/guides/templates/mint-collectibles-serverless#testing), and this time the POST request should return a transaction hash for the completed mint and the GET request would return a block number.
Once these steps are complete, you can redeploy and test with the steps outlined in this [prior step](/guides/mint-collectibles-serverless#testing), and this time the POST request should return a transaction hash for the completed mint and the GET request would return a block number.

If you want to browse the full code, see [an example implementation here](https://github.com/0xsequence-demos/cloudflare-worker-sequence-relayer)
4 changes: 0 additions & 4 deletions docs/pages/guides/templates/building-relaying-server.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ With Sequence, you can create a smart contract wallet your server can use to dis
without you having to be worried about transaction speed, throughput and re-orgs.

<Callout type='info'>
Sequentual Transactions <br/>
By default, Sequence transactions will be executed sequentially.
</Callout>

Expand Down Expand Up @@ -123,9 +122,6 @@ if (txnReceipt.status != 1) {
```

<Callout type='warning'>
Triggers migration
<br/>

Openning a session may trigger a migration of your Sequence wallet to a new version, this could be `v1` to `v2` or `v2` to future versions.

Migration is a one-way process, once your wallet is migrated it cannot be reverted to a previous version.
Expand Down
10 changes: 5 additions & 5 deletions docs/pages/guides/templates/template-in-game-wallet.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,24 +18,24 @@ Get started quickly with a [template](https://github.com/0xsequence/demo-waas-au

### SDK Installation

We provide TypeScript and Unity SDKs for the In-Game Wallet authentication system. You can install the TypeScript SDK with:
We provide TypeScript and Unity SDKs for the Embedded Wallet authentication system. You can install the TypeScript SDK with:

```bash
pnpm install @0xsequence/waas
```

For more information on the Unity In-Game Wallet SDK, please refer to the TODO add link [Unity SDK documentation](#TODO)
For more information on the Unity Embedded Wallet SDK, please refer to the TODO add link [Unity SDK documentation](#TODO)

### Project Setup

Sequence In-Game Wallet is currently only available as a closed beta. To start using the In-Game Wallet SDKs, you'll need to contact the Sequence team and acquire API credentials. Once this is done, you will be provided with two keys:
Sequence Embedded Wallet is currently only available as a closed beta. To start using the Embedded Wallet SDKs, you'll need to contact the Sequence team and acquire API credentials. Once this is done, you will be provided with two keys:

- Project access key
- In-Game Wallet configuration key
- Embedded Wallet configuration key

### Library Setup

To start using Sequence In-Game Wallet SDK, you'll need to create a new instance of the `waas` class:
To start using Sequence Embedded Wallet SDK, you'll need to create a new instance of the `waas` class:

```typescript
import { SequenceWaaS } from '@0xsequence/waas'
Expand Down
8 changes: 4 additions & 4 deletions docs/pages/guides/webgl-guide.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ The tools will enable you to perform:
- [4. Deploy a remote minter and mint in-game tokens](/guides/webgl-guide#4-deploy-a-remote-minter--mint-in-game-achievement-tokens): Perform gasless relayed transactions with Cloudflare workers
- [5. Leverage items in-game](/guides/webgl-guide#5-leverage-items-in-game): Integrate collectibles in the game using the Sequence Indexer
- [6. Burn in-game achievement tokens](/guides/webgl-guide#6-burn-in-game-achievement-tokens): Burn game achievements with wagmi
- [7. (Optional) Integrate In-Game Wallet into Sequence Kit](/guides/webgl-guide#7-optional-integrate-in-game-wallet-into-sequence-kit): Enable smooth UX without the use of signer signed messages
- [7. (Optional) Integrate Embedded Wallet into Sequence Kit](/guides/webgl-guide#7-optional-integrate-in-game-wallet-into-sequence-kit): Enable smooth UX without the use of signer signed messages

## 1. Project setup with webpack

Expand Down Expand Up @@ -534,9 +534,9 @@ async fetchTokensFromBurn(tokenID){

And you're done, you can view a full example of the code [here](https://github.com/0xsequence-demos/template-webgl-js-sequence-kit-starter)

## 7. (Optional) Integrate In-Game Wallet into Sequence Kit
## 7. (Optional) Integrate Embedded Wallet into Sequence Kit

If you'd like to smooth the user journey to allow no user transaction signing across the board, you can enable an In-Game Wallet by updating your configuration of your Sequence Kit react component.
If you'd like to smooth the user journey to allow no user transaction signing across the board, you can enable an Embedded Wallet by updating your configuration of your Sequence Kit react component.

By accomplishing this, we reduce a pop-up when burning tokens with `wagmi`, since rewarding achievement tokens and minting collectibles are completed using a cloudflare relayer for gasless transactions.

Expand Down Expand Up @@ -608,5 +608,5 @@ And that's it, no more integration is required for transaction flows to complete
---

<Callout type='info'>
To learn more about In-Game Wallets, see [here](/solutions/wallets/in-game-wallet/overview)
To learn more about In-Game Wallets, see [here](/solutions/wallets/embedded-wallet/overview)
</Callout>
2 changes: 1 addition & 1 deletion docs/pages/sdk/sequence-kit/getting-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ function App() {
2. Wrap your app with the `KitProvider` within the `WagmiConfig` wrapper.


# Setting Up the In-Game Wallet Wrapper
# Setting Up the Embedded Wallet Wrapper
To install the optional in-game wallet, add the `KitWalletProvider` below the `KitProvider` wrapper.

```jsx
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/sdk/sequence-kit/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Sequence Kit 🧰 is the ultimate toolkit for effortlessly integrating web3 wall

- **Web3 Wallet Integration**: Effortlessly integrate with leading web3 wallets like WalletConnect and MetaMask. Unleash the power of blockchain with just a few clicks! 🦊 ⛓️

- **In-Game Wallet Experience**: Provide your users with a comprehensive in-game wallet, enabling them to manage their coins and collectibles all within your own application. 👛 🖼️ 🪙
- **Embedded Wallet Experience**: Provide your users with a comprehensive in-game wallet, enabling them to manage their coins and collectibles all within your own application. 👛 🖼️ 🪙

Explore the potential of Sequence Kit by trying out our [demo](https://0xsequence.github.io/kit)!

Expand Down
2 changes: 1 addition & 1 deletion docs/pages/sdk/typescript/connectors/sequence-kit.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Sequence Kit 🧰 is the ultimate toolkit for effortlessly integrating web3 wall

- **Web3 Wallet Integration**: Effortlessly integrate with leading web3 wallets like WalletConnect and MetaMask. Unleash the power of blockchain with just a few clicks! 🦊 ⛓️

- **In-Game Wallet Experience**: Provide your users with a comprehensive in-game wallet, enabling them to manage their coins and collectibles all within your own application. 👛 🖼️ 🪙
- **Embedded Wallet Experience**: Provide your users with a comprehensive in-game wallet, enabling them to manage their coins and collectibles all within your own application. 👛 🖼️ 🪙

Explore the potential of Sequence Kit by trying out our [demo](https://0xsequence.github.io/kit)!

Expand Down
2 changes: 1 addition & 1 deletion docs/pages/sdk/unity/authentication.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Authentication
As a WaaS SDK, authentication is extremely important. Authentication works by establishing a session signing wallet through association with an [OIDC idToken](https://auth0.com/docs/secure/tokens/id-tokens/id-token-structure#sample-id-token). For more on how our In-Game Wallet works, please [see In-Game Wallet docs](/solutions/wallets/in-game-wallet/overview).
As a WaaS SDK, authentication is extremely important. Authentication works by establishing a session signing wallet through association with an [OIDC idToken](https://auth0.com/docs/secure/tokens/id-tokens/id-token-structure#sample-id-token). For more on how our Embedded Wallet works, please [see Embedded Wallet docs](/solutions/wallets/embedded-wallet/overview).

To implement authentication, we recommend using our `LoginPanel` prefab. Locate this prefab under `SequenceExamples > Prefabs` and drag it under a [Canvas](https://docs.unity3d.com/2020.1/Documentation/Manual/UICanvas.html) in your scene.
We recommend having the `Canvas Scaler` component attached to your `Canvas` use the "Scale with Screen Size" UI Scale Mode. This will make it so that the LoginPanel (and any other UI elements under this Canvas) are scaled automatically when switching between build targets.
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/sdk/unity/overview.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

# Introduction

The Sequence Unity In-Game Wallet SDK provides full Sequence [In-Game Wallet](/solutions/wallets/in-game-wallet/overview) and [Indexer](/api/indexer/overview) integration for your Unity Games, integrated with our own purpose-built for Unity SequenceEthereum library. That's right, no Nethereum required!
The Sequence Unity Embedded Wallet SDK provides full Sequence [Embedded Wallet](/solutions/wallets/embedded-wallet/overview) and [Indexer](/api/indexer/overview) integration for your Unity Games, integrated with our own purpose-built for Unity SequenceEthereum library. That's right, no Nethereum required!

This SDK follows [Semantic Versioning](https://semver.org/) (`major.minor.patch`). While we're still in `0.x.y` builds, API breaking changes can be made at any time. After `1.0.0`, breaking changes will always cause a `major` version increment, non-breaking new features will cause a `minor` version increment, and bugfixes will cause a `patch` version increment.

Expand Down
2 changes: 1 addition & 1 deletion docs/pages/sdk/unreal/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ slug: /unreal-waas-sdk

# Introduction

The Sequence Unreal In-Game Wallet SDK provides full Sequence [In-Game Wallet](/solutions/wallets/in-game-wallet/overview) and [Indexer](/api/indexer/overview) integration for games built on the Unreal Framework.
The Sequence Unreal Embedded Wallet SDK provides full Sequence [Embedded Wallet](/solutions/wallets/embedded-wallet/overview) and [Indexer](/api/indexer/overview) integration for games built on the Unreal Framework.

This SDK follows [Semantic Versioning](https://semver.org/) (`major.minor.patch`). While we're still in `0.x.y` builds, API breaking changes can be made at any time. After `1.0.0`, breaking changes will always cause a `major` version increment, non-breaking new features will cause a `minor` version increment, and bugfixes will cause a `patch` version increment.

Expand Down
14 changes: 7 additions & 7 deletions docs/pages/solutions/builder/in-game-wallet.mdx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# In-Game Wallet in Builder
You can configure a [Sequence In-Game Wallet](/solutions/wallets/in-game-wallet/overview) in Builder and integrate your own OAuth accounts to enable easy onboarding to your games. Configuration page in Builder [is available here](https://sequence.build/project/default/wallet/in-game-wallet).
# Embedded Wallet in Builder
You can configure a [Sequence Embedded Wallet](/solutions/wallets/embedded-wallet/overview) in Builder and integrate your own OAuth accounts to enable easy onboarding to your games. Configuration page in Builder [is available here](https://sequence.build/project/default/wallet/in-game-wallet).

## Login Providers
Sequence In-Game Wallet supports the following login providers:
Sequence Embedded Wallet supports the following login providers:

### Google Auth
If you would like to support Google Auth, you need to make sure that a project is configured at your [Google Cloud Console](https://console.cloud.google.com/) along with the proper OAuth 2.0 client ID. You can find the relevant section under APIs & Services > [Credentials](https://console.cloud.google.com/apis/credentials). After setting up the proper origins and redirect URIs for your project, copy the Client ID and paste it into the Google Client ID field after adding a Google login provider.
Expand All @@ -29,14 +29,14 @@ We recommend that:
Once the recovery wallet is setup properly, provide the public address for it. Recovery wallet cannot be modified once your configuration is saved.

## Initial Configuration and Update Code
Once you have all information prepared, go ahead and create your In-Game Wallet configuration. During initial setup, Builder will provide you with an update code. This code will be required for all subsequent modifications to your In-Game Wallet configuration, so it must be stored safely.
Once you have all information prepared, go ahead and create your Embedded Wallet configuration. During initial setup, Builder will provide you with an update code. This code will be required for all subsequent modifications to your Embedded Wallet configuration, so it must be stored safely.

## Configuration Changes
To make modifications to your In-Game Wallet configuration, navigate to the In-Game Wallet section again and make the necessary changes. Then click "Save Configuration" and enter your update code to deploy the changes.
To make modifications to your Embedded Wallet configuration, navigate to the Embedded Wallet section again and make the necessary changes. Then click "Save Configuration" and enter your update code to deploy the changes.

## SDK Integrations
Now that you have your In-Game Wallet configuration up, go ahead and follow our guides on how to integrate with the SDKs:
Now that you have your Embedded Wallet configuration up, go ahead and follow our guides on how to integrate with the SDKs:

- [TypeScript SDK](/solutions/wallets/in-game-wallet/overview)
- [TypeScript SDK](/solutions/wallets/embedded-wallet/overview)
- [Unity SDK](/sdk/unity/overview)
- [Unreal SDK](/sdk/unreal/overview)
Loading

0 comments on commit 84c84d4

Please sign in to comment.