@coti-io/coti-wallet-plugin 0.2.1 → 0.2.3
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/index.d.mts +175 -72
- package/dist/index.d.ts +175 -72
- package/dist/index.js +3119 -2484
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2932 -2300
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BigNumberish, ethers } from 'ethers';
|
|
2
|
-
import { PodFeeEstimate, PodSdkConfig } from '@coti-io/pod-sdk';
|
|
2
|
+
import { PodFeeEstimate, PodSdkConfig, PodMethodArgument } from '@coti-io/pod-sdk';
|
|
3
3
|
import react from 'react';
|
|
4
4
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
5
5
|
import * as viem from 'viem';
|
|
@@ -42,6 +42,12 @@ interface PodFeeEstimationLimits {
|
|
|
42
42
|
forwardGasLimit: bigint;
|
|
43
43
|
callBackGasLimit: bigint;
|
|
44
44
|
callBackDataSize?: bigint;
|
|
45
|
+
/**
|
|
46
|
+
* Inbox forward calldata size (bytes). Required for encrypted methods (e.g. itUint256
|
|
47
|
+
* transfer) — plaintext arg-length heuristics understate encrypted payloads.
|
|
48
|
+
* PodERC20 uses 512 for remote call size.
|
|
49
|
+
*/
|
|
50
|
+
forwardDataSize?: bigint;
|
|
45
51
|
}
|
|
46
52
|
interface ChainIndexPageUi {
|
|
47
53
|
/** Extra section below token cards (e.g. PoD request tracker on Sepolia). */
|
|
@@ -66,10 +72,11 @@ interface ChainConfig {
|
|
|
66
72
|
unlockStrategy: UnlockStrategy;
|
|
67
73
|
portalStrategy: PortalStrategy;
|
|
68
74
|
walletNetwork: WalletNetworkConfig;
|
|
69
|
-
/** Inbox fee estimation gas limits for PoD portal deposit/withdraw. */
|
|
75
|
+
/** Inbox fee estimation gas limits for PoD portal deposit/withdraw and pToken transfer. */
|
|
70
76
|
podFeeEstimation?: {
|
|
71
77
|
deposit: PodFeeEstimationLimits;
|
|
72
78
|
withdraw: PodFeeEstimationLimits;
|
|
79
|
+
transfer: PodFeeEstimationLimits;
|
|
73
80
|
};
|
|
74
81
|
/** Main Index page: which chrome and labels to show for this chain. */
|
|
75
82
|
indexPage: ChainIndexPageUi;
|
|
@@ -234,11 +241,12 @@ interface CotiPluginConfig {
|
|
|
234
241
|
*/
|
|
235
242
|
snapVersion?: string;
|
|
236
243
|
/**
|
|
237
|
-
* When false,
|
|
238
|
-
*
|
|
239
|
-
*
|
|
244
|
+
* When false, Snap is fully disabled for this app: no install/connect,
|
|
245
|
+
* no AES key probe/retrieval, and strategy routing ignores an already-installed
|
|
246
|
+
* Snap. Unlock continues via encrypted backup restore and/or contract
|
|
247
|
+
* onboarding. Default: true.
|
|
240
248
|
*/
|
|
241
|
-
|
|
249
|
+
snapEnabled?: boolean;
|
|
242
250
|
/** If set, enforces a specific network chain ID (decimal string or hex). */
|
|
243
251
|
defaultNetworkId?: string;
|
|
244
252
|
/** Sepolia RPC URL for PoD portal operations. */
|
|
@@ -272,7 +280,16 @@ interface CotiPluginConfig {
|
|
|
272
280
|
* Only COTI Testnet and COTI Mainnet can hold AES keys.
|
|
273
281
|
*/
|
|
274
282
|
aesKeyChainId?: AesKeyChainId;
|
|
275
|
-
/**
|
|
283
|
+
/**
|
|
284
|
+
* When false, skips native COTI grant requests during onboarding.
|
|
285
|
+
* Default: true. Uses built-in grant API when no custom grantNativeCoti is set.
|
|
286
|
+
*/
|
|
287
|
+
onboardingGrantEnabled?: boolean;
|
|
288
|
+
/** COTI Testnet gas-grant endpoint. Default: official COTI Testnet grant API. */
|
|
289
|
+
grantApiUrlTestnet?: string;
|
|
290
|
+
/** COTI Mainnet gas-grant endpoint. No default — grant is skipped on mainnet until set. */
|
|
291
|
+
grantApiUrlMainnet?: string;
|
|
292
|
+
/** Native COTI threshold required before contract onboarding. Defaults to 0.2 COTI. */
|
|
276
293
|
onboardingGrantMinBalanceWei?: BigNumberish;
|
|
277
294
|
/** Polling interval after grant callback. Defaults to 2000ms. */
|
|
278
295
|
onboardingGrantPollIntervalMs?: number;
|
|
@@ -302,8 +319,8 @@ declare function getSnapRequestParams(snapId?: string, snapVersion?: string): Re
|
|
|
302
319
|
* Returns the current plugin configuration.
|
|
303
320
|
*/
|
|
304
321
|
declare function getPluginConfig(): Readonly<CotiPluginConfig>;
|
|
305
|
-
/** Whether
|
|
306
|
-
declare function
|
|
322
|
+
/** Whether Snap usage (install, probe, AES key retrieve/save) is allowed for this app. */
|
|
323
|
+
declare function isSnapEnabled(): boolean;
|
|
307
324
|
|
|
308
325
|
/**
|
|
309
326
|
* Internal logger for the COTI Wallet Plugin.
|
|
@@ -441,7 +458,7 @@ declare const DEFAULT_POD_BALANCE_STATE: PodBalanceState;
|
|
|
441
458
|
type PodPortalRequestStatus = "wallet-signing" | "source-submitted" | "source-mined" | "target-mined" | "callback-generated" | "pod-pending" | "callback-errored" | "succeeded" | "failed" | "burn-debt";
|
|
442
459
|
interface PodPortalRequest {
|
|
443
460
|
id: string;
|
|
444
|
-
kind: "deposit" | "withdraw";
|
|
461
|
+
kind: "deposit" | "withdraw" | "transfer";
|
|
445
462
|
chainId: number;
|
|
446
463
|
sourceTxHash: string;
|
|
447
464
|
requestId?: string;
|
|
@@ -471,7 +488,7 @@ declare const PRIVACY_PORTAL_ABI: readonly ["function underlyingToken() view ret
|
|
|
471
488
|
* - maxFee == type(uint128).max is the deployed "no cap" sentinel.
|
|
472
489
|
*/
|
|
473
490
|
declare const POD_PORTAL_ADMIN_ABI: readonly ["function owner() view returns (address)", "function setDepositFee(uint256 fixedFee, uint256 percentageBps, uint256 maxFee)", "function setWithdrawFee(uint256 fixedFee, uint256 percentageBps, uint256 maxFee)", "function getFeeConfig(bool isDeposit) view returns (uint256 fixedFee, uint256 percentageBps, uint256 maxFee)", "function accumulatedPortalFees() view returns (uint256)", "function estimateDepositFees(uint256 amount) view returns (uint256 portalFee,bool usedDynamicPricing,uint256 mintTotalFee,uint256 mintCallbackFee)", "function estimateWithdrawFees(uint256 amount) view returns (uint256 portalFee,bool usedDynamicPricing,uint256 transferTotalFee,uint256 transferCallbackFee)"];
|
|
474
|
-
declare const POD_PTOKEN_ABI: readonly ["function name() view returns (string)", "function symbol() view returns (string)", "function decimals() view returns (uint8)", "function nonces(address owner) view returns (uint256)", "function failedRequests(bytes32 requestId) view returns (bytes)", "function balanceOf(address account) view returns (tuple(uint256 ciphertextHigh,uint256 ciphertextLow))", "function balanceWithState(address account) view returns (tuple(uint256 ciphertextHigh,uint256 ciphertextLow) balance,bool pending,bool callbackErrored)", "function balanceOfWithStatus(address account) view returns (tuple(uint256 ciphertextHigh,uint256 ciphertextLow),bool)", "error TransferAlreadyPending(address from, address to, bytes32 requestId)", "event TransferRequestSubmitted(address indexed from,address indexed to,bytes32 requestId)", "event Transfer(address indexed from,address indexed to,bytes senderValue,bytes receiverValue)", "event TransferFailed(address indexed from,address indexed to,bytes errorMsg)", "event RequestCallbackFailed(address indexed from,address indexed to,bytes32 requestId,bytes callbackData)"];
|
|
491
|
+
declare const POD_PTOKEN_ABI: readonly ["function name() view returns (string)", "function symbol() view returns (string)", "function decimals() view returns (uint8)", "function nonces(address owner) view returns (uint256)", "function failedRequests(bytes32 requestId) view returns (bytes)", "function balanceOf(address account) view returns (tuple(uint256 ciphertextHigh,uint256 ciphertextLow))", "function balanceWithState(address account) view returns (tuple(uint256 ciphertextHigh,uint256 ciphertextLow) balance,bool pending,bool callbackErrored)", "function balanceOfWithStatus(address account) view returns (tuple(uint256 ciphertextHigh,uint256 ciphertextLow),bool)", "function transfer(address to, ((uint256,uint256),bytes) value, uint256 callbackFeeLocalWei) payable returns (bytes32)", "function estimateFee() view returns (uint256 totalFeeWei, uint256 targetFeeWei, uint256 callbackFeeWei)", "error TransferAlreadyPending(address from, address to, bytes32 requestId)", "event TransferRequestSubmitted(address indexed from,address indexed to,bytes32 requestId)", "event Transfer(address indexed from,address indexed to,bytes senderValue,bytes receiverValue)", "event TransferFailed(address indexed from,address indexed to,bytes errorMsg)", "event RequestCallbackFailed(address indexed from,address indexed to,bytes32 requestId,bytes callbackData)"];
|
|
475
492
|
|
|
476
493
|
declare const podRequestsStorageKey: (wallet?: string) => string;
|
|
477
494
|
declare function loadPodRequests(wallet?: string): PodPortalRequest[];
|
|
@@ -610,6 +627,13 @@ declare const quotePodPortalTransactionFees: (params: {
|
|
|
610
627
|
gasPrice?: bigint;
|
|
611
628
|
}) => Promise<PodPortalFeeQuote>;
|
|
612
629
|
|
|
630
|
+
type PodPTokenReadinessDebugContext = {
|
|
631
|
+
portalAddress?: string;
|
|
632
|
+
tokenSymbol?: string;
|
|
633
|
+
chainId?: number;
|
|
634
|
+
provider?: ethers.Provider | null;
|
|
635
|
+
};
|
|
636
|
+
declare const assertPodPTokenReady: (pToken: ethers.Contract, account: string, action: "deposit" | "withdraw" | "transfer", debugContext?: PodPTokenReadinessDebugContext) => Promise<void>;
|
|
613
637
|
declare function signPodWithdrawPermit(params: {
|
|
614
638
|
signer: ethers.JsonRpcSigner;
|
|
615
639
|
pTokenAddress: string;
|
|
@@ -639,6 +663,138 @@ declare function executePodPortalTransaction(params: {
|
|
|
639
663
|
receipt: ethers.TransactionReceipt;
|
|
640
664
|
}>;
|
|
641
665
|
|
|
666
|
+
/**
|
|
667
|
+
* Typed EIP-1193 provider interface for window.ethereum access.
|
|
668
|
+
* Eliminates `as any` casts throughout the codebase.
|
|
669
|
+
*/
|
|
670
|
+
interface EIP1193Provider {
|
|
671
|
+
request: (args: {
|
|
672
|
+
method: string;
|
|
673
|
+
params?: unknown[] | Record<string, unknown>;
|
|
674
|
+
}) => Promise<any>;
|
|
675
|
+
isMetaMask?: boolean;
|
|
676
|
+
isRabby?: boolean;
|
|
677
|
+
isPhantom?: boolean;
|
|
678
|
+
on?: (event: string, handler: (...args: any[]) => void) => void;
|
|
679
|
+
removeListener?: (event: string, handler: (...args: any[]) => void) => void;
|
|
680
|
+
providers?: EIP1193Provider[];
|
|
681
|
+
}
|
|
682
|
+
interface InjectedWalletTarget {
|
|
683
|
+
id: string;
|
|
684
|
+
name: string;
|
|
685
|
+
provider: EIP1193Provider;
|
|
686
|
+
}
|
|
687
|
+
/**
|
|
688
|
+
* Returns the EIP-6963 discovered MetaMask provider when available.
|
|
689
|
+
*/
|
|
690
|
+
declare function getEip6963MetaMaskProvider(): EIP1193Provider | null;
|
|
691
|
+
declare function getEip6963RabbyProvider(): EIP1193Provider | null;
|
|
692
|
+
/**
|
|
693
|
+
* Resolves the MetaMask injected target for wagmi/RainbowKit.
|
|
694
|
+
* Never returns undefined — wagmi's injected() connector falls back to
|
|
695
|
+
* window.ethereum (often Rabby) when target() is undefined.
|
|
696
|
+
*/
|
|
697
|
+
declare function resolveMetaMaskInjectedTarget(): InjectedWalletTarget;
|
|
698
|
+
/**
|
|
699
|
+
* Resolves the Rabby injected target for wagmi/RainbowKit.
|
|
700
|
+
* Never returns undefined — avoids wagmi falling back to a generic injected provider.
|
|
701
|
+
*/
|
|
702
|
+
declare function resolveRabbyInjectedTarget(): InjectedWalletTarget;
|
|
703
|
+
/**
|
|
704
|
+
* Returns the typed EIP-1193 provider from `window.ethereum`, or null if unavailable.
|
|
705
|
+
* Use this instead of `window.ethereum as any` throughout the codebase.
|
|
706
|
+
* Handles the case where window.ethereum access may throw due to property
|
|
707
|
+
* redefinition conflicts between wallet extensions.
|
|
708
|
+
*/
|
|
709
|
+
declare function getEthereumProvider(): EIP1193Provider | null;
|
|
710
|
+
/** Minimal wagmi-connector shape needed to resolve its EIP-1193 provider. */
|
|
711
|
+
interface ConnectorProviderSource {
|
|
712
|
+
getProvider?: (params?: {
|
|
713
|
+
chainId?: number;
|
|
714
|
+
}) => Promise<unknown>;
|
|
715
|
+
}
|
|
716
|
+
/**
|
|
717
|
+
* Resolves the EIP-1193 provider for the wallet the user actually connected.
|
|
718
|
+
* Prefers the wagmi connector's provider (the exact wallet chosen via
|
|
719
|
+
* RainbowKit), then the EIP-6963 MetaMask provider, and only then the
|
|
720
|
+
* window.ethereum global — which belongs to whichever extension won the
|
|
721
|
+
* injection race when multiple wallets are installed, so signing through it
|
|
722
|
+
* can pop up a wallet the user never connected.
|
|
723
|
+
*/
|
|
724
|
+
declare function resolveConnectedProvider(connector?: ConnectorProviderSource | null): Promise<EIP1193Provider | null>;
|
|
725
|
+
|
|
726
|
+
type PodTransferFeeQuote = {
|
|
727
|
+
gasPrice: bigint;
|
|
728
|
+
podInboxFeeWei: bigint;
|
|
729
|
+
podCallbackFeeWei: bigint;
|
|
730
|
+
l1ExecutionGasWei: bigint;
|
|
731
|
+
podFeeEstimate: PodFeeEstimate;
|
|
732
|
+
display: {
|
|
733
|
+
podInboxFee: string;
|
|
734
|
+
l1Gas: string;
|
|
735
|
+
feeSymbol: string;
|
|
736
|
+
};
|
|
737
|
+
};
|
|
738
|
+
declare const buildPodTransferMethodArgs: (params: {
|
|
739
|
+
recipient: string;
|
|
740
|
+
amountWei: bigint;
|
|
741
|
+
}) => PodMethodArgument[];
|
|
742
|
+
/** Single source of truth for PoD pToken Send fee quotes — one gasPrice, inbox + L1 gas. */
|
|
743
|
+
declare const quotePodTransferFees: (params: {
|
|
744
|
+
runner: ethers.ContractRunner;
|
|
745
|
+
chainId: number;
|
|
746
|
+
pTokenAddress: string;
|
|
747
|
+
recipient: string;
|
|
748
|
+
amountWei: bigint;
|
|
749
|
+
gasPrice?: bigint;
|
|
750
|
+
}) => Promise<PodTransferFeeQuote>;
|
|
751
|
+
|
|
752
|
+
interface ExecutePodPrivateTokenTransferParams {
|
|
753
|
+
chainId: number;
|
|
754
|
+
symbol: string;
|
|
755
|
+
recipient: string;
|
|
756
|
+
amount: string;
|
|
757
|
+
walletAddress: string;
|
|
758
|
+
provider?: EIP1193Provider | null;
|
|
759
|
+
}
|
|
760
|
+
interface ExecutePodPrivateTokenTransferResult {
|
|
761
|
+
txHash: string;
|
|
762
|
+
request?: PodPortalRequest;
|
|
763
|
+
}
|
|
764
|
+
/**
|
|
765
|
+
* PoD pToken peer Send — quote + encrypt + pay inbox fee via `@coti-io/pod-sdk`,
|
|
766
|
+
* mirroring portal in/out fee/send discipline (pinned gasPrice, callback fee slot).
|
|
767
|
+
*/
|
|
768
|
+
declare function executePodPrivateTokenTransfer(params: ExecutePodPrivateTokenTransferParams): Promise<ExecutePodPrivateTokenTransferResult>;
|
|
769
|
+
/** Quote PoD transfer fees for UI (recipient may be a placeholder when unknown). */
|
|
770
|
+
declare function quotePodPrivateTokenTransferFees(params: {
|
|
771
|
+
chainId: number;
|
|
772
|
+
symbol: string;
|
|
773
|
+
recipient: string;
|
|
774
|
+
amount: string;
|
|
775
|
+
walletAddress: string;
|
|
776
|
+
provider?: EIP1193Provider | null;
|
|
777
|
+
}): Promise<PodTransferFeeQuote>;
|
|
778
|
+
|
|
779
|
+
interface UsePodTransferFeesOptions {
|
|
780
|
+
isConnected: boolean;
|
|
781
|
+
walletAddress?: string;
|
|
782
|
+
chainId?: number;
|
|
783
|
+
symbol?: string;
|
|
784
|
+
recipient?: string;
|
|
785
|
+
amount: string;
|
|
786
|
+
enabled?: boolean;
|
|
787
|
+
}
|
|
788
|
+
/** PoD pToken Send fee quotes — inbox fee + L1 gas in native token. */
|
|
789
|
+
declare const usePodTransferFees: ({ isConnected, walletAddress, chainId, symbol, recipient, amount, enabled, }: UsePodTransferFeesOptions) => {
|
|
790
|
+
podInboxFee: string | null;
|
|
791
|
+
l1GasFee: string | null;
|
|
792
|
+
feeSymbol: string;
|
|
793
|
+
isGasEstimating: boolean;
|
|
794
|
+
refreshFees: () => Promise<void>;
|
|
795
|
+
isPodChain: boolean;
|
|
796
|
+
};
|
|
797
|
+
|
|
642
798
|
/**
|
|
643
799
|
* PoDPriceOracle deployed alongside the PoD privacy portals (Band adapter on
|
|
644
800
|
* Sepolia, Chainlink adapter on Fuji). Prices are 18-decimal USD per whole
|
|
@@ -3707,6 +3863,12 @@ interface AesKeyProviderOptions {
|
|
|
3707
3863
|
forceContractOnboarding?: boolean;
|
|
3708
3864
|
/** Whether contract-onboarding should save a client-encrypted AES backup. */
|
|
3709
3865
|
saveBackup?: boolean;
|
|
3866
|
+
/**
|
|
3867
|
+
* Persist the onboarded AES key to Snap after contract onboarding.
|
|
3868
|
+
* Used when the unlock UI just connected Snap (`wallet_requestSnaps`) but
|
|
3869
|
+
* `isMetaMaskWithSnap` may still be stale.
|
|
3870
|
+
*/
|
|
3871
|
+
persistToSnap?: boolean;
|
|
3710
3872
|
/** Only restore via Snap-side decrypt / backup; never export raw key or run contract onboarding. */
|
|
3711
3873
|
restoreOnly?: boolean;
|
|
3712
3874
|
/** Unlock via Snap typed decrypt RPC (no raw AES export). Used when AES is already stored in Snap. */
|
|
@@ -3778,6 +3940,7 @@ interface PrivacyBridgeUnlockContextValue {
|
|
|
3778
3940
|
amount: string;
|
|
3779
3941
|
}) => Promise<{
|
|
3780
3942
|
txHash: string;
|
|
3943
|
+
request?: PodPortalRequest;
|
|
3781
3944
|
}>;
|
|
3782
3945
|
/** Encrypt a human-readable amount into ctUint256 JSON without exposing the AES key. */
|
|
3783
3946
|
encryptPrivateValue: (params: {
|
|
@@ -3915,66 +4078,6 @@ interface FeeEstimate {
|
|
|
3915
4078
|
}
|
|
3916
4079
|
declare function estimateBridgeFee(symbol: string, amount: string, provider: ethers.JsonRpcProvider | ethers.BrowserProvider): Promise<FeeEstimate>;
|
|
3917
4080
|
|
|
3918
|
-
/**
|
|
3919
|
-
* Typed EIP-1193 provider interface for window.ethereum access.
|
|
3920
|
-
* Eliminates `as any` casts throughout the codebase.
|
|
3921
|
-
*/
|
|
3922
|
-
interface EIP1193Provider {
|
|
3923
|
-
request: (args: {
|
|
3924
|
-
method: string;
|
|
3925
|
-
params?: unknown[] | Record<string, unknown>;
|
|
3926
|
-
}) => Promise<any>;
|
|
3927
|
-
isMetaMask?: boolean;
|
|
3928
|
-
isRabby?: boolean;
|
|
3929
|
-
isPhantom?: boolean;
|
|
3930
|
-
on?: (event: string, handler: (...args: any[]) => void) => void;
|
|
3931
|
-
removeListener?: (event: string, handler: (...args: any[]) => void) => void;
|
|
3932
|
-
providers?: EIP1193Provider[];
|
|
3933
|
-
}
|
|
3934
|
-
interface InjectedWalletTarget {
|
|
3935
|
-
id: string;
|
|
3936
|
-
name: string;
|
|
3937
|
-
provider: EIP1193Provider;
|
|
3938
|
-
}
|
|
3939
|
-
/**
|
|
3940
|
-
* Returns the EIP-6963 discovered MetaMask provider when available.
|
|
3941
|
-
*/
|
|
3942
|
-
declare function getEip6963MetaMaskProvider(): EIP1193Provider | null;
|
|
3943
|
-
declare function getEip6963RabbyProvider(): EIP1193Provider | null;
|
|
3944
|
-
/**
|
|
3945
|
-
* Resolves the MetaMask injected target for wagmi/RainbowKit.
|
|
3946
|
-
* Never returns undefined — wagmi's injected() connector falls back to
|
|
3947
|
-
* window.ethereum (often Rabby) when target() is undefined.
|
|
3948
|
-
*/
|
|
3949
|
-
declare function resolveMetaMaskInjectedTarget(): InjectedWalletTarget;
|
|
3950
|
-
/**
|
|
3951
|
-
* Resolves the Rabby injected target for wagmi/RainbowKit.
|
|
3952
|
-
* Never returns undefined — avoids wagmi falling back to a generic injected provider.
|
|
3953
|
-
*/
|
|
3954
|
-
declare function resolveRabbyInjectedTarget(): InjectedWalletTarget;
|
|
3955
|
-
/**
|
|
3956
|
-
* Returns the typed EIP-1193 provider from `window.ethereum`, or null if unavailable.
|
|
3957
|
-
* Use this instead of `window.ethereum as any` throughout the codebase.
|
|
3958
|
-
* Handles the case where window.ethereum access may throw due to property
|
|
3959
|
-
* redefinition conflicts between wallet extensions.
|
|
3960
|
-
*/
|
|
3961
|
-
declare function getEthereumProvider(): EIP1193Provider | null;
|
|
3962
|
-
/** Minimal wagmi-connector shape needed to resolve its EIP-1193 provider. */
|
|
3963
|
-
interface ConnectorProviderSource {
|
|
3964
|
-
getProvider?: (params?: {
|
|
3965
|
-
chainId?: number;
|
|
3966
|
-
}) => Promise<unknown>;
|
|
3967
|
-
}
|
|
3968
|
-
/**
|
|
3969
|
-
* Resolves the EIP-1193 provider for the wallet the user actually connected.
|
|
3970
|
-
* Prefers the wagmi connector's provider (the exact wallet chosen via
|
|
3971
|
-
* RainbowKit), then the EIP-6963 MetaMask provider, and only then the
|
|
3972
|
-
* window.ethereum global — which belongs to whichever extension won the
|
|
3973
|
-
* injection race when multiple wallets are installed, so signing through it
|
|
3974
|
-
* can pop up a wallet the user never connected.
|
|
3975
|
-
*/
|
|
3976
|
-
declare function resolveConnectedProvider(connector?: ConnectorProviderSource | null): Promise<EIP1193Provider | null>;
|
|
3977
|
-
|
|
3978
4081
|
/** Matches coti-snap useTokenOperations private 256-bit transfer selector. */
|
|
3979
4082
|
declare const PRIVATE_ERC20_TRANSFER_256_SIG = "transfer(address,((uint256,uint256),bytes))";
|
|
3980
4083
|
declare function resolvePrivateTokenContractAddress(chainId: number, addressKey: string): string | undefined;
|
|
@@ -4752,4 +4855,4 @@ declare function muteChainUpdates(): void;
|
|
|
4752
4855
|
declare function unmuteChainUpdates(): void;
|
|
4753
4856
|
declare function isChainUpdatesMuted(): boolean;
|
|
4754
4857
|
|
|
4755
|
-
export { type AesKeyChainId, type AesKeyProviderOptions, BRIDGE_ABI, BRIDGE_ERC20_ABI, type BridgeData, type BridgeFees, type BridgeStatus, CHAIN_CONFIGS, CONTRACT_ADDRESSES, COTI_MAINNET_CHAIN_ID, COTI_MAINNET_RPC, COTI_PRICE_CONSUMER_ABI, COTI_TESTNET_CHAIN_ID$1 as COTI_TESTNET_CHAIN_ID, COTI_TESTNET_POD_INBOX, COTI_TESTNET_RPC, type ChainIndexPageUi, type ConnectorProviderSource, type CotiBridgeFeeQuote, CotiErrorCode, type CotiPluginConfig, CotiPluginError, DEFAULT_CHAIN_ID, DEFAULT_POD_BALANCE_STATE, DEFAULT_POD_EXPLORER_BASE_URL, type EIP1193Provider, ERC20_ABI, ETHEREUM_MAINNET_CHAIN_ID, ETHEREUM_MAINNET_RPC, type EncryptedAesBackup, type FeeEstimate, type GrantResult, LIMITS, type Logger, MINIMUM_PORTAL_IN_AMOUNTS, MULTIPLE_WALLETS_ERROR_SUBSTRING, type NetworkEnforcerResult, NetworkGuard, type NetworkGuardProps, ONBOARDING_STEPS, ONBOARD_MODAL_STYLE_KEYS, OnboardModal, type OnboardModalPage, type OnboardModalProps, type OnboardModalTheme, type OnboardModalWarnings, type OnboardingProgressCallback, type OnboardingServiceRequest, type OnboardingServices, type OnboardingStep, type OnboardingStepInfo, COTI_TESTNET_CHAIN_ID as POD_COTI_TESTNET_CHAIN_ID, POD_INBOX_ADDRESS, POD_PORTAL_ADMIN_ABI, POD_PRICE_ORACLE_ABI, POD_PTOKEN_ABI, SEPOLIA_CHAIN_ID as POD_SEPOLIA_CHAIN_ID, PRIVACY_PORTAL_ABI, PRIVATE_ERC20_TRANSFER_256_SIG, type PodBalanceState, type PodBalanceTrustState, type PodPortalFeeQuote, type PodPortalRequest, type PodPortalRequestStatus, type PodWithdrawPermit, type ChainConfig as PortalChainConfig, type PortalStrategy, type PrivacyBridgeContextType, type PrivacyBridgeModalsContextValue, type PrivacyBridgeNetworkContextValue, type PrivacyBridgePodContextValue, PrivacyBridgeProvider, type PrivacyBridgeProviderProps, type PrivacyBridgeSwapContextValue, type PrivacyBridgeTokensContextValue, type PrivacyBridgeUnlockContextValue, type PrivacyBridgeWalletContextValue, type PrivateUnlockControllerValue, PrivateUnlockProvider, type PrivateUnlockProviderOptions, type PrivateUnlockProviderProps, type RefreshPrivateBalancesOptions, type ResolvedIndexPageUi, SEPOLIA_CHAIN_ID$1 as SEPOLIA_CHAIN_ID, SEPOLIA_RPC, SEPOLIA_RPC_FALLBACK, SUPPORTED_TOKENS, type SaveEncryptedAesBackupRequest, type SimulationResult, TOKEN_ABI, type TokenConfig, type UnlockStrategy, WALLET_CONNECT_FAILURE_EVENT, type WagmiConfigOptions, WagmiRainbowKitProvider, type WalletConnectFailureDetail, type WalletNetworkConfig, type WalletType, type WalletTypeInfo, addThousandsSeparators, buildPodExplorerRequestUrl, computeCotiFee, computeErc20Fee, configureCotiPlugin, cotiMainnet, cotiTestnet, estimateBridgeFee, estimateCotiBridgeGasFeeDisplay, estimatePodPortalFees, ethereumMainnet, executePodPortalTransaction, fetchBridgeFees, fetchPodBridgeData, fetchPodOracleTokenUsdPrice, fetchTokenUsdPrice, formatBalanceWithNotation, formatPodFeeDisplay, formatPortalFeeDisplay, formatTokenBalanceDisplay, getChainConfig, getChainIdConstants, getContractAddresses, getEip6963MetaMaskProvider, getEip6963RabbyProvider, getEthereumProvider, getExplorerBaseUrlForChain, getNetworkNameForChain, getPluginConfig, getPodGasPrice, getPodInboxAddress, getPodSdkConfig, getPrivateTokensForChain, getPublicTokensForChain, getRpcUrlForChain, getRpcUrlForChainId, getRpcUrlsForChain, getSepoliaGasPrice, getSnapRequestParams, getTokenSimulationMeta, getTokensForChain, getUnlockStrategyForChain, getWagmiConfig, getWalletNetworkConfigs, getWalletNetworkOptions, hasCotiErrorCode, isChainUpdatesMuted, isCotiPluginError, isMultipleWalletsError,
|
|
4858
|
+
export { type AesKeyChainId, type AesKeyProviderOptions, BRIDGE_ABI, BRIDGE_ERC20_ABI, type BridgeData, type BridgeFees, type BridgeStatus, CHAIN_CONFIGS, CONTRACT_ADDRESSES, COTI_MAINNET_CHAIN_ID, COTI_MAINNET_RPC, COTI_PRICE_CONSUMER_ABI, COTI_TESTNET_CHAIN_ID$1 as COTI_TESTNET_CHAIN_ID, COTI_TESTNET_POD_INBOX, COTI_TESTNET_RPC, type ChainIndexPageUi, type ConnectorProviderSource, type CotiBridgeFeeQuote, CotiErrorCode, type CotiPluginConfig, CotiPluginError, DEFAULT_CHAIN_ID, DEFAULT_POD_BALANCE_STATE, DEFAULT_POD_EXPLORER_BASE_URL, type EIP1193Provider, ERC20_ABI, ETHEREUM_MAINNET_CHAIN_ID, ETHEREUM_MAINNET_RPC, type EncryptedAesBackup, type FeeEstimate, type GrantResult, LIMITS, type Logger, MINIMUM_PORTAL_IN_AMOUNTS, MULTIPLE_WALLETS_ERROR_SUBSTRING, type NetworkEnforcerResult, NetworkGuard, type NetworkGuardProps, ONBOARDING_STEPS, ONBOARD_MODAL_STYLE_KEYS, OnboardModal, type OnboardModalPage, type OnboardModalProps, type OnboardModalTheme, type OnboardModalWarnings, type OnboardingProgressCallback, type OnboardingServiceRequest, type OnboardingServices, type OnboardingStep, type OnboardingStepInfo, COTI_TESTNET_CHAIN_ID as POD_COTI_TESTNET_CHAIN_ID, POD_INBOX_ADDRESS, POD_PORTAL_ADMIN_ABI, POD_PRICE_ORACLE_ABI, POD_PTOKEN_ABI, SEPOLIA_CHAIN_ID as POD_SEPOLIA_CHAIN_ID, PRIVACY_PORTAL_ABI, PRIVATE_ERC20_TRANSFER_256_SIG, type PodBalanceState, type PodBalanceTrustState, type PodPortalFeeQuote, type PodPortalRequest, type PodPortalRequestStatus, type PodTransferFeeQuote, type PodWithdrawPermit, type ChainConfig as PortalChainConfig, type PortalStrategy, type PrivacyBridgeContextType, type PrivacyBridgeModalsContextValue, type PrivacyBridgeNetworkContextValue, type PrivacyBridgePodContextValue, PrivacyBridgeProvider, type PrivacyBridgeProviderProps, type PrivacyBridgeSwapContextValue, type PrivacyBridgeTokensContextValue, type PrivacyBridgeUnlockContextValue, type PrivacyBridgeWalletContextValue, type PrivateUnlockControllerValue, PrivateUnlockProvider, type PrivateUnlockProviderOptions, type PrivateUnlockProviderProps, type RefreshPrivateBalancesOptions, type ResolvedIndexPageUi, SEPOLIA_CHAIN_ID$1 as SEPOLIA_CHAIN_ID, SEPOLIA_RPC, SEPOLIA_RPC_FALLBACK, SUPPORTED_TOKENS, type SaveEncryptedAesBackupRequest, type SimulationResult, TOKEN_ABI, type TokenConfig, type UnlockStrategy, WALLET_CONNECT_FAILURE_EVENT, type WagmiConfigOptions, WagmiRainbowKitProvider, type WalletConnectFailureDetail, type WalletNetworkConfig, type WalletType, type WalletTypeInfo, addThousandsSeparators, assertPodPTokenReady, buildPodExplorerRequestUrl, buildPodTransferMethodArgs, computeCotiFee, computeErc20Fee, configureCotiPlugin, cotiMainnet, cotiTestnet, estimateBridgeFee, estimateCotiBridgeGasFeeDisplay, estimatePodPortalFees, ethereumMainnet, executePodPortalTransaction, executePodPrivateTokenTransfer, fetchBridgeFees, fetchPodBridgeData, fetchPodOracleTokenUsdPrice, fetchTokenUsdPrice, formatBalanceWithNotation, formatPodFeeDisplay, formatPortalFeeDisplay, formatTokenBalanceDisplay, getChainConfig, getChainIdConstants, getContractAddresses, getEip6963MetaMaskProvider, getEip6963RabbyProvider, getEthereumProvider, getExplorerBaseUrlForChain, getNetworkNameForChain, getPluginConfig, getPodGasPrice, getPodInboxAddress, getPodSdkConfig, getPrivateTokensForChain, getPublicTokensForChain, getRpcUrlForChain, getRpcUrlForChainId, getRpcUrlsForChain, getSepoliaGasPrice, getSnapRequestParams, getTokenSimulationMeta, getTokensForChain, getUnlockStrategyForChain, getWagmiConfig, getWalletNetworkConfigs, getWalletNetworkOptions, hasCotiErrorCode, isChainUpdatesMuted, isCotiPluginError, isMultipleWalletsError, isSnapEnabled, loadPodRequests, logger, mobileZerionWallet, muteChainUpdates, defaultStyles as onboardModalDefaultStyles, podRequestsStorageKey, quoteCotiBridgeFees, quotePodPortalTransactionFees, quotePodPrivateTokenTransferFees, quotePodTransferFees, quotePortalFeeOnly, requireChainConfig, resolveConnectedProvider, resolveIndexPageUi, resolveMetaMaskInjectedTarget, resolvePodRequestStatus, resolvePodTxGasPrice, resolvePrivateTokenContractAddress, resolvePrivateTokenTransferTarget, resolveRabbyInjectedTarget, savePodRequests, sepolia, setDebugLogging, signPodWithdrawPermit, simulateFeeOnChain, simulatePodPortalFee, truncateDecimalValue, unmuteChainUpdates, useBalanceUpdater, useBridgeData, useBridgeStatus, useMetamask, useNetworkEnforcer, usePodTransferFees, usePrivacyBridgeContext, usePrivacyBridgeModals, usePrivacyBridgeNetwork, usePrivacyBridgePod, usePrivacyBridgeSwap, usePrivacyBridgeTokens, usePrivacyBridgeUnlock, usePrivacyBridgeWallet, usePrivateTokenBalance, usePrivateUnlock, useWalletType, wagmiConfig };
|