SEPs / Toml
StellarToml.Resolver
Resolver allows resolving stellar.toml files.
class Resolver { constructor(); static resolve(domain: string, opts: StellarTomlResolveOptions = {}): Promise<StellarToml>;}Source: src/stellartoml/index.ts:16
new Resolver()
constructor();Resolver.resolve(domain, opts)
Returns a parsed stellar.toml file for a given domain.
static resolve(domain: string, opts: StellarTomlResolveOptions = {}): Promise<StellarToml>;Parameters
domain—string(required) — Domain to get stellar.toml file foropts—StellarTomlResolveOptions(optional) (default:{}) — (optional) Options objectallowHttp(optional): Allow connecting to http servers. This must be set to false in production deployments!timeout(optional): Allow a timeout. Allows user to avoid nasty lag due to TOML resolve issue.
Returns
A Promise that resolves to the parsed stellar.toml object
Example
StellarSdk.StellarToml.Resolver.resolve('acme.com') .then(stellarToml => { // stellarToml in an object representing domain stellar.toml file. }) .catch(error => { // stellar.toml does not exist or is invalid });See also
Stellar.toml doc
Source: src/stellartoml/index.ts:38
StellarToml.STELLAR_TOML_MAX_SIZE
The maximum size of stellar.toml file, in bytes
const STELLAR_TOML_MAX_SIZE: numberSource: src/stellartoml/index.ts:11
Types
StellarToml.Api.ContractId
type ContractId = stringSource: src/stellartoml/index.ts:101
StellarToml.Api.Currency
interface Currency { anchor_asset?: string; anchor_asset_type?: "fiat" | "crypto" | "nft" | "stock" | "bond" | "commodity" | "realestate" | "other"; approval_criteria?: string; approval_server?: string; attestation_of_reserve?: string; attestation_of_reserve_amount?: string; attestation_of_reserve_last_audit?: string; code?: string; code_template?: string; collateral_address_messages?: string[]; collateral_address_signatures?: string[]; collateral_addresses?: string[]; conditions?: string; desc?: string; display_decimals?: number; fixed_number?: number; image?: string; is_asset_anchored?: boolean; is_unlimited?: boolean; issuer?: string; max_number?: number; name?: string; redemption_instructions?: string; regulated?: boolean; status?: "live" | "dead" | "test" | "private";}Source: src/stellartoml/index.ts:134
currency.anchor_asset
anchor_asset?: string;Source: src/stellartoml/index.ts:155
currency.anchor_asset_type
anchor_asset_type?: "fiat" | "crypto" | "nft" | "stock" | "bond" | "commodity" | "realestate" | "other";Source: src/stellartoml/index.ts:146
currency.approval_criteria
approval_criteria?: string;Source: src/stellartoml/index.ts:167
currency.approval_server
approval_server?: string;Source: src/stellartoml/index.ts:166
currency.attestation_of_reserve
attestation_of_reserve?: string;Source: src/stellartoml/index.ts:156
currency.attestation_of_reserve_amount
attestation_of_reserve_amount?: string;Source: src/stellartoml/index.ts:157
currency.attestation_of_reserve_last_audit
attestation_of_reserve_last_audit?: string;Source: src/stellartoml/index.ts:158
currency.code
code?: string;Source: src/stellartoml/index.ts:135
currency.code_template
code_template?: string;Source: src/stellartoml/index.ts:136
currency.collateral_address_messages
collateral_address_messages?: string[];Source: src/stellartoml/index.ts:164
currency.collateral_address_signatures
collateral_address_signatures?: string[];Source: src/stellartoml/index.ts:165
currency.collateral_addresses
collateral_addresses?: string[];Source: src/stellartoml/index.ts:163
currency.conditions
conditions?: string;Source: src/stellartoml/index.ts:142
currency.desc
desc?: string;Source: src/stellartoml/index.ts:141
currency.display_decimals
display_decimals?: number;Source: src/stellartoml/index.ts:138
currency.fixed_number
fixed_number?: number;Source: src/stellartoml/index.ts:143
currency.image
image?: string;Source: src/stellartoml/index.ts:161
currency.is_asset_anchored
is_asset_anchored?: boolean;Source: src/stellartoml/index.ts:145
currency.is_unlimited
is_unlimited?: boolean;Source: src/stellartoml/index.ts:159
currency.issuer
issuer?: string;Source: src/stellartoml/index.ts:137
currency.max_number
max_number?: number;Source: src/stellartoml/index.ts:144
currency.name
name?: string;Source: src/stellartoml/index.ts:140
currency.redemption_instructions
redemption_instructions?: string;Source: src/stellartoml/index.ts:160
currency.regulated
regulated?: boolean;Source: src/stellartoml/index.ts:162
currency.status
status?: "live" | "dead" | "test" | "private";Source: src/stellartoml/index.ts:139
StellarToml.Api.Documentation
interface Documentation { ORG_DBA?: string; ORG_DESCRIPTION?: string; ORG_GITHUB?: string; ORG_KEYBASE?: string; ORG_LICENSE_NUMBER?: string; ORG_LICENSE_TYPE?: string; ORG_LICENSING_AUTHORITY?: string; ORG_LOGO?: string; ORG_NAME?: string; ORG_OFFICIAL_EMAIL?: string; ORG_PHONE_NUMBER?: string; ORG_PHONE_NUMBER_ATTESTATION?: string; ORG_PHYSICAL_ADDRESS?: string; ORG_PHYSICAL_ADDRESS_ATTESTATION?: string; ORG_SUPPORT_EMAIL?: string; ORG_TWITTER?: string; ORG_URL?: string;}Source: src/stellartoml/index.ts:103
documentation.ORG_DBA
ORG_DBA?: string;Source: src/stellartoml/index.ts:105
documentation.ORG_DESCRIPTION
ORG_DESCRIPTION?: string;Source: src/stellartoml/index.ts:112
documentation.ORG_GITHUB
ORG_GITHUB?: string;Source: src/stellartoml/index.ts:120
documentation.ORG_KEYBASE
ORG_KEYBASE?: string;Source: src/stellartoml/index.ts:118
documentation.ORG_LICENSE_NUMBER
ORG_LICENSE_NUMBER?: string;Source: src/stellartoml/index.ts:109
documentation.ORG_LICENSE_TYPE
ORG_LICENSE_TYPE?: string;Source: src/stellartoml/index.ts:111
documentation.ORG_LICENSING_AUTHORITY
ORG_LICENSING_AUTHORITY?: string;Source: src/stellartoml/index.ts:110
documentation.ORG_LOGO
ORG_LOGO?: string;Source: src/stellartoml/index.ts:108
documentation.ORG_NAME
ORG_NAME?: string;Source: src/stellartoml/index.ts:104
documentation.ORG_OFFICIAL_EMAIL
ORG_OFFICIAL_EMAIL?: string;Source: src/stellartoml/index.ts:116
documentation.ORG_PHONE_NUMBER
ORG_PHONE_NUMBER?: string;Source: src/stellartoml/index.ts:107
documentation.ORG_PHONE_NUMBER_ATTESTATION
ORG_PHONE_NUMBER_ATTESTATION?: string;Source: src/stellartoml/index.ts:115
documentation.ORG_PHYSICAL_ADDRESS
ORG_PHYSICAL_ADDRESS?: string;Source: src/stellartoml/index.ts:113
documentation.ORG_PHYSICAL_ADDRESS_ATTESTATION
ORG_PHYSICAL_ADDRESS_ATTESTATION?: string;Source: src/stellartoml/index.ts:114
documentation.ORG_SUPPORT_EMAIL
ORG_SUPPORT_EMAIL?: string;Source: src/stellartoml/index.ts:117
documentation.ORG_TWITTER
ORG_TWITTER?: string;Source: src/stellartoml/index.ts:119
documentation.ORG_URL
ORG_URL?: string;Source: src/stellartoml/index.ts:106
StellarToml.Api.ISODateTime
type ISODateTime = stringSource: src/stellartoml/index.ts:102
StellarToml.Api.Principal
interface Principal { email: string; github?: string; id_photo_hash?: string; keybase?: string; name: string; telegram?: string; twitter?: string; verification_photo_hash?: string;}Source: src/stellartoml/index.ts:123
principal.email
email: string;Source: src/stellartoml/index.ts:125
principal.github
github?: string;Source: src/stellartoml/index.ts:126
principal.id_photo_hash
id_photo_hash?: string;Source: src/stellartoml/index.ts:130
principal.keybase
keybase?: string;Source: src/stellartoml/index.ts:127
principal.name
name: string;Source: src/stellartoml/index.ts:124
principal.telegram
telegram?: string;Source: src/stellartoml/index.ts:128
principal.twitter
twitter?: string;Source: src/stellartoml/index.ts:129
principal.verification_photo_hash
verification_photo_hash?: string;Source: src/stellartoml/index.ts:131
StellarToml.Api.PublicKey
type PublicKey = stringSource: src/stellartoml/index.ts:100
StellarToml.Api.StellarToml
interface StellarToml { ACCOUNTS?: string[]; ANCHOR_QUOTE_SERVER?: string; CURRENCIES?: Currency[]; DIRECT_PAYMENT_SERVER?: string; DOCUMENTATION?: Documentation; FEDERATION_SERVER?: string; HORIZON_URL?: string; KYC_SERVER?: string; NETWORK_PASSPHRASE?: Networks; PRINCIPALS?: Principal[]; SIGNING_KEY?: string; TRANSFER_SERVER?: string; TRANSFER_SERVER_SEP0024?: string; URI_REQUEST_SIGNING_KEY?: string; VALIDATORS?: Validator[]; VERSION?: string; WEB_AUTH_CONTRACT_ID?: string; WEB_AUTH_ENDPOINT?: string; WEB_AUTH_FOR_CONTRACTS_ENDPOINT?: string;}Source: src/stellartoml/index.ts:182
stellarToml.ACCOUNTS
ACCOUNTS?: string[];Source: src/stellartoml/index.ts:184
stellarToml.ANCHOR_QUOTE_SERVER
ANCHOR_QUOTE_SERVER?: string;Source: src/stellartoml/index.ts:197
stellarToml.CURRENCIES
CURRENCIES?: Currency[];Source: src/stellartoml/index.ts:200
stellarToml.DIRECT_PAYMENT_SERVER
DIRECT_PAYMENT_SERVER?: string;Source: src/stellartoml/index.ts:196
stellarToml.DOCUMENTATION
DOCUMENTATION?: Documentation;Source: src/stellartoml/index.ts:198
stellarToml.FEDERATION_SERVER
FEDERATION_SERVER?: string;Source: src/stellartoml/index.ts:192
stellarToml.HORIZON_URL
HORIZON_URL?: string;Source: src/stellartoml/index.ts:194
stellarToml.KYC_SERVER
KYC_SERVER?: string;Source: src/stellartoml/index.ts:188
stellarToml.NETWORK_PASSPHRASE
NETWORK_PASSPHRASE?: Networks;Source: src/stellartoml/index.ts:185
stellarToml.PRINCIPALS
PRINCIPALS?: Principal[];Source: src/stellartoml/index.ts:199
stellarToml.SIGNING_KEY
SIGNING_KEY?: string;Source: src/stellartoml/index.ts:193
stellarToml.TRANSFER_SERVER
TRANSFER_SERVER?: string;Source: src/stellartoml/index.ts:187
stellarToml.TRANSFER_SERVER_SEP0024
TRANSFER_SERVER_SEP0024?: string;Source: src/stellartoml/index.ts:186
stellarToml.URI_REQUEST_SIGNING_KEY
URI_REQUEST_SIGNING_KEY?: string;Source: src/stellartoml/index.ts:195
stellarToml.VALIDATORS
VALIDATORS?: Validator[];Source: src/stellartoml/index.ts:201
stellarToml.VERSION
VERSION?: string;Source: src/stellartoml/index.ts:183
stellarToml.WEB_AUTH_CONTRACT_ID
WEB_AUTH_CONTRACT_ID?: string;Source: src/stellartoml/index.ts:191
stellarToml.WEB_AUTH_ENDPOINT
WEB_AUTH_ENDPOINT?: string;Source: src/stellartoml/index.ts:189
stellarToml.WEB_AUTH_FOR_CONTRACTS_ENDPOINT
WEB_AUTH_FOR_CONTRACTS_ENDPOINT?: string;Source: src/stellartoml/index.ts:190
StellarToml.Api.StellarTomlResolveOptions
interface StellarTomlResolveOptions { allowedRedirects?: number; allowHttp?: boolean; timeout?: number;}Source: src/stellartoml/index.ts:94
stellarTomlResolveOptions.allowedRedirects
allowedRedirects?: number;Source: src/stellartoml/index.ts:97
stellarTomlResolveOptions.allowHttp
allowHttp?: boolean;Source: src/stellartoml/index.ts:95
stellarTomlResolveOptions.timeout
timeout?: number;Source: src/stellartoml/index.ts:96
StellarToml.Api.Url
type Url = stringSource: src/stellartoml/index.ts:99
StellarToml.Api.Validator
interface Validator { ALIAS?: string; DISPLAY_NAME?: string; HISTORY?: string; HOST?: string; PUBLIC_KEY?: string;}Source: src/stellartoml/index.ts:171
validator.ALIAS
ALIAS?: string;Source: src/stellartoml/index.ts:172
validator.DISPLAY_NAME
DISPLAY_NAME?: string;Source: src/stellartoml/index.ts:173
validator.HISTORY
HISTORY?: string;Source: src/stellartoml/index.ts:176
validator.HOST
HOST?: string;Source: src/stellartoml/index.ts:175
validator.PUBLIC_KEY
PUBLIC_KEY?: string;Source: src/stellartoml/index.ts:174