UNPKG

@dfinity/assets

Version:

JavaScript and TypeScript library to manage assets on the Internet Computer

14 lines (11 loc) 490 B
import { Actor, type ActorConfig, type ActorSubclass } from '@dfinity/agent'; import { idlFactory } from './assets_idl.ts'; import type _SERVICE from './assets_service.ts'; export type AssetsCanisterRecord = _SERVICE; /** * Create an assets canister actor * @param config Configuration to make calls to the Replica. */ export function getAssetsCanister(config: ActorConfig): ActorSubclass<AssetsCanisterRecord> { return Actor.createActor<AssetsCanisterRecord>(idlFactory, config); }