-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Embedded Wallet section edits and standardization (#40)
* Standardize Embedded Wallet naming * Fix issues with Embedded Wallet intro and quickstart * Fix code sample issues with WaaS examples --------- Co-authored-by: James Lawton <[email protected]>
- Loading branch information
1 parent
d253752
commit 0ce6fe0
Showing
11 changed files
with
192 additions
and
172 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
node_modules | ||
docs/dist | ||
docs/dist | ||
.DS_Store | ||
pnpm-lock.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# Embedded Wallet in Builder | ||
You can configure a [Sequence Embedded Wallet](/solutions/wallets/embedded-wallet/01-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/embedded-wallet). | ||
|
||
## 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. | ||
|
||
You can find a detailed tutorial on [how to configure Google Auth here](https://developers.google.com/identity/gsi/web/guides/get-google-api-clientid). | ||
|
||
### Apple Auth | ||
If you would like to offer Apple Auth, you need to make sure that an application is configured at your [Apple Developer Console](https://developer.apple.com/account) account. More information on how to configure Sign in with Apple [can be found here](https://developer.apple.com/help/account/configure-app-capabilities/configure-sign-in-with-apple-for-the-web/). Once you have all requirements completed, share the unique identifier for the Services ID you created as part of your onboarding package after adding an Apple login provider. | ||
|
||
## Allowed Origins | ||
This additional security measure will prevent unauthorized usage of your WaaS configuration outside of domains you whitelisted. Add any development and production URLs under Allowed Origins. By default all subpaths under theses hosts will be allowed. | ||
|
||
You must define allowed origins with a valid scheme (i.e. `https`). | ||
|
||
## Recovery Wallet | ||
WaaS requires the public address for a recovery wallet that you control. This recovery wallet will be used for recovering user wallets in a disaster scenario, so it must be controlled by you and must be kept safe at all times. | ||
|
||
We recommend that: | ||
|
||
- You use [Gnosis Safe](https://safe.global/) for setting up the wallet | ||
- You ensure you have at least 2, ideally 3+ signers configured and required for every transaction | ||
- Every signer is protected by a hardware wallet | ||
|
||
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 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 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 Embedded Wallet configuration up, go ahead and follow our guides on how to integrate with the SDKs: | ||
|
||
- [TypeScript SDK](/solutions/wallets/embedded-wallet/01-overview) | ||
- [Unity SDK](/sdk/unity/01-overview) | ||
- [Unreal SDK](/sdk/unreal/01-overview) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
58 changes: 29 additions & 29 deletions
58
docs/pages/solutions/wallets/embedded-wallet/02-quickstart.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,51 @@ | ||
# Quickstart | ||
|
||
## Try a Demo | ||
You can quickly try out a Sequence Embedded Wallet integration before doing a complete configuration specific to your application. There are several ways to test out the features: | ||
|
||
:::info | ||
Try out seamless UX of our embedded wallet at our [demo](https://0xsequence.github.io/demo-waas-auth/) | ||
::: | ||
- Try out [Sequence WaaS demo](https://waas-demo.sequence.xyz/), showcasing a sample authentication and transaction flow leveraging Sequence Kit for web applications | ||
- Play with [Aviator](https://0xsequence.github.io/waas-airplane-demo/), a complete WebGL game built using Embedded Wallet, leveraging [Sequence Marketplace API](/solutions/marketplaces/orderbook/01-overview) as well as [serverless Cloudflare Worker](/guides/templates/03-mint-collectibles-serverless) for minting | ||
- Browse [Jelly Forest source code](https://github.com/0xsequence-demos/jelly-forest), our Unity WaaS SDK demo implementation that natively runs on iOS and Android | ||
|
||
## Template | ||
You can also do a quick integration of Embedded Wallet into your own application by using the following test configuration keys: | ||
|
||
:::info | ||
Get started quickly with a [template](https://github.com/0xsequence/demo-waas-auth) leveraging our embedded wallet. | ||
::: | ||
- Project Access Key: `AQAAAAAAAEGvyZiWA9FMslYeG_yayXaHnSI` | ||
- WaaS Configuration Key: `eyJwcm9qZWN0SWQiOjE2ODE1LCJycGNTZXJ2ZXIiOiJodHRwczovL3dhYXMuc2VxdWVuY2UuYXBwIn0=` | ||
|
||
## Getting Started | ||
These will leverage Sequence's own Google and Apple test authentication configurations and are whitelisted for `localhost` usage only. They cannot be used in a production setup. | ||
|
||
### SDK Installation | ||
To see how to integrate these keys into a sample demo application, you can browse the [Demo WaaS repository](https://github.com/0xsequence/demo-waas-auth). | ||
|
||
You can also view SDK-specific guides here: | ||
|
||
- [TypeScript SDK](/solutions/wallets/embedded-wallet/02-quickstart) | ||
- [Unity SDK](/sdk/unity/01-overview) | ||
- [Unreal SDK](/sdk/unreal/01-overview) | ||
|
||
We provide TypeScript and Unity SDKs for the Embedded Wallet authentication system. You can install the TypeScript SDK with: | ||
When you are ready to configure your own Embedded Wallet, you can [follow the Builder guide here](/solutions/builder/embedded-wallet). | ||
|
||
## Getting Started with TypeScript SDK | ||
|
||
### SDK Installation | ||
You can install the TypeScript SDK with: | ||
|
||
```bash | ||
pnpm install @0xsequence/waas | ||
``` | ||
|
||
For more information on the Unity Embedded Wallet SDK, please refer to the TODO add link [Unity SDK documentation](#TODO) | ||
|
||
### Project Setup | ||
|
||
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 | ||
- Embedded Wallet configuration key | ||
You can test out the library with the Project Access Key and WaaS Configuration Key provided above. Once you are ready to configure your own Embedded Wallet, follow [the Builder guide here](/solutions/builder/embedded-wallet). | ||
|
||
### Library Setup | ||
|
||
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"; | ||
|
||
const waas = new SequenceWaaS( | ||
{ | ||
projectAccessKey: `${process.env.PROJECT_ACCESS_KEY}`, | ||
waasConfigKey: `${process.env.WAAS_CONFIG_KEY}`, | ||
network: "mumbai", | ||
}, | ||
defaults.TEST | ||
); | ||
import { SequenceWaaS } from '@0xsequence/waas' | ||
|
||
const waas = new SequenceWaaS({ | ||
projectAccessKey: `${process.env.PROJECT_ACCESS_KEY}`, | ||
waasConfigKey: `${process.env.WAAS_CONFIG_KEY}`, | ||
network: 'arbitrum-nova' | ||
}) | ||
``` | ||
|
||
Note that the library is operational, but it can't be used to interact with any wallet until you have authenticated **as a user**. |
Oops, something went wrong.