diff --git a/Gulpfile.js b/Gulpfile.js index ca085241..e4001960 100644 --- a/Gulpfile.js +++ b/Gulpfile.js @@ -15,7 +15,7 @@ var pkg = require('./package.json'); var uglifyOptions = { mangle: { - except: ['_', 'ChainsqlError', 'ChainsqldError', 'UnexpectedError', + except: ['_', 'DacError', 'DacdError', 'UnexpectedError', 'LedgerVersionError', 'ConnectionError', 'NotConnectedError', 'DisconnectedError', 'TimeoutError', 'ResponseFormatError', 'ValidationError', 'NotFoundError', 'MissingLedgerHistoryError', diff --git a/HISTORY.md b/HISTORY.md index 055f4977..daa1f341 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -28,7 +28,7 @@ ## 0.16.0 __BREAKING CHANGES__ -+ [Fix types of ZXC values in `getServerInfo` response](https://github.com/ripple/ripple-lib/commit/99d08065e4bda3dda6ae1f183adbd11abc70a9b7) ++ [Fix types of DAC values in `getServerInfo` response](https://github.com/ripple/ripple-lib/commit/99d08065e4bda3dda6ae1f183adbd11abc70a9b7) + [Change error event format and fix crash due to error event on websocket](https://github.com/ripple/ripple-lib/commit/9cd72595f0efc062d77b9d625695d6030c524cc6) __OTHER CHANGES__ @@ -48,7 +48,7 @@ __OTHER CHANGES__ + [Fix `babel-polyfill` require](https://github.com/ripple/ripple-lib/commit/062148674c3b1293ab82c28e25615ddd530339fa) + [Fix samples](https://github.com/ripple/ripple-lib/commit/5d5cf868a2ddb1b1cd40e4a4f0a782d0066c2055) -+ [Add unit tests for `ChainsqlAPIBroadcast`](https://github.com/ripple/ripple-lib/commit/ddf8fe5b1a9c750490dca98fb9ffaaf8017f87e0) ++ [Add unit tests for `DacAPIBroadcast`](https://github.com/ripple/ripple-lib/commit/ddf8fe5b1a9c750490dca98fb9ffaaf8017f87e0) ## 0.15.0 @@ -70,7 +70,7 @@ __OTHER CHANGES__ + [Fix proxy support and add support for proxy authorization](https://github.com/ripple/ripple-lib/commit/14b840f3feca758e0384b746c94e36d8bf59b8c2) + [Fix trace option](https://github.com/ripple/ripple-lib/commit/af620755c53556c55eed12de4b0013ef5a349ce2) + [Allow memos on all transaction types](https://github.com/ripple/ripple-lib/commit/b5081344da8e66fbd3a5113cc3313325ef72a494) -+ [Add documentation for ChainsqlAPI options](https://github.com/ripple/ripple-lib/commit/a76b554cadb9f9f918b06f8386bc29355682a1a4) ++ [Add documentation for DacAPI options](https://github.com/ripple/ripple-lib/commit/a76b554cadb9f9f918b06f8386bc29355682a1a4) + [Docs: more on basic types, tx types](https://github.com/ripple/ripple-lib/commit/fdbac63f466b4fd3be701d4878800d856692e26e) + [Docs: revised introductory material](https://github.com/ripple/ripple-lib/commit/ef2515507dbd3c6a426ab5b31332a1bdf72d5b2d) + [boost coverage to almost 100%](https://github.com/ripple/ripple-lib/commit/995606b1e6f3643af34d9fd442ccd31f320b03eb) @@ -88,8 +88,8 @@ __OTHER CHANGES__ ## 0.13.0 __BREAKING CHANGES__ -+ Add new ChainsqlAPI interface and delete old API - - [ChainsqlAPI README and samples](https://github.com/ripple/ripple-lib/tree/develop/docs/samples) ++ Add new DacAPI interface and delete old API + - [DacAPI README and samples](https://github.com/ripple/ripple-lib/tree/develop/docs/samples) - [Method documentation](https://rawgit.com/ripple/ripple-lib/develop/docs/api.html) __OTHER CHANGES__ @@ -167,7 +167,7 @@ __OTHER CHANGES__ + [Fix Amount.to_human for very small numbers](https://github.com/ripple/ripple-lib/commit/6abfa759aa09d68074ac558d96c4b126a7cd1719) + [Refactor base conversion](https://github.com/ripple/ripple-lib/commit/f2b63fa4a80663eb29472bc6bb1aea8159f1f205) + [Update binary transaction format](https://github.com/ripple/ripple-lib/commit/8e134918fb4c22983320a3102f955e4568bb1dfb) -+ [Add DefaultChainsql account flag](https://github.com/ripple/ripple-lib/commit/3e249902c4cf25b4da5e75048c84ae391be83b10) ++ [Add DefaultDac account flag](https://github.com/ripple/ripple-lib/commit/3e249902c4cf25b4da5e75048c84ae391be83b10) + [Remove `Features` field requirement in `SetFee` transaction format](https://github.com/ripple/ripple-lib/commit/a20a649013646710c078d4ce1e210f87c7fe74fe) + [Remove `RegularKey` field requirement in `SetRegularKey` transaction format](https://github.com/ripple/ripple-lib/commit/c275174f27877ba8f389eb4efe969feb514d6e46) @@ -191,7 +191,7 @@ __OTHER CHANGES__ + [Fix taker_gets_funded exceeding offer.TakerGets](https://github.com/ripple/ripple-lib/commit/b19ecb4482b589d575382b7a5d0480b963383bb1) + [Fix unsymmetric memo serializing](https://github.com/ripple/ripple-lib/commit/1ed36fabdbd54f4d31078c2b0eaa3becc0fe2821) + [Fix IOU value passed to `Amount.from_json()`](https://github.com/ripple/ripple-lib/commit/fd1b64393dffb3d1819cd40b8d43df43a4db042d) -+ [Update transaction binary parsing to account for ZXC delivered amounts](https://github.com/ripple/ripple-lib/commit/35a346a674e6ee1e1e495db93700d55984efc7dd) ++ [Update transaction binary parsing to account for DAC delivered amounts](https://github.com/ripple/ripple-lib/commit/35a346a674e6ee1e1e495db93700d55984efc7dd) + [Bumped dependencies](https://github.com/ripple/ripple-lib/commit/f9bc7cc746b44b24b61bbe260ae2e9d9617286da) ## 0.11.0 @@ -241,7 +241,7 @@ are locally determined to have expired: `tejMaxLedger`. + [Add a "core" browser build of ripple-lib which has a subset of features and smaller file size](https://github.com/ripple/ripple-lib/pull/205) + [Update binformat with missing fields from rippled](https://github.com/ripple/ripple-lib/commit/cae980788efb00191bfd0988ed836d60cdf7a9a2) + [Wait for transaction validation before returning `tec` error](https://github.com/ripple/ripple-lib/commit/6bdd4b2670906588852fc4dda457607b4aac08e4) -+ [Change default `max_fee` on `Remote` to `1 ZXC`](https://github.com/ripple/ripple-lib/commit/d6b1728c23ff85c3cc791bed6982a750641fd95f) ++ [Change default `max_fee` on `Remote` to `1 DAC`](https://github.com/ripple/ripple-lib/commit/d6b1728c23ff85c3cc791bed6982a750641fd95f) + [Fix: Request ledger_accept should return the Remote](https://github.com/ripple/ripple-lib/pull/209) ## 0.9.2 @@ -325,7 +325,7 @@ __OTHER CHANGES__ + Request: `request.request()` now accepts an array of servers as first argument. Servers can be represented with URL, or the server object itself. + Request: `request.broadcast()` now returns the number of servers request was sent to + Server: Acquire host information from server without additional request -+ Amount: Add a constant for the maximum canonical value that can be expressed as a Chainsql value ++ Amount: Add a constant for the maximum canonical value that can be expressed as a Dac value + Amount: Make Constants static fields on the class, instead of a separate export ## 0.7.39 @@ -342,7 +342,7 @@ __OTHER CHANGES__ + **Deprecations** - 1. Removed humanistic amount detection in `transaction.payment`. Passing `1ZXC` as the payment amount no longer works. + 1. Removed humanistic amount detection in `transaction.payment`. Passing `1DAC` as the payment amount no longer works. 2. `remote.setServer` uses full server URL rather than hostname. Example: `remote.setServer('wss://s`.ripple.com:443')` 3. Removed constructors for deprecated transaction types from `transaction.js`. 4. Removed `invoiceID` option from `transaction.payment`. Instead, use the `transaction.invoiceID` method. @@ -358,7 +358,7 @@ __OTHER CHANGES__ parseBinary: false } ``` -+ Added full currency name support, e.g. `Currency.from_json('ZXC').to_human({full_name:'Chainsqls'})` will return `ZXC - Chainsqls` ++ Added full currency name support, e.g. `Currency.from_json('DAC').to_human({full_name:'Dacs'})` will return `DAC - Dacs` + Improved interest bearing currency support, e.g. `Currency.from_human('USD - US Dollar (2.5%pa)')` + Improve test coverage + Added blob vault client. The vault client facilitates interaction with ripple's namespace and blob vault or 3rd party blob vaults using ripple's blob vault software (https://github.com/ripple/ripple-blobvault). A list of the available functions can be found at [docs/VAULTCLIENT.md](docs/VAULTCLIENT.md) diff --git a/LICENSE b/LICENSE index 51bbc194..ad666291 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2012-2015 Chainsql Labs Inc. +Copyright (c) 2012-2015 Dac Labs Inc. Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that the above diff --git a/README.md b/README.md index 5f919db7..4cb8c360 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# chainsql-lib +# dac-lib -A JavaScript API for interacting with the ZXC Ledger +A JavaScript API for interacting with the DAC Ledger [![Circle CI](https://circleci.com/gh/ripple/ripple-lib/tree/develop.svg?style=svg)](https://circleci.com/gh/ripple/ripple-lib/tree/develop) [![Coverage Status](https://coveralls.io/repos/ripple/ripple-lib/badge.png?branch=develop)](https://coveralls.io/r/ripple/ripple-lib?branch=develop) @@ -10,16 +10,16 @@ A JavaScript API for interacting with the ZXC Ledger + Connect to a `rippled` server from Node.js or a web browser + Issue [rippled API](https://ripple.com/build/rippled-apis/) requests -+ Listen to events on the ZXC Ledger (transaction, ledger, etc.) -+ Sign and submit transactions to the ZXC Ledger ++ Listen to events on the DAC Ledger (transaction, ledger, etc.) ++ Sign and submit transactions to the DAC Ledger ## Getting Started -See also: [ChainsqlAPI Beginners Guide](https://ripple.com/build/rippleapi-beginners-guide/) +See also: [DacAPI Beginners Guide](https://ripple.com/build/rippleapi-beginners-guide/) -Install `chainsql-lib` using npm: +Install `dac-lib` using npm: ``` -$ npm install chainsql-lib +$ npm install dac-lib ``` Then see the [documentation](https://github.com/ripple/ripple-lib/blob/develop/docs/index.md) and [code samples](https://github.com/ripple/ripple-lib/tree/develop/docs/samples) @@ -36,4 +36,4 @@ The continuous integration tests require that the documentation stays up-to-date ## More Information -+ [Chainsql Developer Center](https://ripple.com/build/) ++ [Dac Developer Center](https://ripple.com/build/) diff --git a/docs/index.md b/docs/index.md index 4f888c85..c38d82b1 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,6 +1,6 @@ -# ChainsqlAPI Reference +# DacAPI Reference - [Introduction](#introduction) - [Boilerplate](#boilerplate) @@ -77,26 +77,26 @@ # Introduction -ChainsqlAPI is the official client library to the ZXC Ledger. Currently, ChainsqlAPI is only available in JavaScript. -Using ChainsqlAPI, you can: +DacAPI is the official client library to the DAC Ledger. Currently, DacAPI is only available in JavaScript. +Using DacAPI, you can: -* [Query transactions from the ZXC Ledger history](#gettransaction) +* [Query transactions from the DAC Ledger history](#gettransaction) * [Sign](#sign) transactions securely without connecting to any server -* [Submit](#submit) transactions to the ZXC Ledger, including [Payments](#payment), [Orders](#order), [Settings changes](#settings), and [other types](#transaction-types) -* [Generate a new ZXC Ledger Address](#generateaddress) +* [Submit](#submit) transactions to the DAC Ledger, including [Payments](#payment), [Orders](#order), [Settings changes](#settings), and [other types](#transaction-types) +* [Generate a new DAC Ledger Address](#generateaddress) * ... and [much more](#api-methods). -ChainsqlAPI only provides access to *validated*, *immutable* transaction data. +DacAPI only provides access to *validated*, *immutable* transaction data. ## Boilerplate -Use the following [boilerplate code](https://en.wikipedia.org/wiki/Boilerplate_code) to wrap your custom code using ChainsqlAPI. +Use the following [boilerplate code](https://en.wikipedia.org/wiki/Boilerplate_code) to wrap your custom code using DacAPI. ```javascript -const ChainsqlAPI = require('chainsql-lib').ChainsqlAPI; +const DacAPI = require('dac-lib').DacAPI; -const api = new ChainsqlAPI({ - server: 'wss://s1.ripple.com' // Public rippled server hosted by Chainsql, Inc. +const api = new DacAPI({ + server: 'wss://s1.ripple.com' // Public rippled server hosted by Dac, Inc. }); api.on('error', (errorCode, errorMessage) => { console.log(errorCode + ': ' + errorMessage); @@ -116,9 +116,9 @@ api.connect().then(() => { }).catch(console.error); ``` -ChainsqlAPI is designed to work in [Node.js](https://nodejs.org) version **6.11.3**. ChainsqlAPI may work on older Node.js versions if you use [Babel](https://babeljs.io/) for [ECMAScript 6](https://babeljs.io/docs/learn-es2015/) support. +DacAPI is designed to work in [Node.js](https://nodejs.org) version **6.11.3**. DacAPI may work on older Node.js versions if you use [Babel](https://babeljs.io/) for [ECMAScript 6](https://babeljs.io/docs/learn-es2015/) support. -The code samples in this documentation are written with ECMAScript 6 (ES6) features, but `ChainsqlAPI` also works with ECMAScript 5 (ES5). Regardless of whether you use ES5 or ES6, the methods that return Promises return [ES6-style promises](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise). +The code samples in this documentation are written with ECMAScript 6 (ES6) features, but `DacAPI` also works with ECMAScript 5 (ES5). Regardless of whether you use ES5 or ES6, the methods that return Promises return [ES6-style promises](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise).