@glacislabs/stablegenie-zerodelta 4.1.1 → 4.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -222,7 +222,11 @@ interface Chain {
222
222
  [k: string]: unknown;
223
223
  }
224
224
  interface Token {
225
+ /** The ASSET's symbol — the same on every chain, and the identifier the engine matches on. */
225
226
  symbol: string;
227
+ /** What this deployment calls itself on its own chain (`USD₮0` for USDT on Arbitrum). Display
228
+ * only — never an identifier. Absent on a gateway that predates it; print `tokenTicker(token)`. */
229
+ displaySymbol?: string;
226
230
  name?: string;
227
231
  chainId: number;
228
232
  address: string;
@@ -315,6 +319,8 @@ interface Quote {
315
319
  interface PayOption {
316
320
  symbol: string;
317
321
  symbolKey: string;
322
+ /** The deployment's own ticker, for labels (see `tokenTicker`). Absent = print `symbol`. */
323
+ ticker?: string;
318
324
  name: string;
319
325
  chainId: number;
320
326
  chainName: string;
@@ -368,12 +374,16 @@ interface RouteLeg {
368
374
  index: number;
369
375
  /** Symbol bid on this leg, or "" when the registry does not list that deployment. */
370
376
  fromAsset: string;
377
+ /** What `fromAsset` is called on `fromChainId` (`USD₮0`), for display. Absent = print `fromAsset`. */
378
+ fromTicker?: string;
371
379
  fromChainId: number;
372
380
  fromChainName: string;
373
381
  /** Formatted bid amount, or "" when the bid token's decimals are unknown. */
374
382
  fromAmount: string;
375
383
  /** Symbol asked on this leg, or "" when the registry does not list that deployment. */
376
384
  toAsset: string;
385
+ /** What `toAsset` is called on `toChainId`, for display. Absent = print `toAsset`. */
386
+ toTicker?: string;
377
387
  toChainId: number;
378
388
  toChainName: string;
379
389
  /** Formatted ask amount, or "" when the ask token's decimals are unknown. */
@@ -389,6 +399,8 @@ interface RouteResult {
389
399
  state: "DIRECT" | "ROUTE" | "SHORT";
390
400
  source: {
391
401
  asset: string;
402
+ /** The source deployment's own ticker, for display. `asset` stays the identifier. */
403
+ ticker?: string;
392
404
  chainId: number;
393
405
  chainName: string;
394
406
  tokenAddress?: string;
@@ -398,6 +410,8 @@ interface RouteResult {
398
410
  };
399
411
  receive: {
400
412
  asset: string;
413
+ /** The delivered deployment's own ticker, for display. `asset` stays the identifier. */
414
+ ticker?: string;
401
415
  chainId: number;
402
416
  chainName: string;
403
417
  tokenAddress?: string;
@@ -480,6 +494,9 @@ interface TxHistoryEntry {
480
494
  chainName?: string;
481
495
  fromAsset?: string;
482
496
  toAsset?: string;
497
+ /** Display tickers for `fromAsset` / `toAsset` on their chains. */
498
+ fromTicker?: string;
499
+ toTicker?: string;
483
500
  payAmount?: string;
484
501
  receiveAmount?: string;
485
502
  /** The signer (payer) — history is scoped per connected wallet. */
@@ -501,6 +518,9 @@ interface SanitizedTxEntry {
501
518
  chainName: string;
502
519
  fromAsset: string;
503
520
  toAsset: string;
521
+ /** Display tickers for `fromAsset` / `toAsset`. Absent on entries recorded before tickers existed. */
522
+ fromTicker?: string;
523
+ toTicker?: string;
504
524
  payAmount: string;
505
525
  receiveAmount: string;
506
526
  /** Normalized signer address, or "" when unknown. */
@@ -222,7 +222,11 @@ interface Chain {
222
222
  [k: string]: unknown;
223
223
  }
224
224
  interface Token {
225
+ /** The ASSET's symbol — the same on every chain, and the identifier the engine matches on. */
225
226
  symbol: string;
227
+ /** What this deployment calls itself on its own chain (`USD₮0` for USDT on Arbitrum). Display
228
+ * only — never an identifier. Absent on a gateway that predates it; print `tokenTicker(token)`. */
229
+ displaySymbol?: string;
226
230
  name?: string;
227
231
  chainId: number;
228
232
  address: string;
@@ -315,6 +319,8 @@ interface Quote {
315
319
  interface PayOption {
316
320
  symbol: string;
317
321
  symbolKey: string;
322
+ /** The deployment's own ticker, for labels (see `tokenTicker`). Absent = print `symbol`. */
323
+ ticker?: string;
318
324
  name: string;
319
325
  chainId: number;
320
326
  chainName: string;
@@ -368,12 +374,16 @@ interface RouteLeg {
368
374
  index: number;
369
375
  /** Symbol bid on this leg, or "" when the registry does not list that deployment. */
370
376
  fromAsset: string;
377
+ /** What `fromAsset` is called on `fromChainId` (`USD₮0`), for display. Absent = print `fromAsset`. */
378
+ fromTicker?: string;
371
379
  fromChainId: number;
372
380
  fromChainName: string;
373
381
  /** Formatted bid amount, or "" when the bid token's decimals are unknown. */
374
382
  fromAmount: string;
375
383
  /** Symbol asked on this leg, or "" when the registry does not list that deployment. */
376
384
  toAsset: string;
385
+ /** What `toAsset` is called on `toChainId`, for display. Absent = print `toAsset`. */
386
+ toTicker?: string;
377
387
  toChainId: number;
378
388
  toChainName: string;
379
389
  /** Formatted ask amount, or "" when the ask token's decimals are unknown. */
@@ -389,6 +399,8 @@ interface RouteResult {
389
399
  state: "DIRECT" | "ROUTE" | "SHORT";
390
400
  source: {
391
401
  asset: string;
402
+ /** The source deployment's own ticker, for display. `asset` stays the identifier. */
403
+ ticker?: string;
392
404
  chainId: number;
393
405
  chainName: string;
394
406
  tokenAddress?: string;
@@ -398,6 +410,8 @@ interface RouteResult {
398
410
  };
399
411
  receive: {
400
412
  asset: string;
413
+ /** The delivered deployment's own ticker, for display. `asset` stays the identifier. */
414
+ ticker?: string;
401
415
  chainId: number;
402
416
  chainName: string;
403
417
  tokenAddress?: string;
@@ -480,6 +494,9 @@ interface TxHistoryEntry {
480
494
  chainName?: string;
481
495
  fromAsset?: string;
482
496
  toAsset?: string;
497
+ /** Display tickers for `fromAsset` / `toAsset` on their chains. */
498
+ fromTicker?: string;
499
+ toTicker?: string;
483
500
  payAmount?: string;
484
501
  receiveAmount?: string;
485
502
  /** The signer (payer) — history is scoped per connected wallet. */
@@ -501,6 +518,9 @@ interface SanitizedTxEntry {
501
518
  chainName: string;
502
519
  fromAsset: string;
503
520
  toAsset: string;
521
+ /** Display tickers for `fromAsset` / `toAsset`. Absent on entries recorded before tickers existed. */
522
+ fromTicker?: string;
523
+ toTicker?: string;
504
524
  payAmount: string;
505
525
  receiveAmount: string;
506
526
  /** Normalized signer address, or "" when unknown. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@glacislabs/stablegenie-zerodelta",
3
- "version": "4.1.1",
3
+ "version": "4.2.0",
4
4
  "description": "Lightweight embeddable ZeroDelta payment + swap widget (exact-receive Pay and exact-in Swap). Wallet always owns the final signature.",
5
5
  "type": "module",
6
6
  "license": "MIT",