@metamask/keyring-api
Version:
MetaMask Keyring API
1 lines • 1.79 kB
Source Map (JSON)
{"version":3,"file":"private-key.mjs","sourceRoot":"","sources":["../../../../src/api/v2/export-account/private-key.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAc,8BAA8B;AAE5E,OAAO,EAAE,wBAAwB,EAAE,2BAAuB;AAE1D;;GAEG;AACH,MAAM,CAAC,MAAM,+BAA+B,GAAG,MAAM,CAAC;IACpD;;OAEG;IACH,IAAI,EAAE,OAAO,CAAC,aAAa,CAAC;IAC5B;;OAEG;IACH,UAAU,EAAE,MAAM,EAAE;IACpB;;OAEG;IACH,QAAQ,EAAE,wBAAwB;CACnC,CAAC,CAAC;AASH;;GAEG;AACH,MAAM,CAAC,MAAM,oCAAoC,GAAG,MAAM,CAAC;IACzD;;OAEG;IACH,IAAI,EAAE,OAAO,CAAC,aAAa,CAAC;IAC5B;;OAEG;IACH,QAAQ,EAAE,wBAAwB;CACnC,CAAC,CAAC","sourcesContent":["import { literal, object, string, type Infer } from '@metamask/superstruct';\n\nimport { PrivateKeyEncodingStruct } from '../private-key';\n\n/**\n * Struct for {@link PrivateKeyExportedAccount}.\n */\nexport const PrivateKeyExportedAccountStruct = object({\n /**\n * The type of the account export.\n */\n type: literal('private-key'),\n /**\n * The private key of the exported account.\n */\n privateKey: string(),\n /**\n * The encoding of the exported private key.\n */\n encoding: PrivateKeyEncodingStruct,\n});\n\n/**\n * Represents an account that has been exported using a private key.\n */\nexport type PrivateKeyExportedAccount = Infer<\n typeof PrivateKeyExportedAccountStruct\n>;\n\n/**\n * Struct for {@link ExportAccountPrivateKeyOptions}.\n */\nexport const ExportAccountPrivateKeyOptionsStruct = object({\n /**\n * The type of the account export.\n */\n type: literal('private-key'),\n /**\n * The encoding of the exported private key.\n */\n encoding: PrivateKeyEncodingStruct,\n});\n\n/**\n * Options for exporting an account's private key.\n */\nexport type ExportAccountPrivateKeyOptions = Infer<\n typeof ExportAccountPrivateKeyOptionsStruct\n>;\n"]}