Skip to content

Arianee/spkz-sdk

Repository files navigation

SPKZ SDK

Get started

npm i @arianee/spkz-sdk -S

In your index.ts or js.

// It will create or retrieve wallet from local storage if there is one
const proxyWallet=createOrRetrieveWallet();

// For testing purpose you can use this method
await proxyWallet.wallets.addWalletFromPrivateKey('your very unique private key');

Now you have proxy wallet that allow you to send message on behalf of your blockchain wallet.

await proxyWallet.room.sendMessage({
        roomId:0,
        sectionId:'chat',
        messageContent:{
        title:'Hello world'
        }
    });

Boom! You have just sent your very first message. Behind the curtain, SPKZ-SDK add JWT authorizations and others cryptographic elements to be sure that no one can send a message on your behalf!

Environment

Env is set to prod by default.

process.env.spkzEnv='dev'

or

window.spkzEnv='dev';

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published