Novel Preposterous Mockery

    TypeScript icon, indicating that this package has built-in type declarations

    0.1.15 • Public • Published

    Vynos Build Status

    In-browser ethereum micropayments wallet.



    To use Vynos one has to plug it into a web page as yet another javascript library.

    <script src=""></script>

    Here vA.B.C represents the version you use, for example: v.0.0.3. When included, it sets a global vynos object, that serves as an entrypoint to Vynos wallet.


    Including the script tag downloads the code into your application context, and runs that. One could use NPM package just for that: import vynos from 'vynos' equivalents to the script tag above.


    vynos entrypoint provides the following API:

    • vynos.display(): Promise<void> - display Vynos wallet component,
    • vynos.hide(): Promise<void> - hide Vynos wallet component,
    • vynos.ready(): Promise<Vynos> - get access to the wallet; more on that below.

    The latter is an asynchronous method, that returns Promise of a wallet. This prevents a developer from calling the wallet while it is not loaded, or waiting for loading using while loop.

    One could call vynos.ready() multiple times. It initialises the wallet once. If loaded, it returns the current instance of the wallet:

    import vynos from 'vynos'
    import * as Web3 from 'web3'
    vynos.ready().then(wallet => {
        let web3 = new Web3(wallet.provider)
        web3.eth.getAccounts((err, accounts) => {
            if (err) {
                throw err
            } else {
                let account = accounts[0]

    Wallet instance provides the following API:

    • wallet.initAccount(): Promise<void> - resolved when the user unlocks her wallet; if it is already unlocked, the promise resolves immediately;
    • wallet.openChannel(receiverAccount: string, channelValue: BigNumber.BigNumber): Promise<PaymentChannel> - open a payment channel,
    • wallet.closeChannel(channelId: string): Promise<void> - close the channel,
    • string, amount: number, gateway: string, meta: string, purchaseMeta?: PurchaseMeta, channelValue?: number): Promise<VynosBuyResponse> - send a payment to gateway, open a channel if necessary,
    • wallet.listChannels(): Promise<Array<PaymentChannel>> - list all the open channels,
    • wallet.provider - web3 provider.

    Build configuration via environment variables

    QR_TAB=true - enable tab with QR-code (QR-encoded mnemonic) in Mnemonic dialog while creating new wallet.



    You are expected to have yarn package manager installed globally on your machine. For installation instructions go ts the official web site.


    git clone
    cd vynos
    yarn install


    yarn run harness

    That command starts a web server to play with Vynos on localhost. Open browser on http://localhost:9000 and click on some buttons. It triggers the building process, so you should wait a little bit staring on the page.

    You could change the port via .env file:


    WTF is Harness

    It demonstrates Vynos work on localhost. It runs a web page (Vynos client) on localhost:9000, serves Vynos frame (stores private keys a-la MetaMaskara) from localhost:9001. Different ports make the browser think the pages belong to different origins, thus should be secured against each other malicious behaviour.

    Copyright Notice

    Vynos use icons from icons8


    npm i vynos

    DownloadsWeekly Downloads






    Unpacked Size

    677 kB

    Total Files


    Last publish


    • ariaskov
    • ukstv