@test-org122/hypernet-core
Version:
Hypernet Core. Represents the SDK for running the Hypernet Protocol.
20 lines • 1.11 kB
TypeScript
import { ResultAsync } from "neverthrow";
import { PublicKey } from "@interfaces/objects";
import { PersistenceError } from "@interfaces/objects/errors/PersistenceError";
import { CoreUninitializedError, MerchantConnectorError, MerchantValidationError } from "@interfaces/objects/errors";
export interface IMerchantConnectorRepository {
/**
* Returns the PublicKey for a merchant
*/
getMerchantPublicKeys(merchantUrl: string[]): ResultAsync<Map<string, PublicKey>, Error>;
/**
* Adds the merchant url as authorized with a particular signature
* @param merchantUrl
* @param signature
*/
addAuthorizedMerchant(merchantUrl: string): ResultAsync<void, PersistenceError>;
getAuthorizedMerchants(): ResultAsync<Map<string, string>, PersistenceError>;
activateAuthorizedMerchants(): ResultAsync<void, MerchantConnectorError>;
resolveChallenge(merchantUrl: string, paymentId: string, transferId: string): ResultAsync<void, MerchantConnectorError | MerchantValidationError | CoreUninitializedError>;
}
//# sourceMappingURL=IMerchantConnectorRepository.d.ts.map