@spicenet-io/spiceflow-ui 4.18.8 → 4.18.9-conditional-intents.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/dist/auth-privy.cjs +1 -1
- package/dist/auth-privy.js +1 -1
- package/dist/components/SpiceDeposit/lib/executors.d.ts +2 -0
- package/dist/components/SpiceLock/lib/helpers.d.ts +1 -0
- package/dist/components/SpiceSupply/lib/actionProceeds.d.ts +1 -0
- package/dist/components/SpiceSupply/lib/feeConversion.d.ts +1 -1
- package/dist/components/SpiceSupply/lib/feePreview.d.ts +2 -0
- package/dist/components/SpiceSupply/lib/payFundingBatches.d.ts +1 -0
- package/dist/execution/conditionalSwap.d.ts +17 -0
- package/dist/execution/sourceFunding.d.ts +2 -0
- package/dist/hooks/index.d.ts +2 -0
- package/dist/hooks/useSpiceConditionalIntents.d.ts +18 -0
- package/dist/index.cjs +13 -13
- package/dist/index.d.ts +3 -2
- package/dist/index.js +13 -13
- package/dist/privy-ByZ46D5J.cjs +1 -0
- package/dist/privy-Clhl8wtW.js +2 -0
- package/dist/types/conditionalIntents.d.ts +54 -0
- package/dist/types/deposit.d.ts +2 -0
- package/dist/utils/crossChainRouter/liquidityVenues.d.ts +1 -0
- package/dist/utils/errors.d.ts +1 -1
- package/dist/utils/relayer/index.d.ts +17 -1
- package/package.json +2 -2
- package/dist/privy-BBLy63_q.js +0 -2
- package/dist/privy-Df1bsdsz.cjs +0 -1
package/dist/auth-privy.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
(function(){if(typeof document==="undefined"||document.getElementById("spiceflow-styles"))return;var s=document.createElement("style");s.id="spiceflow-styles";s.textContent="@keyframes spiceflow-spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}@keyframes spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}@media (prefers-reduced-motion:reduce){*,:after,:before{animation-duration:.001ms!important;animation-iteration-count:1!important;scroll-behavior:auto!important;transition-duration:.001ms!important}}.spiceflow-focus-ring:focus-visible,[data-spiceflow-focus]:focus-visible{border-radius:4px;outline:2px solid currentColor;outline-offset:2px}@media (forced-colors:active){.spiceflow-focus-ring:focus-visible,[data-spiceflow-focus]:focus-visible{outline:2px solid Highlight}}.ibm-plex-mono-thin{font-weight:100}.ibm-plex-mono-extralight,.ibm-plex-mono-thin{font-family:IBM Plex Mono,monospace!important;font-style:normal}.ibm-plex-mono-extralight{font-weight:200}.ibm-plex-mono-light{font-weight:300}.ibm-plex-mono-light,.ibm-plex-mono-regular{font-family:IBM Plex Mono,monospace!important;font-style:normal}.ibm-plex-mono-regular{font-weight:400}.ibm-plex-mono-medium{font-weight:500}.ibm-plex-mono-medium,.ibm-plex-mono-semibold{font-family:IBM Plex Mono,monospace!important;font-style:normal}.ibm-plex-mono-semibold{font-weight:600}.ibm-plex-mono-bold{font-family:IBM Plex Mono,monospace!important;font-style:normal;font-weight:700}#privy-modal-content button{border-radius:6px;font-family:IBM Plex Mono,monospace!important;font-size:small;letter-spacing:-.5px;text-transform:uppercase}#privy-modal-content input{background:#fff;border-radius:6px;padding-top:5px!important}#privy-dialog-title{display:none!important;font-size:18px;padding-bottom:10px;padding-top:10px}.AppLogoContainer-sc-a206bd44-0{display:none}#privy-modal-content{background:var(--Neutral-0,#fafafa);border:6px solid var(--Neutral-1,#e9e9e9);box-shadow:inset 0 0 0 1px rgba(0,0,0,.15),0 330px 92px transparent,0 211px 84px rgba(0,0,0,.01),0 119px 71px rgba(0,0,0,.05),0 53px 53px rgba(0,0,0,.09),0 13px 29px rgba(0,0,0,.1);height:auto!important;padding-bottom:10px}.Subtitle-sc-ddbf22b4-4{font-size:12px;margin-top:-14px;opacity:.5}.StyledLink-sc-1c6127e5-0{background:none!important}.StyledLink-sc-c8577138-0,.login-method-button{font-family:IBM Plex Mono,monospace!important}.StyledLink-sc-c8577138-0{font-style:uppercase}#protected-by-privy{color:#000!important}";document.head.appendChild(s)})();
|
|
2
|
-
"use strict";const r=require("./privy-
|
|
2
|
+
"use strict";const r=require("./privy-ByZ46D5J.cjs");require("react/jsx-runtime"),require("react"),require("@spicenet-io/spiceflow-core"),require("@tanstack/react-query"),require("viem"),require("@privy-io/react-auth"),require("wagmi"),require("viem/actions"),exports.PrivyLogin=r.PrivyLogin;
|
package/dist/auth-privy.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
(function(){if(typeof document==="undefined"||document.getElementById("spiceflow-styles"))return;var s=document.createElement("style");s.id="spiceflow-styles";s.textContent="@keyframes spiceflow-spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}@keyframes spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}@media (prefers-reduced-motion:reduce){*,:after,:before{animation-duration:.001ms!important;animation-iteration-count:1!important;scroll-behavior:auto!important;transition-duration:.001ms!important}}.spiceflow-focus-ring:focus-visible,[data-spiceflow-focus]:focus-visible{border-radius:4px;outline:2px solid currentColor;outline-offset:2px}@media (forced-colors:active){.spiceflow-focus-ring:focus-visible,[data-spiceflow-focus]:focus-visible{outline:2px solid Highlight}}.ibm-plex-mono-thin{font-weight:100}.ibm-plex-mono-extralight,.ibm-plex-mono-thin{font-family:IBM Plex Mono,monospace!important;font-style:normal}.ibm-plex-mono-extralight{font-weight:200}.ibm-plex-mono-light{font-weight:300}.ibm-plex-mono-light,.ibm-plex-mono-regular{font-family:IBM Plex Mono,monospace!important;font-style:normal}.ibm-plex-mono-regular{font-weight:400}.ibm-plex-mono-medium{font-weight:500}.ibm-plex-mono-medium,.ibm-plex-mono-semibold{font-family:IBM Plex Mono,monospace!important;font-style:normal}.ibm-plex-mono-semibold{font-weight:600}.ibm-plex-mono-bold{font-family:IBM Plex Mono,monospace!important;font-style:normal;font-weight:700}#privy-modal-content button{border-radius:6px;font-family:IBM Plex Mono,monospace!important;font-size:small;letter-spacing:-.5px;text-transform:uppercase}#privy-modal-content input{background:#fff;border-radius:6px;padding-top:5px!important}#privy-dialog-title{display:none!important;font-size:18px;padding-bottom:10px;padding-top:10px}.AppLogoContainer-sc-a206bd44-0{display:none}#privy-modal-content{background:var(--Neutral-0,#fafafa);border:6px solid var(--Neutral-1,#e9e9e9);box-shadow:inset 0 0 0 1px rgba(0,0,0,.15),0 330px 92px transparent,0 211px 84px rgba(0,0,0,.01),0 119px 71px rgba(0,0,0,.05),0 53px 53px rgba(0,0,0,.09),0 13px 29px rgba(0,0,0,.1);height:auto!important;padding-bottom:10px}.Subtitle-sc-ddbf22b4-4{font-size:12px;margin-top:-14px;opacity:.5}.StyledLink-sc-1c6127e5-0{background:none!important}.StyledLink-sc-c8577138-0,.login-method-button{font-family:IBM Plex Mono,monospace!important}.StyledLink-sc-c8577138-0{font-style:uppercase}#protected-by-privy{color:#000!important}";document.head.appendChild(s)})();
|
|
3
|
-
import{P as g}from"./privy-
|
|
3
|
+
import{P as g}from"./privy-Clhl8wtW.js";import"react/jsx-runtime";import"react";import"@spicenet-io/spiceflow-core";import"@tanstack/react-query";import"viem";import"@privy-io/react-auth";import"wagmi";import"viem/actions";export{g as PrivyLogin};
|
|
@@ -16,6 +16,7 @@ export declare function depositFeeMatchesQuote(fee: DepositFee | null | undefine
|
|
|
16
16
|
chainId: number;
|
|
17
17
|
}): fee is DepositFee;
|
|
18
18
|
export interface DepositExecutorContext {
|
|
19
|
+
isCurrent?: () => boolean;
|
|
19
20
|
selectedDepositAssets: SelectedAsset[];
|
|
20
21
|
escrowOnly: boolean;
|
|
21
22
|
sourceAddress: Address | undefined;
|
|
@@ -49,6 +50,7 @@ export interface DepositExecutorContext {
|
|
|
49
50
|
bridgedAmountRef: React.MutableRefObject<string | null>;
|
|
50
51
|
setIsExecuting: (v: boolean) => void;
|
|
51
52
|
setError: (v: string | null) => void;
|
|
53
|
+
setRetryBlocked?: (v: boolean) => void;
|
|
52
54
|
setConfirmationData: (v: DepositConfirmationData | null) => void;
|
|
53
55
|
setShowConfirmation: (v: boolean) => void;
|
|
54
56
|
setDirectDepositStatus: (v: "idle" | "processing" | "success") => void;
|
|
@@ -49,4 +49,5 @@ export declare function build7702EstimateRequestWithAuthorizations(user: Address
|
|
|
49
49
|
export declare function withSpicenetFundingBatch(batches: ChainBatch[], userAddress: Address, feeEstimate?: FeeEstimateSummary, options?: {
|
|
50
50
|
payoutAlreadyGross?: boolean;
|
|
51
51
|
requestTimestampMs?: number;
|
|
52
|
+
expiresAt?: number;
|
|
52
53
|
}): ChainBatch[];
|
|
@@ -17,5 +17,6 @@ export declare function estimateProceedsFunding(args: {
|
|
|
17
17
|
baseline: () => Promise<SupplyFeeQuote | null>;
|
|
18
18
|
buildBatches: (amount: bigint, options?: SupplyBatchBuildOptions) => Promise<ChainBatch[]>;
|
|
19
19
|
fundShortfall?: boolean;
|
|
20
|
+
expiresAt?: number;
|
|
20
21
|
actionAmountFor?: (fee: bigint) => bigint;
|
|
21
22
|
}): Promise<SupplyFeeQuote>;
|
|
@@ -12,7 +12,7 @@ export interface FundingConversion {
|
|
|
12
12
|
fromProceeds?: boolean;
|
|
13
13
|
fromInput?: boolean;
|
|
14
14
|
}
|
|
15
|
-
export declare function simulateInPlaceFees(ctx: FeePreviewContext, owner: Address, tokenOut: Address, batches: ChainBatch[]): Promise<{
|
|
15
|
+
export declare function simulateInPlaceFees(ctx: Pick<FeePreviewContext, "signal">, owner: Address, tokenOut: Address, batches: ChainBatch[]): Promise<{
|
|
16
16
|
gasFee: bigint;
|
|
17
17
|
gasQuoteSource: string;
|
|
18
18
|
simulationVerified?: boolean;
|
|
@@ -63,6 +63,7 @@ export declare function estimateQuotedSupplyFees(params: {
|
|
|
63
63
|
}): Promise<FeeEstimateSummary>;
|
|
64
64
|
export declare function solveGrossFunding(fees: Pick<FeePreview, "grossAmount" | "gasFee" | "spicenetFee" | "bridgeFee">, requiredNetFunding: bigint): bigint;
|
|
65
65
|
export declare function estimatePayFunding(args: {
|
|
66
|
+
expiresAt?: number;
|
|
66
67
|
requiredNetFunding: bigint;
|
|
67
68
|
feeOnlyAction?: boolean;
|
|
68
69
|
buildBatches: (gross: bigint) => ChainBatch[] | Promise<ChainBatch[]>;
|
|
@@ -99,6 +100,7 @@ export declare function estimateSupplyMaxAmount(ctx: {
|
|
|
99
100
|
feeExecutionMode: SpiceSupplyProps["feeExecutionMode"];
|
|
100
101
|
}): Promise<string | null>;
|
|
101
102
|
export interface FeePreviewContext {
|
|
103
|
+
expiresAt?: number;
|
|
102
104
|
combinedSourceGroup?: import("../../../utils/combinedSourceBalances").CombinedSourceGroup;
|
|
103
105
|
getCombinedSourceGroup?: (asset: Asset, reserve?: {
|
|
104
106
|
asset: Asset;
|
|
@@ -4,4 +4,5 @@ import type { ChainBatch } from "../../../types/authorization";
|
|
|
4
4
|
export declare function wrapPayWithSpicenet(raw: ChainBatch[], fundingRecipient: Address, feeEstimate?: FeeEstimateSummary, opts?: {
|
|
5
5
|
payoutAlreadyGross?: boolean;
|
|
6
6
|
requestTimestampMs?: number;
|
|
7
|
+
expiresAt?: number;
|
|
7
8
|
}): ChainBatch[];
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type Address } from "viem";
|
|
2
|
+
import { type FeePreviewContext } from "../components/SpiceSupply/lib/feePreview";
|
|
3
|
+
import type { ConditionalSwapDraft } from "../types/conditionalIntents";
|
|
4
|
+
import type { Asset } from "../types/assets";
|
|
5
|
+
import type { ChainBatch } from "../types/authorization";
|
|
6
|
+
export declare function prepareConditionalSwapBatches(input: ConditionalSwapDraft, owner: Address, balances: Asset[], estimate: FeePreviewContext["estimate"]): Promise<{
|
|
7
|
+
batches: ChainBatch[];
|
|
8
|
+
swapAmountIn: bigint;
|
|
9
|
+
feeFundingSource: import("../types/supply").FeeFundingSource | undefined;
|
|
10
|
+
feeSourceAmount: bigint | undefined;
|
|
11
|
+
fees: {
|
|
12
|
+
token: `0x${string}`;
|
|
13
|
+
symbol: string;
|
|
14
|
+
decimals: number;
|
|
15
|
+
amount: bigint;
|
|
16
|
+
};
|
|
17
|
+
}>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { Address } from "viem";
|
|
2
2
|
import type { Asset } from "../types/assets";
|
|
3
|
+
import { type TransactionObserver } from "./externalWalletClient";
|
|
3
4
|
export declare function fundEmbeddedFromExternal(params: {
|
|
4
5
|
asset: Asset;
|
|
5
6
|
embedded: Address;
|
|
@@ -9,4 +10,5 @@ export declare function fundEmbeddedFromExternal(params: {
|
|
|
9
10
|
} | null;
|
|
10
11
|
amount: bigint;
|
|
11
12
|
assertCurrent: () => void | Promise<void>;
|
|
13
|
+
observer?: TransactionObserver;
|
|
12
14
|
}): Promise<void>;
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -6,6 +6,8 @@ export type { UseWalletReturn, WalletActions, WalletState } from "./useWallet";
|
|
|
6
6
|
export { useSpiceAssets } from "./useSpiceAssets";
|
|
7
7
|
export type { UseSpiceAssetsConfig, UseSpiceAssetsReturn, } from "./useSpiceAssets";
|
|
8
8
|
export { useSpiceExecution } from "./useSpiceExecution";
|
|
9
|
+
export { useSpiceConditionalIntents } from "./useSpiceConditionalIntents";
|
|
10
|
+
export type { ConditionalIntentDraft, ConditionalSwapDraft, PreparedConditionalIntent, } from "../types/conditionalIntents";
|
|
9
11
|
export type { ExecutionOptions, ExecutionProgress, ExecutionStep, OnProgress, } from "./useSpiceExecution";
|
|
10
12
|
export { useLockDuration } from "./useLockDuration";
|
|
11
13
|
export type { UseLockDurationReturn } from "./useLockDuration";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type ConditionalIntentStatus, type RegisterConditionalIntentResponse } from "@spicenet-io/spiceflow-core";
|
|
2
|
+
import type { ConditionalIntentDraft, ConditionalSwapDraft, PreparedConditionalIntent } from "../types/conditionalIntents";
|
|
3
|
+
export declare function useSpiceConditionalIntents(): {
|
|
4
|
+
prepare: (draft: ConditionalIntentDraft) => Promise<PreparedConditionalIntent>;
|
|
5
|
+
prepareSwap: (draft: ConditionalSwapDraft) => Promise<PreparedConditionalIntent>;
|
|
6
|
+
sign: (value: PreparedConditionalIntent) => Promise<PreparedConditionalIntent>;
|
|
7
|
+
register: (value: PreparedConditionalIntent) => Promise<RegisterConditionalIntentResponse>;
|
|
8
|
+
authorizeRead: (serviceId: string) => Promise<string>;
|
|
9
|
+
get: (id: string, serviceId: string) => Promise<ConditionalIntentStatus>;
|
|
10
|
+
list: (serviceId: string, options?: {
|
|
11
|
+
limit?: number;
|
|
12
|
+
cursor?: string;
|
|
13
|
+
}) => Promise<{
|
|
14
|
+
intents: ConditionalIntentStatus[];
|
|
15
|
+
nextCursor?: string;
|
|
16
|
+
}>;
|
|
17
|
+
cancel: (id: string, serviceId: string) => Promise<ConditionalIntentStatus>;
|
|
18
|
+
};
|