Constructor
new URI()
URI Methods. Shall only be used on AmonLib.URI instance.
Do not instanciate by yourself.
Methods
parse(str) → (nullable) {Object|string|string|string}
This parses an URI to an object.
Input is a string, either an address or a valid URI
Parameters:
Name | Type | Description |
---|---|---|
str |
Object | address or URI |
Returns:
-
obj
- Type
- Object
-
obj.address
- Type
- string
-
obj.coinCode [BTC, ETH]
- Type
- string
-
obj.amount Amount requested, optional
- Type
- string
stringify(params) → {string}
This generate an URI string to be used in links or QR-code
Parameters:
Name | Type | Description | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
params |
Object |
Properties
|
Returns:
URI as text
- Type
- string