@stridge/kit 0.1.0-alpha.45 → 0.1.0-alpha.46

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.
@@ -1 +1 @@
1
- async function e(e,t,n,r){try{return await e.gateway.poll(t,{...n?{network_id:n.network_id,to_address:n.to_address,asset_symbol:n.asset_symbol}:{},signal:r})}catch(e){if(r.aborted)throw e;if(e.statusCode===404)return null;throw e}}export{e as pollOnce};
1
+ async function e(e,n,r,i){try{return t((await e.gateway.poll(n,{...r?{network_id:r.network_id,to_address:r.to_address,asset_symbol:r.asset_symbol}:{},signal:i})).udas,r)}catch(e){if(i.aborted)throw e;if(e.statusCode===404)return null;throw e}}function t(e,t){if(e.length===0)return null;if(!t)return e[0]??null;let n=t.to_address.toLowerCase(),r=t.asset_symbol.toUpperCase();return e.find(e=>e.destination.network_id===t.network_id&&(e.destination.asset_symbol??``).toUpperCase()===r&&(e.destination.address??``).toLowerCase()===n)??null}export{e as pollOnce};
@@ -1,7 +1,7 @@
1
1
  import { SettlementFailureKind } from "../../shared/driver/types.js";
2
2
  import { AddressItemPayload, BalanceItemPayload, BrandPayload, QuotePayload, SettlementFailurePayload, SettlementPayload, SettlementPendingPayload, SettlementSuccessPayload, TargetPayload, WalletInfo, WalletPayload } from "../../flows/deposit/driver/payloads.js";
3
3
  import { I18n } from "@lingui/core";
4
- import { DepositAddressDto, GatewayPollResponse, GatewaySettlementDto, GatewayStartResponse, OnchainBalanceResponse, QuoteResponse, SupportedAssetDto, SupportedAssetsResponse } from "@stridge/sdk";
4
+ import { DepositAddressDto, GatewaySettlementDto, GatewayStartResponse, GatewayUdaDto, OnchainBalanceResponse, QuoteResponse, SupportedAssetDto, SupportedAssetsResponse } from "@stridge/sdk";
5
5
 
6
6
  //#region src/drivers/stridge-mock/fixtures.d.ts
7
7
  /**
@@ -1,6 +1,6 @@
1
1
  import { Entity, SettlementFailureKind, TxRef } from "../../../shared/driver/types.js";
2
2
  import { AcceptedAssetPayload, AddressItemPayload, AssetPayload, BalanceItemPayload, BrandPayload, ChainPayload, QuoteBreakdownPayload, QuotePayload, QuoteRoutePayload, SettlementFailurePayload, SettlementPayload, SettlementPendingPayload, SettlementSuccessPayload, SourceWalletPayload, TargetPayload, WalletInfo, WalletPayload } from "./payloads.js";
3
- import { DepositAddressDto, GatewayPollResponse, GatewaySettlementDto, GatewayStartResponse, OnchainBalanceResponse, QuoteResponse, SupportedAssetDto, SupportedAssetsResponse } from "@stridge/sdk";
3
+ import { DepositAddressDto, GatewaySettlementDto, GatewayStartResponse, GatewayUdaDto, OnchainBalanceResponse, QuoteResponse, SupportedAssetDto, SupportedAssetsResponse } from "@stridge/sdk";
4
4
 
5
5
  //#region src/flows/deposit/driver/types.d.ts
6
6
  /**
@@ -39,7 +39,7 @@ interface DepositSnapshot {
39
39
  * the payload (`pending` / `succeeded` / `failed`) drives whether `<ProcessingState>`,
40
40
  * `<SuccessState>`, or `<ErrorState>` is shown.
41
41
  */
