@flapsdk/vault-runtime 0.1.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.
- package/README.md +14 -0
- package/host.d.mts +18 -0
- package/host.js +871 -0
- package/host.js.map +1 -0
- package/hostRuntimeConfig-BOEJo2nq.d.mts +14 -0
- package/package.json +49 -0
- package/runtime-contract.json +27 -0
- package/sdk.d.mts +24 -0
- package/sdk.js +571 -0
- package/sdk.js.map +1 -0
- package/server.d.mts +26 -0
- package/server.js +200 -0
- package/server.js.map +1 -0
- package/txError-1lPZHdqI.d.mts +216 -0
- package/types-CX7pLmiT.d.mts +270 -0
- package/ui.d.mts +99 -0
- package/ui.js +232 -0
- package/ui.js.map +1 -0
package/README.md
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# @flapsdk/vault-runtime
|
|
2
|
+
|
|
3
|
+
Generated from `flap-vault-ui-template`.
|
|
4
|
+
|
|
5
|
+
This package is the shared runtime surface that local preview, Artifact Workbench, and `flap.sh` should agree on.
|
|
6
|
+
|
|
7
|
+
## Exports
|
|
8
|
+
|
|
9
|
+
- `./sdk`: component-facing SDK hooks, helpers, types, and provider
|
|
10
|
+
- `./ui`: shared UI primitives
|
|
11
|
+
- `./host`: host/runtime preflight helpers
|
|
12
|
+
- `./server`: server-side presentation and host-proxy helpers
|
|
13
|
+
|
|
14
|
+
See `runtime-contract.json` for the machine-readable subpath contract.
|
package/host.d.mts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { a as Address, x as TokenRuntimeSnapshot, w as TokenMetadataSnapshot, n as HostRuntimeInput, H as HostRuntimeAddresses, r as HostRuntimeResult, c as CreateVaultRuntimeContextInput, G as VaultRuntimeContext } from './types-CX7pLmiT.mjs';
|
|
2
|
+
export { A as ActionAvailabilityStage, C as ContractReadRequest, b as ContractWriteRequest, E as EndpointPolicy, F as FeeMode, d as FlapFeeVaultInfo, e as FlapI18n, f as FlapNotify, g as FlapTaxInfo, h as FlapTokenInfo, i as FlapVaultPortalInfo, j as FlapVaultSdk, k as FlapWallet, l as HostRuntimeDataSource, m as HostRuntimeDegradeReason, o as HostRuntimePolicy, p as HostRuntimePresentationFetcher, q as HostRuntimePresentationRequest, s as HostRuntimeSources, t as HostRuntimeStatus, u as HostRuntimeWarning, v as HostTokenPresentation, M as ManifestBindingEntry, P as PaymentToken, S as SimulateResult, T as TokenMarketPhase, y as TxReceipt, V as VaultComponentProps, z as VaultHostContext, B as VaultManifest, D as VaultRenderSurface, I as VaultRuntimeContextOverrides, J as VaultRuntimeExtraConfig } from './types-CX7pLmiT.mjs';
|
|
3
|
+
export { C as CreateTaxInfoHostContextInput, R as ResolveRenderSurfaceInput, a as RuntimeMatchInput, T as TaxVaultHostSnapshot, b as TxErrorKind, V as VaultBindingPolicy, Z as ZERO_ADDRESS, c as createTaxInfoHostContext, f as formatCountdown, d as formatPercentBps, e as formatTokenAmount, g as getTupleField, h as getTxErrorKind, i as handleTxError, j as isActionAvailableForPhase, k as isCustomVaultTaxToken, l as isManifestRuntimeMatch, m as isSameAddress, n as isValidAddress, o as isVaultBindingMatch, p as normalizeAddress, q as parseFeeVaultInfo, r as parsePortalTokenInfo, s as parseTaxTokenInfo, t as parseTokenAmount, u as parseVaultPortalInfo, v as readTaxVaultHostContext, w as resolveFeeMode, x as resolveManifestBinding, y as resolveTaxInfoRenderSurface, z as resolveTokenMarketPhase, A as resolveVaultBinding, B as shortenAddress, D as standardErc20Abi } from './txError-1lPZHdqI.mjs';
|
|
4
|
+
import { PublicClient } from 'viem';
|
|
5
|
+
export { erc20Abi } from 'viem';
|
|
6
|
+
export { T as TaxVaultHostChainConfig, g as getTaxVaultHostChainConfig } from './hostRuntimeConfig-BOEJo2nq.mjs';
|
|
7
|
+
|
|
8
|
+
declare function readErc20TokenMetadata(publicClient: PublicClient, tokenAddress?: Address | null): Promise<TokenMetadataSnapshot | null>;
|
|
9
|
+
declare function loadTokenRuntimeSnapshot(publicClient: PublicClient, chainId: number, tokenAddress?: Address | null): Promise<TokenRuntimeSnapshot | null>;
|
|
10
|
+
|
|
11
|
+
declare function resolveHostRuntimeAddresses(input: Pick<HostRuntimeInput, "chainId" | "tokenAddress" | "factoryAddressHint" | "vaultAddressHint">, snapshot?: TokenRuntimeSnapshot | null): HostRuntimeAddresses;
|
|
12
|
+
declare function runHostRuntime(input: HostRuntimeInput): Promise<HostRuntimeResult>;
|
|
13
|
+
|
|
14
|
+
declare function explorerForChain(chainId: number): "https://bscscan.com" | "https://testnet.bscscan.com" | undefined;
|
|
15
|
+
declare function chainLabelForChain(chainId: number): string;
|
|
16
|
+
declare function createVaultRuntimeContext(input: CreateVaultRuntimeContextInput): VaultRuntimeContext;
|
|
17
|
+
|
|
18
|
+
export { Address, CreateVaultRuntimeContextInput, HostRuntimeAddresses, HostRuntimeInput, HostRuntimeResult, TokenMetadataSnapshot, TokenRuntimeSnapshot, VaultRuntimeContext, chainLabelForChain, createVaultRuntimeContext, explorerForChain, loadTokenRuntimeSnapshot, readErc20TokenMetadata, resolveHostRuntimeAddresses, runHostRuntime };
|