stellar-sdk
Advanced tools
Comparing version 10.3.0 to 10.4.0
@@ -9,2 +9,15 @@ # Changelog | ||
## [v10.4.0](https://github.com/stellar/js-stellar-sdk/compare/v10.3.0...v10.4.0) | ||
### Add | ||
- Add [SEP-1](https://stellar.org/protocol/sep-1) fields to `StellarTomlResolver` for type checks ([#794](https://github.com/stellar/js-stellar-sdk/pull/794)). | ||
- Add support for passing `X-Auth-Token` as a custom header ([#795](https://github.com/stellar/js-stellar-sdk/pull/795)). | ||
### Update | ||
- Bumps `stellar-base` version to [v8.2.1](https://github.com/stellar/js-stellar-base/releases/tag/v8.2.1) to include latest fixes. | ||
## [v10.3.0](https://github.com/stellar/js-stellar-sdk/compare/v10.2.0...v10.3.0) | ||
@@ -11,0 +24,0 @@ |
@@ -52,2 +52,3 @@ import { Asset, FeeBumpTransaction, Transaction } from "stellar-base"; | ||
appVersion?: string; | ||
authToken?: string; | ||
} | ||
@@ -54,0 +55,0 @@ interface Timebounds { |
@@ -51,2 +51,5 @@ "use strict"; | ||
} | ||
if (opts.authToken) { | ||
customHeaders["X-Auth-Token"] = opts.authToken; | ||
} | ||
if (!isEmpty_1.default(customHeaders)) { | ||
@@ -53,0 +56,0 @@ horizon_axios_client_1.default.interceptors.request.use(function (config) { |
@@ -0,6 +1,5 @@ | ||
import { Networks } from "stellar-base"; | ||
export declare const STELLAR_TOML_MAX_SIZE: number; | ||
export declare class StellarTomlResolver { | ||
static resolve(domain: string, opts?: StellarTomlResolver.StellarTomlResolveOptions): Promise<{ | ||
[key: string]: any; | ||
}>; | ||
static resolve(domain: string, opts?: StellarTomlResolver.StellarTomlResolveOptions): Promise<StellarTomlResolver.StellarToml>; | ||
} | ||
@@ -12,2 +11,92 @@ export declare namespace StellarTomlResolver { | ||
} | ||
type Url = string; | ||
type PublicKey = string; | ||
type ISODateTime = string; | ||
interface Documentation { | ||
ORG_NAME?: string; | ||
ORG_DBA?: string; | ||
ORG_URL?: Url; | ||
ORG_PHONE_NUMBER?: string; | ||
ORG_LOGO?: Url; | ||
ORG_LICENSE_NUMBER?: string; | ||
ORG_LICENSING_AUTHORITY?: string; | ||
ORG_LICENSE_TYPE?: string; | ||
ORG_DESCRIPTION?: string; | ||
ORG_PHYSICAL_ADDRESS?: string; | ||
ORG_PHYSICAL_ADDRESS_ATTESTATION?: string; | ||
ORG_PHONE_NUMBER_ATTESTATION?: string; | ||
ORG_OFFICIAL_EMAIL?: string; | ||
ORG_SUPPORT_EMAIL?: string; | ||
ORG_KEYBASE?: string; | ||
ORG_TWITTER?: string; | ||
ORG_GITHUB?: string; | ||
[key: string]: unknown; | ||
} | ||
interface Principal { | ||
name: string; | ||
email: string; | ||
github?: string; | ||
keybase?: string; | ||
telegram?: string; | ||
twitter?: string; | ||
id_photo_hash?: string; | ||
verification_photo_hash?: string; | ||
[key: string]: unknown; | ||
} | ||
interface Currency { | ||
code?: string; | ||
code_template?: string; | ||
issuer?: PublicKey; | ||
display_decimals?: number; | ||
status?: "live" | "dead" | "test" | "private"; | ||
name?: string; | ||
desc?: string; | ||
conditions?: string; | ||
fixed_number?: number; | ||
max_number?: number; | ||
is_asset_anchored?: boolean; | ||
anchor_asset_type?: "fiat" | "crypto" | "nft" | "stock" | "bond" | "commodity" | "realestate" | "other"; | ||
anchor_asset?: string; | ||
attestation_of_reserve?: Url; | ||
attestation_of_reserve_amount?: string; | ||
attestation_of_reserve_last_audit?: ISODateTime; | ||
is_unlimited?: boolean; | ||
redemption_instructions?: string; | ||
image?: Url; | ||
regulated?: boolean; | ||
collateral_addresses?: string[]; | ||
collateral_address_messages?: string[]; | ||
collateral_address_signatures?: string[]; | ||
approval_server?: Url; | ||
approval_criteria?: string; | ||
[key: string]: unknown; | ||
} | ||
interface Validator { | ||
ALIAS?: string; | ||
DISPLAY_NAME?: string; | ||
PUBLIC_KEY?: PublicKey; | ||
HOST?: string; | ||
HISTORY?: Url; | ||
[key: string]: unknown; | ||
} | ||
interface StellarToml { | ||
VERSION?: string; | ||
ACCOUNTS?: PublicKey[]; | ||
NETWORK_PASSPHRASE?: Networks; | ||
TRANSFER_SERVER_SEP0024?: Url; | ||
TRANSFER_SERVER?: Url; | ||
KYC_SERVER?: Url; | ||
WEB_AUTH_ENDPOINT?: Url; | ||
FEDERATION_SERVER?: Url; | ||
SIGNING_KEY?: PublicKey; | ||
HORIZON_URL?: Url; | ||
URI_REQUEST_SIGNING_KEY?: PublicKey; | ||
DIRECT_PAYMENT_SERVER?: Url; | ||
ANCHOR_QUOTE_SERVER?: Url; | ||
DOCUMENTATION?: Documentation; | ||
PRINCIPALS?: Principal[]; | ||
CURRENCIES?: Currency[]; | ||
VALIDATORS?: Validator[]; | ||
[key: string]: unknown; | ||
} | ||
} |
{ | ||
"name": "stellar-sdk", | ||
"version": "10.3.0", | ||
"version": "10.4.0", | ||
"description": "stellar-sdk is a library for working with the Stellar Horizon server.", | ||
@@ -141,3 +141,3 @@ "main": "./lib/index.js", | ||
"randombytes": "^2.1.0", | ||
"stellar-base": "^8.2.0", | ||
"stellar-base": "^8.2.1", | ||
"toml": "^2.3.0", | ||
@@ -144,0 +144,0 @@ "tslib": "^1.10.0", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
Found 1 instance in 1 package
2629990
53681
1
Updatedstellar-base@^8.2.1