From 324b1079e7eb29829bf06ff65299acdc58abf308 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Mon, 9 Jul 2018 19:05:38 +0200 Subject: Add ability to nest doc ref markdown under specific versions --- packages/website/md/docs/0xjs/1.0.0/async.md | 26 ++++++++++++++++++ packages/website/md/docs/0xjs/1.0.0/errors.md | 1 + .../website/md/docs/0xjs/1.0.0/installation.md | 31 ++++++++++++++++++++++ .../website/md/docs/0xjs/1.0.0/introduction.md | 1 + packages/website/md/docs/0xjs/1.0.0/versioning.md | 1 + packages/website/md/docs/0xjs/async.md | 26 ------------------ packages/website/md/docs/0xjs/errors.md | 1 - packages/website/md/docs/0xjs/installation.md | 31 ---------------------- packages/website/md/docs/0xjs/introduction.md | 1 - packages/website/md/docs/0xjs/versioning.md | 1 - .../website/md/docs/connect/1.0.0/installation.md | 15 +++++++++++ .../website/md/docs/connect/1.0.0/introduction.md | 1 + packages/website/md/docs/connect/installation.md | 15 ----------- packages/website/md/docs/connect/introduction.md | 1 - .../md/docs/json_schemas/1.0.0/installation.md | 17 ++++++++++++ .../md/docs/json_schemas/1.0.0/introduction.md | 3 +++ .../website/md/docs/json_schemas/1.0.0/schemas.md | 28 +++++++++++++++++++ .../website/md/docs/json_schemas/1.0.0/usage.md | 14 ++++++++++ .../website/md/docs/json_schemas/installation.md | 17 ------------ .../website/md/docs/json_schemas/introduction.md | 3 --- packages/website/md/docs/json_schemas/schemas.md | 28 ------------------- packages/website/md/docs/json_schemas/usage.md | 14 ---------- .../md/docs/order_utils/1.0.0/installation.md | 17 ++++++++++++ .../md/docs/order_utils/1.0.0/introduction.md | 1 + .../website/md/docs/order_utils/installation.md | 17 ------------ .../website/md/docs/order_utils/introduction.md | 1 - .../md/docs/smart_contracts/1.0.0/introduction.md | 8 ++++++ .../md/docs/smart_contracts/introduction.md | 8 ------ 28 files changed, 164 insertions(+), 164 deletions(-) create mode 100644 packages/website/md/docs/0xjs/1.0.0/async.md create mode 100644 packages/website/md/docs/0xjs/1.0.0/errors.md create mode 100644 packages/website/md/docs/0xjs/1.0.0/installation.md create mode 100644 packages/website/md/docs/0xjs/1.0.0/introduction.md create mode 100644 packages/website/md/docs/0xjs/1.0.0/versioning.md delete mode 100644 packages/website/md/docs/0xjs/async.md delete mode 100644 packages/website/md/docs/0xjs/errors.md delete mode 100644 packages/website/md/docs/0xjs/installation.md delete mode 100644 packages/website/md/docs/0xjs/introduction.md delete mode 100644 packages/website/md/docs/0xjs/versioning.md create mode 100644 packages/website/md/docs/connect/1.0.0/installation.md create mode 100644 packages/website/md/docs/connect/1.0.0/introduction.md delete mode 100644 packages/website/md/docs/connect/installation.md delete mode 100644 packages/website/md/docs/connect/introduction.md create mode 100644 packages/website/md/docs/json_schemas/1.0.0/installation.md create mode 100644 packages/website/md/docs/json_schemas/1.0.0/introduction.md create mode 100644 packages/website/md/docs/json_schemas/1.0.0/schemas.md create mode 100644 packages/website/md/docs/json_schemas/1.0.0/usage.md delete mode 100644 packages/website/md/docs/json_schemas/installation.md delete mode 100644 packages/website/md/docs/json_schemas/introduction.md delete mode 100644 packages/website/md/docs/json_schemas/schemas.md delete mode 100644 packages/website/md/docs/json_schemas/usage.md create mode 100644 packages/website/md/docs/order_utils/1.0.0/installation.md create mode 100644 packages/website/md/docs/order_utils/1.0.0/introduction.md delete mode 100644 packages/website/md/docs/order_utils/installation.md delete mode 100644 packages/website/md/docs/order_utils/introduction.md create mode 100644 packages/website/md/docs/smart_contracts/1.0.0/introduction.md delete mode 100644 packages/website/md/docs/smart_contracts/introduction.md (limited to 'packages/website/md') diff --git a/packages/website/md/docs/0xjs/1.0.0/async.md b/packages/website/md/docs/0xjs/1.0.0/async.md new file mode 100644 index 000000000..8abaef331 --- /dev/null +++ b/packages/website/md/docs/0xjs/1.0.0/async.md @@ -0,0 +1,26 @@ +0x.js is a promise-based library. This means that whenever an asynchronous call is required, the library method will return a native Javascript promise. You can therefore choose between using `promise` or `async/await` syntax when calling our async methods. + +_Async/await syntax (recommended):_ + +```javascript +try { + var availableAddresses = await zeroEx.getAvailableAddressesAsync(); +} catch (error) { + console.log('Caught error: ', error); +} +``` + +_Promise syntax:_ + +```javascript +zeroEx + .getAvailableAddressesAsync() + .then(function(availableAddresses) { + console.log(availableAddresses); + }) + .catch(function(error) { + console.log('Caught error: ', error); + }); +``` + +As is the convention with promise-based libraries, if an error occurs, it is thrown. It is the callers responsibility to catch thrown errors and to handle them appropriately. diff --git a/packages/website/md/docs/0xjs/1.0.0/errors.md b/packages/website/md/docs/0xjs/1.0.0/errors.md new file mode 100644 index 000000000..e97973ccf --- /dev/null +++ b/packages/website/md/docs/0xjs/1.0.0/errors.md @@ -0,0 +1 @@ +All error messages thrown by the 0x.js library are part of a documented string enum. Each error message is in all-caps, snake-case format. This makes the error messages easily identifiable, unique and grep-able. The error enums listing all possible errors the library could throw can be found in the `Types` section. diff --git a/packages/website/md/docs/0xjs/1.0.0/installation.md b/packages/website/md/docs/0xjs/1.0.0/installation.md new file mode 100644 index 000000000..ac0a47699 --- /dev/null +++ b/packages/website/md/docs/0xjs/1.0.0/installation.md @@ -0,0 +1,31 @@ +0x.js ships as both a [UMD](https://github.com/umdjs/umd) module and a [CommonJS](https://en.wikipedia.org/wiki/CommonJS) package. + +#### CommonJS _(recommended)_: + +**Install** + +```bash +npm install 0x.js --save +``` + +**Import** + +```javascript +import { ZeroEx } from '0x.js'; +``` + +#### UMD: + +**Install** + +Download the UMD module from our [releases page](https://github.com/0xProject/0x-monorepo/releases) and add it to your project. + +**Import** + +```html + +``` + +### Wiki + +Check out our [wiki](https://0xproject.com/wiki) for articles on how to get 0x.js setup with TestRPC, Infura and more! diff --git a/packages/website/md/docs/0xjs/1.0.0/introduction.md b/packages/website/md/docs/0xjs/1.0.0/introduction.md new file mode 100644 index 000000000..008376d33 --- /dev/null +++ b/packages/website/md/docs/0xjs/1.0.0/introduction.md @@ -0,0 +1 @@ +Welcome to the [0x.js](https://github.com/0xProject/0x-monorepo) documentation! 0x.js is a Javascript library for interacting with the 0x protocol. With it, you can easily make calls to the 0x smart contracts as well as any ERC20 token. Functionality includes generating, signing, filling and cancelling orders, verifying an orders signature, setting or checking a users ERC20 token balance/allowance and much more. diff --git a/packages/website/md/docs/0xjs/1.0.0/versioning.md b/packages/website/md/docs/0xjs/1.0.0/versioning.md new file mode 100644 index 000000000..6bcaa5b4d --- /dev/null +++ b/packages/website/md/docs/0xjs/1.0.0/versioning.md @@ -0,0 +1 @@ +This project adheres to the [Semantic Versioning 2.0.0](http://semver.org/) specification. The library's public interface includes all the methods, properties and types included in the documentation. Since the library is still an alpha, it's public interface is not yet stable and we will introduce backward incompatible changes to the interface without incrementing the major version until the `1.0.0` release. Our convention until then will be to increment the minor version whenever we introduce backward incompatible changes to the public interface, and to increment the patch version otherwise. This way, it is safe for you to include 0x.js in your projects with the tilda (e.g `~0.22.0`) without fear that a patch update would break your app. diff --git a/packages/website/md/docs/0xjs/async.md b/packages/website/md/docs/0xjs/async.md deleted file mode 100644 index 8abaef331..000000000 --- a/packages/website/md/docs/0xjs/async.md +++ /dev/null @@ -1,26 +0,0 @@ -0x.js is a promise-based library. This means that whenever an asynchronous call is required, the library method will return a native Javascript promise. You can therefore choose between using `promise` or `async/await` syntax when calling our async methods. - -_Async/await syntax (recommended):_ - -```javascript -try { - var availableAddresses = await zeroEx.getAvailableAddressesAsync(); -} catch (error) { - console.log('Caught error: ', error); -} -``` - -_Promise syntax:_ - -```javascript -zeroEx - .getAvailableAddressesAsync() - .then(function(availableAddresses) { - console.log(availableAddresses); - }) - .catch(function(error) { - console.log('Caught error: ', error); - }); -``` - -As is the convention with promise-based libraries, if an error occurs, it is thrown. It is the callers responsibility to catch thrown errors and to handle them appropriately. diff --git a/packages/website/md/docs/0xjs/errors.md b/packages/website/md/docs/0xjs/errors.md deleted file mode 100644 index e97973ccf..000000000 --- a/packages/website/md/docs/0xjs/errors.md +++ /dev/null @@ -1 +0,0 @@ -All error messages thrown by the 0x.js library are part of a documented string enum. Each error message is in all-caps, snake-case format. This makes the error messages easily identifiable, unique and grep-able. The error enums listing all possible errors the library could throw can be found in the `Types` section. diff --git a/packages/website/md/docs/0xjs/installation.md b/packages/website/md/docs/0xjs/installation.md deleted file mode 100644 index ac0a47699..000000000 --- a/packages/website/md/docs/0xjs/installation.md +++ /dev/null @@ -1,31 +0,0 @@ -0x.js ships as both a [UMD](https://github.com/umdjs/umd) module and a [CommonJS](https://en.wikipedia.org/wiki/CommonJS) package. - -#### CommonJS _(recommended)_: - -**Install** - -```bash -npm install 0x.js --save -``` - -**Import** - -```javascript -import { ZeroEx } from '0x.js'; -``` - -#### UMD: - -**Install** - -Download the UMD module from our [releases page](https://github.com/0xProject/0x-monorepo/releases) and add it to your project. - -**Import** - -```html - -``` - -### Wiki - -Check out our [wiki](https://0xproject.com/wiki) for articles on how to get 0x.js setup with TestRPC, Infura and more! diff --git a/packages/website/md/docs/0xjs/introduction.md b/packages/website/md/docs/0xjs/introduction.md deleted file mode 100644 index 008376d33..000000000 --- a/packages/website/md/docs/0xjs/introduction.md +++ /dev/null @@ -1 +0,0 @@ -Welcome to the [0x.js](https://github.com/0xProject/0x-monorepo) documentation! 0x.js is a Javascript library for interacting with the 0x protocol. With it, you can easily make calls to the 0x smart contracts as well as any ERC20 token. Functionality includes generating, signing, filling and cancelling orders, verifying an orders signature, setting or checking a users ERC20 token balance/allowance and much more. diff --git a/packages/website/md/docs/0xjs/versioning.md b/packages/website/md/docs/0xjs/versioning.md deleted file mode 100644 index 6bcaa5b4d..000000000 --- a/packages/website/md/docs/0xjs/versioning.md +++ /dev/null @@ -1 +0,0 @@ -This project adheres to the [Semantic Versioning 2.0.0](http://semver.org/) specification. The library's public interface includes all the methods, properties and types included in the documentation. Since the library is still an alpha, it's public interface is not yet stable and we will introduce backward incompatible changes to the interface without incrementing the major version until the `1.0.0` release. Our convention until then will be to increment the minor version whenever we introduce backward incompatible changes to the public interface, and to increment the patch version otherwise. This way, it is safe for you to include 0x.js in your projects with the tilda (e.g `~0.22.0`) without fear that a patch update would break your app. diff --git a/packages/website/md/docs/connect/1.0.0/installation.md b/packages/website/md/docs/connect/1.0.0/installation.md new file mode 100644 index 000000000..950bf92ca --- /dev/null +++ b/packages/website/md/docs/connect/1.0.0/installation.md @@ -0,0 +1,15 @@ +**Install** + +```bash +npm install @0xproject/connect --save +``` + +**Import** + +```javascript +import { HttpClient } from '@0xproject/connect'; +``` + +### Wiki + +Check out our [0x Connect introduction tutorial](https://0xproject.com/wiki#Intro-Tutorial) for information on how to integrate relayers into your application. diff --git a/packages/website/md/docs/connect/1.0.0/introduction.md b/packages/website/md/docs/connect/1.0.0/introduction.md new file mode 100644 index 000000000..4e3039442 --- /dev/null +++ b/packages/website/md/docs/connect/1.0.0/introduction.md @@ -0,0 +1 @@ +Welcome to the [0x Connect](https://github.com/0xProject/0x-monorepo/tree/development/packages/connect) documentation! 0x Connect is a Javascript library that makes it easy to interact with relayers that conform to the [Standard Relayer API](https://github.com/0xProject/standard-relayer-api). Functionality includes getting supported token pairs from a relayer, getting orders filtered by different attributes, getting individual orders specified by order hash, getting orderbooks for specific token pairs, getting fee information, and submitting orders. diff --git a/packages/website/md/docs/connect/installation.md b/packages/website/md/docs/connect/installation.md deleted file mode 100644 index 950bf92ca..000000000 --- a/packages/website/md/docs/connect/installation.md +++ /dev/null @@ -1,15 +0,0 @@ -**Install** - -```bash -npm install @0xproject/connect --save -``` - -**Import** - -```javascript -import { HttpClient } from '@0xproject/connect'; -``` - -### Wiki - -Check out our [0x Connect introduction tutorial](https://0xproject.com/wiki#Intro-Tutorial) for information on how to integrate relayers into your application. diff --git a/packages/website/md/docs/connect/introduction.md b/packages/website/md/docs/connect/introduction.md deleted file mode 100644 index 4e3039442..000000000 --- a/packages/website/md/docs/connect/introduction.md +++ /dev/null @@ -1 +0,0 @@ -Welcome to the [0x Connect](https://github.com/0xProject/0x-monorepo/tree/development/packages/connect) documentation! 0x Connect is a Javascript library that makes it easy to interact with relayers that conform to the [Standard Relayer API](https://github.com/0xProject/standard-relayer-api). Functionality includes getting supported token pairs from a relayer, getting orders filtered by different attributes, getting individual orders specified by order hash, getting orderbooks for specific token pairs, getting fee information, and submitting orders. diff --git a/packages/website/md/docs/json_schemas/1.0.0/installation.md b/packages/website/md/docs/json_schemas/1.0.0/installation.md new file mode 100644 index 000000000..50a37bae1 --- /dev/null +++ b/packages/website/md/docs/json_schemas/1.0.0/installation.md @@ -0,0 +1,17 @@ +**Install** + +```bash +yarn add @0xproject/json-schemas +``` + +**Import** + +```javascript +import { schemas } from '@0xproject/json-schemas'; +``` + +or + +```javascript +var schemas = require('@0xproject/json-schemas').schemas; +``` diff --git a/packages/website/md/docs/json_schemas/1.0.0/introduction.md b/packages/website/md/docs/json_schemas/1.0.0/introduction.md new file mode 100644 index 000000000..a27f4b521 --- /dev/null +++ b/packages/website/md/docs/json_schemas/1.0.0/introduction.md @@ -0,0 +1,3 @@ +Welcome to the [@0xproject/json-schemas](https://github.com/0xProject/0x-monorepo/tree/development/packages/json-schemas) documentation! This package provides JSON schemas for validating 0x Protocol & Standard Relayer API data structures. It provides both the raw JSON schemas and a schema validator class to interact with them from a JS project. + +If you are not using a Javascript-based language for your project, you can copy-paste the JSON schemas within this package and use them together with a [JSON Schema](http://json-schema.org/) implementation in your [language of choice](http://json-schema.org/implementations.html) (e.g Python, Haskell, Go, C, C++, Rust, Ruby, Scala, etc...). diff --git a/packages/website/md/docs/json_schemas/1.0.0/schemas.md b/packages/website/md/docs/json_schemas/1.0.0/schemas.md new file mode 100644 index 000000000..fcf5d8df6 --- /dev/null +++ b/packages/website/md/docs/json_schemas/1.0.0/schemas.md @@ -0,0 +1,28 @@ +0x Protocol Schemas + +* [Basic types](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/basic_type_schemas.ts) (e.g Ethereum address, number) +* [ECSignature](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/ec_signature_schema.ts) +* [Order/SignedOrder](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/order_schemas.ts) +* [OrderHash](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/order_hash_schema.ts) + +0x.js Schemas + +* [BlockRange](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/block_range_schema.ts) +* [IndexFilter Values](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/index_filter_values_schema.ts) +* [OrderFillRequests](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/order_fill_requests_schema.ts) +* [OrderCancellationRequests](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/order_cancel_schema.ts) +* [OrderFillOrKillRequests](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/order_fill_or_kill_requests_schema.ts) +* [SignedOrders](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/signed_orders_schema.ts) +* [Token](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/token_schema.ts) +* [TxData](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/tx_data_schema.ts) + +Standard Relayer API Schemas + +* [Error response](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/relayer_api_error_response_schema.ts) +* [Fees payload](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/relayer_api_fees_payload_schema.ts) +* [Fees response](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/relayer_api_fees_response_schema.ts) +* [Orderbook channel subscribe](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/relayer_api_orberbook_channel_subscribe_schema.ts) +* [Orderbook channel snapshot](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/relayer_api_orderbook_channel_snapshot_schema.ts) +* [Orderbook channel update](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/relayer_api_orderbook_channel_update_response_schema.ts) +* [Orderbook response](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/relayer_api_orderbook_response_schema.ts) +* [Token pairs response](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/relayer_api_token_pairs_response_schema.ts) diff --git a/packages/website/md/docs/json_schemas/1.0.0/usage.md b/packages/website/md/docs/json_schemas/1.0.0/usage.md new file mode 100644 index 000000000..68b801153 --- /dev/null +++ b/packages/website/md/docs/json_schemas/1.0.0/usage.md @@ -0,0 +1,14 @@ +The following example shows you how to validate a 0x order using the `@0xproject/json-schemas` package. + +```javascript +import {SchemaValidator, ValidatorResult, schemas} from '@0xproject/json-schemas'; + +const {orderSchema} = schemas; +const validator = new SchemaValidator(); + +const order = { + ... +}; +const validatorResult: ValidatorResult = validator.validate(order, orderSchema); // Contains all errors +const isValid: boolean = validator.isValid(order, orderSchema); // Only returns boolean +``` diff --git a/packages/website/md/docs/json_schemas/installation.md b/packages/website/md/docs/json_schemas/installation.md deleted file mode 100644 index 50a37bae1..000000000 --- a/packages/website/md/docs/json_schemas/installation.md +++ /dev/null @@ -1,17 +0,0 @@ -**Install** - -```bash -yarn add @0xproject/json-schemas -``` - -**Import** - -```javascript -import { schemas } from '@0xproject/json-schemas'; -``` - -or - -```javascript -var schemas = require('@0xproject/json-schemas').schemas; -``` diff --git a/packages/website/md/docs/json_schemas/introduction.md b/packages/website/md/docs/json_schemas/introduction.md deleted file mode 100644 index a27f4b521..000000000 --- a/packages/website/md/docs/json_schemas/introduction.md +++ /dev/null @@ -1,3 +0,0 @@ -Welcome to the [@0xproject/json-schemas](https://github.com/0xProject/0x-monorepo/tree/development/packages/json-schemas) documentation! This package provides JSON schemas for validating 0x Protocol & Standard Relayer API data structures. It provides both the raw JSON schemas and a schema validator class to interact with them from a JS project. - -If you are not using a Javascript-based language for your project, you can copy-paste the JSON schemas within this package and use them together with a [JSON Schema](http://json-schema.org/) implementation in your [language of choice](http://json-schema.org/implementations.html) (e.g Python, Haskell, Go, C, C++, Rust, Ruby, Scala, etc...). diff --git a/packages/website/md/docs/json_schemas/schemas.md b/packages/website/md/docs/json_schemas/schemas.md deleted file mode 100644 index fcf5d8df6..000000000 --- a/packages/website/md/docs/json_schemas/schemas.md +++ /dev/null @@ -1,28 +0,0 @@ -0x Protocol Schemas - -* [Basic types](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/basic_type_schemas.ts) (e.g Ethereum address, number) -* [ECSignature](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/ec_signature_schema.ts) -* [Order/SignedOrder](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/order_schemas.ts) -* [OrderHash](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/order_hash_schema.ts) - -0x.js Schemas - -* [BlockRange](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/block_range_schema.ts) -* [IndexFilter Values](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/index_filter_values_schema.ts) -* [OrderFillRequests](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/order_fill_requests_schema.ts) -* [OrderCancellationRequests](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/order_cancel_schema.ts) -* [OrderFillOrKillRequests](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/order_fill_or_kill_requests_schema.ts) -* [SignedOrders](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/signed_orders_schema.ts) -* [Token](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/token_schema.ts) -* [TxData](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/tx_data_schema.ts) - -Standard Relayer API Schemas - -* [Error response](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/relayer_api_error_response_schema.ts) -* [Fees payload](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/relayer_api_fees_payload_schema.ts) -* [Fees response](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/relayer_api_fees_response_schema.ts) -* [Orderbook channel subscribe](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/relayer_api_orberbook_channel_subscribe_schema.ts) -* [Orderbook channel snapshot](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/relayer_api_orderbook_channel_snapshot_schema.ts) -* [Orderbook channel update](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/relayer_api_orderbook_channel_update_response_schema.ts) -* [Orderbook response](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/relayer_api_orderbook_response_schema.ts) -* [Token pairs response](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/relayer_api_token_pairs_response_schema.ts) diff --git a/packages/website/md/docs/json_schemas/usage.md b/packages/website/md/docs/json_schemas/usage.md deleted file mode 100644 index 68b801153..000000000 --- a/packages/website/md/docs/json_schemas/usage.md +++ /dev/null @@ -1,14 +0,0 @@ -The following example shows you how to validate a 0x order using the `@0xproject/json-schemas` package. - -```javascript -import {SchemaValidator, ValidatorResult, schemas} from '@0xproject/json-schemas'; - -const {orderSchema} = schemas; -const validator = new SchemaValidator(); - -const order = { - ... -}; -const validatorResult: ValidatorResult = validator.validate(order, orderSchema); // Contains all errors -const isValid: boolean = validator.isValid(order, orderSchema); // Only returns boolean -``` diff --git a/packages/website/md/docs/order_utils/1.0.0/installation.md b/packages/website/md/docs/order_utils/1.0.0/installation.md new file mode 100644 index 000000000..68a7cf960 --- /dev/null +++ b/packages/website/md/docs/order_utils/1.0.0/installation.md @@ -0,0 +1,17 @@ +**Install** + +```bash +yarn add @0xproject/order-utils +``` + +**Import** + +```javascript +import { createSignedOrderAsync } from '@0xproject/order-utils'; +``` + +or + +```javascript +var createSignedOrderAsync = require('@0xproject/order-utils').createSignedOrderAsync; +``` diff --git a/packages/website/md/docs/order_utils/1.0.0/introduction.md b/packages/website/md/docs/order_utils/1.0.0/introduction.md new file mode 100644 index 000000000..d5f3f2925 --- /dev/null +++ b/packages/website/md/docs/order_utils/1.0.0/introduction.md @@ -0,0 +1 @@ +Welcome to the [@0xproject/order-utils](https://github.com/0xProject/0x-monorepo/tree/development/packages/order-utils) documentation! Order utils is a set of utils around creating, signing, validating 0x orders. diff --git a/packages/website/md/docs/order_utils/installation.md b/packages/website/md/docs/order_utils/installation.md deleted file mode 100644 index 68a7cf960..000000000 --- a/packages/website/md/docs/order_utils/installation.md +++ /dev/null @@ -1,17 +0,0 @@ -**Install** - -```bash -yarn add @0xproject/order-utils -``` - -**Import** - -```javascript -import { createSignedOrderAsync } from '@0xproject/order-utils'; -``` - -or - -```javascript -var createSignedOrderAsync = require('@0xproject/order-utils').createSignedOrderAsync; -``` diff --git a/packages/website/md/docs/order_utils/introduction.md b/packages/website/md/docs/order_utils/introduction.md deleted file mode 100644 index d5f3f2925..000000000 --- a/packages/website/md/docs/order_utils/introduction.md +++ /dev/null @@ -1 +0,0 @@ -Welcome to the [@0xproject/order-utils](https://github.com/0xProject/0x-monorepo/tree/development/packages/order-utils) documentation! Order utils is a set of utils around creating, signing, validating 0x orders. diff --git a/packages/website/md/docs/smart_contracts/1.0.0/introduction.md b/packages/website/md/docs/smart_contracts/1.0.0/introduction.md new file mode 100644 index 000000000..566a573b6 --- /dev/null +++ b/packages/website/md/docs/smart_contracts/1.0.0/introduction.md @@ -0,0 +1,8 @@ +Welcome to the [0x smart contracts](https://github.com/0xProject/contracts) documentation! This documentation is intended for dApp developers who want to integrate 0x exchange functionality directly into their own smart contracts. + +### Helpful wiki articles: + +* [Overview of 0x protocol architecture](https://0xproject.com/wiki#Architecture) +* [0x smart contract interactions](https://0xproject.com/wiki#Contract-Interactions) +* [Deployed smart contract addresses](https://0xproject.com/wiki#Deployed-Addresses) +* [0x protocol message format](https://0xproject.com/wiki#Message-Format) diff --git a/packages/website/md/docs/smart_contracts/introduction.md b/packages/website/md/docs/smart_contracts/introduction.md deleted file mode 100644 index 566a573b6..000000000 --- a/packages/website/md/docs/smart_contracts/introduction.md +++ /dev/null @@ -1,8 +0,0 @@ -Welcome to the [0x smart contracts](https://github.com/0xProject/contracts) documentation! This documentation is intended for dApp developers who want to integrate 0x exchange functionality directly into their own smart contracts. - -### Helpful wiki articles: - -* [Overview of 0x protocol architecture](https://0xproject.com/wiki#Architecture) -* [0x smart contract interactions](https://0xproject.com/wiki#Contract-Interactions) -* [Deployed smart contract addresses](https://0xproject.com/wiki#Deployed-Addresses) -* [0x protocol message format](https://0xproject.com/wiki#Message-Format) -- cgit v1.2.3