Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JS SDK (onboarding) #85

Open
b-avb opened this issue Jan 28, 2025 · 0 comments
Open

JS SDK (onboarding) #85

b-avb opened this issue Jan 28, 2025 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@b-avb
Copy link
Member

b-avb commented Jan 28, 2025

// Virto -> Servidor | Worker

// vos.proteinas.com/v1/_info
// {
//     "name": "Proteinas",
//     "version": "1.0.0",
//     "description": "Proteinas is a platform for creating and managing accounts",
//     "url": "https://vos.proteinas.com/v1",
// }

 // v0 direct request to server
const orgA = new SDK({
    vos_api: "https://vos.proteinas.com", // expone los servicios de la organizacion
    access_token: "1234567890",
});

// v1 autodiscovery
const org = new SDK({
    organizationId: "1234567890",
});


// /account/register

const account = await org.account.register({
    profile: {
        name: "John Doe",
        email: "[email protected]",
        phone: "1234567890",
    },
    metadata: {
        "hello": "world",
    }
});

account.id = "0x123123123123123123@proteinas"; 
account.profile = {} as any; // hello world
account.metadata = {};
account.memberships = []; // registrer

// authenticate
const session = await org.account.connect({
    userId: "0x1234567890",
});
@b-avb b-avb added the enhancement New feature or request label Jan 28, 2025
@b-avb b-avb assigned S0c5 and b-avb Jan 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants