Members
(constant) AuthClawbackEnabledFlag
When set using Operation.setOptions
option, then any trustlines
created by this account can have a ClawbackOp operation submitted for the
corresponding asset.
- Source:
- See:
(constant) AuthImmutableFlag
When set using Operation.setOptions
option, then none of the
authorization flags can be set and the account can never be deleted.
- Source:
- See:
(constant) AuthRequiredFlag
When set using Operation.setOptions
option, requires the issuing
account to give other accounts permission before they can hold the issuing
account’s credit.
- Source:
- See:
(constant) AuthRevocableFlag
When set using Operation.setOptions
option, allows the issuing
account to revoke its credit held by other accounts.
- Source:
- See:
(constant) BASE_FEE
Minimum base fee for transactions. If this fee is below the network minimum, the transaction will fail. The more operations in the transaction, the greater the required fee. Use Server#fetchBaseFee to get an accurate value of minimum transaction fee on the network.
- Source:
- See:
(constant) FastSigning
Use this flag to check if fast signing (provided by sodium-native
package) is available.
If your app is signing a large number of transaction or verifying a large number
of signatures make sure sodium-native
package is installed.
- Source:
(constant) Networks :Object
Contains passphrases for common networks:
Networks.PUBLIC
:Public Global Stellar Network ; September 2015
Networks.TESTNET
:Test SDF Network ; September 2015
- Source:
Type:
-
Object
(constant) SERVER_TIME_MAP
keep a local map of server times (export this purely for testing purposes)
each entry will map the server domain to the last-known time and the local time it was recorded, ex:
"horizon-testnet.stellar.org": {
serverTime: 1552513039,
localTimeRecorded: 1552513052
}
- Source:
(constant) TimeoutInfinite
Methods
decodeAddressToMuxedAccount(address, supportMuxingopt) → {xdr.MuxedAccount}
Converts a Stellar address (in G... or M... form) to an XDR MuxedAccount structure, forcing the ed25519 representation by default.
This optionally (that is, opt-in only) supports proper muxed accounts, where an M... address will resolve to both its underlying G... address and an ID. Note that this behaviour will eventually be the default.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
address |
string
|
G... or M... address to encode into XDR |
|
supportMuxing |
bool
|
<optional> |
allows decoding of the muxed representation of the address, extracting the underlying ID from the M... address |
Returns:
- Type:
-
xdr.MuxedAccount
a muxed account object for this address string
encodeMuxedAccount(address, id) → {xdr.MuxedAccount}
Transform a Stellar address (G...) and an ID into its XDR representation.
Parameters:
Name | Type | Description |
---|---|---|
address |
string
|
a Stellar G... address |
id |
string
|
a Uint64 ID represented as a string |
Returns:
- Type:
-
xdr.MuxedAccount
- XDR representation of the above muxed account
encodeMuxedAccountToAddress(muxedAccount, supportMuxingopt) → {string}
Converts an xdr.MuxedAccount to its string representation.
By default, this returns its "G..." string representation (i.e. forcing the ed25519 representation), but can return the "M..." representation via opt-in.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
muxedAccount |
xdr.MuxedAccount
|
account to stringify |
|
supportMuxing |
bool
|
<optional> |
converts the object into its full, proper M... address, encoding both the underlying G... address and the muxing ID, but ONLY when the ID is present. |
Returns:
- Type:
-
string
stringified G... (corresponding to the underlying pubkey) or M... address (corresponding to both the key and the muxed ID)
getCurrentServerTime(hostname) → {number}
Given a hostname, get the current time of that server (i.e., use the last- recorded server time and offset it by the time since then.) If there IS no recorded server time, or it's been 5 minutes since the last, return null.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
hostname |
string
|
Hostname of a Horizon server. |
Returns:
- Type:
-
number
The UNIX timestamp (in seconds, not milliseconds)
representing the current time on that server, or null
if we don't have
a record of that time.
isValidDate(d) → {boolean}
Checks whether a provided object is a valid Date.
Parameters:
Name | Type | Description |
---|---|---|
d |
Date
|
date object |
Returns:
- Type:
-
boolean