web4-oasis-api
v1.0.8
Published
A JavaScript proxy for the WEB4 OASIS API. To be used only in the browser.
Downloads
88
Keywords
Readme
WEB4 OASIS API Javascript Package
- WEB4 OASIS API Javascript Package
- Previous Version
- Introduction
- Overview
- Best Of All Worlds
- Maximum Interopability/Aggregation
- HOT Swappable Plugin Architecture
- Full Redundancy/Zero Downtime/Impossible To Shutdown
- HTTP REST/gRPC/GraphQL/CLI/Native Endpoints
- Javascript, Unity & C# Packages
- Avatar API
- Karma API
- Full Accountability/Zero Crime/Dark Net Prove
- Data API
- Future Prove! Never Need To Learn A New Tech Stack/Language Again
- SEEDS API
- Keys/Wallet API
- Works Offline/Local Networks (LAN, Bluetooth, Mesh Networks)
- OAPPS - Write Once, Deploy Everywhere
- One API To Rule Them All - The GOD Protocol/API
- Full Smart Contract Interoperability
- Powerful Pick n Mix & Plug n Play UI Components
- WEB/2D/3D/AR/VR/IR/Map/Meta Visusalization
- Our World Geo-Location/AR/IR/Map UI (Game Of Games Engine)
- IR (Infinite Reality) Ready
- One World Open World MMO (VR) (Game Of Games Engine)
- XR/IR Unified Interface To The World
- ARC/HoloMap/Synergy Engine Integration
- WEB 5 STAR OASIS Omniverse Interoperable Metaverse Low Code Generator
- AI/Machine Learning Over All Of World's Aggregated Data
- Summary
- Benefits Of Building On The WEB4 OASIS API
- WEB 4 OASIS API Packages
- Do You Want To Get Involved?
- How To Use
- Getting started
- Auth
- Avatar
- Data
- Karma
- Holochain
- NFT
- Solona
Previous Version
The previous version (package) can be found here: https://www.npmjs.com/package/oasis-api
This previous version has now been deprecated (unfortunaltey npm will not let you rename an existing package so when we renamed oasis-api to web4-oasis-api it has forced us to create this new version of the package). We are currently keeping the older version to preserve the version history, download stats, etc.
The current version can be found here: https://www.npmjs.com/package/web4-oasis-api
Introduction
This package is for client applications to connect and work with the OASIS API.
Overview
The WEB4 OASIS API enables you to integrate your project with everything else (WEB2 & WEB3) such as all blockchains, holochain & much more. It also provides SSO, load balancing, auto failover, auto replication, zero downtime, zero lag, infinite players and much more!
Various OASIS API functions and services can be accessed with this API such as Authentication, Karma, Avatars, Data, SEEDS, Wallets/Keys & more...
http://api.oasisplatform.world
This allows you to bridge between all of WEB2 & WEB3 Holochain, IPFS, MongoDB, SQLLite, Neo4j, Solana, Ethereum, EOS & ThreeFold with many more coming soon such as COSMOS, Polkadot, Polygon, SOLID, ActivityPub, Near, Nexus, HIVE, CEPTR Pluggable Protocol, Fediverse, XMPP & many more! :) The majority of these are aimed at building a truly decentralised distributed internet (Web 3.0) and this is also the aim of the OASIS API. If you wish to get involved and help build out any of these providers or any other you would like to see integrated please get in touch here: https://t.me/ourworldthegamechat.
WEB 4 OASIS API is a fully distributed decentralised fault tolerant load balanced integrated API that runs across the full Internet acting as an abstraction layer over everything and serves as a network of networks. It is unity consciousnes expressed within the technical sphere. The OASIS API is a global universal API that aims to connect anything to everything to eliminate walled gardens/silos.
The core OASIS (Open Advanced Sensory Immersion System) API that powers Our World/One World and manages the central profile/avatar/karma system that other satellite apps/games/sites/services plug into it and share. This allows karma to be earnt in the satellite apps/games by doing good deeds or progressing self help apps for example.
Best Of All Worlds
Just like a team of people, different tech has various strengths and weaknesses, by integrating them together so they work as one unified co-ordinated team, you eliminate all weaknesses and then have the best of all worlds, the whole is greater than the sum of the parts. It harnesses the best of each provider so the OASIS uses the strengths of each provider to the maximum and removes all weaknesses, it automatically uses the most appropriate provider or providers for any given use case.
Maximum Interopability/Aggregation
One of the core design goals of the OASIS is maximum interoperability (to remove all silos and walled gardens) to the point everything merges into one (the singularity) and also to be super powerful but super easy and intuitive to use.
The WEB4 OASIS API connects & Integrates everything (all of WEB 2 & WEB 3) including all blockchains, holochain, IPFS, databases, cloud etc into one fully unified API that is an abstraction layer over everything.
The whole point of the OASIS API is to allow everything to be fully interoperable so data can be shared between any provider, the architecture opens the doors for many more use cases like importing and exporting your data between providers, aggregating all your data to remove all silos so better sense making and AI machine learning can be made to analyse and to make predictions, smart contract interoperability, etc
HOT Swappable Plugin Architecture
The OASIS API features a HOT Swappable Plugin Architecture meaning any OASIS Provider can be deployed and used at runtime without having to re-compile or deploy a ONODE (OASIS Node).
Full Redundancy/Zero Downtime/Impossible To Shutdown
It also allows full data redundancy and for it to be network independent so if one network goes down it can automatically switch to the next fastest node in your area regardless of what network it is on. So it will be impossible to shut the OASIS down, you need to shut the entire Internet down, goodluck with that! ;-)
HTTP REST/gRPC/GraphQL/CLI/Native Endpoints
The OASIS API currently has a HTTP REST API, CLI & Native endpoints. gRPC & GraphQL are coming soon...
Javascript, Unity & C# Packages
The OASIS API currently has a Javascript, Unity & C# package, more are coming soon...
Avatar API
The OASIS API features a powerful Avatar SSO (Single Sign On) API allowing ONE login across all your sites, games, apps, services, etc across all devices and platforms for your OASIS Avatar where you have FULL control of ALL of your data right down to the individual field level and whether each field is Replicated/Shared (ReadOnly) or Shared (ReadWrite). You no longer need to remember multiple login details, you can have just ONE login (avatar), that follows you everywhere and you have FULL control of. You choose where your data is stored and who has access to it. This avatar is the digital twin of YOU and allows you to earn/lose karma through the Karma API.
Karma API
The OASIS API also has a powerful Karma API where your avatar (YOU) can earn and lose karma across any OAPP (OASIS App) that is integrated into the OASIS API (websites, apps, games, services, etc). You can earn karma for picking up litter, recycling, going green, helping people, eating/drinking healthily, improving your self or the enviroment, donating to chairty, volunteering for good causes, planting trees, progressing in self help apps, medidation, yoga, mindfulness, spending time in nature, etc. You lose karma for dropping liter, being abusive online, not eating healthily.
This karma is then redeemed for real world goods & services such as for a free smoothie, yoga class, retreat etc.
It also unlocks new gifts and super powers for your avatar in the Our World/One World games that plug into the API, they are the first worlds of the new upcoming OASIS Omniverse (network of metaverses).
Full Accountability/Zero Crime/Dark Net Prove
The extra benefit of this is that everyone is fully accountable for their actions where their karma & how they earnt/lost it is fully visible to all. There can be no hiding in the OASIS, it makes crime & the dark net impossible!
Data API
It also features the powerful Data API allowing data to be shared between the above providers giving full interoperability. It also has powerful features such as auto-fail over, auto-load balancing and auto-replication across the providers so if one node goes down in your local area it will automatically switch to the next fastest node in your area independent of the network it belongs to, this way the OASIS API never has any downtime and will always be super fast and not reliant on only one network. This also applies for all the other API's such as the Avatar API etc. With unity consciousness the possibilities are limitless!
Future Prove! Never Need To Learn A New Tech Stack/Language Again
The OASIS API is very intuitive and easy to use hiding away the complexities of the lower-level networks/protocols/platforms/API's but at the same time gives full power and control to power users who wish to dive deeper into the lower-level tech. This also means you do not need to keep learning new tech/APIs/programming languages etc, from now on you only ever need to use the very intuitive powerful OASIS API and the rest is taken care of for you! Also, even if a newer version of one network/API comes out like Holochain RSM or Ethereum 2, you do not need to do anything to port your app to the latest version, the OASIS will take care of this for you. This saves you valuable time to focus on bringing your idea to life! Happy Days! :)
SEEDS API
The OASIS API also has a SEEDS API allowing people to earn karma for donating and paying with Seeds (a new currency based on re-generating the planet) as well as when they invite or join Seeds. Read more here: https://joinseeds.earth/
Keys/Wallet API
Finally it also features a new powerful Keys/Wallets API, which allows public private keys to be linked to your avatar per provider and private keys are only stored locally. Public keys and the rest of the wallet are stored on any provider (and auto-replicated across providers). Using the Avatar SSO you can also login using any of your public keys linked to your avatar (as well as either your username or email). You can also transfer tokens using any of these 3 so you do not need to ever worry about long meaningless public keys!
All of your wallets, bank accounts, PayPal, etc can be linked to your aggregated OASIS Wallet so you can see your full balance of assets and easily transfer between ANY of them with just one cick, gone are the days of having to painfully manage and transfer between mutiple wallets just to get access to your funds!
Because of the auto replication the private keys are automatically backed up to your local devices and can automatically sync between them so if you get a new device it can automatically sync with it, a bit like a decentralised offline cloud.
You will never lose your keys again! ;-)
It can also then sync your public key and wallet address etc when you go back online. With this architecture it opens the doors to many new use cases...
Works Offline/Local Networks (LAN, Bluetooth, Mesh Networks)
This same technology works across all of the API's (Avatar, Data, etc) so you can work offline if your connection to the internet goes down and will automatically sync once it goes back online. It even allows you to network over LAN, Bluetooth, Mesh Networks, etc.
OAPPS - Write Once, Deploy Everywhere
OAPP's (OASIS Apps) that use the OASIS API can be deployed anywhere across any network, platform, API or protocol. This includes all of WEB2 (clouds, databases, etc), Holochain, every popular blockchain, ActivityPub, IPFS, SOLID & many more... check the growing list of providers supported below.
Gone are the days of having to write multiple dApps and having to spend lots of time setting up your dev environment for each one such as the network, wallet, account, etc. The OASIS API can manage all of this for you with one simple to use UI (web, desktop and Unity versions planned). The Unity UI will in fact be Our World and will be the most feature rich through the XR interface.
You can also of course fully manage every feature and option through the API itself so you could even write your own UI to it if you so wished.
One API To Rule Them All - The GOD Protocol/API
The OASIS API will allow you to connect into everything including e-commerce, trading, security, social networks, blockchains, holochain networks, etc. regardless of where they are running (WEB2 or WEB3/IoT).
Full Smart Contract Interoperability
Smart Contracts will be supported across any of the supported providers (network/platform/API/protocol), so you only need to write the contract once for your OAPP and then deploy your OAPP once and it will then take care of deploying and running your app/smart contract across all supported providers (network/platform/API/protocol).
Powerful Pick n Mix & Plug n Play UI Components
Soon you will also have a very powerful intuitive UI allowing anyone to build an OAPP through a simple intuitive to use drag n drop interface plugging together the various components (web, unity, unreal, metaverse & more) you need allowing you to focus on your ideas rather than on how to implement them. This will lower the barrier to entry for non-technical people, the perfect low-code solution!
WEB/2D/3D/AR/VR/IR/Map/Meta Visusalization
Each OAPP can have a Web, 2D, 3D AR, 3D VR, 3D Map, 3D IR (Infinite Reality), 2D Map & Meta View. You will be able to switch between these at run-time.
Our World Geo-Location/AR/IR/Map UI (Game Of Games Engine)
Our World is the first world in the infinite Omniverse (what comes after Metaverse). Our World also acts as the UI to the OASIS API allowing the various OAPP’s to have a 3D object/2D sprite representation on the 3D map of the world. They can then view meta data about the app as well as launch the app from within Our World (phase 1 of The OASIS you see in Ready Player One). Through the OASIS API people have a full geo-location API allowing them to fully control the 3D map, add quests, routes, sub-games, AR hotspots, and so much more. One possible use case would be Smart Cities amongst many more.
Our World is an exciting immersive next generation 3D XR/IR (Infinite Reality) educational game/platform/social network/ecosystem teaching people on how to look after themselves, each other and the planet using the latest cutting-edge technology. It teaches people the importance of real-life face to face connections with human beings and encourages them to get out into nature using Augmented Reality similar to Pokémon Go but on a much more evolved scale. This is our flagship product and is our top priority due to the massive positive impact it will make upon the world...
It is the XR/IR Gamification layer of the new interplanetary operating system & the new internet (Web 3.0), which is being built by the elite technical wizards stationed around the world. This will one day replace the current tech giants such as Google, FaceBook, etc and act as the technical layer of the New Earth, which is birthing now. Unlike the current tech giants who's only aim is to ruthlessly maximize profits at the expense of people and the planet (as well as spying, exploitation, censorship & social engineering), our technology is based on true love & unity consciousness where money and profits are not our aim or intention, our aim and intention is to heal the entire planet & human race so we can all live in harmony with each other. It is a 5th dimensional and ascension training platform, teaching people vital life lessons as well as acting as a real-time simulation of the real world.
Our World is built on top of the de-centralised, distributed nextgen internet known as Holochain (but bridges to all other WEB2 & WEB3 sites/apps/games through the OASIS API).
The first phase of Our World will be a de-centralised distributed XR Gamified 3D Map replacement for Google Maps along with the Avatar/Profile/Karma & OASIS API system. The satellite apps/games will be able to create their own 2D/3D object to appear on the real-time 3D map.
Check out the site for more info.
Read another more refined (and updated) summary on the github repo code base for the Our World Smartphone AR Prototype: https://github.com/NextGenSoftwareUK/Our-World-Smartphone-Prototype-AR
IR (Infinite Reality) Ready
IR is what comes after AR, VR & XR. It is where the boundary between real and the virtual become one. More coming soon... ;-)
One World Open World MMO (VR) (Game Of Games Engine)
One World is Our World's cousin and is a Open World MMORPG set in the past allowing people to build whatever they can imagine unleashing their FULl creativity & potential! It uses bio-feedback technology allowing you to move objects with your mind with real force powers! :) You can also see other players avatar/chakras in real-time and so much more! You can medidate to make it rain to water your crops or to help your camp fire burn brighter!
One World will be the first AAA MMO game and 2D/3D Social Network to run on HoloChain and the Blockchain. It will also be the first to integrate a social network with a MMO game/platform as well as all of these technologies and devices together. As with the rest of the game, it will be leading the way in what can be done with this NextGen Technology for the benefit and upliftment of humanity.
More news on this soon...
XR/IR Unified Interface To The World
Our World & One World are like the XR/IR Unified Interface into all of these hApps/dAps/Websites/apps/games (this is the Operating System part of it), it's a bit like the XR UI front-end to Holochain/Blockchains/WEB2 where you can view and launch any app/website/game from inside it but they integrate much more deeper than that through the OASIS API/Profile/Avatar/Karma system where they all share the central avatar/profile and can all add/subtract the profiles/avatars karma.
Both One World (desktop/console) & Our World (smartphone) players can interact in real-time through time portals and much more...
ARC/HoloMap/Synergy Engine Integration
We will be implementing the ARC (Augmented Reality Computer) Membrane allowing the revolutionary next-gen operating system to fully interface & integrate with the 3D Map & Avatar/Karma system as well as render its own 3D interfaces and 2D HUD overlays on top of the map, etc.
We will also port HoloMap (previously called Noomap) to Unity and will implement a Synergy Engine allowing people to easily find and match solutions/desires/passions and to also find various solution providers, which again will be fully integrated with the 3D Map & Avatar/Karma system.
WEB 5 STAR OASIS Omniverse Interoperable Metaverse Low Code Generator
The WEB 5 STAR OASIS Omniverse Interoperable Metaverse Low Code Generator is built on top of the OASIS API and aggregates all the worlds data and expresses it within a cyberspace ontology using a cutting edge custom built ORM (Object Relational Mapper) called COSMIC. The STAR Omniverse is both a simulation & game of life and aggregates all metaverses into one fully integrated unified platform. It is also a fully integrated immersive interoperable metaverse Low Code Generator and soooooo much more.... ;-)
It connects and integrates all metaverses together through the SSO Avatar/Karma system (part of the OASIS API). It is also a fully interoperable Metaverse Low Code Generator (connecting all WEB 2 and WEB 3 together) through the WEB 4 OASIS API.
The STAR ODK, the heart of the OASIS can even compile OAPP's to native code for each platform, provider, network, etc. For example, for Holochain Provider it dynamically generates the low-level Rust code, which acts as the DAL (Data Access Layer). It also dynamically generates the C# code that runs on top of it abstracting away the lower-level complexities and this acts as the BLL (Business Logic Layer). This has the additional benefit that you can now debug your app logic in C#, something you cannot do in rust. It also allows you to have the best of both worlds by giving you access to both rust and C# libraries. The possibilities are endless, time to unleash YOUR full potential!
AI/Machine Learning Over All Of World's Aggregated Data
Both WEB 4 & WEB 5 use machine learning AI to analyse all of the worlds data to generate useful insights, predictions & so much more!
Summary
To summarize, WEB4 OASIS API aggregates all of the worlds data into a fully unified API to allow better sense making to made, which then feeds into WEB5 STAR, which expresses it in a cyberspace ontology and connects the worlds data to the rest of the COSMOS and Galaxy... ;-)
Benefits Of Building On The WEB4 OASIS API
Integrate any WEB2 or WEB3 tech into your (web)app without having to learn or worry about new tech stacks/languages (the OASIS API hides all the complexity away so you can focus on creating your dream app!).
No need to worry about how different blockchains or WEB2 and WEB3 can talk and integrate with each other, the OASIS handles all this for you!
Future prove so when any new language/tech comes out such as Ethereum2 etc, these will be automatically added to the OASIS API for FREE, you will have FREE upgrades for life!
SSO Avatar.
Karma API (full accountability/zero crime/dark net prove) System.
Maximum Integration & Interoprability.
Auto Load-balancing.
Auto Fail-over.
Auto Replication.
Best Of All Worlds.
Maximum Interopability/Aggregation.
HOT Swapable PlugIn Architecture.
HTTP REST/gRPC/GraphQL/CLI/Native Endpoints.
Javascript, Unity & C# Packages - More Coming...
Write Once, Deploy Everywhere Now & Forever.
One API To Rule Them All - The GOD Protocol/API.
Full Smart Contract Interoperability.
AI/Machine Learning Over All Of World's Aggregated Data.
Triple Level Quantum Resistant Encryption.
Intelligent Key Management/Backups/Redundancy (never lose your keys again!).
Full Redundancy/Zero Downtime/Impossible To Shutdown!
Zero Lag.
Infinite Players Online At Same Time.
Decentralised Distributed P2P Networking.
Can Work Off-line (will automatically sync once online again).
When Offline Can Still Sync And Work Over LAN, Bluetooth, Mesh Networks, etc.
Agent Centric (User owns and stores own data).
WEB/2D/3D/AR/VR/IR/Map/Meta Visusalization.
Our World Geo-Location/AR/IR/Map UI (Game of Games Engine).
One World Open World MMO (VR) UI (Game of Games Engine).
Powerful Pick n Mix & Plug n Play UI Components.
Smart City Ready.
Bio-feedback Ready.
Synergy Engine Ready.
IR (Infinite Reality) Ready.
WEB5 Omniverse/Metaverse Ready.
Plus Much More!
Check out more info below: The Power Of The OASIS API What Is WEB4 & WEB5 Really? First Production Release Of The WEB4 OASIS API Annoucing WEB5 STAR ODK/HDK/COSMIC STAR ODK/HDK/COSMIC/OASIS API/Our World Update Main WEB4 OASIS API & WEB5 STAR Repo
WEB 4 OASIS API Packages
Javascript
https://www.npmjs.com/package/web4-oasis-api
https://github.com/NextGenSoftwareUK/OASIS-API-Javascipt-Package
Unity
https://github.com/NextGenSoftwareUK/OASIS-API-Unity-Package
C
https://github.com/NextGenSoftwareUK/Our-World-OASIS-API-HoloNET-HoloUnity-And-.NET-HDK
Do You Want To Get Involved?
We are always looking for people to jump in and get involved, you do not need to be an existing coder, we can help you with that... you just need a willingness to learn and to have an open heart, we are always more interested with what is in your heart rather than your head! ;-)
The whole world is the Our World team, hence the name... ;-) It is not our project; it is all of humanities...
We also offer FREE training and apprenticeship program with the NextGen Developer Training Programmes. We will teach you all we know over time and you get to work on this real live commercial codebase rather than wasting time working on throw away dummy apps as most training offers. No previous skills/experience required and is open to everyone, but especially for all disadvantaged people including special needs, homeless, unemployed, prison inmates, kids on the streets etc. We want to help the people the world has forgotten and for people who have stopped believing in themselves, we BELIEVE IN YOU and in time you will again too. Everyone has a gift for the world, and we will help you find yours… Find out more by checking out the links below:
NextGen Developer Training Programme NextGen Junior Developer Training Programme
We are looking for Web Devs (with any of these: react, angular, vue, js, html, css), Unity Devs & C# Devs.
If anyone is interested in developing this game/platform, then we would LOVE to hear from you! 😊 There will be opportunities for people to own shares and/or cryptocurrency (as well as other unique perks such as premium locations in both the geolocation and VR versions, personal or business service spotlights, free lifetime access to all premium paid services, massive karma points (allowing your avatar to progress to more advanced stages in the game unlocking new exciting quests, areas to explore & new special abilities/superpowers) plus lots more!) based on the input they are willing to provide.
Thank you and we hope we find interest from people to join us on this exciting incredible journey.
Want to make a difference in the world?
What will be your legacy?
Ready to be a hero?
If the answer is YES, then please proceed to here...
Dev Requirements To Join The Our World Tribe The Our World Mission (Summary) http://www.ourworldthegame.com http://oasisplatform.world/swagger https://github.com/NextGenSoftwareUK/Our-World-OASIS-API-HoloNET-HoloUnity-And-.NET-HDK http://www.gofundme.com/ourworldthegame
http://www.nextgensoftware.co.uk http://www.yoga4autism.com
https://youtu.be/wdYa5wQUfrg https://www.youtube.com/watch?v=2oY4_LZBW4M&t=3s https://www.youtube.com/watch?v=rvNJ6poMduo&t=5s https://www.youtube.com/watch?v=zyVmciqD9rs https://www.youtube.com/watch?v=SB97mvzJiRg&t=3s
TOGETHER WE CAN CREATE A BETTER WORLD
In Love, Light & Hope, The Our World Tribe
How To Use
Each function call you make returns a promise of an object which is in this form:
{error: boolean, data: object}
.
object values error: true when response from api fails data: response gotten from server.
Getting started
To get started with this package run
npm install web4-oasis-api
This installs the package to your project. To use it in the Application, it can be imported by
import oasis from "web4-oasis-api"
Auth
The Auth class handles the authentication of the web4-oasis-api. It can be imported by:
import { Auth } from "web4-oasis-api"
Login
To login use this code:
import { Auth } from "web4-oasis-api";
const oasisAuth = new Auth();
oasisAuth.login({
username: "[email protected]",
password: "testpass",
}).then((res)=>{
if(res.error){
// Error
}
else // No error
}).catch((err)=>{
console.log(err)
})
Signup
For signup, use this code snippet:
import { Auth } from "web4-oasis-api";
const oasisAuth = new Auth();
const data = await OasisAuth.signup({
firstName: "test",
lastName: "test",
email: "[email protected]",
password: "test",
confirmPassword: "test",
acceptTerms: true,
avatarType: "User",
title: "Mr",
});
Logout
This logs a user out and revokes his token
import { Auth } from "web4-oasis-api";
const oasisAuth = new Auth();
const data = await OasisAuth.logout();
Forgot password
import { Auth } from "web4-oasis-api";
const oasisAuth = new Auth();
const data = await OasisAuth.forgotPassword({ email: "[email protected]" });
Get user
This function is used when trying to get a currently logged in user. Code snippet:
import { Auth } from "web4-oasis-api";
const oasisAuth = new Auth();
const data = await OasisAuth.getUser();
Avatar
This class manages a user's avatar from adding Karma, deleting and updating avatar, etc,
import { Avatar } from "web4-oasis-api"
get
This function gets an avatar when its ID is provided
import { Avatar } from "web4-oasis-api";
const avatar = new Avatar();
const res = await avatar.get();
Get All
This function returns all registered avatars
import { Avatar } from "web4-oasis-api";
const avatar = new Avatar();
const res = await avatar.getAll();
update
This updates the avatar with the given ID. User must be logged in & authenticated for this method to work.
avatar.update(data, id).then(()=>{
//pass
}).catch((err)=>{
// pass
})
the parameter data should be of this shape
"title": "string",
"firstName": "string",
"lastName": "string",
"avatarType": "string",
"email": "[email protected]",
"password": "string",
"confirmPassword": "string"
}
delete
This updates the avatar with the given ID. User must be logged in & authenticated for this method to work.
avatar.delete(id).then(()=>{
//pass
}).catch((err)=>{
// pass
})
addKarma
Adds karma to avatar. User must be logged in & authenticated for this method to work.
avatar.addKarma(id, data).then(()=>{
//pass
}).catch((err)=>{
// pass
})
params id: Avatar id data schema
"karmaType": "string",
"karmaSourceType": "string",
"karamSourceTitle": "string",
"karmaSourceDesc": "string"
}
removeKarma
Removes karma to avatar. User must be logged in & authenticated for this method to work.
avatar.removeKarma(id, data).then(()=>{
//pass
}).catch((err)=>{
// pass
})
params id: Avatar id data schema
"karmaType": "string",
"karmaSourceType": "string",
"karamSourceTitle": "string",
"karmaSourceDesc": "string"
}
Data
loadHolon
Load's a holon data object for the given id. Set the loadChildren flag to true to load all the holon's child holon's. This defaults to true. If loadChildren is set to true, you can set the Recursive flag to true to load all the child's holon's recursively, or false to only load the first level of child holon's. This defaults to true. If loadChildren is set to true, you can set the maxChildDepth value to a custom int of how many levels down you wish to load, it defaults to 0, which means it will load to infinite depth. Set the continueOnError flag to true if you wish it to continue loading child holon's even if an error has occured, this defaults to true. Set the Version int to the version of the holon you wish to load (defaults to 0) which means the latest version. Pass in the provider you wish to use. Set the autoFailOverMode to 'ON' if you wish this call to work through the the providers in the auto-failover list until it succeeds. Set it to OFF if you do not or to 'DEFAULT' to default to the global OASISDNA setting. Set the autoReplicationMode to 'ON' if you wish this call to auto-replicate to the providers in the auto-replication list. Set it to OFF if you do not or to UseGlobalDefaultInOASISDNA to 'DEFAULT' to the global OASISDNA setting. Set the autoLoadBalanceMode to 'ON' if you wish this call to use the fastest provider in your area from the auto-loadbalance list. Set it to OFF if you do not or to UseGlobalDefaultInOASISDNA to 'DEFAULT' to the global OASISDNA setting. Set the waitForAutoReplicationResult flag to true if you wish for the API to wait for the auto-replication to complete before returning the results. Set the setglobally flag to false to use these settings only for this request or true for it to be used for all future requests. Set the showDetailedSettings flag to true to view detailed settings such as the list of providers in the auto-failover, auto-replication & auto-load balance lists.
the parameter for these function can either be a string that represents the holon's ID or an object
const data = new oasis.Data();
const data = {
id: "188e0e27-3af2-478f-af86-030c56a42edb",
LoadChildren: false,
Recursive: false,
MaxChildDepth: 1,
ContinueOnError: false,
Version: 1,
ProviderType: "HoloOASIS",
SetGlobally: false,
ShowDetailedSettings: true,
AutoFailOverEnabled: "true",
AutoReplicationEnabled: "false",
AutoLoadBalanceEnabled: "false",
AutoFailOverProviders: "MongoDBOASIS, HoloOASIS",
AutoReplicationProviders: "MongoDBOASIS, HoloOASIS",
AutoLoadBalanceProviders: "MongoDBOASIS, HoloOASIS",
WaitForAutoReplicationResult: false,
} || "188e0e27-3af2-478f-af86-030c56a42edb"
data.loadHolon(data).then(()=>{
//pass
}).catch((err)=>{
// pass
})
params data: object || string
loadAllHolons
Load's all holons for the given HolonType. Use 'All' to load all holons. Set the loadChildren flag to true to load all the holon's child holon's. This defaults to true. If loadChildren is set to true, you can set the Recursive flag to true to load all the child's holon's recursively, or false to only load the first level of child holon's. This defaults to true. If loadChildren is set to true, you can set the maxChildDepth value to a custom int of how many levels down you wish to load, it defaults to 0, which means it will load to infinite depth. Set the continueOnError flag to true if you wish it to continue loading child holon's even if an error has occured, this defaults to true. Set the Version int to the version of the holon you wish to load (defaults to 0) which means the latest version. Pass in the provider you wish to use. Set the autoFailOverMode to 'ON' if you wish this call to work through the the providers in the auto-failover list until it succeeds. Set it to OFF if you do not or to 'DEFAULT' to default to the global OASISDNA setting. Set the autoReplicationMode to 'ON' if you wish this call to auto-replicate to the providers in the auto-replication list. Set it to OFF if you do not or to UseGlobalDefaultInOASISDNA to 'DEFAULT' to the global OASISDNA setting. Set the autoLoadBalanceMode to 'ON' if you wish this call to use the fastest provider in your area from the auto-loadbalance list. Set it to OFF if you do not or to UseGlobalDefaultInOASISDNA to 'DEFAULT' to the global OASISDNA setting. Set the waitForAutoReplicationResult flag to true if you wish for the API to wait for the auto-replication to complete before returning the results. Set the setglobally flag to false to use these settings only for this request or true for it to be used for all future requests. Set the showDetailedSettings flag to true to view detailed settings such as the list of providers in the auto-failover, auto-replication & auto-load balance lists.
the parameter for these function can either be either left undefined, a string or an object
const data = new oasis.Data()
data.loadAllHolons().then(()=>{
//pass
}).catch((err)=>{
// pass
})
OR
const data = new oasis.Data()
data.loadAllHolons({
HolonType: "Moon",
LoadChildren: true,
Recursive: true,
MaxChildDepth: 0,
ContinueOnError: false,
Version: 0,
ProviderType: "HoloOASIS",
SetGlobally: false,
ShowDetailedSettings: true,
AutoFailOverEnabled: "true",
AutoReplicationEnabled: "true",
AutoLoadBalanceEnabled: "true",
AutoFailOverProviders: "MongoDBOASIS, HoloOASOS",
AutoReplicationProviders: "MongoDBOASIS, HoloOASOS",
AutoLoadBalanceProviders: "MongoDBOASIS, HoloOASOS",
WaitForAutoReplicationResult: false,
}).then(()=>{
//pass
}).catch((err)=>{
// pass
})
OR
data.loadAllHolons(holonType)
loadHolonsForParent
Load's all holons for the given parent and the given HolonType. Use 'All' to load all holons. Set the loadChildren flag to true to load all the holon's child holon's. This defaults to true. If loadChildren is set to true, you can set the Recursive flag to true to load all the child's holon's recursively, or false to only load the first level of child holon's. This defaults to true. If loadChildren is set to true, you can set the maxChildDepth value to a custom int of how many levels down you wish to load, it defaults to 0, which means it will load to infinite depth. Set the continueOnError flag to true if you wish it to continue loading child holon's even if an error has occured, this defaults to true. Set the Version int to the version of the holon you wish to load (defaults to 0) which means the latest version. Pass in the provider you wish to use. Set the autoFailOverMode to 'ON' if you wish this call to work through the the providers in the auto-failover list until it succeeds. Set it to OFF if you do not or to 'DEFAULT' to default to the global OASISDNA setting. Set the autoReplicationMode to 'ON' if you wish this call to auto-replicate to the providers in the auto-replication list. Set it to OFF if you do not or to UseGlobalDefaultInOASISDNA to 'DEFAULT' to the global OASISDNA setting. Set the autoLoadBalanceMode to 'ON' if you wish this call to use the fastest provider in your area from the auto-loadbalance list. Set it to OFF if you do not or to UseGlobalDefaultInOASISDNA to 'DEFAULT' to the global OASISDNA setting. Set the waitForAutoReplicationResult flag to true if you wish for the API to wait for the auto-replication to complete before returning the results. Set the setglobally flag to false to use these settings only for this request or true for it to be used for all future requests. Set the showDetailedSettings flag to true to view detailed settings such as the list of providers in the auto-failover, auto-replication & auto-load balance lists.
the parameter for these function can either be a string that represents the holon's ID or an object
const data = new oasis.Data()
data.loadHolonForParent(
{
providerType: "Default",
setGlobally: true,
autoFailOverMode: "DEFAULT",
autoReplicationMode: "DEFAULT",
autoLoadBalanceMode: "DEFAULT",
autoFailOverProviders: "DEFAULT",
autoReplicationProviders: "DEFAULT",
autoLoadBalanceProviders: "DEFAULT",
waitForAutoReplicationResult: false,
showDetailedSettings: true,
recursive: true,
maxChildDepth: 0,
continueOnError: true,
version: 0,
loadChildren: true,
id: null,
} || "3fa85f64-5717-4562-b3fc-2c963f66afa6"
).then(()=>{
//pass
}).catch((err)=>{
// pass
})
saveHolon
Save's a holon data object. Set the saveChildren flag to true to save all the holon's child holon's. This defaults to true. If saveChildren is set to true, you can set the Recursive flag to true to save all the child's holon's recursively, or false to only save the first level of child holon's. This defaults to true. If saveChildren is set to true, you can set the maxChildDepth value to a custom int of how many levels down you wish to save, it defaults to 0, which means it will save to infinite depth. Set the continueOnError flag to true if you wish it to continue saving child holon's even if an error has occured, this defaults to true. Pass in the provider you wish to use. Set the autoFailOverMode to 'ON' if you wish this call to work through the the providers in the auto-failover list until it succeeds. Set it to OFF if you do not or to 'DEFAULT' to default to the global OASISDNA setting. Set the autoReplicationMode to 'ON' if you wish this call to auto-replicate to the providers in the auto-replication list. Set it to OFF if you do not or to UseGlobalDefaultInOASISDNA to 'DEFAULT' to the global OASISDNA setting. Set the autoLoadBalanceMode to 'ON' if you wish this call to use the fastest provider in your area from the auto-loadbalance list. Set it to OFF if you do not or to UseGlobalDefaultInOASISDNA to 'DEFAULT' to the global OASISDNA setting. Set the waitForAutoReplicationResult flag to true if you wish for the API to wait for the auto-replication to complete before returning the results. Set the setglobally flag to false to use these settings only for this request or true for it to be used for all future requests. Set the showDetailedSettings flag to true to view detailed settings such as the list of providers in the auto-failover, auto-replication & auto-load balance lists.
const data = new oasis.Data()
data.saveHolon(data).then(()=>{
//pass
}).catch((err)=>{
// pass
})
saveHolonOffChain
Save's a holon data object (meta data) to the given off-chain provider and then links its hash to the on-chain provider. Set the showDetailedSettings flag to true to view detailed settings such as the list of providers in the auto-failover, auto-replication & auto-load balance lists.
const data = new oasis.Data()
data.saveHolonOffChain(data).then(()=>{
//pass
}).catch((err)=>{
// pass
})
deleteHolon
deletes a holon data object for the given id.
const data = new oasis.Data()
data.deleteHolon({
id: "",
softDelete: true
}).then(()=>{
//pass
}).catch((err)=>{
// pass
})
params id: Holon id
Karma
getKarmaForAvatar
gets karma value of an avatar
const karma = new oasis.Karma()
karma.getKarmaForAvatar(id).then(()=>{
//pass
}).catch((err)=>{
// pass
})
params id: Avatar id
removeKarmaForAvatar
removes karma value of an avatar
const karma = new oasis.Karma()
karma.getKarmaForAvatar(id, data).then(()=>{
//pass
}).catch((err)=>{
// pass
})
params id: Avatar id data schema:
const data={
karmaType: string,
karmaSourceType: string,
karamSourceTitle: string,
karmaSourceDesc: string,
}
getKarmaAkashicRecordsForAvatar
oasis.Karma.getKarmaAkashicRecordsForAvatar(id)
params
id: Avatar id
Holochain
getHolochainAgentIdForAvatar
oasis.Holochain.getHolochainAgentIdForAvatar(id)
params
id: holochain id
getHolochainAgentPrivateKeyForAvatar
oasis.Holochain.getHolochainAgentPrivateKeyForAvatar(id)
params
id: avatar id
getAvatarIdForHolochainAgentId
oasis.Holochain.getAvatarIdForHolochainAgentId(id)
params
id: agent id
getHoloFuelBalanceForAgentId
oasis.Holochain.getHoloFuelBalanceForAgentId(id)
params
id: agent id
getHoloFuelBalanceForAvatar
oasis.Holochain.getHoloFuelBalanceForAvatar(id)
params
id: avatar id
getHoloFuelBalanceForAvatar
oasis.Holochain.getHoloFuelBalanceForAvatar(data)
params
data schema: {agentId: string, avatarId: string}
NFT
createPurchase
oasis.NFT.createPurchase(data)
params
data schema
nftProvider: number,
solanaExchange: {
fromAccount: {
publicKey: string,
},
toAccount: {
publicKey: string,
},
memoText: string,
amount: number,
mintAccount: {
publicKey: string,
},
},
cargoExchange: {
saleId: string,
},
}
getOlandPrice
oasis.NFT.createPurchase(count, couponCode)
purchaseOLAND
oasis.NFT.purchaseOLAND(data)
params
data schema
{
olandId: "",
avatarId: "",
avatarUsername: "",
tiles: "",
walletAddress: "",
cargoSaleId: "",
}
Solona
mint
oasis.Solana.mint(data)
exchange
oasis.Solana.exchange(data)
params
data schema
{
fromAccount: {
publicKey: "",
},
toAccount: {
publicKey: "",
},
memoText: "",
amount: 0,
mintAccount: {
publicKey: "",
},
}