Git Product home page Git Product logo

beam-docs's Introduction

Hello Beam

Beam is a sovereign network focused on gaming brought to you by the Merit Circle DAO. Powered by the established Avalanche network, Beam operates independently to cater towards gamers and game developers.

Contributions

Beam is currently in a developer preview, and both the service and the documentation are work in progress. If you would like to contribute to the documentation, please open a pull request.

TL;DR

If you would like to get your hands dirty without reading our documentation, we strongly advise you to get started with one of our implementations ready SDKs. We currently provide SDKs for Node.js and C#, but are happy to facilitate more. If you are interested in an SDK for your implementation language which we don't provide yet, please open an issue.

Getting started

import { Beam } from '@onbeam/node';
 
const beam = new Beam('x-api-key');

const profile = await beam.profiles.createProfile('profileID');
// {
//   "id": "string",
//   "gameId": "string",
//   "externalId": "string",
//   "wallets": [
//     {
//       "id": "string",
//       "externalId": "string",
//       "address": "string",
//       "chainId": 0,
//       ...
//     }
//   ]
// }

const profiles =  await beam.profiles.getAllProfiles({
  offset: 0,
  limit: 10
});

In this example, we initialize an instance of Beam by passing your API key. We then proceed to create a Profile. A Profile is the Beam entity you'll be mostly interacting with. Each profile automatically gets assigned a wallet on the Beam blockchain.


View full documentation and examples on docs.onbeam.com.

Managing assets

Profiles are custodial, and through your API key you are able to transfer / trade and manage assets of the profiles of your users - for as long as the users are custodial. In late 2023, we're aiming to release a feature for users to take self-custody of their accounts, but you'll be in control of implementing the feature to allow them to take custody.

import { Beam } from '@onbeam/node';
 
const beam = new Beam('x-api-key');

const transfer = await beam.assets.transfer({
  sender: 'ProfileID-A',
  receiver: 'ProfileID-B',
  assetAddress: '0x0',
  tokenId: 23
})

View full documentation and examples on docs.onbeam.com.

beam-docs's People

Contributors

robbyuitbeijerse avatar 0x0sub avatar 0xsilkweave avatar mc-ducky avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.