{"version":3,"file":"Context.mjs","sources":["../../src/Context.ts"],"sourcesContent":["import {\n  DownloaderInterface,\n  createNullDownloader,\n} from './DownloaderInterface';\nimport { EddsaInterface, createNullEddsa } from './EddsaInterface';\nimport { HttpInterface, createNullHttp } from './HttpInterface';\nimport {\n  createNullProgramRepository,\n  ProgramRepositoryInterface,\n} from './ProgramRepositoryInterface';\nimport { createNullRpc, RpcInterface } from './RpcInterface';\nimport {\n  createNullSerializer,\n  SerializerInterface,\n} from './SerializerInterface';\nimport { createNullSigner, Signer } from './Signer';\nimport {\n  createNullTransactionFactory,\n  TransactionFactoryInterface,\n} from './TransactionFactoryInterface';\nimport { createNullUploader, UploaderInterface } from './UploaderInterface';\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 * @category Context and Interfaces\n */\nexport interface Context {\n  /** An interface for downloading files from URIs. */\n  downloader: DownloaderInterface;\n  /** An interface for managing public and private keys. */\n  eddsa: EddsaInterface;\n  /** An interface for sending HTTP requests. */\n  http: HttpInterface;\n  /** The signer using your app. */\n  identity: Signer;\n  /** The signer paying for things, usually the same as the `identity`. */\n  payer: Signer;\n  /** An interface for registering and retrieving programs. */\n  programs: ProgramRepositoryInterface;\n  /** An interface for sending RPC requests. */\n  rpc: RpcInterface;\n  /**\n   * An interface for serializing various types.\n   * @deprecated This interface is deprecated.\n   * You can now directly use `@metaplex-foundation/umi/serializers` instead.\n   */\n  serializer: SerializerInterface;\n  /** An interface for managing transactions. */\n  transactions: TransactionFactoryInterface;\n  /** An interface for uploading files and getting their URIs. */\n  uploader: UploaderInterface;\n}\n\n/**\n * A helper method that creates a Umi context object using only\n * Null implementations of the interfaces. This can be useful to\n * create a full Umi context object when only a few of the interfaces\n * are needed.\n *\n * @category Context and Interfaces\n */\nexport const createNullContext = (): Context => ({\n  downloader: createNullDownloader(),\n  eddsa: createNullEddsa(),\n  http: createNullHttp(),\n  identity: createNullSigner(),\n  payer: createNullSigner(),\n  programs: createNullProgramRepository(),\n  rpc: createNullRpc(),\n  serializer: createNullSerializer(),\n  transactions: createNullTransactionFactory(),\n  uploader: createNullUploader(),\n});\n"],"names":["createNullContext","downloader","createNullDownloader","eddsa","createNullEddsa","http","createNullHttp","identity","createNullSigner","payer","programs","createNullProgramRepository","rpc","createNullRpc","serializer","createNullSerializer","transactions","createNullTransactionFactory","uploader","createNullUploader"],"mappings":";;;;;;;;;;AAsBA;AACA;AACA;AACA;AACA;AACA;AACA;;AA4BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMA,iBAAiB,GAAG,OAAgB;EAC/CC,UAAU,EAAEC,oBAAoB,EAAE;EAClCC,KAAK,EAAEC,eAAe,EAAE;EACxBC,IAAI,EAAEC,cAAc,EAAE;EACtBC,QAAQ,EAAEC,gBAAgB,EAAE;EAC5BC,KAAK,EAAED,gBAAgB,EAAE;EACzBE,QAAQ,EAAEC,2BAA2B,EAAE;EACvCC,GAAG,EAAEC,aAAa,EAAE;EACpBC,UAAU,EAAEC,oBAAoB,EAAE;EAClCC,YAAY,EAAEC,4BAA4B,EAAE;AAC5CC,EAAAA,QAAQ,EAAEC,kBAAkB,EAAA;AAC9B,CAAC;;;;"}