Skip to content

Commit

Permalink
chore: self-custody restructuring
Browse files Browse the repository at this point in the history
  • Loading branch information
RobbyUitbeijerse committed Jun 4, 2024
1 parent 0da034a commit 01d0786
Show file tree
Hide file tree
Showing 18 changed files with 170 additions and 253 deletions.
42 changes: 23 additions & 19 deletions pages/service/_meta.json
Original file line number Diff line number Diff line change
@@ -1,24 +1,40 @@
{
"--- Beam": {
"type": "separator",
"title": "Beam"
},
"index": "Getting started",
"game": {
"title": "Your game"
},
"sphere": {
"title": "Sphere"
},
"companion": {
"title": "Companion"
},
"reporting": {
"title": "Reporting"
},
"--- Self-custody (Beta)": {
"type": "separator",
"title": "Self-custody (beta)"
},
"self-custody": {
"title": "Getting started"
"introduction-self-custody": {
"title": "Introduction"
},
"implement-self-custody": {
"title": "Implementation"
},
"operations": {
"title": "Operations (beta)"
},
"sessions": {
"title": "Sessions (beta)"
},
"--- Guides": {
"--- Custodial": {
"type": "separator",
"title": "Guides"
},
"game": {
"title": "Managing your game"
"title": "Custodial"
},
"profiles": {
"title": "Profiles"
Expand All @@ -41,15 +57,6 @@
"exchange": {
"title": "Exchange"
},
"companion": {
"title": "Companion"
},
"sphere": {
"title": "Sphere"
},
"reporting": {
"title": "Reporting"
},
"--- References": {
"type": "separator",
"title": "References"
Expand All @@ -63,9 +70,6 @@
"type": "separator",
"title": "More"
},
"roadmap": {
"title": "Roadmap"
},
"terms-of-service": {
"title": "Terms of Service"
},
Expand Down
35 changes: 35 additions & 0 deletions pages/service/companion.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
title: Introduction to Beam Companion
---

import { Callout, Cards, Card } from "nextra/components";

# Introduction to Beam Companion

The Beam Companion app allows users to manage and access their on-chain NFTs earned through playing your game.

You'll be able to find the latest version of the Beam Companion through the following links

<Cards>
<Card
icon="🍎 "
title="iOS"
href="https://apps.apple.com/us/app/beam-companion/id6467641736"
/>
<Card
icon="🤖 "
title="Android"
href="https://play.google.com/store/apps/details?id=com.onbeam.companion_app"
/>
</Cards>

<Callout emoji="🛠️">
Make sure you connect to **Beam testnet** in order to implement the application
during your development process. You can switch to testnet by switching on the
log-in screen of the app.
</Callout>

### Connecting users to the Beam Companion app

The Beam Companion app works based on the same authentication solution as is being used in the self-custody features of Beam, meaning that any user you onboard through that solution will automatically be linked to your game and is able to use the Beam Companion app.

5 changes: 0 additions & 5 deletions pages/service/companion/_meta.json

This file was deleted.

56 changes: 0 additions & 56 deletions pages/service/companion/connecting-your-users.mdx

This file was deleted.

38 changes: 0 additions & 38 deletions pages/service/companion/introduction.mdx

This file was deleted.

37 changes: 0 additions & 37 deletions pages/service/companion/verifying-webhooks.mdx

This file was deleted.

2 changes: 1 addition & 1 deletion pages/service/environments.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Once you are ready to deploy your game to mainnet, simply request the production
https://api.onbeam.com
````

## api keys and environments
### API keys and environments

<Callout emoji="⚠️">
Keep in mind that keys are not interchangeable per environment, meaning that you will need to send the correct key in the `x-api-key` header based on the hostname you use.
Expand Down
17 changes: 17 additions & 0 deletions pages/service/full-api-reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ The Beam API is a RESTful API. Given you have obtained your api key, you are abl

If you ever feel the need to access all of the available endpoints directly from our deployed service, you can use the following links

### Custodial API

```md filename="Swagger UI"
https://api.testnet.onbeam.com/api/game
```
Expand All @@ -17,3 +19,18 @@ https://api.testnet.onbeam.com/api/game-json
```md filename="OpenAPI specification (YAML)"
https://api.testnet.onbeam.com/api/game-yaml
```


### Self-custody API

```md filename="Swagger UI"
https://api.testnet.onbeam.com/api/self-custody
```

```md filename="OpenAPI specification (JSON)"
https://api.testnet.onbeam.com/api/self-custody-json
```

```md filename="OpenAPI specification (YAML)"
https://api.testnet.onbeam.com/api/self-custody-yaml
```
47 changes: 47 additions & 0 deletions pages/service/implement-self-custody.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
title: Implementation
---

import { Cards, Card } from "nextra-theme-docs";

# Implementing Beam

The implementation of our new self-custodial service consists of two components

- The Beam platform client. We currently solely provide a **C# sdk** meant to be implemented in the **Unity**. In the future, we will be releasing more implementations for various platforms.
- The self-custody client. We currently provide a **C# and Typescript** client.

In the near future, we expect to expand the platfom clients with all the self-custody client methods, giving you more flexibility on how you want to implement Beam in your game.


### Initialize the platform client

In order to interact with these clients, you will need a new type of API key - the `Publishable` API key. You will be able to find this API key by regenerating your API keys through the existing API. You can do so programmatically, or by interacting with the method in the [OpenAPI / Swagger UI](https://api.testnet.onbeam.com/api/game#/Game/regenerateApiKeys) interface.


```csharp

var beamClient = gameObject.AddComponent<BeamClient>()
.SetBeamApiGame("your-game-id", "your-publishable-api-key")
.SetEnvironment(BeamEnvironment.Testnet);
```


### The self-custody client

The self-custody client is a new client which can be used to generate [Operations](/service/operations/introduction). Both the self-custody clients we offer for the new self-custodial services, are structured in similar fashion to the existing SDKs that offer custodial [Profiles](/service/profiles/introduction).

Keep in mind that we expect you to also use the `Publishable` API key in these clients.

<Cards>
<Card
icon=""
title="Typescript"
href="https://www.npmjs.com/package/@onbeam/self-custody"
/>
<Card
icon=""
title="C# (RestSharp)"
href="https://www.nuget.org/packages/BeamSelfCustody"
/>
</Cards>
File renamed without changes.
22 changes: 0 additions & 22 deletions pages/service/roadmap.mdx

This file was deleted.

Loading

0 comments on commit 01d0786

Please sign in to comment.