@oasisprotocol/privana-sdk 0.5.3 → 0.5.4
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 +1 -38
- package/dist/{chunk-7KEQHWZB.cjs → chunk-FGWMLLEC.cjs} +3 -3
- package/dist/{chunk-7KEQHWZB.cjs.map → chunk-FGWMLLEC.cjs.map} +1 -1
- package/dist/{chunk-DZURIIRE.js → chunk-QQG4RPYZ.js} +3 -3
- package/dist/{chunk-DZURIIRE.js.map → chunk-QQG4RPYZ.js.map} +1 -1
- package/dist/index.cjs +1461 -2592
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/dist/index.d.cts +12 -44
- package/dist/index.d.ts +12 -44
- package/dist/index.js +1283 -2411
- package/dist/index.js.map +1 -1
- package/dist/on-ramp.cjs +3 -3
- package/dist/on-ramp.d.cts +2 -2
- package/dist/on-ramp.d.ts +2 -2
- package/dist/on-ramp.js +1 -1
- package/dist/{pending-lock-f4bWWTyN.d.cts → pending-lock-DSEqUHOw.d.cts} +1 -1
- package/dist/{pending-lock-f4bWWTyN.d.ts → pending-lock-DSEqUHOw.d.ts} +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { A as Address, J as JwtRefreshResponse, H as HostedAuthTokenExchangeResponse, B as Bytes32, a as HexString, P as PrivanaClient, N as NetworkConfig, T as TokenConfig, b as TokenBalance, c as PostDepositLockConfig, D as DepositAddressResponse, d as DepositCheckResponse, e as TransactionSubmissionResponse, f as PostDepositLockError, L as LockInfo, g as PendingDeposit, h as PendingDepositsResponse, W as WithdrawalInfo, i as HistoryEntry, j as TokenInfoResponse } from './pending-lock-
|
|
2
|
-
export { k as BalanceResponse, l as BatchBalancesRequest, m as BatchBalancesResponse, C as CreateOnRampIntentRequest, n as CreateOnRampIntentResponse, o as CreateSignedLockRequestParams, p as DEFAULT_LOCK_DURATION_SECONDS, q as DEFAULT_ONRAMP_LOCK_BUFFER, r as DepositAddressRequest, s as DepositCheckRequest, E as ExpiredLocksResponse, t as HistoryKind, u as HistoryRequest, v as HistoryResponse, w as HostedAuthAuthorizeUrlRequest, x as HostedAuthResponseMode, y as HostedAuthTokenExchangeRequest, z as HttpClient, F as HttpClientConfig, I as IntegerLike, G as JwtLogoutRequest, K as JwtLogoutResponse, M as JwtRefreshRequest, O as LockFundsRequest, Q as LockNonceResponse, R as LockedFundsResponse, S as MinDepositAmounts, U as ModifyLockNonceResponse, V as ModifyLockRequest, X as NETWORK_CONFIG, Y as Network, Z as OnRampPostDepositLockConfig, _ as OnRampRecord, $ as OnRampStatus, a0 as PendingDepositStatus, a1 as PendingDepositsRequest, a2 as PendingOnRampsResponse, a3 as PendingWithdrawalsResponse, a4 as PostDepositLockFailureReason, a5 as PrivanaClientConfig, a6 as SignOnRampUrlRequest, a7 as SignOnRampUrlResponse, a8 as SiweDomainResponse, a9 as SiweLoginRequest, aa as SiweLoginResponse, ab as SiweNonceResponse, ac as SubmitPendingLockParams, ad as TokenListResponse, ae as TotalLockedBalanceResponse, af as TransferFundsRequest, ag as TransferLockedFundsRequest, ah as TransferLockedNonceResponse, ai as TransferNonceResponse, aj as UnlockAllExpiredRequest, ak as UnlockFundsRequest, al as UpdateOnRampRequest, am as UpdateOnRampResponse, an as WithdrawFromLockRequest, ao as WithdrawalInfoResponse, ap as WithdrawalNonceResponse, aq as WithdrawalRequest, ar as applyLockBuffer, as as clampLockAmount, at as clearPendingLock, au as createSignedLockRequest, av as getAccountingContract, aw as getApiUrl, ax as getChainId, ay as isSignedLockUsable, az as loadPendingLock, aA as normalizeAddress, aB as normalizeHex, aC as requireDepositLockOwner, aD as requireServiceAddress, aE as savePendingLock, aF as submitPendingLock } from './pending-lock-
|
|
1
|
+
import { A as Address, J as JwtRefreshResponse, H as HostedAuthTokenExchangeResponse, B as Bytes32, a as HexString, P as PrivanaClient, N as NetworkConfig, T as TokenConfig, b as TokenBalance, c as PostDepositLockConfig, D as DepositAddressResponse, d as DepositCheckResponse, e as TransactionSubmissionResponse, f as PostDepositLockError, L as LockInfo, g as PendingDeposit, h as PendingDepositsResponse, W as WithdrawalInfo, i as HistoryEntry, j as TokenInfoResponse } from './pending-lock-DSEqUHOw.js';
|
|
2
|
+
export { k as BalanceResponse, l as BatchBalancesRequest, m as BatchBalancesResponse, C as CreateOnRampIntentRequest, n as CreateOnRampIntentResponse, o as CreateSignedLockRequestParams, p as DEFAULT_LOCK_DURATION_SECONDS, q as DEFAULT_ONRAMP_LOCK_BUFFER, r as DepositAddressRequest, s as DepositCheckRequest, E as ExpiredLocksResponse, t as HistoryKind, u as HistoryRequest, v as HistoryResponse, w as HostedAuthAuthorizeUrlRequest, x as HostedAuthResponseMode, y as HostedAuthTokenExchangeRequest, z as HttpClient, F as HttpClientConfig, I as IntegerLike, G as JwtLogoutRequest, K as JwtLogoutResponse, M as JwtRefreshRequest, O as LockFundsRequest, Q as LockNonceResponse, R as LockedFundsResponse, S as MinDepositAmounts, U as ModifyLockNonceResponse, V as ModifyLockRequest, X as NETWORK_CONFIG, Y as Network, Z as OnRampPostDepositLockConfig, _ as OnRampRecord, $ as OnRampStatus, a0 as PendingDepositStatus, a1 as PendingDepositsRequest, a2 as PendingOnRampsResponse, a3 as PendingWithdrawalsResponse, a4 as PostDepositLockFailureReason, a5 as PrivanaClientConfig, a6 as SignOnRampUrlRequest, a7 as SignOnRampUrlResponse, a8 as SiweDomainResponse, a9 as SiweLoginRequest, aa as SiweLoginResponse, ab as SiweNonceResponse, ac as SubmitPendingLockParams, ad as TokenListResponse, ae as TotalLockedBalanceResponse, af as TransferFundsRequest, ag as TransferLockedFundsRequest, ah as TransferLockedNonceResponse, ai as TransferNonceResponse, aj as UnlockAllExpiredRequest, ak as UnlockFundsRequest, al as UpdateOnRampRequest, am as UpdateOnRampResponse, an as WithdrawFromLockRequest, ao as WithdrawalInfoResponse, ap as WithdrawalNonceResponse, aq as WithdrawalRequest, ar as applyLockBuffer, as as clampLockAmount, at as clearPendingLock, au as createSignedLockRequest, av as getAccountingContract, aw as getApiUrl, ax as getChainId, ay as isSignedLockUsable, az as loadPendingLock, aA as normalizeAddress, aB as normalizeHex, aC as requireDepositLockOwner, aD as requireServiceAddress, aE as savePendingLock, aF as submitPendingLock } from './pending-lock-DSEqUHOw.js';
|
|
3
3
|
import { WalletClient, Address as Address$1 } from 'viem';
|
|
4
4
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
5
5
|
import * as React$1 from 'react';
|
|
6
|
-
import { ReactNode
|
|
6
|
+
import { ReactNode } from 'react';
|
|
7
7
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
8
8
|
import { VariantProps } from 'class-variance-authority';
|
|
9
9
|
|
|
@@ -843,46 +843,6 @@ interface UseModifyLockResult {
|
|
|
843
843
|
}
|
|
844
844
|
declare function useModifyLock(options?: UseModifyLockOptions): UseModifyLockResult;
|
|
845
845
|
|
|
846
|
-
declare const buttonVariants: (props?: ({
|
|
847
|
-
variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
|
|
848
|
-
size?: "default" | "icon" | "sm" | "lg" | "icon-sm" | "icon-lg" | null | undefined;
|
|
849
|
-
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
850
|
-
declare function Button({ className, variant, size, asChild, ...props }: React$1.ComponentProps<'button'> & VariantProps<typeof buttonVariants> & {
|
|
851
|
-
asChild?: boolean;
|
|
852
|
-
}): react_jsx_runtime.JSX.Element;
|
|
853
|
-
|
|
854
|
-
type ButtonVariantProps = VariantProps<typeof buttonVariants>;
|
|
855
|
-
interface PrivanaButtonProps extends Omit<ComponentProps<'button'>, 'children'> {
|
|
856
|
-
children?: ReactNode;
|
|
857
|
-
variant?: ButtonVariantProps['variant'];
|
|
858
|
-
size?: ButtonVariantProps['size'];
|
|
859
|
-
asChild?: boolean;
|
|
860
|
-
renderButton?: (props: {
|
|
861
|
-
onClick: () => void;
|
|
862
|
-
isOpen: boolean;
|
|
863
|
-
}) => ReactElement;
|
|
864
|
-
hideWhenDisconnected?: boolean;
|
|
865
|
-
showLockedFunds?: boolean;
|
|
866
|
-
defaultTab?: 'deposit' | 'withdraw';
|
|
867
|
-
onDepositSuccess?: () => void;
|
|
868
|
-
}
|
|
869
|
-
declare function PrivanaButton({ children, className, variant, size, asChild, renderButton, hideWhenDisconnected, showLockedFunds, defaultTab, onDepositSuccess, ...buttonProps }: PrivanaButtonProps): react_jsx_runtime.JSX.Element | null;
|
|
870
|
-
|
|
871
|
-
interface PrivanaModalProps {
|
|
872
|
-
open: boolean;
|
|
873
|
-
onClose: () => void;
|
|
874
|
-
showLockedFunds?: boolean;
|
|
875
|
-
defaultTab?: 'deposit' | 'withdraw';
|
|
876
|
-
onDepositSuccess?: () => void;
|
|
877
|
-
}
|
|
878
|
-
declare function PrivanaModal({ open, onClose, showLockedFunds, defaultTab, onDepositSuccess, }: PrivanaModalProps): react_jsx_runtime.JSX.Element;
|
|
879
|
-
declare function PrivanaInlineModal({ className, showLockedFunds, defaultTab, onDepositSuccess, }: {
|
|
880
|
-
className?: string;
|
|
881
|
-
showLockedFunds?: boolean;
|
|
882
|
-
defaultTab?: 'deposit' | 'withdraw';
|
|
883
|
-
onDepositSuccess?: () => void;
|
|
884
|
-
}): react_jsx_runtime.JSX.Element;
|
|
885
|
-
|
|
886
846
|
type DepositMethodTab = 'crypto' | 'credit-card';
|
|
887
847
|
type DepositSource = 'connected' | 'external' | 'credit-card';
|
|
888
848
|
interface DepositMethodHandlers {
|
|
@@ -948,6 +908,14 @@ interface WalletInlineModalProps extends WalletModalHandlers {
|
|
|
948
908
|
}
|
|
949
909
|
declare function WalletInlineModal({ className, ...handlers }: WalletInlineModalProps): react_jsx_runtime.JSX.Element;
|
|
950
910
|
|
|
911
|
+
declare const buttonVariants: (props?: ({
|
|
912
|
+
variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
|
|
913
|
+
size?: "default" | "icon" | "sm" | "lg" | "icon-sm" | "icon-lg" | null | undefined;
|
|
914
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
915
|
+
declare function Button({ className, variant, size, asChild, ...props }: React$1.ComponentProps<'button'> & VariantProps<typeof buttonVariants> & {
|
|
916
|
+
asChild?: boolean;
|
|
917
|
+
}): react_jsx_runtime.JSX.Element;
|
|
918
|
+
|
|
951
919
|
declare function Skeleton({ className, ...props }: React.ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
|
|
952
920
|
|
|
953
921
|
declare function getTokenIcon(symbol: string, size?: number): react_jsx_runtime.JSX.Element;
|
|
@@ -959,4 +927,4 @@ interface PrivanaIconProps {
|
|
|
959
927
|
}
|
|
960
928
|
declare function PrivanaIcon({ className, size }: PrivanaIconProps): react_jsx_runtime.JSX.Element;
|
|
961
929
|
|
|
962
|
-
export { AccountingApiError, Address, type Allowance, type AllowanceTerm, Button, Bytes32, type ChainConfig, DepositAddressResponse, DepositCheckResponse, DepositInlineModal, type DepositInlineModalProps, type DepositMethodHandlers, DepositModal, type DepositModalProps, type DepositParams, type DepositSource, type EIP712Domain, HOSTED_AUTH_CLOCK_SKEW_MS, HexString, HistoryEntry, type HostedAuthCallback, type HostedAuthCallbackError, type HostedAuthCallbackSuccess, type HostedAuthConfig, HostedAuthError, type HostedAuthPendingTransaction, HostedAuthRequiredError, type HostedAuthSession, HostedAuthStateMismatchError, HostedAuthTokenExchangeResponse, JwtRefreshResponse, LOCK_TYPES, type LockFundsParams, LockInfo, type LockMessage, MODIFY_LOCK_TYPES, type ModifyLockMessage, type ModifyLockParams, NetworkConfig, NetworkError, PendingDeposit, PendingDepositsResponse, PostDepositLockConfig, PostDepositLockError,
|
|
930
|
+
export { AccountingApiError, Address, type Allowance, type AllowanceTerm, Button, Bytes32, type ChainConfig, DepositAddressResponse, DepositCheckResponse, DepositInlineModal, type DepositInlineModalProps, type DepositMethodHandlers, DepositModal, type DepositModalProps, type DepositParams, type DepositSource, type EIP712Domain, HOSTED_AUTH_CLOCK_SKEW_MS, HexString, HistoryEntry, type HostedAuthCallback, type HostedAuthCallbackError, type HostedAuthCallbackSuccess, type HostedAuthConfig, HostedAuthError, type HostedAuthPendingTransaction, HostedAuthRequiredError, type HostedAuthSession, HostedAuthStateMismatchError, HostedAuthTokenExchangeResponse, JwtRefreshResponse, LOCK_TYPES, type LockFundsParams, LockInfo, type LockMessage, MODIFY_LOCK_TYPES, type ModifyLockMessage, type ModifyLockParams, NetworkConfig, NetworkError, PendingDeposit, PendingDepositsResponse, PostDepositLockConfig, PostDepositLockError, PrivanaClient, type PrivanaContextValue, PrivanaIcon, PrivanaProvider, type PrivanaProviderProps, SUPPORTED_CHAINS, type SignLockParams, type SignModifyLockParams, type SignTransferLockedParams, type SignTransferParams, type SignWithdrawFromLockParams, type SignWithdrawParams, type SiweAuthConfig, type SiweAuthContextValue, SiweAuthProvider, type SiweAuthProviderProps, type SiweAuthSession, type SiweAuthTokens, Skeleton, TRANSFER_LOCKED_TYPES, TRANSFER_TYPES, TokenBalance, TokenConfig, TokenInfoResponse, type TokensStatus, TransactionSubmissionResponse, type TransferLockedMessage, type TransferLockedParams, type TransferMessage, type TransferParams, type UnlockFundsParams, type UseBalanceOptions, type UseBalanceResult, type UseBatchBalancesOptions, type UseBatchBalancesResult, type UseDepositAddressOptions, type UseDepositAddressResult, type UseDepositOptions, type UseDepositResult, type UseDepositVerificationOptions, type UseDepositVerificationResult, type UseExpiredLocksOptions, type UseExpiredLocksResult, type UseHistoryOptions, type UseHistoryResult, type UseHostedRedirectAuthResult, type UseLockFundsOptions, type UseLockFundsResult, type UseLockedFundsOptions, type UseLockedFundsResult, type UseModifyLockOptions, type UseModifyLockResult, type UsePendingDepositsOptions, type UsePendingDepositsResult, type UsePendingWithdrawalsOptions, type UsePendingWithdrawalsResult, type UseTokenInfoOptions, type UseTokenInfoResult, type UseTokenListOptions, type UseTokenListResult, type UseTotalLockedBalanceOptions, type UseTotalLockedBalanceResult, type UseTransferOptions, type UseTransferResult, type UseUnlockFundsOptions, type UseUnlockFundsResult, type UseWithdrawOptions, type UseWithdrawResult, ValidationError, type VerificationContext, WITHDRAW_FROM_LOCK_TYPES, WITHDRAW_TYPES, WalletInlineModal, type WalletInlineModalProps, WalletModal, type WalletModalHandlers, type WalletModalProps, type WalletSession, type WithdrawFromLockMessage, WithdrawInlineModal, type WithdrawInlineModalProps, type WithdrawMessage, WithdrawModal, type WithdrawModalProps, type WithdrawParams, type WithdrawStep, WithdrawalInfo, applyRefreshResponse, buildHostedAuthSession, buildSiweStatement, buttonVariants, clearHostedAuthPendingTransaction, createDomain, createHostedAuthPendingStorageKey, createHostedAuthState, createHostedAuthStorageKey, createLockExpiry, createPkceChallenge, createPkceVerifier, getChainById, getChainIcon, getExplorerAddressUrl, getExplorerLabel, getTokenIcon, isHostedAuthRefreshActive, isHostedAuthSessionActive, parseHostedAuthCallback, persistHostedAuthPendingTransaction, readHostedAuthPendingTransaction, readStoredHostedAuthSession, signLockMessage, signModifyLockMessage, signTransferLockedMessage, signTransferMessage, signWithdrawFromLockMessage, signWithdrawMessage, stripHostedAuthCallbackParams, syncHostedAuthSessionToClient, useBalance, useBatchBalances, useDeposit, useDepositAddress, useDepositVerification, useExpiredLocks, useHistory, useHostedRedirectAuth, useLockFunds, useLockedFunds, useModifyLock, usePendingDeposits, usePendingWithdrawals, usePrivanaClient, usePrivanaContext, useSafeAccount, useSafePrivanaContext, useSiweAuth, useTokenInfo, useTokenList, useTotalLockedBalance, useTransfer, useUnlockFunds, useWithdraw };
|