Simple PayID utility functions
$ yarn add payid-lib
or with npm:
$ npm install payid-lib
- parsePayId(payId) ⇒
-
Parse a PayID into PayIdComponents.
- isValidPayId(payId) ⇒
-
Check whether a string is syntactically a valid PayID.
- resolvePayId(payId, options)
-
Retrieve one or more addresses associated with a PayID.
By default, this retrieves all of a PayID's addresses by passing the
payid
network in the header of the request.To retrieve an address for a particular payment network, set
options.network
to the desired PaymentNetwork.
Parse a PayID into PayIdComponents.
Kind: global function
Returns: the PayIdComponents if the PayID is syntactically valid, otherwise undefined
Param | Description |
---|---|
payId | the PayID to parse |
Check whether a string is syntactically a valid PayID.
Kind: global function
Returns: true
if the PayID is valid, otherwise false
Param | Description |
---|---|
payId | the PayID to check |
Retrieve one or more addresses associated with a PayID.
By default, this retrieves all of a PayID's addresses by passing the payid
network in the header of the request.
To retrieve an address for a particular payment network, set options.network
to the desired PaymentNetwork.
Kind: global function
Param | Description |
---|---|
payId | The PayID to resolve for one or more addresses |
options | Options object |
options.network | The network to retrieve an address for |
options.useInsecureHttp | If true , http will be used. Use for testing purposes only. Defaults to false
|
- Node.js LTS
- Yarn
- TypeScript
- Linting with eslint
- Testing with Jest
- Code coverage
- compile
- Runs typescript (tsc) and outputs to
./dist
- Runs typescript (tsc) and outputs to
- lint
- Runs eslint (use
--fix
to automatically fix issues)
- Runs eslint (use
- test
- Runs jest testing framework
- coverage
- Collects code coverage information and outputs to
./coverage
- Collects code coverage information and outputs to
- docs
- Generate README.md (from README.hbs and jsdoc2md) and
./docs
(withtypedoc
)
- Generate README.md (from README.hbs and jsdoc2md) and