42
- settlement: Entity<SettlementPayload, GatewaySettlementDto, GatewayPollResponse>;
42
+ settlement: Entity<SettlementPayload, GatewaySettlementDto, GatewayUdaDto>;
43
43
  /**
44
44
  * Connected-wallet identity. `idle` when no wallet is connected; `ready` once the host has
45
45
  * supplied an address. The `payload.address.formatted` field is the canonical
@@ -107,7 +107,7 @@ type FetchActiveSettlementInput = Record<string, never>;
107
107
  interface SettlementSnapshot {
108
108
  payload: SettlementPayload;
109
109
  raw: GatewaySettlementDto;
110
- response: GatewayPollResponse;
110
+ response: GatewayUdaDto;
111
111
  }
112
112
  /**
113
113
  * Unified driver contract. A `DepositDriver` is the single host-supplied source of both reactive
@@ -1,5 +1,5 @@
1
1
  import { ComponentProps, ReactNode } from "react";
2
- import { DestinationDto, GatewayLegFromDto, GatewayLegToDto, GatewayPollResponse } from "@stridge/sdk";
2
+ import { DestinationDto, GatewayLegFromDto, GatewayLegToDto, GatewayUdaDto } from "@stridge/sdk";
3
3
 
4
4
  //#region src/flows/deposit/widgets/deposit-status-banner/compound/types.d.ts
5
5
  /**
@@ -25,9 +25,9 @@ interface DepositStatusBannerTxRef {
25
25
  */
26
26
  raw?: GatewayLegFromDto | GatewayLegToDto;
27
27
  /**
28
- * Full `gateway/{owner}` poll response that produced the leg.
28
+ * Per-UDA view picked from `gateway/{owner}` that produced the leg.
29
29
  */
30
- responseRaw?: GatewayPollResponse;
30
+ responseRaw?: GatewayUdaDto;
31
31
  }
32
32
  /**
33
33
  * Destination chrome rendered in the Hero. Drives the `<TokenLogo>` resolution.
@@ -43,9 +43,9 @@ interface DepositStatusBannerAsset {
43
43
  */
44
44
  raw?: DestinationDto;
45
45
  /**
46
- * Full `gateway/{owner}` poll response that produced the destination.
46
+ * Per-UDA view picked from `gateway/{owner}` that produced the destination.
47
47
  */
48
- responseRaw?: GatewayPollResponse;
48
+ responseRaw?: GatewayUdaDto;
49
49
  }
50
50
  /**
51
51
  * Public props accepted by the {@link DepositStatusBanner} root.
@@ -1,4 +1,4 @@
1
- import { GatewayPollResponse, GatewaySettlementDto, OnchainBalanceResponse, QuoteResponse, SupportedAssetDto, SupportedAssetsResponse } from "@stridge/sdk";
1
+ import { GatewaySettlementDto, GatewayUdaDto, OnchainBalanceResponse, QuoteResponse, SupportedAssetDto, SupportedAssetsResponse } from "@stridge/sdk";
2
2
 
3
3
  //#region src/flows/withdraw/driver/dto.d.ts
4
4
  /**
@@ -22,11 +22,12 @@ type WithdrawalQuoteResponse = QuoteResponse;
22
22
  */
23
23
  type WithdrawalSettlementDto = GatewaySettlementDto;
24
24
  /**
25
- * Full `gateway/{owner}` poll response. Carries `destination` plus `settlements[]`. Used as the
26
- * `response` slot on the settlement entity envelope so headless integrators can correlate against
27
- * the UDA-level destination metadata.
25
+ * Per-UDA view from `gateway/{owner}`. Carries the UDA's `destination` plus `settlements[]`. Used
26
+ * as the `response` slot on the settlement entity envelope so headless integrators can correlate
27
+ * against the UDA-level destination metadata. The kit's `pollOnce` boundary picks the matching
28
+ * UDA out of the gateway's multi-UDA envelope before this type is observed downstream.
28
29
  */
