import { Buffer } from 'buffer'; export type SecretsApiUser = { ciphersuite: 'ed25519'; user_pubkey: string; created_at: Date; updated_at: Date; contact_info: string; }; export type SecretsApiSecret = { created_at: Date; updated_at: Date; secret: string; secret_name: string; whitelist: string[]; }; export declare class SwitchboardSecrets { readonly url: string; constructor(url?: string); getUser(userPubkey: string, ciphersuite: string): Promise; createOrUpdateUserRequest( /** * The address of the user. */ userPubkey: string, /** * 'ed25519' for Solana users, 'ethers' for EVM users. */ ciphersuite: string, /** * Stringified contact info for the user. */ contactInfo?: string, /** * The timestamp that this request expires. * * Default: now + 30 seconds. */ expiryTimestamp?: number): UpdateUserPayload; createOrUpdateUser(request: UpdateUserPayload, signature: string): Promise; getUserSecrets(userPubkey: string, ciphersuite: string): Promise; createSecretRequest( /** * The address of the user. */ userPubkey: string, /** * 'ed25519' for Solana users, 'ethers' for EVM users. */ ciphersuite: string, /** * The key of the secret. * * Keys must be unique per user. */ secretName: string, /** * The value of the secret. */ secretValue: string, /** * The timestamp that this request expires. * * Default: now + 30 seconds. */ expiryTimestamp?: number): CreateSecretPayload; createSecret(request: CreateSecretPayload, signature: string): Promise; createAddMrEnclaveRequest( /** * The address of the user. */ userPubkey: string, /** * 'ed25519' for Solana users, 'ethers' for EVM users. */ ciphersuite: string, /** * The MrEnclave value to add. */ mrEnclave: string, /** * The names of the secrets to whitelist the MrEnclave value for. */ secretNames: string[], /** * The timestamp that this request expires. * * Default: now + 30 seconds. */ expiryTimestamp?: number): AddMrEnclavePayload; addMrEnclave(request: AddMrEnclavePayload, signature: string): Promise; createRemoveMrEnclaveRequest( /** * The address of the user. */ userPubkey: string, /** * 'ed25519' for Solana users, 'ethers' for EVM users. */ ciphersuite: string, /** * The mrEnclave value to remove. */ mrEnclave: string, /** * The timestamp that this request expires. * * Default: now + 30 seconds. */ expiryTimestamp?: number): RemoveMrEnclavePayload; removeMrEnclave(request: RemoveMrEnclavePayload, signature: string): Promise; createDeleteSecretRequest( /** * The address of the user. */ userPubkey: string, /** * 'ed25519' for Solana users, 'ethers' for EVM users. */ ciphersuite: string, /** * The name fo the secret to delete. */ secretName: string, /** * The timestamp that this request expires. * * Default: now + 30 seconds. */ expiryTimestamp?: number): DeleteSecretPayload; deleteSecret(request: DeleteSecretPayload, signature: string): Promise; } export interface IUpdateUserPayload { user_pubkey: string; ciphersuite: string; contact_info: string; timestamp: number; } export declare class UpdateUserPayload implements IUpdateUserPayload { readonly user_pubkey: string; readonly ciphersuite: string; readonly contact_info: string; readonly timestamp: number; constructor(user_pubkey: string, ciphersuite: string, contact_info: string, timestamp: number); static from(obj: IUpdateUserPayload): UpdateUserPayload; toJSON(): IUpdateUserPayload; toString(): string; toEncodedMessage(): Buffer; } export interface ICreateSecretPayload { user_pubkey: string; ciphersuite: string; secret_name: string; secret: string; timestamp: number; } export declare class CreateSecretPayload implements ICreateSecretPayload { readonly user_pubkey: string; readonly ciphersuite: string; readonly secret_name: string; readonly secret: string; readonly timestamp: number; constructor(user_pubkey: string, ciphersuite: string, secret_name: string, secret: string, timestamp: number); static from(obj: ICreateSecretPayload): CreateSecretPayload; toJSON(): ICreateSecretPayload; toString(): string; toEncodedMessage(): Buffer; } export interface IAddMrEnclavePayload { user_pubkey: string; ciphersuite: string; mr_enclave: string; secret_names: string[]; timestamp: number; } export declare class AddMrEnclavePayload implements IAddMrEnclavePayload { readonly user_pubkey: string; readonly ciphersuite: string; readonly mr_enclave: string; readonly secret_names: string[]; readonly timestamp: number; constructor(user_pubkey: string, ciphersuite: string, mr_enclave: string, secret_names: string[], timestamp: number); static from(obj: IAddMrEnclavePayload): AddMrEnclavePayload; toJSON(): IAddMrEnclavePayload; toString(): string; toEncodedMessage(): Buffer; } export interface IRemoveMrEnclavePayload { user_pubkey: string; ciphersuite: string; mr_enclave: string; timestamp: number; } export declare class RemoveMrEnclavePayload implements IRemoveMrEnclavePayload { readonly user_pubkey: string; readonly ciphersuite: string; readonly mr_enclave: string; readonly timestamp: number; constructor(user_pubkey: string, ciphersuite: string, mr_enclave: string, timestamp: number); static from(obj: IRemoveMrEnclavePayload): RemoveMrEnclavePayload; toJSON(): IRemoveMrEnclavePayload; toString(): string; toEncodedMessage(): Buffer; } export interface IDeleteSecretPayload { user_pubkey: string; ciphersuite: string; secret_name: string; timestamp: number; } export declare class DeleteSecretPayload implements IDeleteSecretPayload { readonly user_pubkey: string; readonly ciphersuite: string; readonly secret_name: string; readonly timestamp: number; constructor(user_pubkey: string, ciphersuite: string, secret_name: string, timestamp: number); static from(obj: IDeleteSecretPayload): DeleteSecretPayload; toJSON(): IDeleteSecretPayload; toString(): string; toEncodedMessage(): Buffer; } //# sourceMappingURL=secrets.d.ts.map