- Update
submit
response (#978)- Includes the full object returned by divvyd, while keeping the existing fields for backward compatibility
- Add
getLedger
option for ledger hash (##980)- Use the
ledgerHash
option to get a specific ledger by hash
- Use the
When using divvy-lib
with divvyd
, we recommend using divvyd
version
1.1.2 or later.
The SHA-256 checksums for the browser version of this release can be found below.
% shasum -a 256 *
e6cc52395d0c3e205263777ba2e528e50f4d1f84bb4b16763a3bf7f5fcc290f5 divvy-1.1.2-debug.js
82df879bc2970e0e4fd161975a99448b4859b0cde751d8ea34e9f51d672090b9 divvy-1.1.2-min.js
12f56330dc71bba8ac3004025cbc9698413a0c619df302dda105b31228a67319 divvy-1.1.2.js
- Fix
getOrderbook
offer sorting (#970)- BREAKING CHANGE: The ordering of offers returned by
getOrderbook
has been changed so that offers with the best quality are sorted first
- BREAKING CHANGE: The ordering of offers returned by
- Add new helper methods for working with the
divvyd
APIs:formatBidsAndAsks
: Takes offers and returns a formatted order book object with bids and asksrenameCounterpartyToIssuer
: Takes an object and renames thecounterparty
field toissuer
- TypeScript: Add return type for
generateAddress
(#968)
When using divvy-lib
with divvyd
, we recommend using divvyd
version 1.1.1 or
later.
The SHA-256 checksums for the browser version of this release can be found below.
% shasum -a 256 *
e151900e49bb5482b02bef5b0b1542ea586076363b072ae616f6d4d2f7f5b8a1 divvy-1.1.1-debug.js
6aee3757b29de285f361e20862261090033c07a13fd09f4a3cc4c097b6e84b55 divvy-1.1.1-min.js
bea4a889fb9ee4092324c6667490ea66469bdde869ddc1aaddf5e9d12b0cf091 divvy-1.1.1.js
- Add support for Node.js v10 LTS (#964)
- Add DepositPreauth (#958)
- In
FormattedTransactionType
, theOutcome
'sbalanceChanges
property had the wrong type. This is now fixed (#955) - Add/fix docs for: xdvToDrops, dropsToXdv, iso8601ToDivvyTime, schemaValidator, isValidAddress, isValidSecret, deriveKeypair, deriveAddress
The SHA-256 checksums for the browser version of this release can be found below.
% shasum -a 256 *
e1d742092b3c0fcee97a875e18db4baeab3bbc82f08b96e883ee188c5f0cfb37 divvy-1.1.0-debug.js
f28921f57a133678dcb3cb54c497626bd76b1f953d22d61f3ddca31c8947d552 divvy-1.1.0-min.js
3696871a80c1102635699994adcaf00cdfdfcff5014fc2eba3d8f8d8437c8f91 divvy-1.1.0.js
- Fix #954: Exclude SendMax from all XDV to XDV payments (thanks @jefftrudeau)
- TypeScript
- book_offers returns offers type OfferLedgerEntry (#951)
- Use
object
(#936)
The SHA-256 checksums for the browser version of this release can be found below.
% shasum -a 256 *
2556fe17296e127ed44e7066e90a6175e2b164f00ca3c1aa7b1c554f31c688dd divvy-1.0.2-debug.js
e0342ea21eac32a1024c62034fba09c6f26dd3e7371b23ea1e153e03135cd590 divvy-1.0.2-min.js
c7286c517497d018d02d09257e81172b61d36c8b9885a077af68e8133c3b3b9b divvy-1.0.2.js
- Add address/secret/key validation and derivation methods (#932)
isValidAddress(address: string) : boolean
: Checks if the specified string contains a valid address.isValidSecret(secret: string): boolean
: Checks if the specified string contains a valid secret.deriveKeypair(seed: string): {privateKey: string, publicKey: string}
: Derive a public and private key from a seed.deriveAddress(publicKey: string): string
: Derive an XDV Ledger address from a public key.
- To derive an address from a secret:
- Derive the public key from the secret.
- Derive the address from the public key.
- Example:
const address = api.deriveAddress(api.deriveKeypair(secret).publicKey)
- Update server regex to accommodate UDS (#944)
- Include memos when parsing trustlines (#949)
- Add remaining LedgerEntry types (#943)
The SHA-256 checksums for the browser version of this release can be found below.
% shasum -a 256 *
9b6408641ce83659afcd5765c256c35829a4fcb4c3244dc9ca6bf27c871a45c4 divvy-1.0.1-debug.js
7ab2b69fe59c2d4a74638116e2ba3b387155eb2d23e48a01bbf7beb72911f898 divvy-1.0.1-min.js
8bb4dcad9ce25a27003b1d73d71ddf41b8a5af02ece4ebbfeaff4aeb91f3b8c4 divvy-1.0.1.js
We are pleased to announce the release of divvy-lib
version 1.0.0.
This version features a range of changes and improvements that make the library more capable and flexible. It includes new methods for accessing divvyd APIs, including subscriptions.
When using this version with divvyd
for online functionality, we recommend
using divvyd
version 1.0.1 or later.
Here is a summary of the changes since divvy-lib
version 0.22.0, which was
the last non-beta version.
- Add
request()
,hasNextPage()
, andrequestNextPage()
for accessingdivvyd
APIs. - Add
prepareTransaction()
for preparing rawtxJSON
. - XDV amounts can be specified in drops. Also,
xdvToDrops()
anddropsToXdv()
are available to make conversions. getTransaction
responses can include a newchannelChanges
property that describes the details of a payment channel.
- Amounts in drops and XDV are checked for validity.
- A maximum fee is now
imposed. Exceeding it causes a
ValidationError
to be thrown. - Errors are improved and more data validation was added.
- Bug fix:
getPaths
now filters paths correctly and works correctly when the destination currency is XDV.
The following changes were introduced in 1.0.0.
getTransaction()
andgetTransactions()
- The
specification.destination.amount
field has been removed from the parsed transaction response. - To determine the amount that a transaction delivered, use
outcome.deliveredAmount
. - If you require the provisional requested
Amount
from the original transaction:- Use
getTransaction
'sincludeRawTransaction
option, or - Use
getTransactions
'sincludeRawTransactions
option, or - Use the divvyd APIs directly with
request
. For example, call the API methodstx
,account_tx
, etc.
- Use
- The
getLedger()
response object- The
rawTransactions
field has been removed (for consistency withgetTransaction()
andgetTransactions()
). - Instead, within each
transaction
, use the newrawTransaction
JSON string. - The
metaData
field has been renamed tometa
for consistency with divvyd'stx
method. ledger_index
has been added to each raw transaction.
- The
The SHA-256 checksums for the browser version of this release can be found below.
% shasum -a 256 *
06e5efcb6846ad45dedfd85cfa2ef4bdeb608b15ccbfb60b872c995d97342426 divvy-1.0.0-debug.js
cdb26b928a89ce228c727d1ff966df266eb46b2f76bd94f81cbeb0a9d75febf0 divvy-1.0.0-min.js
f74ee804e8a945a994e4e3901a0a3eb52292fbdcbff61ed30cefb8ffbcba50c3 divvy-1.0.0.js
- Add
prepareTransaction()
- Internal improvements and cleanup
- For payment channel transactions,
getTransaction
includes a newchannelChanges
property that describes the details of the payment channel. (#920)
- A bug caused calculated fees to use too many decimal places. This was fixed by rounding fees to 6 decimal places. (#912)
- When using the Settings transaction to set up a multi-signing list, the threshold and weights fields are required. (#909)
- Docs: Fix the MIMETYPE in examples with memos. (#914)
The SHA-256 checksums for the browser version of this release can be found below.
% shasum -a 256 *
460dbb521e24c44cb53dabc1a74feeca33d031b44d889dd5b51103ca92d51de6 divvy-1.0.0-beta.3-debug.js
cccfd24973c6b7990d9e933a589175dae26249825737fff4f2f73d8558a3f186 divvy-1.0.0-beta.3-min.js
0dc456a58fb078347d9920310621595905085595d73c2b8fe96bea73bcf35450 divvy-1.0.0-beta.3.js
- During transaction preparation, there is now a maximum fee. Also, when a transaction is signed, its fee is checked and an error is thrown if the fee exceeds the maximum. The default
maxFeeXDV
is'2'
(2 XDV). Override this value in the DivvyAPI constructor. - Attempting to prepare a transaction with an exact
fee
higher thanmaxFeeXDV
causes aValidationError
to be thrown. - Attempting to sign a transaction with a fee higher than
maxFeeXDV
causes aValidationError
to be thrown. - The value returned by
getFee()
is capped atmaxFeeXDV
.
- In Transaction Instructions, the
maxFee
parameter is deprecated. Use themaxFeeXDV
parameter in the DivvyAPI constructor.
Most users of divvy-lib do not need to make any code changes to accommodate the new soft limit on fees. The limit is designed to protect against the most severe cases where an unintentionally high fee may be used.
- When having divvy-lib provide the fee with a
prepare*
method, a maximum fee ofmaxFeeXDV
(default 2 XDV) applies. You can prepare more economical transactions by setting a lowermaxFeeXDV
, or support high-priority transactions by setting a highermaxFeeXDV
in the DivvyAPI constructor. - When using
sign
with a Fee higher thanmaxFeeXDV
, aValidationError
is thrown.
If you have any questions or concerns, please open an issue on GitHub.
The SHA-256 checksums for the browser version of this release can be found below.
% shasum -a 256 *
ef348a2805098e61395b689b410cbf4bfd35e4d72e38c89f4ab74ec5e19793f5 divvy-1.0.0-beta.2-debug.js
ea33fd53df8c7176d5fbf52dae0b64aade7180860f26449062cdbefaf8bd4d9b divvy-1.0.0-beta.2-min.js
fe5cc6e97c9b8a1470dacb34f16a64255cd639a25381abe9db1ba79e102456f2 divvy-1.0.0-beta.2.js
- Amounts in drops and XDV are checked for validity. Some
methods may now throw a
BigNumber Error
orValidationError
if the amount is invalid. This may include methods that previously did not throw. - Note that 1 drop is equivalent to 0.000001 XDV and 1 XDV is equivalent to 1,000,000 drops.
- Using drops is recommended. All divvyd APIs require XDV amounts to be expressed in drops.
- Allow specifying amounts in drops for consistency with the
divvyd
APIs. - Export
xdvToDrops()
anddropsToXdv()
functions. - Potentially breaking change: Improve errors. For example,
DivvydError
now includes the full response from thedivvyd
server (#687).NotConnectedError
may be thrown with a different message than before.
The SHA-256 checksums for the browser version of this release can be found below.
% shasum -a 256 *
a80ebb39e186640246306eadb2879147458c8271fd3c6cb32e6ef78d0b4b01a5 divvy-1.0.0-beta.1-debug.js
81bcc4b5fd6fd52220ed151242eaddd63eb29c4078845edc68f65b769557d126 divvy-1.0.0-beta.1-min.js
738b4d65b58cf4e3542fa396f8d319a24cd7d0b7aff5ff629a900e244f735ff4 divvy-1.0.0-beta.1.js
- Add
request
,hasNextPage
, andrequestNextPage
.- This provides support for all divvyd APIs, including subscriptions.
When using divvyd APIs, you must:
- For all XDV amounts, use drops (1 drop = 0.000001 XDV).
- Instead of
counterparty
, useissuer
.
The SHA-256 checksums for the browser version of this release can be found below.
% shasum -a 256 *
ab2094979a3d6b320c7bc22bc5946c50fa5e29af0976d352e7689b0a4d840c55 divvy-1.0.0-beta.0-debug.js
0e7f7d740606c2866ebf63776b13b41a555848e1a1419e2c8058d2e6c562d7fd divvy-1.0.0-beta.0-min.js
bd05e8806832ca4192aea7ba2d0362baa9f44605f8e8e6676acd25eb0b94b778 divvy-1.0.0-beta.0.js
getOrderbook
- return raw order data. The fullBookOffer
data is now provided underdata
.
The SHA-256 checksums for the browser version of this release can be found below.
% shasum -a 256 *
33f71b55c4adec4452826e44fe7809377364df04222b60f0fce01e7de2daff33 divvy-0.22.0-debug.js
63232888a4ea77065e8e8eb8fdaa8ebfe3a785428fe935e2667c1ea54c837f29 divvy-0.22.0-min.js
ab98026fabe296bd938297c48cb58e01dfdbe90f3c66c9617d6a3e1efd4c6b93 divvy-0.22.0.js
The SHA-256 checksums for the browser version of this release can be found below.
% shasum -a 256 *
3ab52209ad4a80393c8c08ef3f4aa9cfb47bc76c0ede2ee9fa7f5ca180ba4d67 divvy-0.21.0-debug.js
3b1efccded347bed5f64757098a1ea6a513bb8932d922d00af47cd24e001dc14 divvy-0.21.0-min.js
db08e5a3eab1f659b4c803543374398004d950ba720adc4b9a7658817cb5c94b divvy-0.21.0.js
- Add support for using a keypair with sign()
- Fix a bug caused by jsonschema v1.2.3 by pinning to v1.2.2
- Improve Payment Channel documentation
The SHA-256 checksums for the browser version of this release can be found below.
% shasum -a 256 *
389811a9baa72f77e2a43d0b48045762d29a6f616ed5fd2660ba76fc12a3ecc5 divvy-0.20.0-debug.js
c1746ea0dd55318cb4e1ef3955ef14759d9d70861437c69abafc10169916f068 divvy-0.20.0-min.js
17958b0e46395d2b2a35a003693c0babdfb5382513d3cc58a62f8648ad710b0e divvy-0.20.0.js
- Fix: Include TypeScript declarations in npm package
- Fix: Documentation link to checkCash
- Internal: Clean up types and migrate more APIs to new request method
- Internal: Fix Payment source and destination types
The SHA-256 checksums for the browser version of this release can be found below.
% shasum -a 256 *
3ed5332aa035c07bae6c1abfdfc8ca77cdbb05cc4b88878f544f1ea4cb793f4d divvy-0.19.1-debug.js
2f5507aa00a40ab6a94de1822af87db5e927edef3885aef5d9b39ccb623ccb54 divvy-0.19.1-min.js
1e439aee1b220242d56ea687a9b55a67b8614212c1ddbd70a4fcf34503fc487a divvy-0.19.1.js
- Add support for Checks
- CheckCreate adds a check entry to the ledger. The check is a promise from the source of the check that the destination of the check may cash the check and receive up to the SendMax specified on the check. The check may have an (optional) expiration, after which the check may no longer be cashed.
- CheckCancel removes the check from the ledger without transferring funds. Either the check's source or destination can cancel the check at any time. After a check has expired, any account can cancel the check.
- CheckCash is a request by the destination of the check to transfer a requested amount of funds, up to the check's SendMax, from the source to the destination. The destination may receive less than the SendMax due to transfer fees.
- Add support for the Deposit Authorization account root flag
- Generate .ts.d TypeScript declaration files
- Improve documentation of getTransactions params
- Add new request interface (private for now)
The SHA-256 checksums for the browser version of this release can be found below.
% shasum -a 256 *
0e7ce4594b7e455fbc57ad81f6fddc391d1e1f349a49c96ad783be50f80fdc14 divvy-0.19.0-debug.js
6d716a0357929e51e476f22136880f7a0e5458fd396ac145ce9308f278ff7cc1 divvy-0.19.0-min.js
6715db1af638f99226ab7f8f244103306aa6e04d1b8c1da47a63431053bacb84 divvy-0.19.0.js
- Fix: Publish updated browser builds to npm so that users can easily use CDNs
- Fix: Browserify fails due to dependency on
ws
- Fix:
build
script fails whennode_modules
is in path - Reduce size of published npm package
- Clean up files from Flow (we migrated to TypeScript)
- Typos and code cleanup
The SHA-256 checksums for the browser version of this release can be found below.
% shasum -a 256 *
f08ab61137255be3639e9d210ded2a182b6e0388f257a70d9b372ce7e7e518a6 divvy-0.18.2-debug.js
0604835b8421391167b4314ce93a76b5994780a08bd7edf36d91eb5e8f2643a2 divvy-0.18.2-min.js
fda56ab5c8256e04355e20064877ef4053f26c87f37cfcf861340f22bf89ee40 divvy-0.18.2.js
Note: The package published to npm for this version did not include updated browser builds. If you are using a CDN that pulls from npm, please use 0.18.2 or later.
- Fix: isSameIssue() should check counterparty. This bug caused
getOrderbook()
to return incorrect values.
The SHA-256 checksums for the browser version of this release can be found below.
% shasum -a 256 *
6871855a2af1dc591ef557d442c11e8c60e01c5932054e13e8cbb84a182f45e0 divvy-0.18.1-debug.js
331f0baff46af44933a8fa31f128132945ff82a147acfff0a7315adb446e3de0 divvy-0.18.1-min.js
26324bb0725d2d484fe3b6086335d49734f45dc647b07c60746e0d8619f1ed3e divvy-0.18.1.js
- Convert from Flow to TypeScript
- Use ES Module syntax (Babel still compiles these to common.js modules for distribution)
- Docs: Improve escrow creation example/test
- Fix type errors
- Fix lint errors
- Update ws dependency to 3.3.1
- Remove unnecessary polyfills
- Fix lint errors (#786, #808)
- Update divvy-keypairs dependency to 0.10.1
The SHA-256 checksums for the browser version of this release can be found below.
% shasum -a 256 *
b52f251eedac2509d72093eab1e8dba0d0f4a9fe6a28ec1cc90853cfb0fd7110 divvy-0.17.9-debug.js
d577a2bbdbdf7535c5365a1c52a2a31989d1b966e30abcba65c87133a536b9dc divvy-0.17.9-min.js
ff4c3002842fac72ec2ebbd081e9594b0de6050d4d051a8fd6c06adb9a351488 divvy-0.17.9.js
The SHA-1 checksums for the browser version of this release can be found below.
% shasum *
e1995afc34aef6accd269cfccc55a45619618a41 divvy-0.17.9-debug.js
e6ad9a9c111ab696f5637bfa372d80999e5ae362 divvy-0.17.9-min.js
4866494ec5f9095cc34bea142f1e2b8ac5f7fbf8 divvy-0.17.9.js
- Fix: Freezing in Safari 10.1 (updated bignumber.js) (closes #762)
- Fix:
getSettings
should include signers - Update for Node 6
- Update lodash dependency
- Migrate to yarn
- Replace AJV with jsonschema
- Bump
divvy-binary-codec
dependency version to 0.1.1 to fix issue withcomputeLedgerHash
for transactions withDeliverMin
BREAKING CHANGES
- Fix types of XDV values in
getServerInfo
response - Change error event format and fix crash due to error event on websocket
OTHER CHANGES
- Fix
generateAddress
docs and add error event listener to boilerplate - Allow setting
maxLedgerVersion
tonull
to specify no maximum - Add support for client certificates
getFee
returns a string not a float- Fix parsing of quality for
getTrustlines
- Fix
DeliverMin
value when specifyingminAmount
- http server example
BREAKING CHANGES
OTHER CHANGES
- Fix handling memos in
prepareSettings
- Docs: SusPay warnings, offline mode, and other tweaks
- Fix prepareOrderCancellation documentation
BREAKING CHANGES
prepareOrderCancellation
now takes orderCancellation specification- Rename "ledgerClosed" event to "ledger" and change format
OTHER CHANGES
- Fix proxy support and add support for proxy authorization
- Fix trace option
- Allow memos on all transaction types
- Add documentation for DivvyAPI options
- Docs: more on basic types, tx types
- Docs: revised introductory material
- boost coverage to almost 100%
BREAKING CHANGES
- Add new DivvyAPI interface and delete old API
OTHER CHANGES
- Removed timeout method of Request and added default timeout
- Add Remote.closeCurrentPathFind function, so current pathfind can be properly closed
- Implement Balance Sheet API
- Fix bugs in orderbook subscription
- Fix crash due to divvyd slowDown error
- Fix: Emit error events and return error on pathfind
- Deprecate core and remove snake case method copying
- Fix RangeSet for validated_ledger as single ledger
- Fix bug where the paths would be set with an empty array
- Fix reserve calculation
- Improve performance of orderbook
- Remove Firefox warning about prototype overwrite
- Fix compare bug in
Amount
class
- Add offer autobridging
- Prevent crash when listening for "model" events on the OrderBook class
- Fix empty order edgecase
- Fix AutobridgeCalculator (RT-3445)
- Update sjcl and delete custom ripemd160, montgomery, and jacobi
- Fix transaction summary for transactions that fail with remoteError
- Fix serializedobject append for excessively large bytes length
- Switch to sjcl npm module
- Add babel transpiler
- Remove unused float.js and wallet.js
- Remove config singleton to reduce global state
- Add getLedgerSequence to Remote
- Improve randomness when generating ECDSA signatures
- Improve SerializedObject.append performance
- Add
Amount.scale
. Multiply an amount’s value by a scale factor
BREAKING CHANGES
OTHER CHANGES
- Fix taker pays funded calculation
- Fix order funded amount calculation
- Fix handling of quality in order book
- Fix currency parsing of non-alphanumeric and no-currency currencies
- Add Amount.strict_mode for toggling range validation
- Add filename and line number to log, use log.warn() for deprecations
- Add GlobalFreeze and NoFreeze flags
- Fix handling of falsy parameters in requestLedger
- Fix Base:decode
- Fix Amount: clone in ratio_human, product_human
- Fix Amount.to_human for very small numbers
- Refactor base conversion
- Update binary transaction format
- Add DefaultDivvy account flag
- Remove
Features
field requirement inSetFee
transaction format - Remove
RegularKey
field requirement inSetRegularKey
transaction format
BREAKING CHANGES
- REMOVED Remote storage interface
- REMOVED Remote
ping
configuration - REMOVED Old/deprecated Remote server configuration (websocket_ip, websocket_port)
- REMOVED browser
online
reconnect listener - Remove
jsbn
and usebignumber.js
instead for big number math - The
allow_nan
flag has been removed. Results for invalid amounts will always beNaN
OTHER CHANGES
- Add deprecation warnings to request constructors. The first argument to request constructor functions should be an object containing request properties
- Fix taker_gets_funded exceeding offer.TakerGets
- Fix unsymmetric memo serializing
- Fix IOU value passed to
Amount.from_json()
- Update transaction binary parsing to account for XDV delivered amounts
- Bumped dependencies
- Track the funded status of an order based on cumulative account orders and 67d3973
- Remove blobvault client from divvy-lib, use the
divvy-vault-client
instead 9b3d62b7 - Add support for
ledger
option in requestBookOffers - Add support for
limit
option in requestBookOffers - Add
ledgerSelect
request constructor inRemote
- Default to binary data for commands that accept the binary flag
- Fix metadata account check
- Double check
tes
code before emittingsuccess
- Decrease redundancy in binary account_tx parsing
- Abort server connection on unrecoverable TLS error
- Fix complete ledgers check on subscription that is not initial
- Transaction changes
- Important
tef*
andtel*
and errors will no longer be presented as final. Rather than considering these errors final, divvy-lib will wait until theLastLedgerSequence
specified in the transaction is exceeded. This makes failures more definitive, and ensures that no transaction will resubmit indefinitely. - A new, final tej-class error is introduced to account for transactions that
are locally determined to have expired:
tejMaxLedger
. - Allow per transaction fees to be set,
transaction.setFixedFee()
- Improve memo support
- Add
MemoFormat
property for memo - Enforce
MemoFormat
andMemoType
to be valid ASCII - Support
text
andjson
MemoFormat
- Add
- Update sjcl library
- Improved entropy by taking advantage of platform crypto
- Use jscl's k256 curve instead of altering the c256 curve with k256 configuration
- Deprecated: The c256 curve is linked to the k256 curve to provide backwards compatibility, this link will be removed in the future
- Fix empty queue check on reconnect
- Normalize offers from book_offers and transaction stream
- Fix: Amount.to_human() precision rounding
- Fix: fractional drops in funded taker_pays setter
- Change
presubmit
to emit immediately before transaction submit - Add a "core" browser build of divvy-lib which has a subset of features and smaller file size
- Update binformat with missing fields from divvyd
- Wait for transaction validation before returning
tec
error - Change default
max_fee
onRemote
to1 XDV
- Fix: Request ledger_accept should return the Remote
BREAKING CHANGES
OTHER CHANGES
- Add paging behavior for account requests,
account_lines
andaccount_offers
- Add max_fee setter to transactions to set max fee the submitter is willing to pay
- Fix: cap IOU Amounts to their max and min value
Example on how to use paging with account_offers
:
// A valid `ledger_index` or `ledger_hash` is required to provide a reliable result.
// Results can change between ledger closes, so the provided ledger will be used as base.
var options = {
account: < divvyAccount >,
limit: < Number between 10 and 400 >,
ledger: < valid ledger_index or ledger_hash >
}
// The `marker` comes back in an account request if there are more results than are returned
// in the current response. The amount of results per response are determined by the `limit`.
if (marker) {
options.marker = < marker >;
}
var request = remote.requestAccountOffers(options);
- Switch account requests to use ledgerSelect rather than ledgerChoose (278df90)
- Deprecated setting
ident
andaccount_index
on account requests (278df90) - Change initial account transaction sequence to 1 (a3c1d06)
- Fix: instance transaction without remote (d3b6b81)
- Fix: account root request ledger argument (bc1f9f8)
- Fix: rsign.js local signing and example (d3b6b81 and f1004c6)
BREAKING CHANGES
- Make maxLoops in seed.get_key optional. Example use in tests (23e473b)
OTHER CHANGES
- Add routes to the vault client for KYC attestations (ed2da574)
- Currency: add
show_interest
flag to show or hide interest inCurrency.to_human()
andCurrency.to_json()
Example use in tests - Configurable maxAttempts for transaction submission (d107092)
- Binformat: added missing TransactionResult options (6abed8d)
- Shrinkwrap packages for dependency locking (2dcd5f9)
- Fix: Amount.to_human() precision bugs (4be209e and 7708c64)
- Fix: change handling of requestLedger options (57b7030)
- Currency: Allow mixed letters and numbers in currencies
- Deprecate account_tx map/reduce/filterg
- Fix: correct requestLedger arguments
- Fix: missing subscription on error events for some server methods
- Fix: orderbook reset on reconnect
- Fix: divvy-lib crashing. Add potential missing error handlers
- Wallet: Add Wallet class that generates wallets
- Make npm test runnable in Windows.
- Fix several stability issues, see merged PR's for details
- Fix bug in Amount.to_human_full()
- Fix undefined fee states when connecting to a divvyd that is syncing
- Orderbook: Added tracking of offer funds for determining when offers are not funded
- Orderbook: Added tests
- Orderbook: Update owner funds
- Transactions: If transaction errs with
tefALREADY
, wait until all possible submissions err with the same before emittingerror
. Fixes a client "Transaction malformed" bug. - Transactions: Track submissions, don't bother submitting to unconnected servers
- 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 Divvy value
- Amount: Make Constants static fields on the class, instead of a separate export
- Improvements to multi-server support. Fixed an issue where a server's score was not reset and connections would keep dropping after being connected for a significant amount of time.
- Improvements in order book support. Added support for currency pairs with interest bearing currencies. You can request an order book with hex, ISO code or full name for the currency.
- Fix value parsing for amount/currency order pairs, e.g.
Amount.from_human("XAU 12345.6789")
- Improved Amount parsing from human readable string given a hex currency, e.g.
Amount.from_human("10 015841551A748AD2C1F76FF6ECB0CCCD00000000")
- Improvements to username normalization in the vault client
- Add 2-factor authentication support for vault client
- Removed vestiges of Grunt, switched to Gulp
-
Deprecations
- Removed humanistic amount detection in
transaction.payment
. Passing1XDV
as the payment amount no longer works. remote.setServer
uses full server URL rather than hostname. Example:remote.setServer('wss://s
.xdv.io:443')`- Removed constructors for deprecated transaction types from
transaction.js
. - Removed
invoiceID
option fromtransaction.payment
. Instead, use thetransaction.invoiceID
method. - Removed
transaction.transactionManager
getter.
- Removed humanistic amount detection in
-
Improved multi-server support. Servers are now ranked dynamically, and transactions are broadcasted to all connected servers.
-
Automatically ping connected servers. Client configuration now should contain
ping: <seconds>
to specify the ping interval. -
Added
transaction.lastLedger
to specifyLastLedgerSequence
. Setting it this way also ensures that the sequence is not bumped on subsequent requests. -
Added optional
remote.accountTx
binary parsing.{ binary: true, parseBinary: false }
-
Added full currency name support, e.g.
Currency.from_json('XDV').to_human({full_name:'Divvys'})
will returnXDV - Divvys
-
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 divvy's namespace and blob vault or 3rd party blob vaults using divvy's blob vault software (https://github.com/xdv/divvy-blobvault). A list of the available functions can be found at docs/VAULTCLIENT.md
LastLedgerSequence
is set by default on outgoing transactions. This refers to the last valid ledger index (AKA sequence) for a transaction. By default, this index is set to the current index (at submission time) plus 8. In theory, this allows divvy-lib to deterministically fail a transaction whose submission request timed out, but whose associated server continues to emit ledger_closed events.- Transactions that err with
telINSUF_FEE_P
will be automatically resubmitted. This error indicates that theFee
supplied in the transaction submission request was inadequate. Ideally, theFee
is tracked by divvy-lib in real-time, and the resubmitted transaction will most likely succeed. - Added Transaction.iff(function(callback) { }). Callback expects first argument to be an Error or null, second argument is a boolean which indicates whether or not to proceed with the transaction submission. If an
iff
function is specified, it will be executed prior to every submission of the transaction (including resubmissions). - Transactions will now emit
presubmit
andpostsubmit
events. They will be emitted before and after a transaction is submitted, respectively. - Added Transaction.summary(). Returns a summary of a transaction in semi-human-readable form. JSON-stringifiable.
- Remote.requestAccountTx() with
binary: true
will automatically parse transactions. - Added Remote.requestAccountTx filter, map, and reduce.
remote.requestAccountTx({
account: 'retc',
ledger_index_min: -1,
ledger_index_max: -1,
limit: 100,
binary: true,
filter: function(transaction) {
return transaction.tx.TransactionType === 'Payment';
},
map: function(transaction) {
return Number(transaction.tx.Amount);
},
reduce: function(a, b) {
return a + b;
},
pluck: 'transactions'
}, console.log)
- Added persistence hooks.
- General performance improvements, especially for long-running processes.