29
- type WithdrawalSettlementResponse = GatewayPollResponse;
30
+ type WithdrawalSettlementResponse = GatewayUdaDto;
30
31
  /**
31
32
  * Per-network entry from `Uda.supportedAssets()`. Surfaced as the `raw` slot on the
32
33
  * `receiveOptions` entity so headless integrators can navigate the catalog without re-fetching.
package/dist/package.js CHANGED
@@ -1 +1 @@
1
- var e=`0.1.0-alpha.45`;export{e as version};
1
+ var e=`0.1.0-alpha.46`;export{e as version};
@@ -1,7 +1,7 @@
1
1
  import { DialogShellControls } from "../../../dialog/DialogShell.js";
2
2
  import { AssetDescriptor } from "../../asset-descriptor.js";
3
3
  import { ComponentProps, ReactNode } from "react";
4
- import { DestinationDto, GatewayPollResponse } from "@stridge/sdk";
4
+ import { DestinationDto, GatewayUdaDto } from "@stridge/sdk";
5
5
 
6
6
  //#region src/shared/widgets/processing-state/compound/types.d.ts
7
7
  /**
@@ -15,9 +15,10 @@ interface ProcessingStateAsset extends AssetDescriptor {
15
15
  */
16
16
  raw?: DestinationDto;
17
17
  /**
18
- * Full `gateway/{owner}` poll response that produced the destination.
18
+ * Per-UDA view picked from `gateway/{owner}`. Carries the UDA's `destination` and
19
+ * `settlements[]`. Headless integrators correlate the matched settlement against this slot.
19
20
  */
20
- responseRaw?: GatewayPollResponse;
21
+ responseRaw?: GatewayUdaDto;
21
22
  }
22
23
  /**
23
24
  * Source-wallet payload backing the predefined `Source` row.
@@ -1,7 +1,7 @@
1
1
  import { DialogShellControls } from "../../../dialog/DialogShell.js";
2
2
  import { AssetDescriptor } from "../../asset-descriptor.js";
3
3
  import { ComponentProps, ReactNode } from "react";
4
- import { DestinationDto, GatewayLegFromDto, GatewayLegToDto, GatewayPollResponse } from "@stridge/sdk";
4
+ import { DestinationDto, GatewayLegFromDto, GatewayLegToDto, GatewayUdaDto } from "@stridge/sdk";
5
5
 
6
6
  //#region src/shared/widgets/success-state/compound/types.d.ts
7
7
  /**
@@ -15,9 +15,9 @@ interface SuccessStateAsset extends AssetDescriptor {
15
15
  */
16
16
  raw?: DestinationDto;
17
17
  /**
18
- * Full `gateway/{owner}` poll response that produced the destination.
18
+ * Per-UDA view picked from `gateway/{owner}` that produced the destination metadata.
19
19
  */
20
- responseRaw?: GatewayPollResponse;
20
+ responseRaw?: GatewayUdaDto;
21
21
  }
22
22
  /**
23
23
  * Config for the secondary "View on …" link rendered inside the Actions
@@ -50,9 +50,9 @@ interface SuccessStateTxRef {
50
50
  */
51
51
  raw?: GatewayLegFromDto | GatewayLegToDto;
52
52
  /**
53
- * Full `gateway/{owner}` poll response that produced the leg.
53
+ * Per-UDA view picked from `gateway/{owner}` that produced the leg.
54
54
  */
55
- responseRaw?: GatewayPollResponse;
55
+ responseRaw?: GatewayUdaDto;
56
56
  }
57
57
  /**
58
58
  * Public props accepted by the {@link SuccessState} root.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stridge/kit",
3
- "version": "0.1.0-alpha.45",
3
+ "version": "0.1.0-alpha.46",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "files": [
@@ -135,7 +135,7 @@
135
135
  "@stylexjs/stylex": "^0.18.3",
136
136
  "motion": "^12.38.0",
137
137
  "qr": "0.6.0",
138
- "@stridge/sdk": "0.1.0-alpha.4"
138
+ "@stridge/sdk": "0.1.0-alpha.5"
139
139
  },
140
140
  "scripts": {
141
141
  "build": "pnpm run i18n:compile && tsdown",