{"version":3,"file":"Umi.cjs","sources":["../../src/Umi.ts"],"sourcesContent":["import { Context, createNullContext } from './Context';\nimport type { UmiPlugin } from './UmiPlugin';\n\n/**\n * A Umi context object that uses all of the interfaces provided by Umi.\n * Once created, the end-user can pass this object to any function that\n * requires some or all of these interfaces.\n *\n * It implements the {@link Context} interface and adds a `use` method\n * that allows plugins to be installed.\n *\n * @category Context and Interfaces\n */\nexport interface Umi extends Context {\n  /** Installs a Umi plugin. */\n  use(plugin: UmiPlugin): Umi;\n}\n\n/**\n * @deprecated You probably want to use `createUmi` from\n * `@metaplex-foundation/umi-bundle-defaults` instead. If\n * you're sure you want to use the base Umi without any plugins,\n * you can use `createBaseUmi` instead.\n *\n * @example Using defaults bundle:\n * import { createUmi } from '@metaplex-foundation/umi-bundle-defaults';\n * const umi = createUmi('https://...');\n *\n * @example Base only (no plugins):\n * import { createBaseUmi } from '@metaplex-foundation/umi';\n * const umi = createBaseUmi();\n */\nexport const createUmi = (): Umi => createBaseUmi();\n\n/**\n * Creates a Umi instance using only Null implementations of the interfaces.\n * The `use` method can then be used to install plugins and replace the\n * Null implementations with real implementations.\n *\n * @category Context and Interfaces\n */\nexport const createBaseUmi = (): Umi => ({\n  ...createNullContext(),\n  use(plugin: UmiPlugin) {\n    plugin.install(this);\n    return this;\n  },\n});\n"],"names":["createUmi","createBaseUmi","createNullContext","use","plugin","install"],"mappings":";;;;;;AAkBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACaA,MAAAA,SAAS,GAAG,MAAWC,aAAa,GAAE;;AAEnD;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMA,aAAa,GAAG,OAAY;AACvC,EAAA,GAAGC,yBAAiB,EAAE;EACtBC,GAAG,CAACC,MAAiB,EAAE;AACrBA,IAAAA,MAAM,CAACC,OAAO,CAAC,IAAI,CAAC,CAAA;AACpB,IAAA,OAAO,IAAI,CAAA;AACb,GAAA;AACF,CAAC;;;;;"}