Navigator Prefabricating Marinates

    This package has been deprecated

    Author message:

    Please install mina-signer instead.

    @o1labs/client-sdk
    TypeScript icon, indicating that this package has built-in type declarations

    1.0.1 • Public • Published

    Coda Client Javascript SDK

    This is a NodeJS client SDK that allows you to sign transactions and strings using Coda's keypairs. The project contains Typescript and ReasonML typings but can be used from plain NodeJS as well.

    Install

    yarn add @o1labs/client-sdk
    # or with npm:
    npm install --save @o1labs/client-sdk

    Usage

    Typescript:

    import * as CodaSDK from "@o1labs/client-sdk";
    
    let keys = CodaSDK.genKeys();
    let signed = CodaSDK.signMessage("hello", keys);
    if (CodaSDK.verifyMessage(signed)) {
        console.log("Message was verified successfully")
    };
    
    let signedPayment = CodaSDK.signPayment({
        to: keys.publicKey,
        from: keys.publicKey,
        amount: 1,
        fee: 1,
        nonce: 0
      }, keys);

    NodeJS:

    const CodaSDK = require("@o1labs/client-sdk");
    
    let keys = CodaSDK.genKeys();
    let signed = CodaSDK.signMessage("hello", keys);
    if (CodaSDK.verifyMessage(signed)) {
        console.log("Message was verified successfully")
    };
    
    let signedPayment = CodaSDK.signPayment({
        to: keys.publicKey,
        from: keys.publicKey,
        amount: 1,
        fee: 1,
        nonce: 0
      }, keys);

    ReasonML:

    • Install gentype: yarn add -D gentype
    • Install bs-platform: yarn add -D bs-platform
    • Build dependencies: yarn bsb -make-world
    module CodaSDK = O1labsClientSdk.CodaSDK;
    
    let keys = CodaSDK.genKeys();
    let signed = CodaSDK.signMessage(. "hello", keys);
    if (CodaSDK.verifyMessage(. signed)) {
      Js.log("Message was verified successfully");
    };
    
    let signedPayment = CodaSDK.signPayment({
        to_: keys.publicKey,
        from: keys.publicKey,
        amount: "1",
        fee: "1",
        nonce: "0"
      }, keys);
    

    API Reference

    Install

    npm i @o1labs/client-sdk

    DownloadsWeekly Downloads

    3,666

    Version

    1.0.1

    License

    MIT

    Unpacked Size

    3.3 MB

    Total Files

    20

    Last publish

    Collaborators

    • akraines
    • bkase
    • ihm00
    • mina-o1bot
    • mminkov
    • o1-labs
    • telecomsteve