{"version":3,"file":"bip44.mjs","sourceRoot":"","sources":["../../../../src/v2/api/create-account/bip44.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,8BAA8B;AAGxE,OAAO,EAAE,oBAAoB,EAAE,oCAAgC;AAE/D;;GAEG;AACH,MAAM,CAAC,MAAM,yCAAyC,GAAG,MAAM,CAAC;IAC9D;;OAEG;IACH,IAAI,EAAE,OAAO,CAAC,mBAAmB,CAAC;IAClC;;OAEG;IACH,aAAa,EAAE,MAAM,EAAE;IACvB;;OAEG;IACH,cAAc,EAAE,oBAAoB;CACrC,CAAC,CAAC;AASH;;GAEG;AACH,MAAM,CAAC,MAAM,0CAA0C,GAAG,MAAM,CAAC;IAC/D;;OAEG;IACH,IAAI,EAAE,OAAO,CAAC,oBAAoB,CAAC;IACnC;;OAEG;IACH,aAAa,EAAE,MAAM,EAAE;IACvB;;OAEG;IACH,UAAU,EAAE,MAAM,EAAE;CACrB,CAAC,CAAC;AAYH;;GAEG;AACH,MAAM,CAAC,MAAM,uCAAuC,GAAG,MAAM,CAAC;IAC5D;;OAEG;IACH,IAAI,EAAE,OAAO,CAAC,gBAAgB,CAAC;IAC/B;;OAEG;IACH,aAAa,EAAE,MAAM,EAAE;IACvB;;OAEG;IACH,UAAU,EAAE,MAAM,EAAE;CACrB,CAAC,CAAC;AAYH;;GAEG;AACH,MAAM,CAAC,MAAM,+CAA+C,GAAG,MAAM,CAAC;IACpE;;OAEG;IACH,IAAI,EAAE,OAAO,CAAC,0BAA0B,CAAC;IACzC;;OAEG;IACH,aAAa,EAAE,MAAM,EAAE;IACvB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;QACZ;;WAEG;QACH,IAAI,EAAE,MAAM,EAAE;QACd;;WAEG;QACH,EAAE,EAAE,MAAM,EAAE;KACb,CAAC;CACH,CAAC,CAAC","sourcesContent":["import { literal, number, object, string } from '@metamask/superstruct';\nimport type { Infer } from '@metamask/superstruct';\n\nimport { DerivationPathStruct } from '../../../api/derivation';\n\n/**\n * Struct for {@link CreateAccountBip44DerivePathOptions}.\n */\nexport const CreateAccountBip44DerivePathOptionsStruct = object({\n  /**\n   * Type of the options.\n   */\n  type: literal('bip44:derive-path'),\n  /**\n   * ID of the entropy source to be used to derive the account.\n   */\n  entropySource: string(),\n  /**\n   * BIP-44 derivation path to be used to derive the account.\n   */\n  derivationPath: DerivationPathStruct,\n});\n\n/**\n * Options for creating an account using the given BIP-44 derivation path.\n */\nexport type CreateAccountBip44DerivePathOptions = Infer<\n  typeof CreateAccountBip44DerivePathOptionsStruct\n>;\n\n/**\n * Struct for {@link CreateAccountBip44DeriveIndexOptions}.\n */\nexport const CreateAccountBip44DeriveIndexOptionsStruct = object({\n  /**\n   * The type of the options.\n   */\n  type: literal('bip44:derive-index'),\n  /**\n   * ID of the entropy source to be used to derive the account.\n   */\n  entropySource: string(),\n  /**\n   * The index of the account group to be derived.\n   */\n  groupIndex: number(),\n});\n\n/**\n * Options for creating an account using the given BIP-44 account group index.\n *\n * Note that the keyring can support non-standard BIP-44 paths for\n * compatibility with other wallets.\n */\nexport type CreateAccountBip44DeriveIndexOptions = Infer<\n  typeof CreateAccountBip44DeriveIndexOptionsStruct\n>;\n\n/**\n * Struct for {@link CreateAccountBip44DiscoverOptions}.\n */\nexport const CreateAccountBip44DiscoverOptionsStruct = object({\n  /**\n   * The type of the options.\n   */\n  type: literal('bip44:discover'),\n  /**\n   * ID of the entropy source to be used to derive the account.\n   */\n  entropySource: string(),\n  /**\n   * The index of the account group to be derived.\n   */\n  groupIndex: number(),\n});\n\n/**\n * Options for creating accounts by performing a BIP-44 account discovery.\n *\n * Note that the keyring can support non-standard BIP-44 paths for\n * compatibility with other wallets.\n */\nexport type CreateAccountBip44DiscoverOptions = Infer<\n  typeof CreateAccountBip44DiscoverOptionsStruct\n>;\n\n/**\n * Struct for {@link CreateAccountBip44DeriveIndexRangeOptions}.\n */\nexport const CreateAccountBip44DeriveIndexRangeOptionsStruct = object({\n  /**\n   * The type of the options.\n   */\n  type: literal('bip44:derive-index-range'),\n  /**\n   * ID of the entropy source to be used to derive the accounts.\n   */\n  entropySource: string(),\n  /**\n   * The range of account group indices to derive (inclusive on both ends).\n   */\n  range: object({\n    /**\n     * The starting index of the account group range (inclusive).\n     */\n    from: number(),\n    /**\n     * The ending index of the account group range (inclusive).\n     */\n    to: number(),\n  }),\n});\n\n/**\n * Options for creating accounts by deriving a range of BIP-44 account indices.\n *\n * The range is inclusive on both ends, meaning range.from=0 and range.to=5\n * will create accounts for group indices 0, 1, 2, 3, 4, and 5.\n *\n * Note that the keyring can support non-standard BIP-44 paths for\n * compatibility with other wallets.\n */\nexport type CreateAccountBip44DeriveIndexRangeOptions = Infer<\n  typeof CreateAccountBip44DeriveIndexRangeOptionsStruct\n>;\n"]}