@zerodev/smart-routing-address-react-ui 0.0.3 → 0.0.6
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/_types/components/FeeBreakdown/index.d.ts +14 -0
- package/dist/_types/components/FeeBreakdown/index.d.ts.map +1 -1
- package/dist/_types/components/QrSheet/index.d.ts.map +1 -1
- package/dist/_types/components/TxnItem/index.d.ts +1 -1
- package/dist/_types/components/TxnItem/index.d.ts.map +1 -1
- package/dist/_types/constants.d.ts +8 -5
- package/dist/_types/constants.d.ts.map +1 -1
- package/dist/_types/context/SmartRoutingAddressProvider.d.ts.map +1 -1
- package/dist/_types/iconAssets.d.ts +0 -1
- package/dist/_types/iconAssets.d.ts.map +1 -1
- package/dist/_types/pages/Deposit.d.ts.map +1 -1
- package/dist/_types/pages/PastDeposits.d.ts.map +1 -1
- package/dist/_types/pages/TransactionDetails.d.ts +4 -3
- package/dist/_types/pages/TransactionDetails.d.ts.map +1 -1
- package/dist/_types/types.d.ts +4 -7
- package/dist/_types/types.d.ts.map +1 -1
- package/dist/_types/utils/config.d.ts +11 -9
- package/dist/_types/utils/config.d.ts.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +1162 -1255
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +5 -5
- package/src/components/FeeBreakdown/index.tsx +47 -2
- package/src/components/PendingDeposits/index.tsx +1 -1
- package/src/components/QrSheet/index.tsx +3 -12
- package/src/components/TxnItem/index.tsx +1 -9
- package/src/constants.ts +14 -25
- package/src/context/SmartRoutingAddressProvider.tsx +12 -10
- package/src/iconAssets.ts +27 -0
- package/src/pages/Deposit.tsx +16 -26
- package/src/pages/PastDeposits.tsx +1 -4
- package/src/pages/TransactionDetails.tsx +58 -49
- package/src/types.ts +4 -7
- package/src/utils/config.ts +14 -26
- package/dist/_types/components/QrSheet/QrCode.d.ts +0 -28
- package/dist/_types/components/QrSheet/QrCode.d.ts.map +0 -1
- package/src/components/QrSheet/QrCode.tsx +0 -163
|
@@ -25,4 +25,18 @@ export declare function ProviderValue({ provider }: {
|
|
|
25
25
|
export declare function FeeBreakdownRows({ breakdown }: {
|
|
26
26
|
breakdown: FeeBreakdown;
|
|
27
27
|
}): import("react").JSX.Element;
|
|
28
|
+
/**
|
|
29
|
+
* The clickable fee value: wraps the summary (children) and the disclosure
|
|
30
|
+
* chevron in one button so the whole value toggles the breakdown, not just
|
|
31
|
+
* the arrow. The action is named by a visually hidden span rather than
|
|
32
|
+
* `aria-label`, which would replace the button's content and leave screen
|
|
33
|
+
* readers hearing the action without the fee.
|
|
34
|
+
*/
|
|
35
|
+
export declare function FeeDisclosureButton({ open, onToggle, panelId, children, }: {
|
|
36
|
+
open: boolean;
|
|
37
|
+
onToggle: () => void;
|
|
38
|
+
/** id of the panel this button controls, when the panel carries one. */
|
|
39
|
+
panelId?: string | undefined;
|
|
40
|
+
children: ReactNode;
|
|
41
|
+
}): import("react").JSX.Element;
|
|
28
42
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/FeeBreakdown/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEtC,OAAO,KAAK,EAAE,YAAY,EAAW,MAAM,0BAA0B,CAAA;AAUrE,MAAM,MAAM,cAAc,GAAG;IAC3B,+DAA+D;IAC/D,OAAO,EAAE,OAAO,CAAA;IAChB,mEAAmE;IACnE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAA;IACzB,QAAQ,EAAE,SAAS,CAAA;CACpB,CAAA;AAED;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,cAAc,+BAwBxE;AAED,0EAA0E;AAC1E,wBAAgB,UAAU,CAAC,EAAE,S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E,OAAO,CAAA;IACb,QAAQ,EAAE,MAAM,IAAI,CAAA;IACpB,wEAAwE;IACxE,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC5B,QAAQ,EAAE,SAAS,CAAA;CACpB,+BAyBA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/QrSheet/index.tsx"],"names":[],"mappings":"AAUA,MAAM,WAAW,YAAY;IAC3B,6CAA6C;IAC7C,IAAI,EAAE,OAAO,CAAA;IACb;yBACqB;IACrB,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAA;IACrC,6DAA6D;IAC7D,OAAO,EAAE,MAAM,CAAA;IACf,gDAAgD;IAChD,MAAM,EAAE,MAAM,IAAI,CAAA;CACnB;AAED;;kDAEkD;AAClD,wBAAgB,OAAO,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,YAAY,+
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/QrSheet/index.tsx"],"names":[],"mappings":"AAUA,MAAM,WAAW,YAAY;IAC3B,6CAA6C;IAC7C,IAAI,EAAE,OAAO,CAAA;IACb;yBACqB;IACrB,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAA;IACrC,6DAA6D;IAC7D,OAAO,EAAE,MAAM,CAAA;IACf,gDAAgD;IAChD,MAAM,EAAE,MAAM,IAAI,CAAA;CACnB;AAED;;kDAEkD;AAClD,wBAAgB,OAAO,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,YAAY,+BA6C5E"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type TxnStatus = 'Routing' | 'Detected' | '
|
|
1
|
+
export type TxnStatus = 'Routing' | 'Detected' | 'Delivered' | 'Failed';
|
|
2
2
|
export interface TxnItemProps {
|
|
3
3
|
/** Pre-formatted deposited amount, e.g. `"$248.00 USD"`. */
|
|
4
4
|
amount: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/TxnItem/index.tsx"],"names":[],"mappings":"AAEA,MAAM,MAAM,SAAS,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/TxnItem/index.tsx"],"names":[],"mappings":"AAEA,MAAM,MAAM,SAAS,GAAG,SAAS,GAAG,UAAU,GAAG,WAAW,GAAG,QAAQ,CAAA;AAEvE,MAAM,WAAW,YAAY;IAC3B,4DAA4D;IAC5D,MAAM,EAAE,MAAM,CAAA;IACd;;;;;OAKG;IACH,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,wDAAwD;IACxD,OAAO,EAAE,MAAM,CAAA;IACf,6EAA6E;IAC7E,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,0DAA0D;IAC1D,SAAS,EAAE,MAAM,CAAA;IACjB,MAAM,EAAE,SAAS,CAAA;IACjB,mCAAmC;IACnC,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,2EAA2E;IAC3E,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,0CAA0C;IAC1C,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,gDAAgD;IAChD,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,kDAAkD;IAClD,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AASD,wBAAgB,OAAO,CAAC,EACtB,MAAM,EACN,UAAU,EACV,OAAO,EACP,IAAI,EACJ,SAAS,EACT,MAAM,EACN,kBAAkB,EAClB,kBAAkB,EAClB,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,EACf,aAAa,EACb,SAAS,GACV,EAAE,YAAY,+BA8Ed"}
|
|
@@ -4,17 +4,20 @@ export declare const DEFAULT_POLLING_INTERVAL_MS = 5000;
|
|
|
4
4
|
export declare const DEFAULT_FILL_TIME_SECONDS = 30;
|
|
5
5
|
export declare const DEFAULT_DASHBOARD_URL = "https://smart-routing-address.zerodev.app";
|
|
6
6
|
/**
|
|
7
|
-
* Chains supported by the smart routing address SDK;
|
|
8
|
-
*
|
|
7
|
+
* Chains supported by the smart routing address SDK; the smart-account-plus
|
|
8
|
+
* core `supportedChainIds` list, plus SRA-only source chains (Robinhood).
|
|
9
|
+
* A chain in the SDK's SUPPORTED_TOKENS but missing here is silently dropped
|
|
10
|
+
* from the source-token list — keep this in sync when the SDK adds chains.
|
|
9
11
|
*/
|
|
10
12
|
export declare const SUPPORTED_CHAINS: readonly Chain[];
|
|
11
13
|
export declare const CHAINS_BY_ID: ReadonlyMap<number, Chain>;
|
|
12
14
|
/**
|
|
13
15
|
* Source tokens offered for deposits: every supported mainnet token the SDK
|
|
14
16
|
* exposes (NATIVE plus each ERC-20, with wrapped native surfaced as WETH),
|
|
15
|
-
* mapped to its viem chain object. Testnets are excluded from the default
|
|
16
|
-
* chains this package cannot resolve to a viem chain are skipped
|
|
17
|
-
*
|
|
17
|
+
* mapped to its viem chain object. Testnets are excluded from the default,
|
|
18
|
+
* and chains this package cannot resolve to a viem chain are skipped.
|
|
19
|
+
* Tokens without an available route at creation time are dropped by the
|
|
20
|
+
* server via `allowPartialRoutes` (e.g. Soneium USDT, deprecated by Across).
|
|
18
21
|
*/
|
|
19
22
|
export declare const DEFAULT_SOURCE_TOKENS: SourceToken[];
|
|
20
23
|
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,MAAM,CAAA;
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,MAAM,CAAA;AA0BjC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAE1C,eAAO,MAAM,2BAA2B,OAAQ,CAAA;AAEhD,eAAO,MAAM,yBAAyB,KAAK,CAAA;AAE3C,eAAO,MAAM,qBAAqB,8CAA8C,CAAA;AAEhF;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,EAAE,SAAS,KAAK,EAwB5C,CAAA;AAED,eAAO,MAAM,YAAY,EAAE,WAAW,CAAC,MAAM,EAAE,KAAK,CAEnD,CAAA;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,qBAAqB,EAAE,WAAW,EAU7C,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SmartRoutingAddressProvider.d.ts","sourceRoot":"","sources":["../../../src/context/SmartRoutingAddressProvider.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SmartRoutingAddressProvider.d.ts","sourceRoot":"","sources":["../../../src/context/SmartRoutingAddressProvider.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAA0C,MAAM,OAAO,CAAA;AAE9E,OAAO,KAAK,EAGV,yBAAyB,EAC1B,MAAM,UAAU,CAAA;AASjB,MAAM,MAAM,gCAAgC,GAAG;IAC7C,MAAM,EAAE,yBAAyB,CAAA;IACjC,QAAQ,EAAE,SAAS,CAAA;CACpB,CAAA;AAED;;;;GAIG;AACH,wBAAgB,2BAA2B,CAAC,EAC1C,MAAM,EACN,QAAQ,GACT,EAAE,gCAAgC,+BAkHlC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"iconAssets.d.ts","sourceRoot":"","sources":["../../src/iconAssets.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"iconAssets.d.ts","sourceRoot":"","sources":["../../src/iconAssets.ts"],"names":[],"mappings":"AAuGA,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CA0B9C,CAAA;AAED,yEAAyE;AACzE,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAa9C,CAAA;AAOD,iFAAiF;AACjF,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAGjD,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Deposit.d.ts","sourceRoot":"","sources":["../../../src/pages/Deposit.tsx"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,cAAc,EAAc,MAAM,gCAAgC,CAAA;AAiChF,MAAM,WAAW,YAAY;IAC3B,SAAS,CAAC,EAAE,MAAM,IAAI,CAAA;IACtB,6EAA6E;IAC7E,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAA;IAC/B;;qDAEiD;IACjD,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,cAAc,KAAK,IAAI,CAAA;CACpD;AAYD,wBAAgB,OAAO,CAAC,EACtB,SAAS,EACT,kBAAkB,EAClB,eAAe,GAChB,EAAE,YAAY,+
|
|
1
|
+
{"version":3,"file":"Deposit.d.ts","sourceRoot":"","sources":["../../../src/pages/Deposit.tsx"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,cAAc,EAAc,MAAM,gCAAgC,CAAA;AAiChF,MAAM,WAAW,YAAY;IAC3B,SAAS,CAAC,EAAE,MAAM,IAAI,CAAA;IACtB,6EAA6E;IAC7E,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAA;IAC/B;;qDAEiD;IACjD,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,cAAc,KAAK,IAAI,CAAA;CACpD;AAYD,wBAAgB,OAAO,CAAC,EACtB,SAAS,EACT,kBAAkB,EAClB,eAAe,GAChB,EAAE,YAAY,+BAsed"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PastDeposits.d.ts","sourceRoot":"","sources":["../../../src/pages/PastDeposits.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;
|
|
1
|
+
{"version":3,"file":"PastDeposits.d.ts","sourceRoot":"","sources":["../../../src/pages/PastDeposits.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AAsEpE,MAAM,WAAW,iBAAiB;IAChC;;6CAEyC;IACzC,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,cAAc,KAAK,IAAI,CAAA;CACpD;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,EAAE,eAAe,EAAE,EAAE,iBAAiB,+BAkKlE"}
|
|
@@ -3,9 +3,10 @@ export interface TransactionDetailsProps {
|
|
|
3
3
|
deposit: DepositWithTimestamp;
|
|
4
4
|
}
|
|
5
5
|
/**
|
|
6
|
-
* Transaction details view (Figma `
|
|
7
|
-
* `
|
|
8
|
-
* route metadata, and a "Transaction Progress"
|
|
6
|
+
* Transaction details view (Figma `20002:37994`) — delivered-amount hero via
|
|
7
|
+
* `TokenSummary`, a "From" row with the deposited amount, a "Transaction
|
|
8
|
+
* details" `Section` with the route metadata, and a "Transaction Progress"
|
|
9
|
+
* `Section` with the step trail.
|
|
9
10
|
*/
|
|
10
11
|
export declare function TransactionDetails({ deposit: initialDeposit, }: TransactionDetailsProps): import("react").JSX.Element;
|
|
11
12
|
//# sourceMappingURL=TransactionDetails.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TransactionDetails.d.ts","sourceRoot":"","sources":["../../../src/pages/TransactionDetails.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TransactionDetails.d.ts","sourceRoot":"","sources":["../../../src/pages/TransactionDetails.tsx"],"names":[],"mappings":"AAqBA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAA;AAYpD,MAAM,WAAW,uBAAuB;IACtC,OAAO,EAAE,oBAAoB,CAAA;CAC9B;AAyCD;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,EACjC,OAAO,EAAE,cAAc,GACxB,EAAE,uBAAuB,+BAgOzB"}
|
package/dist/_types/types.d.ts
CHANGED
|
@@ -17,13 +17,13 @@ export type SourceToken = {
|
|
|
17
17
|
};
|
|
18
18
|
export type SmartRoutingAddressConfig = {
|
|
19
19
|
/**
|
|
20
|
-
* ZeroDev project id
|
|
21
|
-
*
|
|
20
|
+
* ZeroDev project id, sent with every address-creation request (the SDK
|
|
21
|
+
* appends it to the server URL)
|
|
22
22
|
*/
|
|
23
23
|
projectId?: string;
|
|
24
24
|
/** Chain id where funds settle */
|
|
25
25
|
targetChainId: number;
|
|
26
|
-
/** Smart routing address version, defaults to the latest
|
|
26
|
+
/** Smart routing address version, defaults to the latest supported */
|
|
27
27
|
version?: SmartRoutingAddressVersion;
|
|
28
28
|
/**
|
|
29
29
|
* Destination actions per token type. When omitted, funds are simply
|
|
@@ -34,10 +34,7 @@ export type SmartRoutingAddressConfig = {
|
|
|
34
34
|
* Max slippage in basis points (50 = 0.5%).
|
|
35
35
|
*/
|
|
36
36
|
slippage: number;
|
|
37
|
-
/**
|
|
38
|
-
* Override the smart routing address server root URL; the projectId is
|
|
39
|
-
* appended to it
|
|
40
|
-
*/
|
|
37
|
+
/** Override the smart routing address server root URL */
|
|
41
38
|
baseUrl?: string;
|
|
42
39
|
};
|
|
43
40
|
export type AddressState = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,+BAA+B,EAC/B,cAAc,EACd,yCAAyC,EACzC,0BAA0B,EAC1B,UAAU,EACX,MAAM,gCAAgC,CAAA;AACvC,OAAO,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,MAAM,CAAA;AAE1C;;;uCAGuC;AACvC,MAAM,MAAM,oBAAoB,GAAG,cAAc,GAAG;IAAE,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,EAAE,MAAM,CAAA;IAClB,kCAAkC;IAClC,aAAa,EAAE,MAAM,CAAA;IACrB,sEAAsE;IACtE,OAAO,CAAC,EAAE,0BAA0B,CAAA;IACpC;;;OAGG;IACH,OAAO,CAAC,EAAE,+BAA+B,CAAC,SAAS,CAAC,CAAA;IACpD;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAA;IAChB,yDAAyD;IACzD,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB,CAAA;AAED,MAAM,MAAM,YAAY,GACpB;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,GAClB;IAAE,MAAM,EAAE,SAAS,CAAA;CAAE,GACrB;IACE,MAAM,EAAE,SAAS,CAAA;IACjB,OAAO,EAAE,OAAO,CAAA;IAChB,aAAa,EAAE,YAAY,EAAE,CAAA;CAC9B,GACD;IAAE,MAAM,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,KAAK,CAAA;CAAE,CAAA;AAErC,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,UAAU,GAAG,WAAW,GAAG,QAAQ,CAAA;AAE1E;;;;GAIG;AACH,MAAM,MAAM,WAAW,GAAG;IACxB,kDAAkD;IAClD,aAAa,EAAE,MAAM,CAAA;IACrB,8CAA8C;IAC9C,eAAe,EAAE,MAAM,CAAA;IACvB,oDAAoD;IACpD,KAAK,EAAE,OAAO,CAAA;IACd,uEAAuE;IACvE,MAAM,EAAE,MAAM,CAAA;IACd,4CAA4C;IAC5C,QAAQ,EAAE,MAAM,CAAA;IAChB;;sDAEkD;IAClD,SAAS,EAAE,MAAM,CAAA;CAClB,CAAA"}
|
|
@@ -1,14 +1,7 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { CALL, SmartRoutingAddressVersion, TOKEN_TYPE } from '@zerodev/smart-routing-address';
|
|
2
2
|
import { type Address, type Chain } from 'viem';
|
|
3
3
|
import type { EstimatedFee, SmartRoutingAddressConfig, SourceToken } from '../types';
|
|
4
4
|
export declare function resolveVersion(config: SmartRoutingAddressConfig): SmartRoutingAddressVersion;
|
|
5
|
-
/**
|
|
6
|
-
* Server URL for all smart routing address requests: the server root
|
|
7
|
-
* (default or `config.baseUrl`) with the ZeroDev project id appended.
|
|
8
|
-
* Without a project id the URL is only overridden when `config.baseUrl`
|
|
9
|
-
* is set; undefined leaves the SDK default in place.
|
|
10
|
-
*/
|
|
11
|
-
export declare function resolveBaseUrl(config: SmartRoutingAddressConfig): string | undefined;
|
|
12
5
|
export declare function resolveDashboardUrl(address?: string): string;
|
|
13
6
|
/** Chain where the routed funds settle */
|
|
14
7
|
export declare function resolveDestChain(config: SmartRoutingAddressConfig): Chain;
|
|
@@ -28,8 +21,17 @@ export declare function sourceTokensFromFees(estimatedFees: EstimatedFee[]): Sou
|
|
|
28
21
|
* Destination actions for every resolved source token type: ERC-20 deposits
|
|
29
22
|
* are transferred to the recipient and native deposits are forwarded as
|
|
30
23
|
* value. FLEX placeholders are resolved by the server per deposit.
|
|
24
|
+
*
|
|
25
|
+
* v0.x managers additionally run `fallBack` when `action` reverts, so legacy
|
|
26
|
+
* versions get the same calls as the fallback; v1 managers have no fallback
|
|
27
|
+
* and reject the field.
|
|
31
28
|
*/
|
|
32
|
-
export declare function resolveActions(config: SmartRoutingAddressConfig, recipient: Address):
|
|
29
|
+
export declare function resolveActions(config: SmartRoutingAddressConfig, recipient: Address, version: SmartRoutingAddressVersion): {
|
|
30
|
+
[key in TOKEN_TYPE]?: {
|
|
31
|
+
action: CALL[];
|
|
32
|
+
fallBack?: CALL[];
|
|
33
|
+
};
|
|
34
|
+
};
|
|
33
35
|
/** Display symbol for a source token (native tokens use the chain symbol) */
|
|
34
36
|
export declare function getSourceTokenSymbol(source: SourceToken): string;
|
|
35
37
|
//# sourceMappingURL=config.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/utils/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/utils/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,IAAI,EACJ,0BAA0B,EAC1B,UAAU,EACX,MAAM,gCAAgC,CAAA;AAOvC,OAAO,EAAE,KAAK,OAAO,EAAE,KAAK,KAAK,EAAY,MAAM,MAAM,CAAA;AAEzD,OAAO,KAAK,EACV,YAAY,EACZ,yBAAyB,EACzB,WAAW,EACZ,MAAM,UAAU,CAAA;AAIjB,wBAAgB,cAAc,CAC5B,MAAM,EAAE,yBAAyB,GAChC,0BAA0B,CAE5B;AAED,wBAAgB,mBAAmB,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAG5D;AAED,0CAA0C;AAC1C,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,yBAAyB,GAAG,KAAK,CAEzE;AAYD;;;;GAIG;AACH,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,yBAAyB,GAChC,WAAW,EAAE,CAKf;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAClC,aAAa,EAAE,YAAY,EAAE,GAC5B,WAAW,EAAE,CAWf;AAMD;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAC5B,MAAM,EAAE,yBAAyB,EACjC,SAAS,EAAE,OAAO,EAClB,OAAO,EAAE,0BAA0B,GAClC;KAAG,GAAG,IAAI,UAAU,CAAC,CAAC,EAAE;QAAE,MAAM,EAAE,IAAI,EAAE,CAAC;QAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,CAAA;KAAE;CAAE,CAoBjE;AAED,6EAA6E;AAC7E,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,WAAW,GAAG,MAAM,CAQhE"}
|