{"version":3,"file":"bip44.cjs","sourceRoot":"","sources":["../../../../src/v2/api/create-account/bip44.ts"],"names":[],"mappings":";;;AAAA,uDAAwE;AAGxE,4DAA+D;AAE/D;;GAEG;AACU,QAAA,yCAAyC,GAAG,IAAA,oBAAM,EAAC;IAC9D;;OAEG;IACH,IAAI,EAAE,IAAA,qBAAO,EAAC,mBAAmB,CAAC;IAClC;;OAEG;IACH,aAAa,EAAE,IAAA,oBAAM,GAAE;IACvB;;OAEG;IACH,cAAc,EAAE,iCAAoB;CACrC,CAAC,CAAC;AASH;;GAEG;AACU,QAAA,0CAA0C,GAAG,IAAA,oBAAM,EAAC;IAC/D;;OAEG;IACH,IAAI,EAAE,IAAA,qBAAO,EAAC,oBAAoB,CAAC;IACnC;;OAEG;IACH,aAAa,EAAE,IAAA,oBAAM,GAAE;IACvB;;OAEG;IACH,UAAU,EAAE,IAAA,oBAAM,GAAE;CACrB,CAAC,CAAC;AAYH;;GAEG;AACU,QAAA,uCAAuC,GAAG,IAAA,oBAAM,EAAC;IAC5D;;OAEG;IACH,IAAI,EAAE,IAAA,qBAAO,EAAC,gBAAgB,CAAC;IAC/B;;OAEG;IACH,aAAa,EAAE,IAAA,oBAAM,GAAE;IACvB;;OAEG;IACH,UAAU,EAAE,IAAA,oBAAM,GAAE;CACrB,CAAC,CAAC;AAYH;;GAEG;AACU,QAAA,+CAA+C,GAAG,IAAA,oBAAM,EAAC;IACpE;;OAEG;IACH,IAAI,EAAE,IAAA,qBAAO,EAAC,0BAA0B,CAAC;IACzC;;OAEG;IACH,aAAa,EAAE,IAAA,oBAAM,GAAE;IACvB;;OAEG;IACH,KAAK,EAAE,IAAA,oBAAM,EAAC;QACZ;;WAEG;QACH,IAAI,EAAE,IAAA,oBAAM,GAAE;QACd;;WAEG;QACH,EAAE,EAAE,IAAA,oBAAM,GAAE;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"]}