///
import { Connection, PublicKey, Transaction, TransactionSignature } from '@solana/web3.js';
import { State, Options } from '@civic/gateway-client-core';
import { GatewayProps } from '@civic/gateway-client-react';
export type { Options } from '@civic/gateway-client-core';
export interface SolanaWalletAdapter {
publicKey: PublicKey | null;
signTransaction?: (transaction: Transaction) => Promise;
signMessage?: (message: Uint8Array) => Promise;
connected?: boolean;
}
/**
* The properties object passed by the dApp when defining the component
*/
export type SolanaGatewayProviderProps = {
wallet?: SolanaWalletAdapter;
gatekeeperNetwork?: PublicKey;
stage?: string;
connection: Connection;
cluster?: string;
wrapper?: React.FC;
logo?: string;
redirectUrl?: string;
payer?: PublicKey;
gatekeeperSendsTransaction?: boolean;
handleTransaction?: (transaction: Transaction) => Promise;
options?: Options;
children?: React.ReactNode;
expiryMarginSeconds?: number;
partnerAppId?: string;
forceRequireRefresh?: boolean;
hideWalletPrompts?: boolean;
disableAutoRestartOnValidationFailure?: boolean;
};
export type SolanaGatewayToken = {
readonly issuingGatekeeper: PublicKey;
readonly gatekeeperNetworkAddress: PublicKey;
readonly owner: PublicKey;
readonly state: State;
readonly publicKey: PublicKey;
readonly expiryTime?: number;
};
export type SolanaGatewayProps = Omit & {
gatewayToken?: SolanaGatewayToken;
gatewayTokenTransaction?: Transaction;
};
export * from '@civic/gateway-client-react';