UNPKG

@metamask/keyring-api

Version:
46 lines 1.81 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.KeyringCapabilitiesStruct = void 0; const superstruct_1 = require("@metamask/superstruct"); const private_key_1 = require("./private-key.cjs"); const caip_1 = require("../caip.cjs"); /** * Struct for {@link KeyringCapabilities}. */ exports.KeyringCapabilitiesStruct = (0, superstruct_1.object)({ /** * List of CAIP-2 chain IDs that this keyring supports. */ scopes: (0, superstruct_1.nonempty)((0, superstruct_1.array)(caip_1.CaipChainIdStruct)), /** * BIP-44 capabilities supported by this keyring. */ bip44: (0, superstruct_1.exactOptional)((0, superstruct_1.object)({ /** * Whether the keyring supports deriving accounts from a specific BIP-44 path. */ derivePath: (0, superstruct_1.boolean)(), /** * Whether the keyring supports deriving accounts from a BIP-44 account index. */ deriveIndex: (0, superstruct_1.boolean)(), /** * Whether the keyring supports BIP-44 account discovery. */ discover: (0, superstruct_1.boolean)(), })), /** * Private key capabilities supported by this keyring. */ privateKey: (0, superstruct_1.exactOptional)((0, superstruct_1.object)({ /** * List of supported formats for importing private keys. */ importFormats: (0, superstruct_1.exactOptional)((0, superstruct_1.array)(private_key_1.ImportPrivateKeyFormatStruct)), /** * List of supported formats for exporting private keys. */ exportFormats: (0, superstruct_1.exactOptional)((0, superstruct_1.array)(private_key_1.ExportPrivateKeyFormatStruct)), })), }); //# sourceMappingURL=keyring-capabilities.cjs.map