nxt.convert.id: Convert NXT IDs between internal H2 DB format and canonical...

Description Usage Arguments Details Value Author(s) See Also

Description

NXT IDs (e.g., for accounts or transactions or blocks) are stored internally in the NXT H2 database as signed long. When querying the database, these are converted to strings to avoid loss of precision, but IDs are not converted by the database to the canonical unsigned long format used by NXT. This function converts IDs back and forth between unsigned and signed long using bigz objects from the gmp package.

Usage

1
nxt.convert.id(id, from.db = any(as.bigz(id) < 0))

Arguments

id

a vector of NXT ids. Can be of any type that can be converted to bigz.

from.db

Boolean. If true, try to convert id to canonical unsigned long NXT ID format. If false, converts from unsigned long to signed long. By default, will try to automatically convert from the presumed input format to the other.

Details

For efficiency, results are always returned as character strings.

Value

A vector of character strings containing the IDs in the desired format.

Author(s)

David M. Kaplan dmkaplan2000@gmail.com

See Also

bigz


dmkaplan2000/Rxt documentation built on May 15, 2019, 9:35 a.m.