Getting Started

We're excited to provide you the resources to integrate and build on the OpenLaw protocol. To learn more about our shared libraries, please read the OpenLaw core overview.

JavaScript

To use OpenLaw core and our APIClient library in your JavaScript project, you can use our npm package.

$ npm install openlaw --save

Ways to Use

/**
 * ES2015: import for bundlers like webpack
 */

// import both modules
import { APIClient, Openlaw } from "openlaw";
// OR import only `Openlaw`
import { Openlaw } from "openlaw";
// OR import only `APIClient`
import { APIClient } from "openlaw";


/**
 * CommonJS
 */

// require() for Node.js (or bundlers that support CommonJS-style modules)
const { APIClient, Openlaw } = require('openlaw');


/**
 * Browser: available as a browser global: `openlaw`
 */

<script src="https://unpkg.com/openlaw/dist/umd/openlaw.js"></script>

<script>
  const Openlaw = openlaw.Openlaw;
  const APIClient = openlaw.APIClient;
</script>


/**
 * Browser, with ES Modules (https://caniuse.com/#search=Modules)
 */

// in your app
import { Openlaw, APIClient } from './path/to/openlaw/index.esm.js';

// then, in your HTML
<script type="module" src="./app.js"></script>

You can find further instructions on how to use our JavaScript libraries in our APIClient and Openlaw Object references.

Scala

If you want to use OpenLaw core in your Scala project, here is how to add it to your sbt project:

// First add our repository
resolvers += "Openlaw core" at "https://dl.bintray.com/openlawos/openlaw-core"

//add the dependency
libraryDependencies += "org.openlaw" %% "openlaw-core" % "<last version>"

Check out our Markup Language docs to start creating your own dynamic legal agreements using OpenLaw as well as our Review Tool docs to learn how to contribute to our growing library of "smart" legal agreements.

Last updated: 1/24/2019, 10:48:48 PM