{"version":3,"file":"index.cjs","sources":["../../src/api/core/bodySerializer.gen.ts","../../src/api/core/serverSentEvents.gen.ts","../../src/api/core/pathSerializer.gen.ts","../../src/api/core/utils.gen.ts","../../src/api/core/auth.gen.ts","../../src/api/client/utils.gen.ts","../../src/api/client/client.gen.ts","../../src/api/client.gen.ts","../../src/api/sdk.gen.ts","../../src/utils/internal/array.ts","../../src/api-client.ts","../../../../node_modules/.pnpm/@algorandfoundation+algokit-utils@8.2.2_algosdk@3.7.0/node_modules/@algorandfoundation/algokit-utils/types/app-arc56.mjs","../../../../node_modules/.pnpm/base64-js@1.5.1/node_modules/base64-js/index.js","../../../../node_modules/.pnpm/ieee754@1.2.1/node_modules/ieee754/index.js","../../../../node_modules/.pnpm/buffer@6.0.3/node_modules/buffer/index.js","../../../../node_modules/.pnpm/@algorandfoundation+algokit-utils@8.2.2_algosdk@3.7.0/node_modules/@algorandfoundation/algokit-utils/types/async-event-emitter.mjs","../../../../node_modules/.pnpm/@algorandfoundation+algokit-utils@8.2.2_algosdk@3.7.0/node_modules/@algorandfoundation/algokit-utils/types/logging.mjs","../../../../node_modules/.pnpm/@algorandfoundation+algokit-utils@8.2.2_algosdk@3.7.0/node_modules/@algorandfoundation/algokit-utils/types/config.mjs","../../../../node_modules/.pnpm/@algorandfoundation+algokit-utils@8.2.2_algosdk@3.7.0/node_modules/@algorandfoundation/algokit-utils/config.mjs","../../../../node_modules/.pnpm/@algorandfoundation+algokit-utils@8.2.2_algosdk@3.7.0/node_modules/@algorandfoundation/algokit-utils/util.mjs","../../../../node_modules/.pnpm/@algorandfoundation+algokit-utils@8.2.2_algosdk@3.7.0/node_modules/@algorandfoundation/algokit-utils/types/lifecycle-events.mjs","../../../../node_modules/.pnpm/@algorandfoundation+algokit-utils@8.2.2_algosdk@3.7.0/node_modules/@algorandfoundation/algokit-utils/types/app-spec.mjs","../../../../node_modules/.pnpm/@algorandfoundation+algokit-utils@8.2.2_algosdk@3.7.0/node_modules/@algorandfoundation/algokit-utils/types/logic-error.mjs","../../../../node_modules/.pnpm/@algorandfoundation+algokit-utils@8.2.2_algosdk@3.7.0/node_modules/@algorandfoundation/algokit-utils/types/app-client.mjs","../../src/contracts/NFDInstanceClient.ts","../../src/contracts/NFDRegistryClient.ts","../../src/modules/base.ts","../../src/modules/lookup.ts","../../../../node_modules/.pnpm/@algorandfoundation+algokit-utils@8.2.2_algosdk@3.7.0/node_modules/@algorandfoundation/algokit-utils/types/amount.mjs","../../src/utils/error-parser.ts","../../src/utils/internal/numbers.ts","../../src/modules/manager.ts","../../src/assets.ts","../../src/utils/ipfs.ts","../../src/modules/metadata.ts","../../src/modules/minting.ts","../../src/modules/purchasing.ts","../../src/client.ts"],"sourcesContent":["// This file is auto-generated by @hey-api/openapi-ts\n\nimport type {\n  ArrayStyle,\n  ObjectStyle,\n  SerializerOptions,\n} from './pathSerializer.gen'\n\nexport type QuerySerializer = (query: Record<string, unknown>) => string\n\nexport type BodySerializer = (body: unknown) => unknown\n\ntype QuerySerializerOptionsObject = {\n  allowReserved?: boolean\n  array?: Partial<SerializerOptions<ArrayStyle>>\n  object?: Partial<SerializerOptions<ObjectStyle>>\n}\n\nexport type QuerySerializerOptions = QuerySerializerOptionsObject & {\n  /**\n   * Per-parameter serialization overrides. When provided, these settings\n   * override the global array/object settings for specific parameter names.\n   */\n  parameters?: Record<string, QuerySerializerOptionsObject>\n}\n\nconst serializeFormDataPair = (\n  data: FormData,\n  key: string,\n  value: unknown,\n): void => {\n  if (typeof value === 'string' || value instanceof Blob) {\n    data.append(key, value)\n  } else if (value instanceof Date) {\n    data.append(key, value.toISOString())\n  } else {\n    data.append(key, JSON.stringify(value))\n  }\n}\n\nconst serializeUrlSearchParamsPair = (\n  data: URLSearchParams,\n  key: string,\n  value: unknown,\n): void => {\n  if (typeof value === 'string') {\n    data.append(key, value)\n  } else {\n    data.append(key, JSON.stringify(value))\n  }\n}\n\nexport const formDataBodySerializer = {\n  bodySerializer: (body: unknown): FormData => {\n    const data = new FormData()\n\n    Object.entries(body as Record<string, unknown>).forEach(([key, value]) => {\n      if (value === undefined || value === null) {\n        return\n      }\n      if (Array.isArray(value)) {\n        value.forEach((v) => serializeFormDataPair(data, key, v))\n      } else {\n        serializeFormDataPair(data, key, value)\n      }\n    })\n\n    return data\n  },\n}\n\nexport const jsonBodySerializer = {\n  bodySerializer: (body: unknown): string =>\n    JSON.stringify(body, (_key, value) =>\n      typeof value === 'bigint' ? value.toString() : value,\n    ),\n}\n\nexport const urlSearchParamsBodySerializer = {\n  bodySerializer: (body: unknown): string => {\n    const data = new URLSearchParams()\n\n    Object.entries(body as Record<string, unknown>).forEach(([key, value]) => {\n      if (value === undefined || value === null) {\n        return\n      }\n      if (Array.isArray(value)) {\n        value.forEach((v) => serializeUrlSearchParamsPair(data, key, v))\n      } else {\n        serializeUrlSearchParamsPair(data, key, value)\n      }\n    })\n\n    return data.toString()\n  },\n}\n","// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Config } from './types.gen'\n\nexport type ServerSentEventsOptions<TData = unknown> = Omit<\n  RequestInit,\n  'method'\n> &\n  Pick<Config, 'method' | 'responseTransformer' | 'responseValidator'> & {\n    /**\n     * Fetch API implementation. You can use this option to provide a custom\n     * fetch instance.\n     *\n     * @default globalThis.fetch\n     */\n    fetch?: typeof fetch\n    /**\n     * Implementing clients can call request interceptors inside this hook.\n     */\n    onRequest?: (url: string, init: RequestInit) => Promise<Request>\n    /**\n     * Callback invoked when a network or parsing error occurs during streaming.\n     *\n     * This option applies only if the endpoint returns a stream of events.\n     *\n     * @param error The error that occurred.\n     */\n    onSseError?: (error: unknown) => void\n    /**\n     * Callback invoked when an event is streamed from the server.\n     *\n     * This option applies only if the endpoint returns a stream of events.\n     *\n     * @param event Event streamed from the server.\n     * @returns Nothing (void).\n     */\n    onSseEvent?: (event: StreamEvent<TData>) => void\n    serializedBody?: RequestInit['body']\n    /**\n     * Default retry delay in milliseconds.\n     *\n     * This option applies only if the endpoint returns a stream of events.\n     *\n     * @default 3000\n     */\n    sseDefaultRetryDelay?: number\n    /**\n     * Maximum number of retry attempts before giving up.\n     */\n    sseMaxRetryAttempts?: number\n    /**\n     * Maximum retry delay in milliseconds.\n     *\n     * Applies only when exponential backoff is used.\n     *\n     * This option applies only if the endpoint returns a stream of events.\n     *\n     * @default 30000\n     */\n    sseMaxRetryDelay?: number\n    /**\n     * Optional sleep function for retry backoff.\n     *\n     * Defaults to using `setTimeout`.\n     */\n    sseSleepFn?: (ms: number) => Promise<void>\n    url: string\n  }\n\nexport interface StreamEvent<TData = unknown> {\n  data: TData\n  event?: string\n  id?: string\n  retry?: number\n}\n\nexport type ServerSentEventsResult<\n  TData = unknown,\n  TReturn = void,\n  TNext = unknown,\n> = {\n  stream: AsyncGenerator<\n    TData extends Record<string, unknown> ? TData[keyof TData] : TData,\n    TReturn,\n    TNext\n  >\n}\n\nexport function createSseClient<TData = unknown>({\n  onRequest,\n  onSseError,\n  onSseEvent,\n  responseTransformer,\n  responseValidator,\n  sseDefaultRetryDelay,\n  sseMaxRetryAttempts,\n  sseMaxRetryDelay,\n  sseSleepFn,\n  url,\n  ...options\n}: ServerSentEventsOptions): ServerSentEventsResult<TData> {\n  let lastEventId: string | undefined\n\n  const sleep =\n    sseSleepFn ??\n    ((ms: number) => new Promise((resolve) => setTimeout(resolve, ms)))\n\n  const createStream = async function* () {\n    let retryDelay: number = sseDefaultRetryDelay ?? 3000\n    let attempt = 0\n    const signal = options.signal ?? new AbortController().signal\n\n    while (true) {\n      if (signal.aborted) break\n\n      attempt++\n\n      const headers =\n        options.headers instanceof Headers\n          ? options.headers\n          : new Headers(options.headers as Record<string, string> | undefined)\n\n      if (lastEventId !== undefined) {\n        headers.set('Last-Event-ID', lastEventId)\n      }\n\n      try {\n        const requestInit: RequestInit = {\n          redirect: 'follow',\n          ...options,\n          body: options.serializedBody,\n          headers,\n          signal,\n        }\n        let request = new Request(url, requestInit)\n        if (onRequest) {\n          request = await onRequest(url, requestInit)\n        }\n        // fetch must be assigned here, otherwise it would throw the error:\n        // TypeError: Failed to execute 'fetch' on 'Window': Illegal invocation\n        const _fetch = options.fetch ?? globalThis.fetch\n        const response = await _fetch(request)\n\n        if (!response.ok)\n          throw new Error(\n            `SSE failed: ${response.status} ${response.statusText}`,\n          )\n\n        if (!response.body) throw new Error('No body in SSE response')\n\n        const reader = response.body\n          .pipeThrough(new TextDecoderStream())\n          .getReader()\n\n        let buffer = ''\n\n        const abortHandler = () => {\n          try {\n            reader.cancel()\n          } catch {\n            // noop\n          }\n        }\n\n        signal.addEventListener('abort', abortHandler)\n\n        try {\n          while (true) {\n            const { done, value } = await reader.read()\n            if (done) break\n            buffer += value\n            buffer = buffer.replace(/\\r\\n?/g, '\\n') // normalize line endings\n\n            const chunks = buffer.split('\\n\\n')\n            buffer = chunks.pop() ?? ''\n\n            for (const chunk of chunks) {\n              const lines = chunk.split('\\n')\n              const dataLines: Array<string> = []\n              let eventName: string | undefined\n\n              for (const line of lines) {\n                if (line.startsWith('data:')) {\n                  dataLines.push(line.replace(/^data:\\s*/, ''))\n                } else if (line.startsWith('event:')) {\n                  eventName = line.replace(/^event:\\s*/, '')\n                } else if (line.startsWith('id:')) {\n                  lastEventId = line.replace(/^id:\\s*/, '')\n                } else if (line.startsWith('retry:')) {\n                  const parsed = Number.parseInt(\n                    line.replace(/^retry:\\s*/, ''),\n                    10,\n                  )\n                  if (!Number.isNaN(parsed)) {\n                    retryDelay = parsed\n                  }\n                }\n              }\n\n              let data: unknown\n              let parsedJson = false\n\n              if (dataLines.length) {\n                const rawData = dataLines.join('\\n')\n                try {\n                  data = JSON.parse(rawData)\n                  parsedJson = true\n                } catch {\n                  data = rawData\n                }\n              }\n\n              if (parsedJson) {\n                if (responseValidator) {\n                  await responseValidator(data)\n                }\n\n                if (responseTransformer) {\n                  data = await responseTransformer(data)\n                }\n              }\n\n              onSseEvent?.({\n                data,\n                event: eventName,\n                id: lastEventId,\n                retry: retryDelay,\n              })\n\n              if (dataLines.length) {\n                yield data as any\n              }\n            }\n          }\n        } finally {\n          signal.removeEventListener('abort', abortHandler)\n          reader.releaseLock()\n        }\n\n        break // exit loop on normal completion\n      } catch (error) {\n        // connection failed or aborted; retry after delay\n        onSseError?.(error)\n\n        if (\n          sseMaxRetryAttempts !== undefined &&\n          attempt >= sseMaxRetryAttempts\n        ) {\n          break // stop after firing error\n        }\n\n        // exponential backoff: double retry each attempt, cap at 30s\n        const backoff = Math.min(\n          retryDelay * 2 ** (attempt - 1),\n          sseMaxRetryDelay ?? 30000,\n        )\n        await sleep(backoff)\n      }\n    }\n  }\n\n  const stream = createStream()\n\n  return { stream }\n}\n","// This file is auto-generated by @hey-api/openapi-ts\n\ninterface SerializeOptions<T>\n  extends SerializePrimitiveOptions, SerializerOptions<T> {}\n\ninterface SerializePrimitiveOptions {\n  allowReserved?: boolean\n  name: string\n}\n\nexport interface SerializerOptions<T> {\n  /**\n   * @default true\n   */\n  explode: boolean\n  style: T\n}\n\nexport type ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited'\nexport type ArraySeparatorStyle = ArrayStyle | MatrixStyle\ntype MatrixStyle = 'label' | 'matrix' | 'simple'\nexport type ObjectStyle = 'form' | 'deepObject'\ntype ObjectSeparatorStyle = ObjectStyle | MatrixStyle\n\ninterface SerializePrimitiveParam extends SerializePrimitiveOptions {\n  value: string\n}\n\nexport const separatorArrayExplode = (\n  style: ArraySeparatorStyle,\n): '.' | ';' | ',' | '&' => {\n  switch (style) {\n    case 'label':\n      return '.'\n    case 'matrix':\n      return ';'\n    case 'simple':\n      return ','\n    default:\n      return '&'\n  }\n}\n\nexport const separatorArrayNoExplode = (\n  style: ArraySeparatorStyle,\n): ',' | '|' | '%20' => {\n  switch (style) {\n    case 'form':\n      return ','\n    case 'pipeDelimited':\n      return '|'\n    case 'spaceDelimited':\n      return '%20'\n    default:\n      return ','\n  }\n}\n\nexport const separatorObjectExplode = (\n  style: ObjectSeparatorStyle,\n): '.' | ';' | ',' | '&' => {\n  switch (style) {\n    case 'label':\n      return '.'\n    case 'matrix':\n      return ';'\n    case 'simple':\n      return ','\n    default:\n      return '&'\n  }\n}\n\nexport const serializeArrayParam = ({\n  allowReserved,\n  explode,\n  name,\n  style,\n  value,\n}: SerializeOptions<ArraySeparatorStyle> & {\n  value: unknown[]\n}): string => {\n  if (!explode) {\n    const joinedValues = (\n      allowReserved ? value : value.map((v) => encodeURIComponent(v as string))\n    ).join(separatorArrayNoExplode(style))\n    switch (style) {\n      case 'label':\n        return `.${joinedValues}`\n      case 'matrix':\n        return `;${name}=${joinedValues}`\n      case 'simple':\n        return joinedValues\n      default:\n        return `${name}=${joinedValues}`\n    }\n  }\n\n  const separator = separatorArrayExplode(style)\n  const joinedValues = value\n    .map((v) => {\n      if (style === 'label' || style === 'simple') {\n        return allowReserved ? v : encodeURIComponent(v as string)\n      }\n\n      return serializePrimitiveParam({\n        allowReserved,\n        name,\n        value: v as string,\n      })\n    })\n    .join(separator)\n  return style === 'label' || style === 'matrix'\n    ? separator + joinedValues\n    : joinedValues\n}\n\nexport const serializePrimitiveParam = ({\n  allowReserved,\n  name,\n  value,\n}: SerializePrimitiveParam): string => {\n  if (value === undefined || value === null) {\n    return ''\n  }\n\n  if (typeof value === 'object') {\n    throw new Error(\n      'Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.',\n    )\n  }\n\n  return `${name}=${allowReserved ? value : encodeURIComponent(value)}`\n}\n\nexport const serializeObjectParam = ({\n  allowReserved,\n  explode,\n  name,\n  style,\n  value,\n  valueOnly,\n}: SerializeOptions<ObjectSeparatorStyle> & {\n  value: Record<string, unknown> | Date\n  valueOnly?: boolean\n}): string => {\n  if (value instanceof Date) {\n    return valueOnly ? value.toISOString() : `${name}=${value.toISOString()}`\n  }\n\n  if (style !== 'deepObject' && !explode) {\n    let values: string[] = []\n    Object.entries(value).forEach(([key, v]) => {\n      values = [\n        ...values,\n        key,\n        allowReserved ? (v as string) : encodeURIComponent(v as string),\n      ]\n    })\n    const joinedValues = values.join(',')\n    switch (style) {\n      case 'form':\n        return `${name}=${joinedValues}`\n      case 'label':\n        return `.${joinedValues}`\n      case 'matrix':\n        return `;${name}=${joinedValues}`\n      default:\n        return joinedValues\n    }\n  }\n\n  const separator = separatorObjectExplode(style)\n  const joinedValues = Object.entries(value)\n    .map(([key, v]) =>\n      serializePrimitiveParam({\n        allowReserved,\n        name: style === 'deepObject' ? `${name}[${key}]` : key,\n        value: v as string,\n      }),\n    )\n    .join(separator)\n  return style === 'label' || style === 'matrix'\n    ? separator + joinedValues\n    : joinedValues\n}\n","// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { BodySerializer, QuerySerializer } from './bodySerializer.gen'\nimport {\n  type ArraySeparatorStyle,\n  serializeArrayParam,\n  serializeObjectParam,\n  serializePrimitiveParam,\n} from './pathSerializer.gen'\n\nexport interface PathSerializer {\n  path: Record<string, unknown>\n  url: string\n}\n\nexport const PATH_PARAM_RE: RegExp = /\\{[^{}]+\\}/g\n\nexport const defaultPathSerializer = ({\n  path,\n  url: _url,\n}: PathSerializer): string => {\n  let url = _url\n  const matches = _url.match(PATH_PARAM_RE)\n  if (matches) {\n    for (const match of matches) {\n      let explode = false\n      let name = match.substring(1, match.length - 1)\n      let style: ArraySeparatorStyle = 'simple'\n\n      if (name.endsWith('*')) {\n        explode = true\n        name = name.substring(0, name.length - 1)\n      }\n\n      if (name.startsWith('.')) {\n        name = name.substring(1)\n        style = 'label'\n      } else if (name.startsWith(';')) {\n        name = name.substring(1)\n        style = 'matrix'\n      }\n\n      const value = path[name]\n\n      if (value === undefined || value === null) {\n        continue\n      }\n\n      if (Array.isArray(value)) {\n        url = url.replace(\n          match,\n          serializeArrayParam({ explode, name, style, value }),\n        )\n        continue\n      }\n\n      if (typeof value === 'object') {\n        url = url.replace(\n          match,\n          serializeObjectParam({\n            explode,\n            name,\n            style,\n            value: value as Record<string, unknown>,\n            valueOnly: true,\n          }),\n        )\n        continue\n      }\n\n      if (style === 'matrix') {\n        url = url.replace(\n          match,\n          `;${serializePrimitiveParam({\n            name,\n            value: value as string,\n          })}`,\n        )\n        continue\n      }\n\n      const replaceValue = encodeURIComponent(\n        style === 'label' ? `.${value as string}` : (value as string),\n      )\n      url = url.replace(match, replaceValue)\n    }\n  }\n  return url\n}\n\nexport const getUrl = ({\n  baseUrl,\n  path,\n  query,\n  querySerializer,\n  url: _url,\n}: {\n  baseUrl?: string\n  path?: Record<string, unknown>\n  query?: Record<string, unknown>\n  querySerializer: QuerySerializer\n  url: string\n}): string => {\n  const pathUrl = _url.startsWith('/') ? _url : `/${_url}`\n  let url = (baseUrl ?? '') + pathUrl\n  if (path) {\n    url = defaultPathSerializer({ path, url })\n  }\n  let search = query ? querySerializer(query) : ''\n  if (search.startsWith('?')) {\n    search = search.substring(1)\n  }\n  if (search) {\n    url += `?${search}`\n  }\n  return url\n}\n\nexport function getValidRequestBody(options: {\n  body?: unknown\n  bodySerializer?: BodySerializer | null\n  serializedBody?: unknown\n}): unknown {\n  const hasBody = options.body !== undefined\n  const isSerializedBody = hasBody && options.bodySerializer\n\n  if (isSerializedBody) {\n    if ('serializedBody' in options) {\n      const hasSerializedBody =\n        options.serializedBody !== undefined && options.serializedBody !== ''\n\n      return hasSerializedBody ? options.serializedBody : null\n    }\n\n    // not all clients implement a serializedBody property (i.e., client-axios)\n    return options.body !== '' ? options.body : null\n  }\n\n  // plain/text body\n  if (hasBody) {\n    return options.body\n  }\n\n  // no body was provided\n  return undefined\n}\n","// This file is auto-generated by @hey-api/openapi-ts\n\nexport type AuthToken = string | undefined\n\nexport interface Auth {\n  /**\n   * Which part of the request do we use to send the auth?\n   *\n   * @default 'header'\n   */\n  in?: 'header' | 'query' | 'cookie'\n  /**\n   * A unique identifier for the security scheme.\n   *\n   * Defined only when there are multiple security schemes whose `Auth`\n   * shape would otherwise be identical.\n   */\n  key?: string\n  /**\n   * Header or query parameter name.\n   *\n   * @default 'Authorization'\n   */\n  name?: string\n  scheme?: 'basic' | 'bearer'\n  type: 'apiKey' | 'http'\n}\n\nexport const getAuthToken = async (\n  auth: Auth,\n  callback: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken,\n): Promise<string | undefined> => {\n  const token = typeof callback === 'function' ? await callback(auth) : callback\n\n  if (!token) {\n    return\n  }\n\n  if (auth.scheme === 'bearer') {\n    return `Bearer ${token}`\n  }\n\n  if (auth.scheme === 'basic') {\n    return `Basic ${btoa(token)}`\n  }\n\n  return token\n}\n","// This file is auto-generated by @hey-api/openapi-ts\n\nimport { getAuthToken } from '../core/auth.gen'\nimport type { QuerySerializerOptions } from '../core/bodySerializer.gen'\nimport { jsonBodySerializer } from '../core/bodySerializer.gen'\nimport {\n  serializeArrayParam,\n  serializeObjectParam,\n  serializePrimitiveParam,\n} from '../core/pathSerializer.gen'\nimport { getUrl } from '../core/utils.gen'\nimport type { Client, ClientOptions, Config, RequestOptions } from './types.gen'\n\nexport const createQuerySerializer = <T = unknown>({\n  parameters = {},\n  ...args\n}: QuerySerializerOptions = {}): ((queryParams: T) => string) => {\n  const querySerializer = (queryParams: T): string => {\n    const search: string[] = []\n    if (queryParams && typeof queryParams === 'object') {\n      for (const name in queryParams) {\n        const value = queryParams[name]\n\n        if (value === undefined || value === null) {\n          continue\n        }\n\n        const options = parameters[name] || args\n\n        if (Array.isArray(value)) {\n          const serializedArray = serializeArrayParam({\n            allowReserved: options.allowReserved,\n            explode: true,\n            name,\n            style: 'form',\n            value,\n            ...options.array,\n          })\n          if (serializedArray) search.push(serializedArray)\n        } else if (typeof value === 'object') {\n          const serializedObject = serializeObjectParam({\n            allowReserved: options.allowReserved,\n            explode: true,\n            name,\n            style: 'deepObject',\n            value: value as Record<string, unknown>,\n            ...options.object,\n          })\n          if (serializedObject) search.push(serializedObject)\n        } else {\n          const serializedPrimitive = serializePrimitiveParam({\n            allowReserved: options.allowReserved,\n            name,\n            value: value as string,\n          })\n          if (serializedPrimitive) search.push(serializedPrimitive)\n        }\n      }\n    }\n    return search.join('&')\n  }\n  return querySerializer\n}\n\n/**\n * Infers parseAs value from provided Content-Type header.\n */\nexport const getParseAs = (\n  contentType: string | null,\n): Exclude<Config['parseAs'], 'auto'> => {\n  if (!contentType) {\n    // If no Content-Type header is provided, the best we can do is return the raw response body,\n    // which is effectively the same as the 'stream' option.\n    return 'stream'\n  }\n\n  const cleanContent = contentType.split(';')[0]?.trim()\n\n  if (!cleanContent) {\n    return\n  }\n\n  if (\n    cleanContent.startsWith('application/json') ||\n    cleanContent.endsWith('+json')\n  ) {\n    return 'json'\n  }\n\n  if (cleanContent === 'multipart/form-data') {\n    return 'formData'\n  }\n\n  if (\n    ['application/', 'audio/', 'image/', 'video/'].some((type) =>\n      cleanContent.startsWith(type),\n    )\n  ) {\n    return 'blob'\n  }\n\n  if (cleanContent.startsWith('text/')) {\n    return 'text'\n  }\n\n  return\n}\n\nconst checkForExistence = (\n  options: Pick<RequestOptions, 'auth' | 'query'> & {\n    headers: Headers\n  },\n  name?: string,\n): boolean => {\n  if (!name) {\n    return false\n  }\n  if (\n    options.headers.has(name) ||\n    options.query?.[name] ||\n    options.headers.get('Cookie')?.includes(`${name}=`)\n  ) {\n    return true\n  }\n  return false\n}\n\nexport async function setAuthParams(\n  options: Pick<RequestOptions, 'auth' | 'query' | 'security'> & {\n    headers: Headers\n  },\n): Promise<void> {\n  for (const auth of options.security ?? []) {\n    if (checkForExistence(options, auth.name)) {\n      continue\n    }\n\n    const token = await getAuthToken(auth, options.auth)\n\n    if (!token) {\n      continue\n    }\n\n    const name = auth.name ?? 'Authorization'\n\n    switch (auth.in) {\n      case 'query':\n        if (!options.query) {\n          options.query = {}\n        }\n        options.query[name] = token\n        break\n      case 'cookie':\n        options.headers.append('Cookie', `${name}=${token}`)\n        break\n      case 'header':\n      default:\n        options.headers.set(name, token)\n        break\n    }\n  }\n}\n\nexport const buildUrl: Client['buildUrl'] = (options) =>\n  getUrl({\n    baseUrl: options.baseUrl as string,\n    path: options.path,\n    query: options.query,\n    querySerializer:\n      typeof options.querySerializer === 'function'\n        ? options.querySerializer\n        : createQuerySerializer(options.querySerializer),\n    url: options.url,\n  })\n\nexport const mergeConfigs = (a: Config, b: Config): Config => {\n  const config = { ...a, ...b }\n  if (config.baseUrl?.endsWith('/')) {\n    config.baseUrl = config.baseUrl.substring(0, config.baseUrl.length - 1)\n  }\n  config.headers = mergeHeaders(a.headers, b.headers)\n  return config\n}\n\nconst headersEntries = (headers: Headers): Array<[string, string]> => {\n  const entries: Array<[string, string]> = []\n  headers.forEach((value, key) => {\n    entries.push([key, value])\n  })\n  return entries\n}\n\nexport const mergeHeaders = (\n  ...headers: Array<Required<Config>['headers'] | undefined>\n): Headers => {\n  const mergedHeaders = new Headers()\n  for (const header of headers) {\n    if (!header) {\n      continue\n    }\n\n    const iterator =\n      header instanceof Headers\n        ? headersEntries(header)\n        : Object.entries(header)\n\n    for (const [key, value] of iterator) {\n      if (value === null) {\n        mergedHeaders.delete(key)\n      } else if (Array.isArray(value)) {\n        for (const v of value) {\n          mergedHeaders.append(key, v as string)\n        }\n      } else if (value !== undefined) {\n        // assume object headers are meant to be JSON stringified, i.e., their\n        // content value in OpenAPI specification is 'application/json'\n        mergedHeaders.set(\n          key,\n          typeof value === 'object' ? JSON.stringify(value) : (value as string),\n        )\n      }\n    }\n  }\n  return mergedHeaders\n}\n\ntype ErrInterceptor<Err, Res, Req, Options> = (\n  error: Err,\n  /** response may be undefined due to a network error where no response object is produced */\n  response: Res | undefined,\n  /** request may be undefined, because error may be from building the request object itself */\n  request: Req | undefined,\n  options: Options,\n) => Err | Promise<Err>\n\ntype ReqInterceptor<Req, Options> = (\n  request: Req,\n  options: Options,\n) => Req | Promise<Req>\n\ntype ResInterceptor<Res, Req, Options> = (\n  response: Res,\n  request: Req,\n  options: Options,\n) => Res | Promise<Res>\n\nclass Interceptors<Interceptor> {\n  fns: Array<Interceptor | null> = []\n\n  clear(): void {\n    this.fns = []\n  }\n\n  eject(id: number | Interceptor): void {\n    const index = this.getInterceptorIndex(id)\n    if (this.fns[index]) {\n      this.fns[index] = null\n    }\n  }\n\n  exists(id: number | Interceptor): boolean {\n    const index = this.getInterceptorIndex(id)\n    return Boolean(this.fns[index])\n  }\n\n  getInterceptorIndex(id: number | Interceptor): number {\n    if (typeof id === 'number') {\n      return this.fns[id] ? id : -1\n    }\n    return this.fns.indexOf(id)\n  }\n\n  update(\n    id: number | Interceptor,\n    fn: Interceptor,\n  ): number | Interceptor | false {\n    const index = this.getInterceptorIndex(id)\n    if (this.fns[index]) {\n      this.fns[index] = fn\n      return id\n    }\n    return false\n  }\n\n  use(fn: Interceptor): number {\n    this.fns.push(fn)\n    return this.fns.length - 1\n  }\n}\n\nexport interface Middleware<Req, Res, Err, Options> {\n  error: Interceptors<ErrInterceptor<Err, Res, Req, Options>>\n  request: Interceptors<ReqInterceptor<Req, Options>>\n  response: Interceptors<ResInterceptor<Res, Req, Options>>\n}\n\nexport const createInterceptors = <Req, Res, Err, Options>(): Middleware<\n  Req,\n  Res,\n  Err,\n  Options\n> => ({\n  error: new Interceptors<ErrInterceptor<Err, Res, Req, Options>>(),\n  request: new Interceptors<ReqInterceptor<Req, Options>>(),\n  response: new Interceptors<ResInterceptor<Res, Req, Options>>(),\n})\n\nconst defaultQuerySerializer = createQuerySerializer({\n  allowReserved: false,\n  array: {\n    explode: true,\n    style: 'form',\n  },\n  object: {\n    explode: true,\n    style: 'deepObject',\n  },\n})\n\nconst defaultHeaders = {\n  'Content-Type': 'application/json',\n}\n\nexport const createConfig = <T extends ClientOptions = ClientOptions>(\n  override: Config<Omit<ClientOptions, keyof T> & T> = {},\n): Config<Omit<ClientOptions, keyof T> & T> => ({\n  ...jsonBodySerializer,\n  headers: defaultHeaders,\n  parseAs: 'auto',\n  querySerializer: defaultQuerySerializer,\n  ...override,\n})\n","// This file is auto-generated by @hey-api/openapi-ts\n\nimport { createSseClient } from '../core/serverSentEvents.gen'\nimport type { HttpMethod } from '../core/types.gen'\nimport { getValidRequestBody } from '../core/utils.gen'\nimport type {\n  Client,\n  Config,\n  RequestOptions,\n  ResolvedRequestOptions,\n} from './types.gen'\nimport {\n  buildUrl,\n  createConfig,\n  createInterceptors,\n  getParseAs,\n  mergeConfigs,\n  mergeHeaders,\n  setAuthParams,\n} from './utils.gen'\n\ntype ReqInit = Omit<RequestInit, 'body' | 'headers'> & {\n  body?: any\n  headers: ReturnType<typeof mergeHeaders>\n}\n\nexport const createClient = (config: Config = {}): Client => {\n  let _config = mergeConfigs(createConfig(), config)\n\n  const getConfig = (): Config => ({ ..._config })\n\n  const setConfig = (config: Config): Config => {\n    _config = mergeConfigs(_config, config)\n    return getConfig()\n  }\n\n  const interceptors = createInterceptors<\n    Request,\n    Response,\n    unknown,\n    ResolvedRequestOptions\n  >()\n\n  const beforeRequest = async <\n    TData = unknown,\n    TResponseStyle extends 'data' | 'fields' = 'fields',\n    ThrowOnError extends boolean = boolean,\n    Url extends string = string,\n  >(\n    options: RequestOptions<TData, TResponseStyle, ThrowOnError, Url>,\n  ) => {\n    const opts = {\n      ..._config,\n      ...options,\n      fetch: options.fetch ?? _config.fetch ?? globalThis.fetch,\n      headers: mergeHeaders(_config.headers, options.headers),\n      serializedBody: undefined as string | undefined,\n    }\n\n    if (opts.security) {\n      await setAuthParams(opts)\n    }\n\n    if (opts.requestValidator) {\n      await opts.requestValidator(opts)\n    }\n\n    if (opts.body !== undefined && opts.bodySerializer) {\n      opts.serializedBody = opts.bodySerializer(opts.body) as string | undefined\n    }\n\n    // remove Content-Type header if body is empty to avoid sending invalid requests\n    if (opts.body === undefined || opts.serializedBody === '') {\n      opts.headers.delete('Content-Type')\n    }\n\n    const resolvedOpts = opts as typeof opts &\n      ResolvedRequestOptions<TResponseStyle, ThrowOnError, Url>\n    const url = buildUrl(resolvedOpts)\n\n    return { opts: resolvedOpts, url }\n  }\n\n  const request: Client['request'] = async (options) => {\n    const throwOnError = options.throwOnError ?? _config.throwOnError\n    const responseStyle = options.responseStyle ?? _config.responseStyle\n\n    let request: Request | undefined\n    let response: Response | undefined\n\n    try {\n      const { opts, url } = await beforeRequest(options)\n      const requestInit: ReqInit = {\n        redirect: 'follow',\n        ...opts,\n        body: getValidRequestBody(opts),\n      }\n\n      request = new Request(url, requestInit)\n\n      for (const fn of interceptors.request.fns) {\n        if (fn) {\n          request = await fn(request, opts)\n        }\n      }\n\n      // fetch must be assigned here, otherwise it would throw the error:\n      // TypeError: Failed to execute 'fetch' on 'Window': Illegal invocation\n      const _fetch = opts.fetch!\n\n      response = await _fetch(request)\n\n      for (const fn of interceptors.response.fns) {\n        if (fn) {\n          response = await fn(response, request, opts)\n        }\n      }\n\n      const result = {\n        request,\n        response,\n      }\n\n      if (response.ok) {\n        const parseAs =\n          (opts.parseAs === 'auto'\n            ? getParseAs(response.headers.get('Content-Type'))\n            : opts.parseAs) ?? 'json'\n\n        if (\n          response.status === 204 ||\n          response.headers.get('Content-Length') === '0'\n        ) {\n          let emptyData: any\n          switch (parseAs) {\n            case 'arrayBuffer':\n            case 'blob':\n            case 'text':\n              emptyData = await response[parseAs]()\n              break\n            case 'formData':\n              emptyData = new FormData()\n              break\n            case 'stream':\n              emptyData = response.body\n              break\n            case 'json':\n            default:\n              emptyData = {}\n              break\n          }\n          return opts.responseStyle === 'data'\n            ? emptyData\n            : {\n                data: emptyData,\n                ...result,\n              }\n        }\n\n        let data: any\n        switch (parseAs) {\n          case 'arrayBuffer':\n          case 'blob':\n          case 'formData':\n          case 'text':\n            data = await response[parseAs]()\n            break\n          case 'json': {\n            // Some servers return 200 with no Content-Length and empty body.\n            // response.json() would throw; read as text and parse if non-empty.\n            const text = await response.text()\n            data = text ? JSON.parse(text) : {}\n            break\n          }\n          case 'stream':\n            return opts.responseStyle === 'data'\n              ? response.body\n              : {\n                  data: response.body,\n                  ...result,\n                }\n        }\n\n        if (parseAs === 'json') {\n          if (opts.responseValidator) {\n            await opts.responseValidator(data)\n          }\n\n          if (opts.responseTransformer) {\n            data = await opts.responseTransformer(data)\n          }\n        }\n\n        return opts.responseStyle === 'data'\n          ? data\n          : {\n              data,\n              ...result,\n            }\n      }\n\n      const textError = await response.text()\n      let jsonError: unknown\n\n      try {\n        jsonError = JSON.parse(textError)\n      } catch {\n        // noop\n      }\n\n      throw jsonError ?? textError\n    } catch (error) {\n      let finalError = error\n\n      for (const fn of interceptors.error.fns) {\n        if (fn) {\n          finalError = await fn(\n            finalError,\n            response,\n            request,\n            options as ResolvedRequestOptions,\n          )\n        }\n      }\n\n      finalError = finalError || {}\n\n      if (throwOnError) {\n        throw finalError\n      }\n\n      // TODO: we probably want to return error and improve types\n      return responseStyle === 'data'\n        ? undefined\n        : {\n            error: finalError,\n            request,\n            response,\n          }\n    }\n  }\n\n  const makeMethodFn =\n    (method: Uppercase<HttpMethod>) => (options: RequestOptions) =>\n      request({ ...options, method })\n\n  const makeSseFn =\n    (method: Uppercase<HttpMethod>) => async (options: RequestOptions) => {\n      const { opts, url } = await beforeRequest(options)\n      return createSseClient({\n        ...opts,\n        body: opts.body as BodyInit | null | undefined,\n        method,\n        onRequest: async (url, init) => {\n          let request = new Request(url, init)\n          for (const fn of interceptors.request.fns) {\n            if (fn) {\n              request = await fn(request, opts)\n            }\n          }\n          return request\n        },\n        serializedBody: getValidRequestBody(opts) as\n          BodyInit | null | undefined,\n        url,\n      })\n    }\n\n  const _buildUrl: Client['buildUrl'] = (options) =>\n    buildUrl({ ..._config, ...options })\n\n  return {\n    buildUrl: _buildUrl,\n    connect: makeMethodFn('CONNECT'),\n    delete: makeMethodFn('DELETE'),\n    get: makeMethodFn('GET'),\n    getConfig,\n    head: makeMethodFn('HEAD'),\n    interceptors,\n    options: makeMethodFn('OPTIONS'),\n    patch: makeMethodFn('PATCH'),\n    post: makeMethodFn('POST'),\n    put: makeMethodFn('PUT'),\n    request,\n    setConfig,\n    sse: {\n      connect: makeSseFn('CONNECT'),\n      delete: makeSseFn('DELETE'),\n      get: makeSseFn('GET'),\n      head: makeSseFn('HEAD'),\n      options: makeSseFn('OPTIONS'),\n      patch: makeSseFn('PATCH'),\n      post: makeSseFn('POST'),\n      put: makeSseFn('PUT'),\n      trace: makeSseFn('TRACE'),\n    },\n    trace: makeMethodFn('TRACE'),\n  } as Client\n}\n","// This file is auto-generated by @hey-api/openapi-ts\n\nimport {\n  type Client,\n  type ClientOptions,\n  type Config,\n  createClient,\n  createConfig,\n} from './client'\nimport type { ClientOptions as ClientOptions2 } from './types.gen'\n\n/**\n * The `createClientConfig()` function will be called on client initialization\n * and the returned object will become the client's initial configuration.\n *\n * You may want to initialize your client this way instead of calling\n * `setConfig()`. This is useful for example if you're using Next.js\n * to ensure your client always has the correct values.\n */\nexport type CreateClientConfig<T extends ClientOptions = ClientOptions2> = (\n  override?: Config<ClientOptions & T>,\n) => Config<Required<ClientOptions> & T>\n\nexport const client: Client = createClient(\n  createConfig<ClientOptions2>({ baseUrl: 'https://api.nf.domains' }),\n)\n","// This file is auto-generated by @hey-api/openapi-ts\n\nimport type {\n  Client,\n  ClientMeta,\n  Options as Options2,\n  RequestResult,\n  TDataShape,\n} from './client'\nimport { client } from './client.gen'\nimport type {\n  InfoInfoOpenapi3YamlData,\n  InfoInfoOpenapi3YamlResponses,\n  InfoVersionData,\n  InfoVersionResponses,\n  NfdActivityData,\n  NfdActivityErrors,\n  NfdActivityResponses,\n  NfdAnalyticsData,\n  NfdAnalyticsErrors,\n  NfdAnalyticsResponses,\n  NfdBadgesData,\n  NfdBadgesErrors,\n  NfdBadgesResponses,\n  NfdBlueskyLeadersData,\n  NfdBlueskyLeadersErrors,\n  NfdBlueskyLeadersResponses,\n  NfdBrowseData,\n  NfdBrowseErrors,\n  NfdBrowseResponses,\n  NfdConsensusLeadersData,\n  NfdConsensusLeadersErrors,\n  NfdConsensusLeadersResponses,\n  NfdConsensusMetricsData,\n  NfdConsensusMetricsErrors,\n  NfdConsensusMetricsResponses,\n  NfdContractLockData,\n  NfdContractLockErrors,\n  NfdContractLockResponses,\n  NfdContractUpgradeData,\n  NfdContractUpgradeErrors,\n  NfdContractUpgradeResponses,\n  NfdContractUpgradeV3Data,\n  NfdContractUpgradeV3Errors,\n  NfdContractUpgradeV3Responses,\n  NfdDonationLeadersV2Data,\n  NfdDonationLeadersV2Errors,\n  NfdDonationLeadersV2Responses,\n  NfdDonationListV2Data,\n  NfdDonationListV2Errors,\n  NfdDonationListV2Responses,\n  NfdDonationsData,\n  NfdDonationsErrors,\n  NfdDonationsResponses,\n  NfdGetLookupData,\n  NfdGetLookupErrors,\n  NfdGetLookupResponses,\n  NfdGetNameSigData,\n  NfdGetNameSigErrors,\n  NfdGetNameSigResponses,\n  NfdGetNfdData,\n  NfdGetNfdErrors,\n  NfdGetNfdResponses,\n  NfdGetNfdsForAddressesV2Data,\n  NfdGetNfdsForAddressesV2Errors,\n  NfdGetNfdsForAddressesV2Responses,\n  NfdGetQuoteData,\n  NfdGetQuoteErrors,\n  NfdGetQuoteResponses,\n  NfdGetRevAddressSigData,\n  NfdGetRevAddressSigErrors,\n  NfdGetRevAddressSigResponses,\n  NfdIsValidAsaData,\n  NfdIsValidAsaErrors,\n  NfdIsValidAsaResponses,\n  NfdIsValidNfdData,\n  NfdIsValidNfdErrors,\n  NfdIsValidNfdResponses,\n  NfdLinkAddressData,\n  NfdLinkAddressErrors,\n  NfdLinkAddressResponses,\n  NfdMintData,\n  NfdMintErrors,\n  NfdMintResponses,\n  NfdOfferData,\n  NfdOfferErrors,\n  NfdOfferResponses,\n  NfdPostOfferToOwnerData,\n  NfdPostOfferToOwnerErrors,\n  NfdPostOfferToOwnerResponses,\n  NfdPurchaseData,\n  NfdPurchaseErrors,\n  NfdPurchaseResponses,\n  NfdRenewData,\n  NfdRenewErrors,\n  NfdRenewResponses,\n  NfdRescindOfferData,\n  NfdRescindOfferErrors,\n  NfdRescindOfferResponses,\n  NfdSearchV2Data,\n  NfdSearchV2Errors,\n  NfdSearchV2Responses,\n  NfdSegmentLeadersData,\n  NfdSegmentLeadersErrors,\n  NfdSegmentLeadersResponses,\n  NfdSegmentLockData,\n  NfdSegmentLockErrors,\n  NfdSegmentLockResponses,\n  NfdSendFromVaultData,\n  NfdSendFromVaultErrors,\n  NfdSendFromVaultResponses,\n  NfdSendToVaultData,\n  NfdSendToVaultErrors,\n  NfdSendToVaultResponses,\n  NfdSetPrimaryAddressData,\n  NfdSetPrimaryAddressErrors,\n  NfdSetPrimaryAddressResponses,\n  NfdSetPrimaryNfdData,\n  NfdSetPrimaryNfdErrors,\n  NfdSetPrimaryNfdResponses,\n  NfdSuggestData,\n  NfdSuggestErrors,\n  NfdSuggestResponses,\n  NfdTotalsData,\n  NfdTotalsErrors,\n  NfdTotalsResponses,\n  NfdTwitterLeadersData,\n  NfdTwitterLeadersErrors,\n  NfdTwitterLeadersResponses,\n  NfdUnlinkAddressData,\n  NfdUnlinkAddressErrors,\n  NfdUnlinkAddressResponses,\n  NfdUpdateAllData,\n  NfdUpdateAllErrors,\n  NfdUpdateAllResponses,\n  NfdUpdateImageData,\n  NfdUpdateImageErrors,\n  NfdUpdateImageResponses,\n  NfdUpdatePartialData,\n  NfdUpdatePartialErrors,\n  NfdUpdatePartialResponses,\n  NfdVaultOptInLockData,\n  NfdVaultOptInLockErrors,\n  NfdVaultOptInLockResponses,\n  NfdVerifyConfirmData,\n  NfdVerifyConfirmErrors,\n  NfdVerifyConfirmResponses,\n  NfdVerifyRequestData,\n  NfdVerifyRequestErrors,\n  NfdVerifyRequestResponses,\n} from './types.gen'\n\nexport type Options<\n  TData extends TDataShape = TDataShape,\n  ThrowOnError extends boolean = boolean,\n  TResponse = unknown,\n> = Options2<TData, ThrowOnError, TResponse> & {\n  /**\n   * You can provide a client instance returned by `createClient()` instead of\n   * individual options. This might be also useful if you want to implement a\n   * custom client.\n   */\n  client?: Client\n  /**\n   * You can pass arbitrary values through the `meta` object. This can be\n   * used to access values that aren't defined as part of the SDK function.\n   */\n  meta?: keyof ClientMeta extends never ? Record<string, unknown> : ClientMeta\n}\n\n/**\n * Download ./pubfiles/openapi3.yaml\n *\n * YAML document containing the API swagger definition\n */\nexport const info_InfoOpenapi3Yaml = <ThrowOnError extends boolean = false>(\n  options?: Options<InfoInfoOpenapi3YamlData, ThrowOnError>,\n): RequestResult<InfoInfoOpenapi3YamlResponses, unknown, ThrowOnError> =>\n  (options?.client ?? client).get<\n    InfoInfoOpenapi3YamlResponses,\n    unknown,\n    ThrowOnError\n  >({ url: '/info/openapi3.yaml', ...options })\n\n/**\n * version info\n *\n * Returns version information for the service\n */\nexport const info_version = <ThrowOnError extends boolean = false>(\n  options?: Options<InfoVersionData, ThrowOnError>,\n): RequestResult<InfoVersionResponses, unknown, ThrowOnError> =>\n  (options?.client ?? client).get<InfoVersionResponses, unknown, ThrowOnError>({\n    url: '/info/version',\n    ...options,\n  })\n\n/**\n * Get a specific NFD by name or by its application ID\n *\n * Get a specific NFD by name or by its application ID\n */\nexport const nfd_getNfd = <ThrowOnError extends boolean = false>(\n  options: Options<NfdGetNfdData, ThrowOnError>,\n): RequestResult<NfdGetNfdResponses, NfdGetNfdErrors, ThrowOnError> =>\n  (options.client ?? client).get<\n    NfdGetNfdResponses,\n    NfdGetNfdErrors,\n    ThrowOnError\n  >({ url: '/nfd/{nameOrID}', ...options })\n\n/**\n * Fetch change activity for an NFD\n *\n * Fetch change activity for an NFD, specifically general 'block-level' deltas for an NFD\n */\nexport const nfd_activity = <ThrowOnError extends boolean = false>(\n  options: Options<NfdActivityData, ThrowOnError>,\n): RequestResult<NfdActivityResponses, NfdActivityErrors, ThrowOnError> =>\n  (options.client ?? client).get<\n    NfdActivityResponses,\n    NfdActivityErrors,\n    ThrowOnError\n  >({ url: '/nfd/activity', ...options })\n\n/**\n * Fetch NFD analytics via various filters\n *\n * Fetch NFD analytics via various filters\n */\nexport const nfd_analytics = <ThrowOnError extends boolean = false>(\n  options?: Options<NfdAnalyticsData, ThrowOnError>,\n): RequestResult<NfdAnalyticsResponses, NfdAnalyticsErrors, ThrowOnError> =>\n  (options?.client ?? client).get<\n    NfdAnalyticsResponses,\n    NfdAnalyticsErrors,\n    ThrowOnError\n  >({ url: '/nfd/analytics', ...options })\n\n/**\n * Fetch badge information (donations/etc) for an NFD\n *\n * Fetch badge information (ie: donations) for an NFD\n */\nexport const nfd_badges = <ThrowOnError extends boolean = false>(\n  options: Options<NfdBadgesData, ThrowOnError>,\n): RequestResult<NfdBadgesResponses, NfdBadgesErrors, ThrowOnError> =>\n  (options.client ?? client).get<\n    NfdBadgesResponses,\n    NfdBadgesErrors,\n    ThrowOnError\n  >({ url: '/nfd/badges/{name}', ...options })\n\n/**\n * blueskyLeaders nfd\n *\n * Get top bluesky influencers\n */\nexport const nfd_blueskyLeaders = <ThrowOnError extends boolean = false>(\n  options?: Options<NfdBlueskyLeadersData, ThrowOnError>,\n): RequestResult<\n  NfdBlueskyLeadersResponses,\n  NfdBlueskyLeadersErrors,\n  ThrowOnError\n> =>\n  (options?.client ?? client).get<\n    NfdBlueskyLeadersResponses,\n    NfdBlueskyLeadersErrors,\n    ThrowOnError\n  >({ url: '/nfd/bluesky/leaders', ...options })\n\n/**\n * Browse NFDs via various filters\n */\nexport const nfd_browse = <ThrowOnError extends boolean = false>(\n  options?: Options<NfdBrowseData, ThrowOnError>,\n): RequestResult<NfdBrowseResponses, NfdBrowseErrors, ThrowOnError> =>\n  (options?.client ?? client).get<\n    NfdBrowseResponses,\n    NfdBrowseErrors,\n    ThrowOnError\n  >({ url: '/nfd/browse', ...options })\n\n/**\n * consensusLeaders nfd\n *\n * Get top consensus leaders\n */\nexport const nfd_consensusLeaders = <ThrowOnError extends boolean = false>(\n  options?: Options<NfdConsensusLeadersData, ThrowOnError>,\n): RequestResult<\n  NfdConsensusLeadersResponses,\n  NfdConsensusLeadersErrors,\n  ThrowOnError\n> =>\n  (options?.client ?? client).get<\n    NfdConsensusLeadersResponses,\n    NfdConsensusLeadersErrors,\n    ThrowOnError\n  >({ url: '/nfd/consensus/leaders', ...options })\n\n/**\n * consensusMetrics nfd\n *\n * Get general metrics about Algorand consensus\n */\nexport const nfd_consensusMetrics = <ThrowOnError extends boolean = false>(\n  options?: Options<NfdConsensusMetricsData, ThrowOnError>,\n): RequestResult<\n  NfdConsensusMetricsResponses,\n  NfdConsensusMetricsErrors,\n  ThrowOnError\n> =>\n  (options?.client ?? client).get<\n    NfdConsensusMetricsResponses,\n    NfdConsensusMetricsErrors,\n    ThrowOnError\n  >({ url: '/nfd/consensus/metrics', ...options })\n\n/**\n * contractLock nfd\n *\n * Lock/Unlock an NFD contract - if locked, the contract can never being modified until unlocked again by the owner.\n */\nexport const nfd_contractLock = <ThrowOnError extends boolean = false>(\n  options: Options<NfdContractLockData, ThrowOnError>,\n): RequestResult<\n  NfdContractLockResponses,\n  NfdContractLockErrors,\n  ThrowOnError\n> =>\n  (options.client ?? client).post<\n    NfdContractLockResponses,\n    NfdContractLockErrors,\n    ThrowOnError\n  >({\n    url: '/nfd/contract/lock/{name}',\n    ...options,\n    headers: {\n      'Content-Type': 'application/json',\n      ...options.headers,\n    },\n  })\n\n/**\n * contractUpgrade nfd\n *\n * Request upgrade of a pre 2.11 NFD to 2.11 (going no further)\n */\nexport const nfd_contractUpgrade = <ThrowOnError extends boolean = false>(\n  options: Options<NfdContractUpgradeData, ThrowOnError>,\n): RequestResult<\n  NfdContractUpgradeResponses,\n  NfdContractUpgradeErrors,\n  ThrowOnError\n> =>\n  (options.client ?? client).post<\n    NfdContractUpgradeResponses,\n    NfdContractUpgradeErrors,\n    ThrowOnError\n  >({\n    url: '/nfd/contract/upgrade/{name}',\n    ...options,\n    headers: {\n      'Content-Type': 'application/json',\n      ...options.headers,\n    },\n  })\n\n/**\n * donations nfd\n *\n * Fetch donation activity for an NFD, totalling amounts sent 'to' designated donation accounts\n */\nexport const nfd_donations = <ThrowOnError extends boolean = false>(\n  options: Options<NfdDonationsData, ThrowOnError>,\n): RequestResult<NfdDonationsResponses, NfdDonationsErrors, ThrowOnError> =>\n  (options.client ?? client).get<\n    NfdDonationsResponses,\n    NfdDonationsErrors,\n    ThrowOnError\n  >({ url: '/nfd/donations/{name}', ...options })\n\n/**\n * getQuote nfd\n *\n * get price / carry cost to mint or rewnew an NFD (if existing)\n */\nexport const nfd_getQuote = <ThrowOnError extends boolean = false>(\n  options: Options<NfdGetQuoteData, ThrowOnError>,\n): RequestResult<NfdGetQuoteResponses, NfdGetQuoteErrors, ThrowOnError> =>\n  (options.client ?? client).get<\n    NfdGetQuoteResponses,\n    NfdGetQuoteErrors,\n    ThrowOnError\n  >({ url: '/nfd/getQuote/{name}', ...options })\n\n/**\n * isValidNFD nfd\n *\n * Determines if specified NFD Application ID is authentic\n */\nexport const nfd_isValidNfd = <ThrowOnError extends boolean = false>(\n  options: Options<NfdIsValidNfdData, ThrowOnError>,\n): RequestResult<NfdIsValidNfdResponses, NfdIsValidNfdErrors, ThrowOnError> =>\n  (options.client ?? client).get<\n    NfdIsValidNfdResponses,\n    NfdIsValidNfdErrors,\n    ThrowOnError\n  >({ url: '/nfd/isValid/{appID}', ...options })\n\n/**\n * isValidASA nfd\n *\n * Determines if specified NFD NFT ASA ID is authentic NFD\n */\nexport const nfd_isValidAsa = <ThrowOnError extends boolean = false>(\n  options: Options<NfdIsValidAsaData, ThrowOnError>,\n): RequestResult<NfdIsValidAsaResponses, NfdIsValidAsaErrors, ThrowOnError> =>\n  (options.client ?? client).get<\n    NfdIsValidAsaResponses,\n    NfdIsValidAsaErrors,\n    ThrowOnError\n  >({ url: '/nfd/isValidASA/{asaID}', ...options })\n\n/**\n * linkAddress nfd\n *\n * Link one or more addresses to an NFD, adding to the reverse-address lookups as well as to this NFD.  Sender must be owner, and each added address must be able to be signed for.\n */\nexport const nfd_linkAddress = <ThrowOnError extends boolean = false>(\n  options: Options<NfdLinkAddressData, ThrowOnError>,\n): RequestResult<NfdLinkAddressResponses, NfdLinkAddressErrors, ThrowOnError> =>\n  (options.client ?? client).post<\n    NfdLinkAddressResponses,\n    NfdLinkAddressErrors,\n    ThrowOnError\n  >({\n    url: '/nfd/links/addAddress/{name}',\n    ...options,\n    headers: {\n      'Content-Type': 'application/json',\n      ...options.headers,\n    },\n  })\n\n/**\n * unlinkAddress nfd\n *\n * UnLink one or more addresses to an NFD, adding to the reverse-address lookups as well as to this NFD.  Sender must be owner, and each added address must be able to be signed for.\n */\nexport const nfd_unlinkAddress = <ThrowOnError extends boolean = false>(\n  options: Options<NfdUnlinkAddressData, ThrowOnError>,\n): RequestResult<\n  NfdUnlinkAddressResponses,\n  NfdUnlinkAddressErrors,\n  ThrowOnError\n> =>\n  (options.client ?? client).post<\n    NfdUnlinkAddressResponses,\n    NfdUnlinkAddressErrors,\n    ThrowOnError\n  >({\n    url: '/nfd/links/removeAddress/{name}',\n    ...options,\n    headers: {\n      'Content-Type': 'application/json',\n      ...options.headers,\n    },\n  })\n\n/**\n * setPrimaryAddress nfd\n *\n * Set which of the currently verified addresses should be the first in the list (swapping positions as necessary)\n */\nexport const nfd_setPrimaryAddress = <ThrowOnError extends boolean = false>(\n  options: Options<NfdSetPrimaryAddressData, ThrowOnError>,\n): RequestResult<\n  NfdSetPrimaryAddressResponses,\n  NfdSetPrimaryAddressErrors,\n  ThrowOnError\n> =>\n  (options.client ?? client).post<\n    NfdSetPrimaryAddressResponses,\n    NfdSetPrimaryAddressErrors,\n    ThrowOnError\n  >({\n    url: '/nfd/links/setPrimaryAddress/{name}',\n    ...options,\n    headers: {\n      'Content-Type': 'application/json',\n      ...options.headers,\n    },\n  })\n\n/**\n * setPrimaryNFD nfd\n *\n * Set the specified NFD as the primary NFD to return for the specified address via its reverse lookup\n */\nexport const nfd_setPrimaryNfd = <ThrowOnError extends boolean = false>(\n  options: Options<NfdSetPrimaryNfdData, ThrowOnError>,\n): RequestResult<\n  NfdSetPrimaryNfdResponses,\n  NfdSetPrimaryNfdErrors,\n  ThrowOnError\n> =>\n  (options.client ?? client).post<\n    NfdSetPrimaryNfdResponses,\n    NfdSetPrimaryNfdErrors,\n    ThrowOnError\n  >({\n    url: '/nfd/links/setPrimaryNFD/{name}',\n    ...options,\n    headers: {\n      'Content-Type': 'application/json',\n      ...options.headers,\n    },\n  })\n\n/**\n * Reverse Address lookup with results returned per address\n *\n * Get the primary NFD for an address.  Must be verified address, or if allowUnverified is set, it may match against an unverified address\n */\nexport const nfd_getLookup = <ThrowOnError extends boolean = false>(\n  options: Options<NfdGetLookupData, ThrowOnError>,\n): RequestResult<NfdGetLookupResponses, NfdGetLookupErrors, ThrowOnError> =>\n  (options.client ?? client).get<\n    NfdGetLookupResponses,\n    NfdGetLookupErrors,\n    ThrowOnError\n  >({ url: '/nfd/lookup', ...options })\n\n/**\n * mint nfd\n *\n * Mint a new NFD, with user buying specified NFD and paying for a prorated amount of time based on its yearly price.\n */\nexport const nfd_mint = <ThrowOnError extends boolean = false>(\n  options: Options<NfdMintData, ThrowOnError>,\n): RequestResult<NfdMintResponses, NfdMintErrors, ThrowOnError> =>\n  (options.client ?? client).post<\n    NfdMintResponses,\n    NfdMintErrors,\n    ThrowOnError\n  >({\n    url: '/nfd/mint',\n    ...options,\n    headers: {\n      'Content-Type': 'application/json',\n      ...options.headers,\n    },\n  })\n\n/**\n * getNameSig nfd\n *\n * Returns NameSig address for an NFD name (usable for V1 only)\n */\nexport const nfd_getNameSig = <ThrowOnError extends boolean = false>(\n  options: Options<NfdGetNameSigData, ThrowOnError>,\n): RequestResult<NfdGetNameSigResponses, NfdGetNameSigErrors, ThrowOnError> =>\n  (options.client ?? client).get<\n    NfdGetNameSigResponses,\n    NfdGetNameSigErrors,\n    ThrowOnError\n  >({ url: '/nfd/nameSig/{name}', ...options })\n\n/**\n * offer nfd\n *\n * Offer up an NFD for sale - specifying price and optionally an address it is reserved for.\n */\nexport const nfd_offer = <ThrowOnError extends boolean = false>(\n  options: Options<NfdOfferData, ThrowOnError>,\n): RequestResult<NfdOfferResponses, NfdOfferErrors, ThrowOnError> =>\n  (options.client ?? client).post<\n    NfdOfferResponses,\n    NfdOfferErrors,\n    ThrowOnError\n  >({\n    url: '/nfd/offer/{name}',\n    ...options,\n    headers: {\n      'Content-Type': 'application/json',\n      ...options.headers,\n    },\n  })\n\n/**\n * postOfferToOwner nfd\n *\n * Post an offer to buy to the owner of an NFD, offering up a particular amount with optional note for them to consider\n */\nexport const nfd_postOfferToOwner = <ThrowOnError extends boolean = false>(\n  options: Options<NfdPostOfferToOwnerData, ThrowOnError>,\n): RequestResult<\n  NfdPostOfferToOwnerResponses,\n  NfdPostOfferToOwnerErrors,\n  ThrowOnError\n> =>\n  (options.client ?? client).post<\n    NfdPostOfferToOwnerResponses,\n    NfdPostOfferToOwnerErrors,\n    ThrowOnError\n  >({\n    url: '/nfd/postOfferToOwner/{name}',\n    ...options,\n    headers: {\n      'Content-Type': 'application/json',\n      ...options.headers,\n    },\n  })\n\n/**\n * purchase nfd\n *\n * Purchase an NFD for sale - specifying buyer (to sign transaction) and price\n */\nexport const nfd_purchase = <ThrowOnError extends boolean = false>(\n  options: Options<NfdPurchaseData, ThrowOnError>,\n): RequestResult<NfdPurchaseResponses, NfdPurchaseErrors, ThrowOnError> =>\n  (options.client ?? client).post<\n    NfdPurchaseResponses,\n    NfdPurchaseErrors,\n    ThrowOnError\n  >({\n    url: '/nfd/purchase/{name}',\n    ...options,\n    headers: {\n      'Content-Type': 'application/json',\n      ...options.headers,\n    },\n  })\n\n/**\n * renew nfd\n *\n * Renew or extend the expiration of an NFD.  If current owner, renews at base price. If other owner, can take ownership but goes through reverse auction process for first 28 days where price drops to base price - with price being for 1 year\n */\nexport const nfd_renew = <ThrowOnError extends boolean = false>(\n  options: Options<NfdRenewData, ThrowOnError>,\n): RequestResult<NfdRenewResponses, NfdRenewErrors, ThrowOnError> =>\n  (options.client ?? client).post<\n    NfdRenewResponses,\n    NfdRenewErrors,\n    ThrowOnError\n  >({\n    url: '/nfd/renew',\n    ...options,\n    headers: {\n      'Content-Type': 'application/json',\n      ...options.headers,\n    },\n  })\n\n/**\n * rescindOffer nfd\n *\n * Rescind offer of sale. Claiming NFD back for self, and removing it for sale.\n */\nexport const nfd_rescindOffer = <ThrowOnError extends boolean = false>(\n  options: Options<NfdRescindOfferData, ThrowOnError>,\n): RequestResult<\n  NfdRescindOfferResponses,\n  NfdRescindOfferErrors,\n  ThrowOnError\n> =>\n  (options.client ?? client).post<\n    NfdRescindOfferResponses,\n    NfdRescindOfferErrors,\n    ThrowOnError\n  >({\n    url: '/nfd/rescindOffer/{name}',\n    ...options,\n    headers: {\n      'Content-Type': 'application/json',\n      ...options.headers,\n    },\n  })\n\n/**\n * getRevAddressSig nfd\n *\n * Returns RevAddress address for an NFD name (usable for V1 only)\n */\nexport const nfd_getRevAddressSig = <ThrowOnError extends boolean = false>(\n  options: Options<NfdGetRevAddressSigData, ThrowOnError>,\n): RequestResult<\n  NfdGetRevAddressSigResponses,\n  NfdGetRevAddressSigErrors,\n  ThrowOnError\n> =>\n  (options.client ?? client).get<\n    NfdGetRevAddressSigResponses,\n    NfdGetRevAddressSigErrors,\n    ThrowOnError\n  >({ url: '/nfd/revAddressSig/{address}', ...options })\n\n/**\n * segmentLeaders nfd\n *\n * Get top segment roots\n */\nexport const nfd_segmentLeaders = <ThrowOnError extends boolean = false>(\n  options?: Options<NfdSegmentLeadersData, ThrowOnError>,\n): RequestResult<\n  NfdSegmentLeadersResponses,\n  NfdSegmentLeadersErrors,\n  ThrowOnError\n> =>\n  (options?.client ?? client).get<\n    NfdSegmentLeadersResponses,\n    NfdSegmentLeadersErrors,\n    ThrowOnError\n  >({ url: '/nfd/segment/leaders', ...options })\n\n/**\n * Lock/Unlock an NFD segment - specifying open price if unlocking\n *\n * Lock/Unlock an NFD segment - if locked, the segment only allows minted names created by the segment owner.  If unlocked, anyone can mint off the segment for the price (in USD) the owner sets\n */\nexport const nfd_segmentLock = <ThrowOnError extends boolean = false>(\n  options: Options<NfdSegmentLockData, ThrowOnError>,\n): RequestResult<NfdSegmentLockResponses, NfdSegmentLockErrors, ThrowOnError> =>\n  (options.client ?? client).post<\n    NfdSegmentLockResponses,\n    NfdSegmentLockErrors,\n    ThrowOnError\n  >({\n    url: '/nfd/segment/lock/{name}',\n    ...options,\n    headers: {\n      'Content-Type': 'application/json',\n      ...options.headers,\n    },\n  })\n\n/**\n * suggest nfd\n *\n * Suggest NFDs to purchase\n */\nexport const nfd_suggest = <ThrowOnError extends boolean = false>(\n  options: Options<NfdSuggestData, ThrowOnError>,\n): RequestResult<NfdSuggestResponses, NfdSuggestErrors, ThrowOnError> =>\n  (options.client ?? client).get<\n    NfdSuggestResponses,\n    NfdSuggestErrors,\n    ThrowOnError\n  >({ url: '/nfd/suggest/{name}', ...options })\n\n/**\n * totals nfd\n *\n * Fetch NFD summary data - results subject to change in the future\n */\nexport const nfd_totals = <ThrowOnError extends boolean = false>(\n  options?: Options<NfdTotalsData, ThrowOnError>,\n): RequestResult<NfdTotalsResponses, NfdTotalsErrors, ThrowOnError> =>\n  (options?.client ?? client).get<\n    NfdTotalsResponses,\n    NfdTotalsErrors,\n    ThrowOnError\n  >({ url: '/nfd/totals', ...options })\n\n/**\n * twitterLeaders nfd\n *\n * Get top twitter influencers\n */\nexport const nfd_twitterLeaders = <ThrowOnError extends boolean = false>(\n  options?: Options<NfdTwitterLeadersData, ThrowOnError>,\n): RequestResult<\n  NfdTwitterLeadersResponses,\n  NfdTwitterLeadersErrors,\n  ThrowOnError\n> =>\n  (options?.client ?? client).get<\n    NfdTwitterLeadersResponses,\n    NfdTwitterLeadersErrors,\n    ThrowOnError\n  >({ url: '/nfd/twitter/leaders', ...options })\n\n/**\n * updatePartial nfd\n *\n * Set an attribute in an NFD on behalf of a particular sender (who must be the owner).  Can set user-defined fields, or clear verified fields (except v.ca*)\n */\nexport const nfd_updatePartial = <ThrowOnError extends boolean = false>(\n  options: Options<NfdUpdatePartialData, ThrowOnError>,\n): RequestResult<\n  NfdUpdatePartialResponses,\n  NfdUpdatePartialErrors,\n  ThrowOnError\n> =>\n  (options.client ?? client).patch<\n    NfdUpdatePartialResponses,\n    NfdUpdatePartialErrors,\n    ThrowOnError\n  >({\n    url: '/nfd/update/{name}',\n    ...options,\n    headers: {\n      'Content-Type': 'application/json',\n      ...options.headers,\n    },\n  })\n\n/**\n * updateAll nfd\n *\n * Replace all NFD user-settable attributes with those passed-in, removing, adding and replacing on behalf of a particular sender (who must be the owner).  Returns transaction group of transactions to sign\n */\nexport const nfd_updateAll = <ThrowOnError extends boolean = false>(\n  options: Options<NfdUpdateAllData, ThrowOnError>,\n): RequestResult<NfdUpdateAllResponses, NfdUpdateAllErrors, ThrowOnError> =>\n  (options.client ?? client).put<\n    NfdUpdateAllResponses,\n    NfdUpdateAllErrors,\n    ThrowOnError\n  >({\n    url: '/nfd/update/{name}',\n    ...options,\n    headers: {\n      'Content-Type': 'application/json',\n      ...options.headers,\n    },\n  })\n\n/**\n * updateImage nfd\n *\n * Update the avatar or banner image associated with an NFD by uploading new image content\n */\nexport const nfd_updateImage = <ThrowOnError extends boolean = false>(\n  options: Options<NfdUpdateImageData, ThrowOnError>,\n): RequestResult<NfdUpdateImageResponses, NfdUpdateImageErrors, ThrowOnError> =>\n  (options.client ?? client).post<\n    NfdUpdateImageResponses,\n    NfdUpdateImageErrors,\n    ThrowOnError\n  >({ url: '/nfd/updateImage/{name}/{sender}/{which}', ...options })\n\n/**\n * Reverse Address lookup with results returned per address\n *\n * Get all NFDs which have been explicitly linked to one or more verified [or unverified] Algorand address(es).  Unverified addresses will match but return as unverifiedCaAlgo array.  These should be treated specially and not have the same trust level as verified addresses as they can be falsely attributed.  The caAlgo array is what should be trusted for things like NFT creation addresses. For reverse lookups returning multiple NFDs, the first result should be used.\n */\nexport const nfd_getNfdsForAddressesV2 = <ThrowOnError extends boolean = false>(\n  options: Options<NfdGetNfdsForAddressesV2Data, ThrowOnError>,\n): RequestResult<\n  NfdGetNfdsForAddressesV2Responses,\n  NfdGetNfdsForAddressesV2Errors,\n  ThrowOnError\n> =>\n  (options.client ?? client).get<\n    NfdGetNfdsForAddressesV2Responses,\n    NfdGetNfdsForAddressesV2Errors,\n    ThrowOnError\n  >({ url: '/nfd/v2/address', ...options })\n\n/**\n * donationLeadersV2 nfd\n *\n * Get top donors to a specific NFD Donation target\n */\nexport const nfd_donationLeadersV2 = <ThrowOnError extends boolean = false>(\n  options: Options<NfdDonationLeadersV2Data, ThrowOnError>,\n): RequestResult<\n  NfdDonationLeadersV2Responses,\n  NfdDonationLeadersV2Errors,\n  ThrowOnError\n> =>\n  (options.client ?? client).get<\n    NfdDonationLeadersV2Responses,\n    NfdDonationLeadersV2Errors,\n    ThrowOnError\n  >({ url: '/nfd/v2/donations/leaders/{name}', ...options })\n\n/**\n * donationListV2 nfd\n *\n * Fetch list of tracked Donation NFD 'targets'.\n */\nexport const nfd_donationListV2 = <ThrowOnError extends boolean = false>(\n  options?: Options<NfdDonationListV2Data, ThrowOnError>,\n): RequestResult<\n  NfdDonationListV2Responses,\n  NfdDonationListV2Errors,\n  ThrowOnError\n> =>\n  (options?.client ?? client).get<\n    NfdDonationListV2Responses,\n    NfdDonationListV2Errors,\n    ThrowOnError\n  >({ url: '/nfd/v2/donations/list', ...options })\n\n/**\n * Search NFDs via various filters\n *\n * Search NFDs via various filters\n */\nexport const nfd_searchV2 = <ThrowOnError extends boolean = false>(\n  options?: Options<NfdSearchV2Data, ThrowOnError>,\n): RequestResult<NfdSearchV2Responses, NfdSearchV2Errors, ThrowOnError> =>\n  (options?.client ?? client).get<\n    NfdSearchV2Responses,\n    NfdSearchV2Errors,\n    ThrowOnError\n  >({ url: '/nfd/v2/search', ...options })\n\n/**\n * ContractUpgradeV3 nfd\n *\n * Request upgrade of a 2.11 or 3.x NFD to 3.x+ (post renewals). First switch to 3.x will pay 1 year renewal fee\n */\nexport const nfd_ContractUpgradeV3 = <ThrowOnError extends boolean = false>(\n  options: Options<NfdContractUpgradeV3Data, ThrowOnError>,\n): RequestResult<\n  NfdContractUpgradeV3Responses,\n  NfdContractUpgradeV3Errors,\n  ThrowOnError\n> =>\n  (options.client ?? client).post<\n    NfdContractUpgradeV3Responses,\n    NfdContractUpgradeV3Errors,\n    ThrowOnError\n  >({\n    url: '/nfd/v3/contract/upgrade/{name}',\n    ...options,\n    headers: {\n      'Content-Type': 'application/json',\n      ...options.headers,\n    },\n  })\n\n/**\n * vaultOptInLock nfd\n *\n * Lock/Unlock ability for the specified NFD Vault to auto opt-in to assets, allowing airdrops from other accounts\n */\nexport const nfd_vaultOptInLock = <ThrowOnError extends boolean = false>(\n  options: Options<NfdVaultOptInLockData, ThrowOnError>,\n): RequestResult<\n  NfdVaultOptInLockResponses,\n  NfdVaultOptInLockErrors,\n  ThrowOnError\n> =>\n  (options.client ?? client).post<\n    NfdVaultOptInLockResponses,\n    NfdVaultOptInLockErrors,\n    ThrowOnError\n  >({\n    url: '/nfd/vault/lock/{name}',\n    ...options,\n    headers: {\n      'Content-Type': 'application/json',\n      ...options.headers,\n    },\n  })\n\n/**\n * sendFromVault nfd\n *\n * Send an amount of an asset [0 == ALGO] to another account FROM the NFD Vault.  Only owner of NFD can send.\n */\nexport const nfd_sendFromVault = <ThrowOnError extends boolean = false>(\n  options: Options<NfdSendFromVaultData, ThrowOnError>,\n): RequestResult<\n  NfdSendFromVaultResponses,\n  NfdSendFromVaultErrors,\n  ThrowOnError\n> =>\n  (options.client ?? client).post<\n    NfdSendFromVaultResponses,\n    NfdSendFromVaultErrors,\n    ThrowOnError\n  >({\n    url: '/nfd/vault/sendFrom/{name}',\n    ...options,\n    headers: {\n      'Content-Type': 'application/json',\n      ...options.headers,\n    },\n  })\n\n/**\n * sendToVault nfd\n *\n * Provide transaction to send an asset owned by sender account to an NFD vault.  Call to have opt-in to vault will be included if necessary.  Callable by NFD owner, or if Opt-in is UNLOCKED (or asset already opted-in), anyone can call\n */\nexport const nfd_sendToVault = <ThrowOnError extends boolean = false>(\n  options: Options<NfdSendToVaultData, ThrowOnError>,\n): RequestResult<NfdSendToVaultResponses, NfdSendToVaultErrors, ThrowOnError> =>\n  (options.client ?? client).post<\n    NfdSendToVaultResponses,\n    NfdSendToVaultErrors,\n    ThrowOnError\n  >({\n    url: '/nfd/vault/sendTo/{name}',\n    ...options,\n    headers: {\n      'Content-Type': 'application/json',\n      ...options.headers,\n    },\n  })\n\n/**\n * verifyConfirm nfd\n *\n * Verify a particular piece of data on, or off-chain.  Each verification differs in its requirements\n */\nexport const nfd_verifyConfirm = <ThrowOnError extends boolean = false>(\n  options: Options<NfdVerifyConfirmData, ThrowOnError>,\n): RequestResult<\n  NfdVerifyConfirmResponses,\n  NfdVerifyConfirmErrors,\n  ThrowOnError\n> =>\n  (options.client ?? client).post<\n    NfdVerifyConfirmResponses,\n    NfdVerifyConfirmErrors,\n    ThrowOnError\n  >({\n    url: '/nfd/verify/confirm/{id}',\n    ...options,\n    headers: {\n      'Content-Type': 'application/json',\n      ...options.headers,\n    },\n  })\n\n/**\n * verifyRequest nfd\n *\n * Request Verification for particular piece of data on, or off-chain.  Each verification differs in its requirements. Returns data to be used in challenge\n */\nexport const nfd_verifyRequest = <ThrowOnError extends boolean = false>(\n  options: Options<NfdVerifyRequestData, ThrowOnError>,\n): RequestResult<\n  NfdVerifyRequestResponses,\n  NfdVerifyRequestErrors,\n  ThrowOnError\n> =>\n  (options.client ?? client).post<\n    NfdVerifyRequestResponses,\n    NfdVerifyRequestErrors,\n    ThrowOnError\n  >({\n    url: '/nfd/verify/request',\n    ...options,\n    headers: {\n      'Content-Type': 'application/json',\n      ...options.headers,\n    },\n  })\n","/**\n * Split an array into chunks of a specified size\n * @param array - The array to split\n * @param chunkSize - The maximum size of each chunk\n * @returns An array of chunks\n */\nexport function chunkArray<T>(array: T[], chunkSize = 20): T[][] {\n  if (!array.length) return []\n  if (array.length <= chunkSize) return [array]\n\n  const chunks: T[][] = []\n  for (let i = 0; i < array.length; i += chunkSize) {\n    chunks.push(array.slice(i, i + chunkSize))\n  }\n  return chunks\n}\n","import { client } from './api/client.gen'\nimport {\n  nfd_getLookup,\n  nfd_getNfd,\n  nfd_searchV2,\n  nfd_suggest,\n  nfd_verifyConfirm,\n  nfd_verifyRequest,\n} from './api/sdk.gen'\nimport { NfdApiBaseUrl, NfdRegistryId } from './constants'\nimport { chunkArray } from './utils/internal/array'\n\nimport type {\n  Nfd,\n  SearchOptions,\n  SearchResponse,\n  SuggestOptions,\n  ReverseLookupOptions,\n  ResolveOptions,\n  VerifyField,\n  VerifyRequestResult,\n  VerifyConfirmResult,\n} from './types'\n\n/**\n * Client for interacting with the NFD API\n * This class wraps the auto-generated API client to provide a more convenient interface\n */\nexport class NfdApiClient {\n  private readonly _client = client\n\n  /**\n   * Create a new NfdApiClient instance\n   * @param registryId - The registry ID to determine which network to use\n   */\n  constructor(registryId?: number | bigint) {\n    // Set the base URL based on the registry ID\n    if (registryId !== undefined) {\n      const baseUrl =\n        BigInt(registryId) === BigInt(NfdRegistryId.TESTNET)\n          ? NfdApiBaseUrl.TESTNET\n          : NfdApiBaseUrl.MAINNET\n\n      this.setBaseUrl(baseUrl)\n    }\n  }\n\n  /**\n   * Create a new NfdApiClient instance configured for MainNet\n   * @returns A new NfdApiClient instance\n   */\n  public static mainNet(): NfdApiClient {\n    const apiClient = new NfdApiClient()\n    apiClient.setBaseUrl(NfdApiBaseUrl.MAINNET)\n    return apiClient\n  }\n\n  /**\n   * Create a new NfdApiClient instance configured for TestNet\n   * @returns A new NfdApiClient instance\n   */\n  public static testNet(): NfdApiClient {\n    const apiClient = new NfdApiClient()\n    apiClient.setBaseUrl(NfdApiBaseUrl.TESTNET)\n    return apiClient\n  }\n\n  /**\n   * Get the raw generated API client\n   * @returns The raw API client\n   */\n  public get client(): typeof client {\n    return this._client\n  }\n\n  /**\n   * Set the base URL for the API client\n   * @param baseUrl - The base URL to use for API requests\n   */\n  public setBaseUrl(baseUrl: string): void {\n    this._client.setConfig({\n      baseUrl,\n    })\n  }\n\n  /**\n   * Resolve an NFD by name or application ID using the API\n   */\n  public async resolve(\n    nameOrId: string,\n    options: ResolveOptions = {},\n  ): Promise<Nfd> {\n    // Add cache parameter if needed\n    const params = this._getCacheParam(options.nocache)\n\n    const response = await nfd_getNfd({\n      client: this._client,\n      query: {\n        view: options.view,\n        poll: options.poll,\n        ...params,\n      },\n      path: {\n        nameOrID: nameOrId,\n      },\n      throwOnError: true,\n    })\n\n    return response.data as Nfd\n  }\n\n  /**\n   * Perform a reverse lookup to find NFDs associated with Algorand addresses\n   * @param addresses - Array of Algorand addresses to look up\n   * @param options - Options for the lookup\n   * @returns Record mapping addresses to their associated NFDs\n   * @remarks\n   * This method returns a record where each key is an Algorand address and the value is the NFD associated with that address.\n   * If an address is not associated with any NFDs, the value will be an empty object.\n   */\n  public async reverseLookup(\n    addresses: string[],\n    options: ReverseLookupOptions = {},\n  ): Promise<Record<string, Nfd>> {\n    // Filter out empty addresses\n    const validAddresses = addresses.filter((addr) => addr.trim() !== '')\n    if (validAddresses.length === 0) {\n      return {}\n    }\n\n    // Split addresses into chunks of 20 (API limit)\n    const addressChunks = chunkArray(validAddresses, 20)\n\n    try {\n      // Add cache parameter if needed\n      const params = this._getCacheParam(options.nocache)\n\n      // Make parallel requests for each chunk\n      const responses = await Promise.all(\n        addressChunks.map((chunk) =>\n          nfd_getLookup({\n            client: this._client,\n            query: {\n              address: chunk,\n              view: options.view,\n              allowUnverified: options.allowUnverified,\n              ...params,\n            },\n            throwOnError: false, // Handle errors per chunk\n          }).catch((error) => {\n            // Return empty result for this chunk if 404 (not found)\n            if (error.response?.status === 404) {\n              return { data: {} }\n            }\n            // Re-throw other errors\n            throw error\n          }),\n        ),\n      )\n\n      // Merge all responses\n      const mergedResults: Record<string, Nfd> = {}\n\n      for (const response of responses) {\n        if (response.data) {\n          Object.entries(response.data).forEach(([address, nfd]) => {\n            mergedResults[address] = nfd as Nfd\n          })\n        }\n      }\n\n      return mergedResults\n    } catch (error) {\n      const errorMessage =\n        error instanceof Error ? error.message : String(error)\n      throw new Error(`Error performing reverse lookup: ${errorMessage}`)\n    }\n  }\n\n  /**\n   * Search for NFDs using the API\n   */\n  public async search(options: SearchOptions = {}): Promise<SearchResponse> {\n    // Add cache parameter if needed\n    const params = this._getCacheParam(options.nocache)\n\n    const response = await nfd_searchV2({\n      client: this._client,\n      query: {\n        name: options.name,\n        category: options.category,\n        saleType: options.saleType,\n        state: options.state,\n        parentAppID: options.parentAppId,\n        length: options.length,\n        traits: options.traits,\n        owner: options.owner,\n        reservedFor: options.reservedFor,\n        excludeUserReserved: options.excludeUserReserved,\n        prefix: options.prefix,\n        substring: options.substring,\n        vproperty: options.verifiedProperty,\n        vvalue: options.verifiedValue,\n        segmentLocked: options.segmentLocked,\n        segmentRoot: options.segmentRoot,\n        minPrice: options.minPrice,\n        maxPrice: options.maxPrice,\n        minPriceUsd: options.minPriceUsd,\n        maxPriceUsd: options.maxPriceUsd,\n        changedAfter: options.changedAfter,\n        expiresBefore: options.expiresBefore,\n        limit: options.limit,\n        offset: options.offset,\n        sort: options.sort,\n        view: options.view,\n        ...params,\n      },\n      throwOnError: true,\n    })\n\n    return {\n      ...response.data,\n      nfds: response.data.nfds.map((nfd) => nfd as Nfd),\n    }\n  }\n\n  /**\n   * Get name suggestions for NFD registration\n   * @param name - The name (even partial) to search for\n   * @param options - Suggestion options including the buyer address\n   * @returns Array of suggested NFD records\n   */\n  public async suggest(name: string, options: SuggestOptions): Promise<Nfd[]> {\n    const response = await nfd_suggest({\n      client: this._client,\n      path: { name },\n      query: {\n        buyer: options.buyer,\n        limit: options.limit,\n        view: options.view,\n      },\n      throwOnError: true,\n    })\n\n    return (response.data ?? []) as Nfd[]\n  }\n\n  /**\n   * Start a verification request for an NFD property\n   * @param name - The NFD name to verify a property for\n   * @param sender - The NFD owner's address\n   * @param field - The field to verify\n   * @returns Verification request result with challenge and ID\n   */\n  public async verifyRequest(\n    name: string,\n    sender: string,\n    field: VerifyField,\n  ): Promise<VerifyRequestResult> {\n    const response = await nfd_verifyRequest({\n      client: this._client,\n      body: {\n        name,\n        sender,\n        fieldToVerify: field,\n      },\n      throwOnError: true,\n    })\n\n    return response.data\n  }\n\n  /**\n   * Confirm a verification request\n   * @param id - The verification request ID\n   * @param challenge - The challenge value (optional depending on verification type)\n   * @returns Verification confirmation result\n   */\n  public async verifyConfirm(\n    id: string,\n    challenge?: string,\n  ): Promise<VerifyConfirmResult> {\n    const response = await nfd_verifyConfirm({\n      client: this._client,\n      path: { id },\n      body: {\n        challenge,\n      },\n      throwOnError: true,\n    })\n\n    return response.data\n  }\n\n  /**\n   * Internal method for cache parameter\n   * @private\n   */\n  private _getCacheParam(flag?: boolean): Record<string, number | undefined> {\n    if (!flag) {\n      return {}\n    }\n\n    const now = new Date()\n    const minutes = now.getMinutes()\n    const seconds = now.getSeconds()\n    const value = Math.floor(((minutes * 60 + seconds) % 120) / 4)\n    return { _cb: value }\n  }\n}\n","import algosdk from 'algosdk';\n\n/**\n * Wrapper around `algosdk.ABIMethod` that represents an ARC-56 ABI method.\n */\nclass Arc56Method extends algosdk.ABIMethod {\n    constructor(method) {\n        super(method);\n        this.method = method;\n        this.args = method.args.map((arg) => ({\n            ...arg,\n            type: algosdk.abiTypeIsTransaction(arg.type) || algosdk.abiTypeIsReference(arg.type) ? arg.type : algosdk.ABIType.from(arg.type),\n        }));\n        this.returns = {\n            ...this.method.returns,\n            type: this.method.returns.type === 'void' ? 'void' : algosdk.ABIType.from(this.method.returns.type),\n        };\n    }\n    toJSON() {\n        return this.method;\n    }\n}\n/**\n * Returns the `ABITupleType` for the given ARC-56 struct definition\n * @param struct The ARC-56 struct definition\n * @returns The `ABITupleType`\n */\nfunction getABITupleTypeFromABIStructDefinition(struct, structs) {\n    return new algosdk.ABITupleType(struct.map((v) => typeof v.type === 'string'\n        ? structs[v.type]\n            ? getABITupleTypeFromABIStructDefinition(structs[v.type], structs)\n            : algosdk.ABIType.from(v.type)\n        : getABITupleTypeFromABIStructDefinition(v.type, structs)));\n}\n/**\n * Converts a decoded ABI tuple as a struct.\n * @param decodedABITuple The decoded ABI tuple value\n * @param structFields The struct fields from an ARC-56 app spec\n * @returns The struct as a Record<string, any>\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction getABIStructFromABITuple(decodedABITuple, structFields, structs) {\n    return Object.fromEntries(structFields.map(({ name: key, type }, i) => {\n        const abiValue = decodedABITuple[i];\n        return [\n            key,\n            (typeof type === 'string' && !structs[type]) || !Array.isArray(abiValue)\n                ? decodedABITuple[i]\n                : getABIStructFromABITuple(abiValue, typeof type === 'string' ? structs[type] : type, structs),\n        ];\n    }));\n}\n/**\n * Converts an ARC-56 struct as an ABI tuple.\n * @param struct The struct to convert\n * @param structFields The struct fields from an ARC-56 app spec\n * @returns The struct as a decoded ABI tuple\n */\nfunction getABITupleFromABIStruct(struct, structFields, structs) {\n    return structFields.map(({ name: key, type }) => {\n        const value = struct[key];\n        return typeof type === 'string' && !structs[type]\n            ? value\n            : getABITupleFromABIStruct(value, typeof type === 'string' ? structs[type] : type, structs);\n    });\n}\n/**\n * Returns the decoded ABI value (or struct for a struct type)\n * for the given raw Algorand value given an ARC-56 type and defined ARC-56 structs.\n * @param value The raw Algorand value (bytes or uint64)\n * @param type The ARC-56 type - either an ABI Type string or a struct name\n * @param structs The defined ARC-56 structs\n * @returns The decoded ABI value or struct\n */\nfunction getABIDecodedValue(value, type, structs) {\n    if (type === 'AVMBytes' || typeof value !== 'object')\n        return value;\n    if (type === 'AVMString')\n        return Buffer.from(value).toString('utf-8');\n    if (type === 'AVMUint64')\n        return algosdk.ABIType.from('uint64').decode(value);\n    if (structs[type]) {\n        const tupleValue = getABITupleTypeFromABIStructDefinition(structs[type], structs).decode(value);\n        return getABIStructFromABITuple(tupleValue, structs[type], structs);\n    }\n    return algosdk.ABIType.from(type).decode(value);\n}\n/**\n * Returns the ABI-encoded value for the given value.\n * @param value The value to encode either already in encoded binary form (`Uint8Array`), a decoded ABI value or an ARC-56 struct\n * @param type The ARC-56 type - either an ABI Type string or a struct name\n * @param structs The defined ARC-56 structs\n * @returns The binary ABI-encoded value\n */\nfunction getABIEncodedValue(value, type, structs) {\n    if (typeof value === 'object' && value instanceof Uint8Array)\n        return value;\n    if (type === 'AVMUint64')\n        return algosdk.ABIType.from('uint64').encode(value);\n    if (type === 'AVMBytes' || type === 'AVMString') {\n        if (typeof value === 'string')\n            return Buffer.from(value, 'utf-8');\n        if (typeof value !== 'object' || !(value instanceof Uint8Array))\n            throw new Error(`Expected bytes value for ${type}, but got ${value}`);\n        return value;\n    }\n    if (structs[type]) {\n        const tupleType = getABITupleTypeFromABIStructDefinition(structs[type], structs);\n        if (Array.isArray(value)) {\n            tupleType.encode(value);\n        }\n        else {\n            return tupleType.encode(getABITupleFromABIStruct(value, structs[type], structs));\n        }\n    }\n    return algosdk.ABIType.from(type).encode(value);\n}\n/**\n * Returns the ARC-56 ABI method object for a given method name or signature and ARC-56 app spec.\n * @param methodNameOrSignature The method name or method signature to call if an ABI call is being emitted.\n * e.g. `my_method` or `my_method(unit64,string)bytes`\n * @param appSpec The app spec for the app\n * @returns The `Arc56Method`\n */\nfunction getArc56Method(methodNameOrSignature, appSpec) {\n    let method;\n    if (!methodNameOrSignature.includes('(')) {\n        const methods = appSpec.methods.filter((m) => m.name === methodNameOrSignature);\n        if (methods.length === 0)\n            throw new Error(`Unable to find method ${methodNameOrSignature} in ${appSpec.name} app.`);\n        if (methods.length > 1) {\n            throw new Error(`Received a call to method ${methodNameOrSignature} in contract ${appSpec.name}, but this resolved to multiple methods; please pass in an ABI signature instead: ${appSpec.methods\n                .map((m) => new algosdk.ABIMethod(m).getSignature())\n                .join(', ')}`);\n        }\n        method = methods[0];\n    }\n    else {\n        const m = appSpec.methods.find((m) => new algosdk.ABIMethod(m).getSignature() === methodNameOrSignature);\n        if (!m)\n            throw new Error(`Unable to find method ${methodNameOrSignature} in ${appSpec.name} app.`);\n        method = m;\n    }\n    return new Arc56Method(method);\n}\n/**\n * Checks for decode errors on the AppCallTransactionResult and maps the return value to the specified generic type\n *\n * @param returnValue The smart contract response\n * @param method The method that was called\n * @param structs The struct fields from the app spec\n * @returns The smart contract response with an updated return value\n */\nfunction getArc56ReturnValue(returnValue, method, structs) {\n    const m = 'method' in method ? method.method : method;\n    const type = m.returns.struct ?? m.returns.type;\n    if (returnValue?.decodeError) {\n        throw returnValue.decodeError;\n    }\n    if (type === undefined || type === 'void' || returnValue?.returnValue === undefined)\n        return undefined;\n    if (type === 'AVMBytes')\n        return returnValue.rawReturnValue;\n    if (type === 'AVMString')\n        return Buffer.from(returnValue.rawReturnValue).toString('utf-8');\n    if (type === 'AVMUint64')\n        return algosdk.ABIType.from('uint64').decode(returnValue.rawReturnValue);\n    if (structs[type]) {\n        return getABIStructFromABITuple(returnValue.returnValue, structs[type], structs);\n    }\n    return returnValue.returnValue;\n}\n\nexport { Arc56Method, getABIDecodedValue, getABIEncodedValue, getABIStructFromABITuple, getABITupleFromABIStruct, getABITupleTypeFromABIStructDefinition, getArc56Method, getArc56ReturnValue };\n//# sourceMappingURL=app-arc56.mjs.map\n","'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n  lookup[i] = code[i]\n  revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n  var len = b64.length\n\n  if (len % 4 > 0) {\n    throw new Error('Invalid string. Length must be a multiple of 4')\n  }\n\n  // Trim off extra bytes after placeholder bytes are found\n  // See: https://github.com/beatgammit/base64-js/issues/42\n  var validLen = b64.indexOf('=')\n  if (validLen === -1) validLen = len\n\n  var placeHoldersLen = validLen === len\n    ? 0\n    : 4 - (validLen % 4)\n\n  return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n  var lens = getLens(b64)\n  var validLen = lens[0]\n  var placeHoldersLen = lens[1]\n  return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n  return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n  var tmp\n  var lens = getLens(b64)\n  var validLen = lens[0]\n  var placeHoldersLen = lens[1]\n\n  var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n  var curByte = 0\n\n  // if there are placeholders, only get up to the last complete 4 chars\n  var len = placeHoldersLen > 0\n    ? validLen - 4\n    : validLen\n\n  var i\n  for (i = 0; i < len; i += 4) {\n    tmp =\n      (revLookup[b64.charCodeAt(i)] << 18) |\n      (revLookup[b64.charCodeAt(i + 1)] << 12) |\n      (revLookup[b64.charCodeAt(i + 2)] << 6) |\n      revLookup[b64.charCodeAt(i + 3)]\n    arr[curByte++] = (tmp >> 16) & 0xFF\n    arr[curByte++] = (tmp >> 8) & 0xFF\n    arr[curByte++] = tmp & 0xFF\n  }\n\n  if (placeHoldersLen === 2) {\n    tmp =\n      (revLookup[b64.charCodeAt(i)] << 2) |\n      (revLookup[b64.charCodeAt(i + 1)] >> 4)\n    arr[curByte++] = tmp & 0xFF\n  }\n\n  if (placeHoldersLen === 1) {\n    tmp =\n      (revLookup[b64.charCodeAt(i)] << 10) |\n      (revLookup[b64.charCodeAt(i + 1)] << 4) |\n      (revLookup[b64.charCodeAt(i + 2)] >> 2)\n    arr[curByte++] = (tmp >> 8) & 0xFF\n    arr[curByte++] = tmp & 0xFF\n  }\n\n  return arr\n}\n\nfunction tripletToBase64 (num) {\n  return lookup[num >> 18 & 0x3F] +\n    lookup[num >> 12 & 0x3F] +\n    lookup[num >> 6 & 0x3F] +\n    lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n  var tmp\n  var output = []\n  for (var i = start; i < end; i += 3) {\n    tmp =\n      ((uint8[i] << 16) & 0xFF0000) +\n      ((uint8[i + 1] << 8) & 0xFF00) +\n      (uint8[i + 2] & 0xFF)\n    output.push(tripletToBase64(tmp))\n  }\n  return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n  var tmp\n  var len = uint8.length\n  var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n  var parts = []\n  var maxChunkLength = 16383 // must be multiple of 3\n\n  // go through the array every three bytes, we'll deal with trailing stuff later\n  for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n    parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))\n  }\n\n  // pad the end with zeros, but make sure to not forget the extra bytes\n  if (extraBytes === 1) {\n    tmp = uint8[len - 1]\n    parts.push(\n      lookup[tmp >> 2] +\n      lookup[(tmp << 4) & 0x3F] +\n      '=='\n    )\n  } else if (extraBytes === 2) {\n    tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n    parts.push(\n      lookup[tmp >> 10] +\n      lookup[(tmp >> 4) & 0x3F] +\n      lookup[(tmp << 2) & 0x3F] +\n      '='\n    )\n  }\n\n  return parts.join('')\n}\n","/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */\nexports.read = function (buffer, offset, isLE, mLen, nBytes) {\n  var e, m\n  var eLen = (nBytes * 8) - mLen - 1\n  var eMax = (1 << eLen) - 1\n  var eBias = eMax >> 1\n  var nBits = -7\n  var i = isLE ? (nBytes - 1) : 0\n  var d = isLE ? -1 : 1\n  var s = buffer[offset + i]\n\n  i += d\n\n  e = s & ((1 << (-nBits)) - 1)\n  s >>= (-nBits)\n  nBits += eLen\n  for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n  m = e & ((1 << (-nBits)) - 1)\n  e >>= (-nBits)\n  nBits += mLen\n  for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n  if (e === 0) {\n    e = 1 - eBias\n  } else if (e === eMax) {\n    return m ? NaN : ((s ? -1 : 1) * Infinity)\n  } else {\n    m = m + Math.pow(2, mLen)\n    e = e - eBias\n  }\n  return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n  var e, m, c\n  var eLen = (nBytes * 8) - mLen - 1\n  var eMax = (1 << eLen) - 1\n  var eBias = eMax >> 1\n  var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n  var i = isLE ? 0 : (nBytes - 1)\n  var d = isLE ? 1 : -1\n  var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n  value = Math.abs(value)\n\n  if (isNaN(value) || value === Infinity) {\n    m = isNaN(value) ? 1 : 0\n    e = eMax\n  } else {\n    e = Math.floor(Math.log(value) / Math.LN2)\n    if (value * (c = Math.pow(2, -e)) < 1) {\n      e--\n      c *= 2\n    }\n    if (e + eBias >= 1) {\n      value += rt / c\n    } else {\n      value += rt * Math.pow(2, 1 - eBias)\n    }\n    if (value * c >= 2) {\n      e++\n      c /= 2\n    }\n\n    if (e + eBias >= eMax) {\n      m = 0\n      e = eMax\n    } else if (e + eBias >= 1) {\n      m = ((value * c) - 1) * Math.pow(2, mLen)\n      e = e + eBias\n    } else {\n      m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n      e = 0\n    }\n  }\n\n  for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n  e = (e << mLen) | m\n  eLen += mLen\n  for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n  buffer[offset + i - d] |= s * 128\n}\n","/*!\n * The buffer module from node.js, for the browser.\n *\n * @author   Feross Aboukhadijeh <https://feross.org>\n * @license  MIT\n */\n/* eslint-disable no-proto */\n\n'use strict'\n\nconst base64 = require('base64-js')\nconst ieee754 = require('ieee754')\nconst customInspectSymbol =\n  (typeof Symbol === 'function' && typeof Symbol['for'] === 'function') // eslint-disable-line dot-notation\n    ? Symbol['for']('nodejs.util.inspect.custom') // eslint-disable-line dot-notation\n    : null\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\nconst K_MAX_LENGTH = 0x7fffffff\nexports.kMaxLength = K_MAX_LENGTH\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n *   === true    Use Uint8Array implementation (fastest)\n *   === false   Print warning and recommend using `buffer` v4.x which has an Object\n *               implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * We report that the browser does not support typed arrays if the are not subclassable\n * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array`\n * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support\n * for __proto__ and has a buggy typed array implementation.\n */\nBuffer.TYPED_ARRAY_SUPPORT = typedArraySupport()\n\nif (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' &&\n    typeof console.error === 'function') {\n  console.error(\n    'This browser lacks typed array (Uint8Array) support which is required by ' +\n    '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.'\n  )\n}\n\nfunction typedArraySupport () {\n  // Can typed array instances can be augmented?\n  try {\n    const arr = new Uint8Array(1)\n    const proto = { foo: function () { return 42 } }\n    Object.setPrototypeOf(proto, Uint8Array.prototype)\n    Object.setPrototypeOf(arr, proto)\n    return arr.foo() === 42\n  } catch (e) {\n    return false\n  }\n}\n\nObject.defineProperty(Buffer.prototype, 'parent', {\n  enumerable: true,\n  get: function () {\n    if (!Buffer.isBuffer(this)) return undefined\n    return this.buffer\n  }\n})\n\nObject.defineProperty(Buffer.prototype, 'offset', {\n  enumerable: true,\n  get: function () {\n    if (!Buffer.isBuffer(this)) return undefined\n    return this.byteOffset\n  }\n})\n\nfunction createBuffer (length) {\n  if (length > K_MAX_LENGTH) {\n    throw new RangeError('The value \"' + length + '\" is invalid for option \"size\"')\n  }\n  // Return an augmented `Uint8Array` instance\n  const buf = new Uint8Array(length)\n  Object.setPrototypeOf(buf, Buffer.prototype)\n  return buf\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n  // Common case.\n  if (typeof arg === 'number') {\n    if (typeof encodingOrOffset === 'string') {\n      throw new TypeError(\n        'The \"string\" argument must be of type string. Received type number'\n      )\n    }\n    return allocUnsafe(arg)\n  }\n  return from(arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\nfunction from (value, encodingOrOffset, length) {\n  if (typeof value === 'string') {\n    return fromString(value, encodingOrOffset)\n  }\n\n  if (ArrayBuffer.isView(value)) {\n    return fromArrayView(value)\n  }\n\n  if (value == null) {\n    throw new TypeError(\n      'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n      'or Array-like Object. Received type ' + (typeof value)\n    )\n  }\n\n  if (isInstance(value, ArrayBuffer) ||\n      (value && isInstance(value.buffer, ArrayBuffer))) {\n    return fromArrayBuffer(value, encodingOrOffset, length)\n  }\n\n  if (typeof SharedArrayBuffer !== 'undefined' &&\n      (isInstance(value, SharedArrayBuffer) ||\n      (value && isInstance(value.buffer, SharedArrayBuffer)))) {\n    return fromArrayBuffer(value, encodingOrOffset, length)\n  }\n\n  if (typeof value === 'number') {\n    throw new TypeError(\n      'The \"value\" argument must not be of type number. Received type number'\n    )\n  }\n\n  const valueOf = value.valueOf && value.valueOf()\n  if (valueOf != null && valueOf !== value) {\n    return Buffer.from(valueOf, encodingOrOffset, length)\n  }\n\n  const b = fromObject(value)\n  if (b) return b\n\n  if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null &&\n      typeof value[Symbol.toPrimitive] === 'function') {\n    return Buffer.from(value[Symbol.toPrimitive]('string'), encodingOrOffset, length)\n  }\n\n  throw new TypeError(\n    'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n    'or Array-like Object. Received type ' + (typeof value)\n  )\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n  return from(value, encodingOrOffset, length)\n}\n\n// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug:\n// https://github.com/feross/buffer/pull/148\nObject.setPrototypeOf(Buffer.prototype, Uint8Array.prototype)\nObject.setPrototypeOf(Buffer, Uint8Array)\n\nfunction assertSize (size) {\n  if (typeof size !== 'number') {\n    throw new TypeError('\"size\" argument must be of type number')\n  } else if (size < 0) {\n    throw new RangeError('The value \"' + size + '\" is invalid for option \"size\"')\n  }\n}\n\nfunction alloc (size, fill, encoding) {\n  assertSize(size)\n  if (size <= 0) {\n    return createBuffer(size)\n  }\n  if (fill !== undefined) {\n    // Only pay attention to encoding if it's a string. This\n    // prevents accidentally sending in a number that would\n    // be interpreted as a start offset.\n    return typeof encoding === 'string'\n      ? createBuffer(size).fill(fill, encoding)\n      : createBuffer(size).fill(fill)\n  }\n  return createBuffer(size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n  return alloc(size, fill, encoding)\n}\n\nfunction allocUnsafe (size) {\n  assertSize(size)\n  return createBuffer(size < 0 ? 0 : checked(size) | 0)\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n  return allocUnsafe(size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n  return allocUnsafe(size)\n}\n\nfunction fromString (string, encoding) {\n  if (typeof encoding !== 'string' || encoding === '') {\n    encoding = 'utf8'\n  }\n\n  if (!Buffer.isEncoding(encoding)) {\n    throw new TypeError('Unknown encoding: ' + encoding)\n  }\n\n  const length = byteLength(string, encoding) | 0\n  let buf = createBuffer(length)\n\n  const actual = buf.write(string, encoding)\n\n  if (actual !== length) {\n    // Writing a hex string, for example, that contains invalid characters will\n    // cause everything after the first invalid character to be ignored. (e.g.\n    // 'abxxcd' will be treated as 'ab')\n    buf = buf.slice(0, actual)\n  }\n\n  return buf\n}\n\nfunction fromArrayLike (array) {\n  const length = array.length < 0 ? 0 : checked(array.length) | 0\n  const buf = createBuffer(length)\n  for (let i = 0; i < length; i += 1) {\n    buf[i] = array[i] & 255\n  }\n  return buf\n}\n\nfunction fromArrayView (arrayView) {\n  if (isInstance(arrayView, Uint8Array)) {\n    const copy = new Uint8Array(arrayView)\n    return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength)\n  }\n  return fromArrayLike(arrayView)\n}\n\nfunction fromArrayBuffer (array, byteOffset, length) {\n  if (byteOffset < 0 || array.byteLength < byteOffset) {\n    throw new RangeError('\"offset\" is outside of buffer bounds')\n  }\n\n  if (array.byteLength < byteOffset + (length || 0)) {\n    throw new RangeError('\"length\" is outside of buffer bounds')\n  }\n\n  let buf\n  if (byteOffset === undefined && length === undefined) {\n    buf = new Uint8Array(array)\n  } else if (length === undefined) {\n    buf = new Uint8Array(array, byteOffset)\n  } else {\n    buf = new Uint8Array(array, byteOffset, length)\n  }\n\n  // Return an augmented `Uint8Array` instance\n  Object.setPrototypeOf(buf, Buffer.prototype)\n\n  return buf\n}\n\nfunction fromObject (obj) {\n  if (Buffer.isBuffer(obj)) {\n    const len = checked(obj.length) | 0\n    const buf = createBuffer(len)\n\n    if (buf.length === 0) {\n      return buf\n    }\n\n    obj.copy(buf, 0, 0, len)\n    return buf\n  }\n\n  if (obj.length !== undefined) {\n    if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) {\n      return createBuffer(0)\n    }\n    return fromArrayLike(obj)\n  }\n\n  if (obj.type === 'Buffer' && Array.isArray(obj.data)) {\n    return fromArrayLike(obj.data)\n  }\n}\n\nfunction checked (length) {\n  // Note: cannot use `length < K_MAX_LENGTH` here because that fails when\n  // length is NaN (which is otherwise coerced to zero.)\n  if (length >= K_MAX_LENGTH) {\n    throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n                         'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes')\n  }\n  return length | 0\n}\n\nfunction SlowBuffer (length) {\n  if (+length != length) { // eslint-disable-line eqeqeq\n    length = 0\n  }\n  return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n  return b != null && b._isBuffer === true &&\n    b !== Buffer.prototype // so Buffer.isBuffer(Buffer.prototype) will be false\n}\n\nBuffer.compare = function compare (a, b) {\n  if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength)\n  if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength)\n  if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n    throw new TypeError(\n      'The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array'\n    )\n  }\n\n  if (a === b) return 0\n\n  let x = a.length\n  let y = b.length\n\n  for (let i = 0, len = Math.min(x, y); i < len; ++i) {\n    if (a[i] !== b[i]) {\n      x = a[i]\n      y = b[i]\n      break\n    }\n  }\n\n  if (x < y) return -1\n  if (y < x) return 1\n  return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n  switch (String(encoding).toLowerCase()) {\n    case 'hex':\n    case 'utf8':\n    case 'utf-8':\n    case 'ascii':\n    case 'latin1':\n    case 'binary':\n    case 'base64':\n    case 'ucs2':\n    case 'ucs-2':\n    case 'utf16le':\n    case 'utf-16le':\n      return true\n    default:\n      return false\n  }\n}\n\nBuffer.concat = function concat (list, length) {\n  if (!Array.isArray(list)) {\n    throw new TypeError('\"list\" argument must be an Array of Buffers')\n  }\n\n  if (list.length === 0) {\n    return Buffer.alloc(0)\n  }\n\n  let i\n  if (length === undefined) {\n    length = 0\n    for (i = 0; i < list.length; ++i) {\n      length += list[i].length\n    }\n  }\n\n  const buffer = Buffer.allocUnsafe(length)\n  let pos = 0\n  for (i = 0; i < list.length; ++i) {\n    let buf = list[i]\n    if (isInstance(buf, Uint8Array)) {\n      if (pos + buf.length > buffer.length) {\n        if (!Buffer.isBuffer(buf)) buf = Buffer.from(buf)\n        buf.copy(buffer, pos)\n      } else {\n        Uint8Array.prototype.set.call(\n          buffer,\n          buf,\n          pos\n        )\n      }\n    } else if (!Buffer.isBuffer(buf)) {\n      throw new TypeError('\"list\" argument must be an Array of Buffers')\n    } else {\n      buf.copy(buffer, pos)\n    }\n    pos += buf.length\n  }\n  return buffer\n}\n\nfunction byteLength (string, encoding) {\n  if (Buffer.isBuffer(string)) {\n    return string.length\n  }\n  if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) {\n    return string.byteLength\n  }\n  if (typeof string !== 'string') {\n    throw new TypeError(\n      'The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. ' +\n      'Received type ' + typeof string\n    )\n  }\n\n  const len = string.length\n  const mustMatch = (arguments.length > 2 && arguments[2] === true)\n  if (!mustMatch && len === 0) return 0\n\n  // Use a for loop to avoid recursion\n  let loweredCase = false\n  for (;;) {\n    switch (encoding) {\n      case 'ascii':\n      case 'latin1':\n      case 'binary':\n        return len\n      case 'utf8':\n      case 'utf-8':\n        return utf8ToBytes(string).length\n      case 'ucs2':\n      case 'ucs-2':\n      case 'utf16le':\n      case 'utf-16le':\n        return len * 2\n      case 'hex':\n        return len >>> 1\n      case 'base64':\n        return base64ToBytes(string).length\n      default:\n        if (loweredCase) {\n          return mustMatch ? -1 : utf8ToBytes(string).length // assume utf8\n        }\n        encoding = ('' + encoding).toLowerCase()\n        loweredCase = true\n    }\n  }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n  let loweredCase = false\n\n  // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n  // property of a typed array.\n\n  // This behaves neither like String nor Uint8Array in that we set start/end\n  // to their upper/lower bounds if the value passed is out of range.\n  // undefined is handled specially as per ECMA-262 6th Edition,\n  // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n  if (start === undefined || start < 0) {\n    start = 0\n  }\n  // Return early if start > this.length. Done here to prevent potential uint32\n  // coercion fail below.\n  if (start > this.length) {\n    return ''\n  }\n\n  if (end === undefined || end > this.length) {\n    end = this.length\n  }\n\n  if (end <= 0) {\n    return ''\n  }\n\n  // Force coercion to uint32. This will also coerce falsey/NaN values to 0.\n  end >>>= 0\n  start >>>= 0\n\n  if (end <= start) {\n    return ''\n  }\n\n  if (!encoding) encoding = 'utf8'\n\n  while (true) {\n    switch (encoding) {\n      case 'hex':\n        return hexSlice(this, start, end)\n\n      case 'utf8':\n      case 'utf-8':\n        return utf8Slice(this, start, end)\n\n      case 'ascii':\n        return asciiSlice(this, start, end)\n\n      case 'latin1':\n      case 'binary':\n        return latin1Slice(this, start, end)\n\n      case 'base64':\n        return base64Slice(this, start, end)\n\n      case 'ucs2':\n      case 'ucs-2':\n      case 'utf16le':\n      case 'utf-16le':\n        return utf16leSlice(this, start, end)\n\n      default:\n        if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n        encoding = (encoding + '').toLowerCase()\n        loweredCase = true\n    }\n  }\n}\n\n// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package)\n// to detect a Buffer instance. It's not possible to use `instanceof Buffer`\n// reliably in a browserify context because there could be multiple different\n// copies of the 'buffer' package in use. This method works even for Buffer\n// instances that were created from another copy of the `buffer` package.\n// See: https://github.com/feross/buffer/issues/154\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n  const i = b[n]\n  b[n] = b[m]\n  b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n  const len = this.length\n  if (len % 2 !== 0) {\n    throw new RangeError('Buffer size must be a multiple of 16-bits')\n  }\n  for (let i = 0; i < len; i += 2) {\n    swap(this, i, i + 1)\n  }\n  return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n  const len = this.length\n  if (len % 4 !== 0) {\n    throw new RangeError('Buffer size must be a multiple of 32-bits')\n  }\n  for (let i = 0; i < len; i += 4) {\n    swap(this, i, i + 3)\n    swap(this, i + 1, i + 2)\n  }\n  return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n  const len = this.length\n  if (len % 8 !== 0) {\n    throw new RangeError('Buffer size must be a multiple of 64-bits')\n  }\n  for (let i = 0; i < len; i += 8) {\n    swap(this, i, i + 7)\n    swap(this, i + 1, i + 6)\n    swap(this, i + 2, i + 5)\n    swap(this, i + 3, i + 4)\n  }\n  return this\n}\n\nBuffer.prototype.toString = function toString () {\n  const length = this.length\n  if (length === 0) return ''\n  if (arguments.length === 0) return utf8Slice(this, 0, length)\n  return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.toLocaleString = Buffer.prototype.toString\n\nBuffer.prototype.equals = function equals (b) {\n  if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n  if (this === b) return true\n  return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n  let str = ''\n  const max = exports.INSPECT_MAX_BYTES\n  str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim()\n  if (this.length > max) str += ' ... '\n  return '<Buffer ' + str + '>'\n}\nif (customInspectSymbol) {\n  Buffer.prototype[customInspectSymbol] = Buffer.prototype.inspect\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n  if (isInstance(target, Uint8Array)) {\n    target = Buffer.from(target, target.offset, target.byteLength)\n  }\n  if (!Buffer.isBuffer(target)) {\n    throw new TypeError(\n      'The \"target\" argument must be one of type Buffer or Uint8Array. ' +\n      'Received type ' + (typeof target)\n    )\n  }\n\n  if (start === undefined) {\n    start = 0\n  }\n  if (end === undefined) {\n    end = target ? target.length : 0\n  }\n  if (thisStart === undefined) {\n    thisStart = 0\n  }\n  if (thisEnd === undefined) {\n    thisEnd = this.length\n  }\n\n  if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n    throw new RangeError('out of range index')\n  }\n\n  if (thisStart >= thisEnd && start >= end) {\n    return 0\n  }\n  if (thisStart >= thisEnd) {\n    return -1\n  }\n  if (start >= end) {\n    return 1\n  }\n\n  start >>>= 0\n  end >>>= 0\n  thisStart >>>= 0\n  thisEnd >>>= 0\n\n  if (this === target) return 0\n\n  let x = thisEnd - thisStart\n  let y = end - start\n  const len = Math.min(x, y)\n\n  const thisCopy = this.slice(thisStart, thisEnd)\n  const targetCopy = target.slice(start, end)\n\n  for (let i = 0; i < len; ++i) {\n    if (thisCopy[i] !== targetCopy[i]) {\n      x = thisCopy[i]\n      y = targetCopy[i]\n      break\n    }\n  }\n\n  if (x < y) return -1\n  if (y < x) return 1\n  return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n  // Empty buffer means no match\n  if (buffer.length === 0) return -1\n\n  // Normalize byteOffset\n  if (typeof byteOffset === 'string') {\n    encoding = byteOffset\n    byteOffset = 0\n  } else if (byteOffset > 0x7fffffff) {\n    byteOffset = 0x7fffffff\n  } else if (byteOffset < -0x80000000) {\n    byteOffset = -0x80000000\n  }\n  byteOffset = +byteOffset // Coerce to Number.\n  if (numberIsNaN(byteOffset)) {\n    // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n    byteOffset = dir ? 0 : (buffer.length - 1)\n  }\n\n  // Normalize byteOffset: negative offsets start from the end of the buffer\n  if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n  if (byteOffset >= buffer.length) {\n    if (dir) return -1\n    else byteOffset = buffer.length - 1\n  } else if (byteOffset < 0) {\n    if (dir) byteOffset = 0\n    else return -1\n  }\n\n  // Normalize val\n  if (typeof val === 'string') {\n    val = Buffer.from(val, encoding)\n  }\n\n  // Finally, search either indexOf (if dir is true) or lastIndexOf\n  if (Buffer.isBuffer(val)) {\n    // Special case: looking for empty string/buffer always fails\n    if (val.length === 0) {\n      return -1\n    }\n    return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n  } else if (typeof val === 'number') {\n    val = val & 0xFF // Search for a byte value [0-255]\n    if (typeof Uint8Array.prototype.indexOf === 'function') {\n      if (dir) {\n        return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n      } else {\n        return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n      }\n    }\n    return arrayIndexOf(buffer, [val], byteOffset, encoding, dir)\n  }\n\n  throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n  let indexSize = 1\n  let arrLength = arr.length\n  let valLength = val.length\n\n  if (encoding !== undefined) {\n    encoding = String(encoding).toLowerCase()\n    if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n        encoding === 'utf16le' || encoding === 'utf-16le') {\n      if (arr.length < 2 || val.length < 2) {\n        return -1\n      }\n      indexSize = 2\n      arrLength /= 2\n      valLength /= 2\n      byteOffset /= 2\n    }\n  }\n\n  function read (buf, i) {\n    if (indexSize === 1) {\n      return buf[i]\n    } else {\n      return buf.readUInt16BE(i * indexSize)\n    }\n  }\n\n  let i\n  if (dir) {\n    let foundIndex = -1\n    for (i = byteOffset; i < arrLength; i++) {\n      if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n        if (foundIndex === -1) foundIndex = i\n        if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n      } else {\n        if (foundIndex !== -1) i -= i - foundIndex\n        foundIndex = -1\n      }\n    }\n  } else {\n    if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n    for (i = byteOffset; i >= 0; i--) {\n      let found = true\n      for (let j = 0; j < valLength; j++) {\n        if (read(arr, i + j) !== read(val, j)) {\n          found = false\n          break\n        }\n      }\n      if (found) return i\n    }\n  }\n\n  return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n  return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n  return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n  return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n  offset = Number(offset) || 0\n  const remaining = buf.length - offset\n  if (!length) {\n    length = remaining\n  } else {\n    length = Number(length)\n    if (length > remaining) {\n      length = remaining\n    }\n  }\n\n  const strLen = string.length\n\n  if (length > strLen / 2) {\n    length = strLen / 2\n  }\n  let i\n  for (i = 0; i < length; ++i) {\n    const parsed = parseInt(string.substr(i * 2, 2), 16)\n    if (numberIsNaN(parsed)) return i\n    buf[offset + i] = parsed\n  }\n  return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n  return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n  return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n  return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n  return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n  // Buffer#write(string)\n  if (offset === undefined) {\n    encoding = 'utf8'\n    length = this.length\n    offset = 0\n  // Buffer#write(string, encoding)\n  } else if (length === undefined && typeof offset === 'string') {\n    encoding = offset\n    length = this.length\n    offset = 0\n  // Buffer#write(string, offset[, length][, encoding])\n  } else if (isFinite(offset)) {\n    offset = offset >>> 0\n    if (isFinite(length)) {\n      length = length >>> 0\n      if (encoding === undefined) encoding = 'utf8'\n    } else {\n      encoding = length\n      length = undefined\n    }\n  } else {\n    throw new Error(\n      'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n    )\n  }\n\n  const remaining = this.length - offset\n  if (length === undefined || length > remaining) length = remaining\n\n  if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n    throw new RangeError('Attempt to write outside buffer bounds')\n  }\n\n  if (!encoding) encoding = 'utf8'\n\n  let loweredCase = false\n  for (;;) {\n    switch (encoding) {\n      case 'hex':\n        return hexWrite(this, string, offset, length)\n\n      case 'utf8':\n      case 'utf-8':\n        return utf8Write(this, string, offset, length)\n\n      case 'ascii':\n      case 'latin1':\n      case 'binary':\n        return asciiWrite(this, string, offset, length)\n\n      case 'base64':\n        // Warning: maxLength not taken into account in base64Write\n        return base64Write(this, string, offset, length)\n\n      case 'ucs2':\n      case 'ucs-2':\n      case 'utf16le':\n      case 'utf-16le':\n        return ucs2Write(this, string, offset, length)\n\n      default:\n        if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n        encoding = ('' + encoding).toLowerCase()\n        loweredCase = true\n    }\n  }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n  return {\n    type: 'Buffer',\n    data: Array.prototype.slice.call(this._arr || this, 0)\n  }\n}\n\nfunction base64Slice (buf, start, end) {\n  if (start === 0 && end === buf.length) {\n    return base64.fromByteArray(buf)\n  } else {\n    return base64.fromByteArray(buf.slice(start, end))\n  }\n}\n\nfunction utf8Slice (buf, start, end) {\n  end = Math.min(buf.length, end)\n  const res = []\n\n  let i = start\n  while (i < end) {\n    const firstByte = buf[i]\n    let codePoint = null\n    let bytesPerSequence = (firstByte > 0xEF)\n      ? 4\n      : (firstByte > 0xDF)\n          ? 3\n          : (firstByte > 0xBF)\n              ? 2\n              : 1\n\n    if (i + bytesPerSequence <= end) {\n      let secondByte, thirdByte, fourthByte, tempCodePoint\n\n      switch (bytesPerSequence) {\n        case 1:\n          if (firstByte < 0x80) {\n            codePoint = firstByte\n          }\n          break\n        case 2:\n          secondByte = buf[i + 1]\n          if ((secondByte & 0xC0) === 0x80) {\n            tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n            if (tempCodePoint > 0x7F) {\n              codePoint = tempCodePoint\n            }\n          }\n          break\n        case 3:\n          secondByte = buf[i + 1]\n          thirdByte = buf[i + 2]\n          if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n            tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n            if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n              codePoint = tempCodePoint\n            }\n          }\n          break\n        case 4:\n          secondByte = buf[i + 1]\n          thirdByte = buf[i + 2]\n          fourthByte = buf[i + 3]\n          if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n            tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n            if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n              codePoint = tempCodePoint\n            }\n          }\n      }\n    }\n\n    if (codePoint === null) {\n      // we did not generate a valid codePoint so insert a\n      // replacement char (U+FFFD) and advance only 1 byte\n      codePoint = 0xFFFD\n      bytesPerSequence = 1\n    } else if (codePoint > 0xFFFF) {\n      // encode to utf16 (surrogate pair dance)\n      codePoint -= 0x10000\n      res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n      codePoint = 0xDC00 | codePoint & 0x3FF\n    }\n\n    res.push(codePoint)\n    i += bytesPerSequence\n  }\n\n  return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nconst MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n  const len = codePoints.length\n  if (len <= MAX_ARGUMENTS_LENGTH) {\n    return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n  }\n\n  // Decode in chunks to avoid \"call stack size exceeded\".\n  let res = ''\n  let i = 0\n  while (i < len) {\n    res += String.fromCharCode.apply(\n      String,\n      codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n    )\n  }\n  return res\n}\n\nfunction asciiSlice (buf, start, end) {\n  let ret = ''\n  end = Math.min(buf.length, end)\n\n  for (let i = start; i < end; ++i) {\n    ret += String.fromCharCode(buf[i] & 0x7F)\n  }\n  return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n  let ret = ''\n  end = Math.min(buf.length, end)\n\n  for (let i = start; i < end; ++i) {\n    ret += String.fromCharCode(buf[i])\n  }\n  return ret\n}\n\nfunction hexSlice (buf, start, end) {\n  const len = buf.length\n\n  if (!start || start < 0) start = 0\n  if (!end || end < 0 || end > len) end = len\n\n  let out = ''\n  for (let i = start; i < end; ++i) {\n    out += hexSliceLookupTable[buf[i]]\n  }\n  return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n  const bytes = buf.slice(start, end)\n  let res = ''\n  // If bytes.length is odd, the last 8 bits must be ignored (same as node.js)\n  for (let i = 0; i < bytes.length - 1; i += 2) {\n    res += String.fromCharCode(bytes[i] + (bytes[i + 1] * 256))\n  }\n  return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n  const len = this.length\n  start = ~~start\n  end = end === undefined ? len : ~~end\n\n  if (start < 0) {\n    start += len\n    if (start < 0) start = 0\n  } else if (start > len) {\n    start = len\n  }\n\n  if (end < 0) {\n    end += len\n    if (end < 0) end = 0\n  } else if (end > len) {\n    end = len\n  }\n\n  if (end < start) end = start\n\n  const newBuf = this.subarray(start, end)\n  // Return an augmented `Uint8Array` instance\n  Object.setPrototypeOf(newBuf, Buffer.prototype)\n\n  return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n  if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n  if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUintLE =\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n  offset = offset >>> 0\n  byteLength = byteLength >>> 0\n  if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n  let val = this[offset]\n  let mul = 1\n  let i = 0\n  while (++i < byteLength && (mul *= 0x100)) {\n    val += this[offset + i] * mul\n  }\n\n  return val\n}\n\nBuffer.prototype.readUintBE =\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n  offset = offset >>> 0\n  byteLength = byteLength >>> 0\n  if (!noAssert) {\n    checkOffset(offset, byteLength, this.length)\n  }\n\n  let val = this[offset + --byteLength]\n  let mul = 1\n  while (byteLength > 0 && (mul *= 0x100)) {\n    val += this[offset + --byteLength] * mul\n  }\n\n  return val\n}\n\nBuffer.prototype.readUint8 =\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n  offset = offset >>> 0\n  if (!noAssert) checkOffset(offset, 1, this.length)\n  return this[offset]\n}\n\nBuffer.prototype.readUint16LE =\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n  offset = offset >>> 0\n  if (!noAssert) checkOffset(offset, 2, this.length)\n  return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUint16BE =\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n  offset = offset >>> 0\n  if (!noAssert) checkOffset(offset, 2, this.length)\n  return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUint32LE =\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n  offset = offset >>> 0\n  if (!noAssert) checkOffset(offset, 4, this.length)\n\n  return ((this[offset]) |\n      (this[offset + 1] << 8) |\n      (this[offset + 2] << 16)) +\n      (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUint32BE =\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n  offset = offset >>> 0\n  if (!noAssert) checkOffset(offset, 4, this.length)\n\n  return (this[offset] * 0x1000000) +\n    ((this[offset + 1] << 16) |\n    (this[offset + 2] << 8) |\n    this[offset + 3])\n}\n\nBuffer.prototype.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE (offset) {\n  offset = offset >>> 0\n  validateNumber(offset, 'offset')\n  const first = this[offset]\n  const last = this[offset + 7]\n  if (first === undefined || last === undefined) {\n    boundsError(offset, this.length - 8)\n  }\n\n  const lo = first +\n    this[++offset] * 2 ** 8 +\n    this[++offset] * 2 ** 16 +\n    this[++offset] * 2 ** 24\n\n  const hi = this[++offset] +\n    this[++offset] * 2 ** 8 +\n    this[++offset] * 2 ** 16 +\n    last * 2 ** 24\n\n  return BigInt(lo) + (BigInt(hi) << BigInt(32))\n})\n\nBuffer.prototype.readBigUInt64BE = defineBigIntMethod(function readBigUInt64BE (offset) {\n  offset = offset >>> 0\n  validateNumber(offset, 'offset')\n  const first = this[offset]\n  const last = this[offset + 7]\n  if (first === undefined || last === undefined) {\n    boundsError(offset, this.length - 8)\n  }\n\n  const hi = first * 2 ** 24 +\n    this[++offset] * 2 ** 16 +\n    this[++offset] * 2 ** 8 +\n    this[++offset]\n\n  const lo = this[++offset] * 2 ** 24 +\n    this[++offset] * 2 ** 16 +\n    this[++offset] * 2 ** 8 +\n    last\n\n  return (BigInt(hi) << BigInt(32)) + BigInt(lo)\n})\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n  offset = offset >>> 0\n  byteLength = byteLength >>> 0\n  if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n  let val = this[offset]\n  let mul = 1\n  let i = 0\n  while (++i < byteLength && (mul *= 0x100)) {\n    val += this[offset + i] * mul\n  }\n  mul *= 0x80\n\n  if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n  return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n  offset = offset >>> 0\n  byteLength = byteLength >>> 0\n  if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n  let i = byteLength\n  let mul = 1\n  let val = this[offset + --i]\n  while (i > 0 && (mul *= 0x100)) {\n    val += this[offset + --i] * mul\n  }\n  mul *= 0x80\n\n  if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n  return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n  offset = offset >>> 0\n  if (!noAssert) checkOffset(offset, 1, this.length)\n  if (!(this[offset] & 0x80)) return (this[offset])\n  return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n  offset = offset >>> 0\n  if (!noAssert) checkOffset(offset, 2, this.length)\n  const val = this[offset] | (this[offset + 1] << 8)\n  return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n  offset = offset >>> 0\n  if (!noAssert) checkOffset(offset, 2, this.length)\n  const val = this[offset + 1] | (this[offset] << 8)\n  return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n  offset = offset >>> 0\n  if (!noAssert) checkOffset(offset, 4, this.length)\n\n  return (this[offset]) |\n    (this[offset + 1] << 8) |\n    (this[offset + 2] << 16) |\n    (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n  offset = offset >>> 0\n  if (!noAssert) checkOffset(offset, 4, this.length)\n\n  return (this[offset] << 24) |\n    (this[offset + 1] << 16) |\n    (this[offset + 2] << 8) |\n    (this[offset + 3])\n}\n\nBuffer.prototype.readBigInt64LE = defineBigIntMethod(function readBigInt64LE (offset) {\n  offset = offset >>> 0\n  validateNumber(offset, 'offset')\n  const first = this[offset]\n  const last = this[offset + 7]\n  if (first === undefined || last === undefined) {\n    boundsError(offset, this.length - 8)\n  }\n\n  const val = this[offset + 4] +\n    this[offset + 5] * 2 ** 8 +\n    this[offset + 6] * 2 ** 16 +\n    (last << 24) // Overflow\n\n  return (BigInt(val) << BigInt(32)) +\n    BigInt(first +\n    this[++offset] * 2 ** 8 +\n    this[++offset] * 2 ** 16 +\n    this[++offset] * 2 ** 24)\n})\n\nBuffer.prototype.readBigInt64BE = defineBigIntMethod(function readBigInt64BE (offset) {\n  offset = offset >>> 0\n  validateNumber(offset, 'offset')\n  const first = this[offset]\n  const last = this[offset + 7]\n  if (first === undefined || last === undefined) {\n    boundsError(offset, this.length - 8)\n  }\n\n  const val = (first << 24) + // Overflow\n    this[++offset] * 2 ** 16 +\n    this[++offset] * 2 ** 8 +\n    this[++offset]\n\n  return (BigInt(val) << BigInt(32)) +\n    BigInt(this[++offset] * 2 ** 24 +\n    this[++offset] * 2 ** 16 +\n    this[++offset] * 2 ** 8 +\n    last)\n})\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n  offset = offset >>> 0\n  if (!noAssert) checkOffset(offset, 4, this.length)\n  return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n  offset = offset >>> 0\n  if (!noAssert) checkOffset(offset, 4, this.length)\n  return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n  offset = offset >>> 0\n  if (!noAssert) checkOffset(offset, 8, this.length)\n  return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n  offset = offset >>> 0\n  if (!noAssert) checkOffset(offset, 8, this.length)\n  return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n  if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n  if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n  if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUintLE =\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n  value = +value\n  offset = offset >>> 0\n  byteLength = byteLength >>> 0\n  if (!noAssert) {\n    const maxBytes = Math.pow(2, 8 * byteLength) - 1\n    checkInt(this, value, offset, byteLength, maxBytes, 0)\n  }\n\n  let mul = 1\n  let i = 0\n  this[offset] = value & 0xFF\n  while (++i < byteLength && (mul *= 0x100)) {\n    this[offset + i] = (value / mul) & 0xFF\n  }\n\n  return offset + byteLength\n}\n\nBuffer.prototype.writeUintBE =\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n  value = +value\n  offset = offset >>> 0\n  byteLength = byteLength >>> 0\n  if (!noAssert) {\n    const maxBytes = Math.pow(2, 8 * byteLength) - 1\n    checkInt(this, value, offset, byteLength, maxBytes, 0)\n  }\n\n  let i = byteLength - 1\n  let mul = 1\n  this[offset + i] = value & 0xFF\n  while (--i >= 0 && (mul *= 0x100)) {\n    this[offset + i] = (value / mul) & 0xFF\n  }\n\n  return offset + byteLength\n}\n\nBuffer.prototype.writeUint8 =\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n  value = +value\n  offset = offset >>> 0\n  if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n  this[offset] = (value & 0xff)\n  return offset + 1\n}\n\nBuffer.prototype.writeUint16LE =\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n  value = +value\n  offset = offset >>> 0\n  if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n  this[offset] = (value & 0xff)\n  this[offset + 1] = (value >>> 8)\n  return offset + 2\n}\n\nBuffer.prototype.writeUint16BE =\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n  value = +value\n  offset = offset >>> 0\n  if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n  this[offset] = (value >>> 8)\n  this[offset + 1] = (value & 0xff)\n  return offset + 2\n}\n\nBuffer.prototype.writeUint32LE =\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n  value = +value\n  offset = offset >>> 0\n  if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n  this[offset + 3] = (value >>> 24)\n  this[offset + 2] = (value >>> 16)\n  this[offset + 1] = (value >>> 8)\n  this[offset] = (value & 0xff)\n  return offset + 4\n}\n\nBuffer.prototype.writeUint32BE =\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n  value = +value\n  offset = offset >>> 0\n  if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n  this[offset] = (value >>> 24)\n  this[offset + 1] = (value >>> 16)\n  this[offset + 2] = (value >>> 8)\n  this[offset + 3] = (value & 0xff)\n  return offset + 4\n}\n\nfunction wrtBigUInt64LE (buf, value, offset, min, max) {\n  checkIntBI(value, min, max, buf, offset, 7)\n\n  let lo = Number(value & BigInt(0xffffffff))\n  buf[offset++] = lo\n  lo = lo >> 8\n  buf[offset++] = lo\n  lo = lo >> 8\n  buf[offset++] = lo\n  lo = lo >> 8\n  buf[offset++] = lo\n  let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n  buf[offset++] = hi\n  hi = hi >> 8\n  buf[offset++] = hi\n  hi = hi >> 8\n  buf[offset++] = hi\n  hi = hi >> 8\n  buf[offset++] = hi\n  return offset\n}\n\nfunction wrtBigUInt64BE (buf, value, offset, min, max) {\n  checkIntBI(value, min, max, buf, offset, 7)\n\n  let lo = Number(value & BigInt(0xffffffff))\n  buf[offset + 7] = lo\n  lo = lo >> 8\n  buf[offset + 6] = lo\n  lo = lo >> 8\n  buf[offset + 5] = lo\n  lo = lo >> 8\n  buf[offset + 4] = lo\n  let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n  buf[offset + 3] = hi\n  hi = hi >> 8\n  buf[offset + 2] = hi\n  hi = hi >> 8\n  buf[offset + 1] = hi\n  hi = hi >> 8\n  buf[offset] = hi\n  return offset + 8\n}\n\nBuffer.prototype.writeBigUInt64LE = defineBigIntMethod(function writeBigUInt64LE (value, offset = 0) {\n  return wrtBigUInt64LE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeBigUInt64BE = defineBigIntMethod(function writeBigUInt64BE (value, offset = 0) {\n  return wrtBigUInt64BE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n  value = +value\n  offset = offset >>> 0\n  if (!noAssert) {\n    const limit = Math.pow(2, (8 * byteLength) - 1)\n\n    checkInt(this, value, offset, byteLength, limit - 1, -limit)\n  }\n\n  let i = 0\n  let mul = 1\n  let sub = 0\n  this[offset] = value & 0xFF\n  while (++i < byteLength && (mul *= 0x100)) {\n    if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n      sub = 1\n    }\n    this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n  }\n\n  return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n  value = +value\n  offset = offset >>> 0\n  if (!noAssert) {\n    const limit = Math.pow(2, (8 * byteLength) - 1)\n\n    checkInt(this, value, offset, byteLength, limit - 1, -limit)\n  }\n\n  let i = byteLength - 1\n  let mul = 1\n  let sub = 0\n  this[offset + i] = value & 0xFF\n  while (--i >= 0 && (mul *= 0x100)) {\n    if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n      sub = 1\n    }\n    this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n  }\n\n  return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n  value = +value\n  offset = offset >>> 0\n  if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n  if (value < 0) value = 0xff + value + 1\n  this[offset] = (value & 0xff)\n  return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n  value = +value\n  offset = offset >>> 0\n  if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n  this[offset] = (value & 0xff)\n  this[offset + 1] = (value >>> 8)\n  return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n  value = +value\n  offset = offset >>> 0\n  if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n  this[offset] = (value >>> 8)\n  this[offset + 1] = (value & 0xff)\n  return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n  value = +value\n  offset = offset >>> 0\n  if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n  this[offset] = (value & 0xff)\n  this[offset + 1] = (value >>> 8)\n  this[offset + 2] = (value >>> 16)\n  this[offset + 3] = (value >>> 24)\n  return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n  value = +value\n  offset = offset >>> 0\n  if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n  if (value < 0) value = 0xffffffff + value + 1\n  this[offset] = (value >>> 24)\n  this[offset + 1] = (value >>> 16)\n  this[offset + 2] = (value >>> 8)\n  this[offset + 3] = (value & 0xff)\n  return offset + 4\n}\n\nBuffer.prototype.writeBigInt64LE = defineBigIntMethod(function writeBigInt64LE (value, offset = 0) {\n  return wrtBigUInt64LE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nBuffer.prototype.writeBigInt64BE = defineBigIntMethod(function writeBigInt64BE (value, offset = 0) {\n  return wrtBigUInt64BE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n  if (offset + ext > buf.length) throw new RangeError('Index out of range')\n  if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n  value = +value\n  offset = offset >>> 0\n  if (!noAssert) {\n    checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n  }\n  ieee754.write(buf, value, offset, littleEndian, 23, 4)\n  return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n  return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n  return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n  value = +value\n  offset = offset >>> 0\n  if (!noAssert) {\n    checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n  }\n  ieee754.write(buf, value, offset, littleEndian, 52, 8)\n  return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n  return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n  return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n  if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer')\n  if (!start) start = 0\n  if (!end && end !== 0) end = this.length\n  if (targetStart >= target.length) targetStart = target.length\n  if (!targetStart) targetStart = 0\n  if (end > 0 && end < start) end = start\n\n  // Copy 0 bytes; we're done\n  if (end === start) return 0\n  if (target.length === 0 || this.length === 0) return 0\n\n  // Fatal error conditions\n  if (targetStart < 0) {\n    throw new RangeError('targetStart out of bounds')\n  }\n  if (start < 0 || start >= this.length) throw new RangeError('Index out of range')\n  if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n  // Are we oob?\n  if (end > this.length) end = this.length\n  if (target.length - targetStart < end - start) {\n    end = target.length - targetStart + start\n  }\n\n  const len = end - start\n\n  if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') {\n    // Use built-in when available, missing from IE11\n    this.copyWithin(targetStart, start, end)\n  } else {\n    Uint8Array.prototype.set.call(\n      target,\n      this.subarray(start, end),\n      targetStart\n    )\n  }\n\n  return len\n}\n\n// Usage:\n//    buffer.fill(number[, offset[, end]])\n//    buffer.fill(buffer[, offset[, end]])\n//    buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n  // Handle string cases:\n  if (typeof val === 'string') {\n    if (typeof start === 'string') {\n      encoding = start\n      start = 0\n      end = this.length\n    } else if (typeof end === 'string') {\n      encoding = end\n      end = this.length\n    }\n    if (encoding !== undefined && typeof encoding !== 'string') {\n      throw new TypeError('encoding must be a string')\n    }\n    if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n      throw new TypeError('Unknown encoding: ' + encoding)\n    }\n    if (val.length === 1) {\n      const code = val.charCodeAt(0)\n      if ((encoding === 'utf8' && code < 128) ||\n          encoding === 'latin1') {\n        // Fast path: If `val` fits into a single byte, use that numeric value.\n        val = code\n      }\n    }\n  } else if (typeof val === 'number') {\n    val = val & 255\n  } else if (typeof val === 'boolean') {\n    val = Number(val)\n  }\n\n  // Invalid ranges are not set to a default, so can range check early.\n  if (start < 0 || this.length < start || this.length < end) {\n    throw new RangeError('Out of range index')\n  }\n\n  if (end <= start) {\n    return this\n  }\n\n  start = start >>> 0\n  end = end === undefined ? this.length : end >>> 0\n\n  if (!val) val = 0\n\n  let i\n  if (typeof val === 'number') {\n    for (i = start; i < end; ++i) {\n      this[i] = val\n    }\n  } else {\n    const bytes = Buffer.isBuffer(val)\n      ? val\n      : Buffer.from(val, encoding)\n    const len = bytes.length\n    if (len === 0) {\n      throw new TypeError('The value \"' + val +\n        '\" is invalid for argument \"value\"')\n    }\n    for (i = 0; i < end - start; ++i) {\n      this[i + start] = bytes[i % len]\n    }\n  }\n\n  return this\n}\n\n// CUSTOM ERRORS\n// =============\n\n// Simplified versions from Node, changed for Buffer-only usage\nconst errors = {}\nfunction E (sym, getMessage, Base) {\n  errors[sym] = class NodeError extends Base {\n    constructor () {\n      super()\n\n      Object.defineProperty(this, 'message', {\n        value: getMessage.apply(this, arguments),\n        writable: true,\n        configurable: true\n      })\n\n      // Add the error code to the name to include it in the stack trace.\n      this.name = `${this.name} [${sym}]`\n      // Access the stack to generate the error message including the error code\n      // from the name.\n      this.stack // eslint-disable-line no-unused-expressions\n      // Reset the name to the actual name.\n      delete this.name\n    }\n\n    get code () {\n      return sym\n    }\n\n    set code (value) {\n      Object.defineProperty(this, 'code', {\n        configurable: true,\n        enumerable: true,\n        value,\n        writable: true\n      })\n    }\n\n    toString () {\n      return `${this.name} [${sym}]: ${this.message}`\n    }\n  }\n}\n\nE('ERR_BUFFER_OUT_OF_BOUNDS',\n  function (name) {\n    if (name) {\n      return `${name} is outside of buffer bounds`\n    }\n\n    return 'Attempt to access memory outside buffer bounds'\n  }, RangeError)\nE('ERR_INVALID_ARG_TYPE',\n  function (name, actual) {\n    return `The \"${name}\" argument must be of type number. Received type ${typeof actual}`\n  }, TypeError)\nE('ERR_OUT_OF_RANGE',\n  function (str, range, input) {\n    let msg = `The value of \"${str}\" is out of range.`\n    let received = input\n    if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) {\n      received = addNumericalSeparator(String(input))\n    } else if (typeof input === 'bigint') {\n      received = String(input)\n      if (input > BigInt(2) ** BigInt(32) || input < -(BigInt(2) ** BigInt(32))) {\n        received = addNumericalSeparator(received)\n      }\n      received += 'n'\n    }\n    msg += ` It must be ${range}. Received ${received}`\n    return msg\n  }, RangeError)\n\nfunction addNumericalSeparator (val) {\n  let res = ''\n  let i = val.length\n  const start = val[0] === '-' ? 1 : 0\n  for (; i >= start + 4; i -= 3) {\n    res = `_${val.slice(i - 3, i)}${res}`\n  }\n  return `${val.slice(0, i)}${res}`\n}\n\n// CHECK FUNCTIONS\n// ===============\n\nfunction checkBounds (buf, offset, byteLength) {\n  validateNumber(offset, 'offset')\n  if (buf[offset] === undefined || buf[offset + byteLength] === undefined) {\n    boundsError(offset, buf.length - (byteLength + 1))\n  }\n}\n\nfunction checkIntBI (value, min, max, buf, offset, byteLength) {\n  if (value > max || value < min) {\n    const n = typeof min === 'bigint' ? 'n' : ''\n    let range\n    if (byteLength > 3) {\n      if (min === 0 || min === BigInt(0)) {\n        range = `>= 0${n} and < 2${n} ** ${(byteLength + 1) * 8}${n}`\n      } else {\n        range = `>= -(2${n} ** ${(byteLength + 1) * 8 - 1}${n}) and < 2 ** ` +\n                `${(byteLength + 1) * 8 - 1}${n}`\n      }\n    } else {\n      range = `>= ${min}${n} and <= ${max}${n}`\n    }\n    throw new errors.ERR_OUT_OF_RANGE('value', range, value)\n  }\n  checkBounds(buf, offset, byteLength)\n}\n\nfunction validateNumber (value, name) {\n  if (typeof value !== 'number') {\n    throw new errors.ERR_INVALID_ARG_TYPE(name, 'number', value)\n  }\n}\n\nfunction boundsError (value, length, type) {\n  if (Math.floor(value) !== value) {\n    validateNumber(value, type)\n    throw new errors.ERR_OUT_OF_RANGE(type || 'offset', 'an integer', value)\n  }\n\n  if (length < 0) {\n    throw new errors.ERR_BUFFER_OUT_OF_BOUNDS()\n  }\n\n  throw new errors.ERR_OUT_OF_RANGE(type || 'offset',\n                                    `>= ${type ? 1 : 0} and <= ${length}`,\n                                    value)\n}\n\n// HELPER FUNCTIONS\n// ================\n\nconst INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n  // Node takes equal signs as end of the Base64 encoding\n  str = str.split('=')[0]\n  // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n  str = str.trim().replace(INVALID_BASE64_RE, '')\n  // Node converts strings with length < 2 to ''\n  if (str.length < 2) return ''\n  // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n  while (str.length % 4 !== 0) {\n    str = str + '='\n  }\n  return str\n}\n\nfunction utf8ToBytes (string, units) {\n  units = units || Infinity\n  let codePoint\n  const length = string.length\n  let leadSurrogate = null\n  const bytes = []\n\n  for (let i = 0; i < length; ++i) {\n    codePoint = string.charCodeAt(i)\n\n    // is surrogate component\n    if (codePoint > 0xD7FF && codePoint < 0xE000) {\n      // last char was a lead\n      if (!leadSurrogate) {\n        // no lead yet\n        if (codePoint > 0xDBFF) {\n          // unexpected trail\n          if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n          continue\n        } else if (i + 1 === length) {\n          // unpaired lead\n          if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n          continue\n        }\n\n        // valid lead\n        leadSurrogate = codePoint\n\n        continue\n      }\n\n      // 2 leads in a row\n      if (codePoint < 0xDC00) {\n        if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n        leadSurrogate = codePoint\n        continue\n      }\n\n      // valid surrogate pair\n      codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n    } else if (leadSurrogate) {\n      // valid bmp char, but last char was a lead\n      if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n    }\n\n    leadSurrogate = null\n\n    // encode utf8\n    if (codePoint < 0x80) {\n      if ((units -= 1) < 0) break\n      bytes.push(codePoint)\n    } else if (codePoint < 0x800) {\n      if ((units -= 2) < 0) break\n      bytes.push(\n        codePoint >> 0x6 | 0xC0,\n        codePoint & 0x3F | 0x80\n      )\n    } else if (codePoint < 0x10000) {\n      if ((units -= 3) < 0) break\n      bytes.push(\n        codePoint >> 0xC | 0xE0,\n        codePoint >> 0x6 & 0x3F | 0x80,\n        codePoint & 0x3F | 0x80\n      )\n    } else if (codePoint < 0x110000) {\n      if ((units -= 4) < 0) break\n      bytes.push(\n        codePoint >> 0x12 | 0xF0,\n        codePoint >> 0xC & 0x3F | 0x80,\n        codePoint >> 0x6 & 0x3F | 0x80,\n        codePoint & 0x3F | 0x80\n      )\n    } else {\n      throw new Error('Invalid code point')\n    }\n  }\n\n  return bytes\n}\n\nfunction asciiToBytes (str) {\n  const byteArray = []\n  for (let i = 0; i < str.length; ++i) {\n    // Node's code seems to be doing this and not & 0x7F..\n    byteArray.push(str.charCodeAt(i) & 0xFF)\n  }\n  return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n  let c, hi, lo\n  const byteArray = []\n  for (let i = 0; i < str.length; ++i) {\n    if ((units -= 2) < 0) break\n\n    c = str.charCodeAt(i)\n    hi = c >> 8\n    lo = c % 256\n    byteArray.push(lo)\n    byteArray.push(hi)\n  }\n\n  return byteArray\n}\n\nfunction base64ToBytes (str) {\n  return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n  let i\n  for (i = 0; i < length; ++i) {\n    if ((i + offset >= dst.length) || (i >= src.length)) break\n    dst[i + offset] = src[i]\n  }\n  return i\n}\n\n// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass\n// the `instanceof` check but they should be treated as of that type.\n// See: https://github.com/feross/buffer/issues/166\nfunction isInstance (obj, type) {\n  return obj instanceof type ||\n    (obj != null && obj.constructor != null && obj.constructor.name != null &&\n      obj.constructor.name === type.name)\n}\nfunction numberIsNaN (obj) {\n  // For IE11 support\n  return obj !== obj // eslint-disable-line no-self-compare\n}\n\n// Create lookup table for `toString('hex')`\n// See: https://github.com/feross/buffer/issues/219\nconst hexSliceLookupTable = (function () {\n  const alphabet = '0123456789abcdef'\n  const table = new Array(256)\n  for (let i = 0; i < 16; ++i) {\n    const i16 = i * 16\n    for (let j = 0; j < 16; ++j) {\n      table[i16 + j] = alphabet[i] + alphabet[j]\n    }\n  }\n  return table\n})()\n\n// Return not function with Error if BigInt not supported\nfunction defineBigIntMethod (fn) {\n  return typeof BigInt === 'undefined' ? BufferBigIntNotDefined : fn\n}\n\nfunction BufferBigIntNotDefined () {\n  throw new Error('BigInt not supported')\n}\n","class AsyncEventEmitter {\n    constructor() {\n        this.listenerWrapperMap = new WeakMap();\n        this.listenerMap = {};\n        this.off = this.removeListener;\n    }\n    async emitAsync(eventName, event) {\n        for (const listener of this.listenerMap[eventName] ?? []) {\n            await listener(event, eventName);\n        }\n    }\n    on(eventName, listener) {\n        if (!this.listenerMap[eventName])\n            this.listenerMap[eventName] = [];\n        this.listenerMap[eventName].push(listener);\n        return this;\n    }\n    once(eventName, listener) {\n        const wrappedListener = async (event, eventName) => {\n            try {\n                return await listener(event, eventName);\n            }\n            finally {\n                this.removeListener(eventName, wrappedListener);\n            }\n        };\n        this.listenerWrapperMap.set(listener, wrappedListener);\n        return this.on(eventName, wrappedListener);\n    }\n    removeListener(eventName, listener) {\n        const wrappedListener = this.listenerWrapperMap.get(listener);\n        if (wrappedListener) {\n            this.listenerWrapperMap.delete(listener);\n            if (this.listenerMap[eventName]?.indexOf(wrappedListener) !== -1) {\n                this.listenerMap[eventName].splice(this.listenerMap[eventName].indexOf(wrappedListener), 1);\n            }\n        }\n        else {\n            if (this.listenerMap[eventName]?.indexOf(listener) !== -1) {\n                this.listenerMap[eventName].splice(this.listenerMap[eventName].indexOf(listener), 1);\n            }\n        }\n        return this;\n    }\n}\n\nexport { AsyncEventEmitter };\n//# sourceMappingURL=async-event-emitter.mjs.map\n","/* eslint-disable @typescript-eslint/no-unused-vars */\n/* eslint-disable no-console */\n/** A logger implementation that writes to console */\nconst consoleLogger = {\n    error: console.error,\n    warn: console.warn,\n    info: console.info,\n    verbose: () => { },\n    debug: console.debug,\n};\nconst infoConsoleLogger = {\n    error: console.error,\n    warn: console.warn,\n    info: console.info,\n    verbose: () => { },\n    debug: () => { },\n};\nconst verboseConsoleLogger = {\n    error: console.error,\n    warn: console.warn,\n    info: console.info,\n    verbose: console.trace,\n    debug: console.debug,\n};\nconst warningConsoleLogger = {\n    error: console.error,\n    warn: console.warn,\n    info: () => { },\n    verbose: () => { },\n    debug: () => { },\n};\n/** A logger implementation that does nothing */\nconst nullLogger = {\n    error: function (message, ...optionalParams) { },\n    warn: function (message, ...optionalParams) { },\n    info: function (message, ...optionalParams) { },\n    verbose: function (message, ...optionalParams) { },\n    debug: function (message, ...optionalParams) { },\n};\n\nexport { consoleLogger, infoConsoleLogger, nullLogger, verboseConsoleLogger, warningConsoleLogger };\n//# sourceMappingURL=logging.mjs.map\n","import { AsyncEventEmitter } from './async-event-emitter.mjs';\nimport { nullLogger, consoleLogger } from './logging.mjs';\n\n/** Updatable AlgoKit config */\nclass UpdatableConfig {\n    get populateAppCallResources() {\n        return this.config.populateAppCallResources;\n    }\n    get logger() {\n        return this.config.logger;\n    }\n    get debug() {\n        return this.config.debug;\n    }\n    get projectRoot() {\n        return this.config.projectRoot;\n    }\n    get traceAll() {\n        return this.config.traceAll;\n    }\n    get traceBufferSizeMb() {\n        return this.config.traceBufferSizeMb;\n    }\n    get maxSearchDepth() {\n        return this.config.maxSearchDepth;\n    }\n    get events() {\n        return this.config.events;\n    }\n    /**\n     * Returns the current logger, or the null logger if true is passed in to `returnNullLogger`\n     * @param returnNullLogger Whether or not to return the null logger\n     * @returns The requested logger\n     */\n    getLogger(returnNullLogger) {\n        if (returnNullLogger) {\n            return nullLogger;\n        }\n        return this.logger;\n    }\n    /**\n     * Temporarily run with debug set to true.\n     * @param lambda A lambda expression with code to run with debug config set to true\n     */\n    withDebug(lambda) {\n        const original = this.config.debug;\n        try {\n            this.config.debug = true;\n            lambda();\n        }\n        finally {\n            this.config.debug = original;\n        }\n    }\n    constructor() {\n        this.config = {\n            logger: consoleLogger,\n            debug: false,\n            projectRoot: null,\n            traceAll: false,\n            traceBufferSizeMb: 256,\n            maxSearchDepth: 10,\n            populateAppCallResources: false,\n            events: new AsyncEventEmitter(),\n        };\n    }\n    /**\n     * Update the AlgoKit configuration with your own configuration settings\n     * @param newConfig Partial or complete config to replace\n     */\n    configure(newConfig) {\n        this.config = { ...this.config, ...newConfig };\n    }\n}\n\nexport { UpdatableConfig };\n//# sourceMappingURL=config.mjs.map\n","import { UpdatableConfig } from './types/config.mjs';\n\n/** The AlgoKit config. To update it use the configure method. */\nconst Config = new UpdatableConfig();\n\nexport { Config };\n//# sourceMappingURL=config.mjs.map\n","import { APP_PAGE_MAX_SIZE } from './types/app.mjs';\n\n/**\n * Converts a value which might be a number or a bigint into a number to be used with apis that don't support bigint.\n *\n * Throws an UnsafeConversionError if the conversion would result in an unsafe integer for the Number type\n * @param value\n */\nconst toNumber = (value) => {\n    if (typeof value === 'number')\n        return value;\n    if (value > BigInt(Number.MAX_SAFE_INTEGER)) {\n        throw new UnsafeConversionError(`Cannot convert ${value} to a Number as it is larger than the maximum safe integer the Number type can hold.`);\n    }\n    else if (value < BigInt(Number.MIN_SAFE_INTEGER)) {\n        throw new UnsafeConversionError(`Cannot convert ${value} to a Number as it is smaller than the minimum safe integer the Number type can hold.`);\n    }\n    return Number(value);\n};\nclass UnsafeConversionError extends Error {\n}\n/**\n * Calculates the amount of funds to add to a wallet to bring it up to the minimum spending balance.\n * @param minSpendingBalance The minimum spending balance for the wallet\n * @param currentSpendingBalance The current spending balance for the wallet\n * @param minFundingIncrement The minimum amount of funds that can be added to the wallet\n * @returns The amount of funds to add to the wallet or null if the wallet is already above the minimum spending balance\n */\nconst calculateFundAmount = (minSpendingBalance, currentSpendingBalance, minFundingIncrement) => {\n    if (minSpendingBalance > currentSpendingBalance) {\n        const minFundAmount = minSpendingBalance - currentSpendingBalance;\n        return BigInt(Math.max(Number(minFundAmount), Number(minFundingIncrement)));\n    }\n    else {\n        return null;\n    }\n};\n/**\n * Returns the given array split into chunks of `batchSize` batches.\n * @param array The array to chunk\n * @param batchSize The size of batches to split the array into\n * @returns A generator that yields the array split into chunks of `batchSize` batches\n */\nfunction* chunkArray(array, batchSize) {\n    for (let i = 0; i < array.length; i += batchSize)\n        yield array.slice(i, i + batchSize);\n}\n/**\n * Memoize calls to the given function in an in-memory map.\n * @param fn The function to memoize\n * @returns The memoized function\n */\nconst memoize = (fn) => {\n    const cache = new Map();\n    const cached = function (val) {\n        return cache.has(val) ? cache.get(val) : cache.set(val, fn.call(this, val)) && cache.get(val);\n    };\n    cached.cache = cache;\n    return cached;\n};\nconst binaryStartsWith = (base, startsWith) => {\n    if (startsWith.length > base.length)\n        return false;\n    for (let i = 0; i < startsWith.length; i++) {\n        if (base[i] !== startsWith[i])\n            return false;\n    }\n    return true;\n};\nconst defaultJsonValueReplacer = (key, value) => {\n    if (typeof value === 'bigint') {\n        try {\n            return toNumber(value);\n        }\n        catch {\n            return value.toString();\n        }\n    }\n    return value;\n};\nconst asJson = (value, replacer = defaultJsonValueReplacer, space) => {\n    return JSON.stringify(value, replacer, space);\n};\n/** Calculate minimum number of extra program pages required for provided approval and clear state programs */\nconst calculateExtraProgramPages = (approvalProgram, clearStateProgram) => {\n    return Math.floor((approvalProgram.length + (clearStateProgram?.length ?? 0) - 1) / APP_PAGE_MAX_SIZE);\n};\n\nexport { UnsafeConversionError, asJson, binaryStartsWith, calculateExtraProgramPages, calculateFundAmount, chunkArray, defaultJsonValueReplacer, memoize, toNumber };\n//# sourceMappingURL=util.mjs.map\n","var EventType;\n(function (EventType) {\n    EventType[\"TxnGroupSimulated\"] = \"TxnGroupSimulated\";\n    EventType[\"AppCompiled\"] = \"AppCompiled\";\n})(EventType || (EventType = {}));\n\nexport { EventType };\n//# sourceMappingURL=lifecycle-events.mjs.map\n","import algosdk from 'algosdk';\n\nvar ABIMethod = algosdk.ABIMethod;\n/**\n * Converts an ARC-32 Application Specification to an ARC-56 Contract\n * @param appSpec The ARC-32 Application Specification\n * @returns The ARC-56 Contract\n * @example\n * ```typescript\n * const arc56AppSpec = arc32ToArc56(arc32AppSpec)\n * ```\n */\nfunction arc32ToArc56(appSpec) {\n    const arc32Structs = Object.values(appSpec.hints).flatMap((hint) => Object.entries(hint.structs ?? {}));\n    const structs = Object.fromEntries(arc32Structs.map(([_, struct]) => {\n        const fields = struct.elements.map((e) => ({ name: e[0], type: e[1] }));\n        return [struct.name, fields];\n    }));\n    const hint = (m) => appSpec.hints[new ABIMethod(m).getSignature()];\n    const actions = (m, type) => {\n        // eslint-disable-next-line @typescript-eslint/no-non-null-asserted-optional-chain\n        return hint(m)?.call_config !== undefined ? callConfigToActions(hint(m)?.call_config, type) : [];\n    };\n    const bareActions = (type) => {\n        return callConfigToActions(appSpec.bare_call_config, type);\n    };\n    const callConfigToActions = (c, type) => {\n        const actions = [];\n        if (c.close_out && ['ALL', type].includes(c.close_out))\n            actions.push('CloseOut');\n        if (c.delete_application && ['ALL', type].includes(c.delete_application))\n            actions.push('DeleteApplication');\n        if (c.no_op && ['ALL', type].includes(c.no_op))\n            actions.push('NoOp');\n        if (c.opt_in && ['ALL', type].includes(c.opt_in))\n            actions.push('OptIn');\n        if (c.update_application && ['ALL', type].includes(c.update_application))\n            actions.push('UpdateApplication');\n        return actions;\n    };\n    const getDefaultArgValue = (type, defaultArg) => {\n        if (!defaultArg)\n            return undefined;\n        if (defaultArg.source === 'abi-method') {\n            return {\n                source: 'method',\n                data: defaultArg.data.name,\n            };\n        }\n        return {\n            source: defaultArg.source === 'constant' ? 'literal' : defaultArg.source === 'global-state' ? 'global' : 'local',\n            data: Buffer.from(typeof defaultArg.data === 'number' ? algosdk.ABIType.from('uint64').encode(defaultArg.data) : defaultArg.data).toString('base64'),\n            type: type === 'string' ? 'AVMString' : type,\n        };\n    };\n    return {\n        arcs: [],\n        name: appSpec.contract.name,\n        desc: appSpec.contract.desc,\n        structs: structs,\n        methods: appSpec.contract.methods.map((m) => ({\n            name: m.name,\n            desc: m.desc,\n            args: m.args.map((a) => ({\n                name: a.name,\n                type: a.type,\n                desc: a.desc,\n                struct: a.name ? hint(m)?.structs?.[a.name]?.name : undefined,\n                defaultValue: getDefaultArgValue(a.type, !a.name ? undefined : hint(m)?.default_arguments?.[a.name]),\n            })),\n            returns: {\n                type: m.returns.type,\n                desc: m.returns.desc,\n                struct: hint(m)?.structs?.output?.name,\n            },\n            events: [],\n            readonly: hint(m)?.read_only,\n            actions: {\n                create: actions(m, 'CREATE'),\n                call: actions(m, 'CALL'),\n            },\n        })),\n        state: {\n            schema: {\n                global: {\n                    ints: appSpec.state.global.num_uints,\n                    bytes: appSpec.state.global.num_byte_slices,\n                },\n                local: {\n                    ints: appSpec.state.local.num_uints,\n                    bytes: appSpec.state.local.num_byte_slices,\n                },\n            },\n            keys: {\n                global: Object.fromEntries(Object.entries(appSpec.schema.global.declared).map((s) => [\n                    s[0],\n                    {\n                        key: Buffer.from(s[1].key, 'utf-8').toString('base64'),\n                        keyType: 'AVMString',\n                        valueType: s[1].type === 'uint64' ? 'AVMUint64' : 'AVMBytes',\n                        desc: s[1].descr,\n                    },\n                ])),\n                local: Object.fromEntries(Object.entries(appSpec.schema.local.declared).map((s) => [\n                    s[0],\n                    {\n                        key: Buffer.from(s[1].key, 'utf-8').toString('base64'),\n                        keyType: 'AVMString',\n                        valueType: s[1].type === 'uint64' ? 'AVMUint64' : 'AVMBytes',\n                        desc: s[1].descr,\n                    },\n                ])),\n                box: {},\n            },\n            maps: {\n                global: {},\n                local: {},\n                box: {},\n            },\n        },\n        source: appSpec.source,\n        bareActions: {\n            create: bareActions('CREATE'),\n            call: bareActions('CALL'),\n        },\n        byteCode: undefined,\n        compilerInfo: undefined,\n        events: undefined,\n        networks: undefined,\n        scratchVariables: undefined,\n        sourceInfo: undefined,\n        templateVariables: undefined,\n    };\n}\n\nexport { arc32ToArc56 };\n//# sourceMappingURL=app-spec.mjs.map\n","const LOGIC_ERROR = /transaction ([A-Z0-9]+): logic eval error: (.*). Details: .*pc=([0-9]+).*/;\n/** Wraps key functionality around processing logic errors */\nclass LogicError extends Error {\n    /** Takes an error message and parses out the details of any logic errors in there.\n     * @param error The error message to parse\n     * @returns The logic error details if any, or undefined\n     */\n    // eslint-disable-next-line @typescript-eslint/no-explicit-any\n    static parseLogicError(error) {\n        const errorMessage = error.message;\n        const res = LOGIC_ERROR.exec(errorMessage);\n        if (res === null || res.length <= 3)\n            return undefined;\n        return {\n            txId: res[1],\n            msg: res[2],\n            desc: errorMessage,\n            pc: parseInt(res[3] ? res[3] : '0'),\n            traces: error.traces,\n        };\n    }\n    /**\n     * Create a new logic error object.\n     * @param errorDetails The details of the logic error\n     * @param program The TEAL source code, split by line\n     * @param getLineForPc The source map of the TEAL source code\n     */\n    constructor(errorDetails, program, getLineForPc) {\n        super();\n        this.lines = 5;\n        this.teal_line = 0;\n        this.led = errorDetails;\n        this.program = program;\n        const line = getLineForPc(errorDetails.pc);\n        this.teal_line = line === undefined ? 0 : line;\n        this.message = `${this.led.msg}. at:${line}. ${this.led.desc}`;\n        if (this.teal_line > 0) {\n            const start = this.teal_line > this.lines ? this.teal_line - this.lines : 0;\n            const stop = program.length > this.teal_line + this.lines ? this.teal_line + this.lines : program.length;\n            const stack_lines = program.slice(start, stop);\n            stack_lines[stack_lines.length / 2] += ' <--- Error';\n            this.stack = stack_lines.join('\\n');\n        }\n    }\n}\n\nexport { LogicError };\n//# sourceMappingURL=logic-error.mjs.map\n","import algosdk, { Address } from 'algosdk';\nimport { Buffer } from 'buffer';\nimport { compileTeal, createApp, updateApp, callApp, getAppGlobalState, getAppLocalState, getAppBoxNames, getAppBoxValue, getAppBoxValueFromABIType } from '../app.mjs';\nimport { replaceDeployTimeControlParams, performTemplateSubstitution, deployApp, getCreatorAppsByName } from '../app-deploy.mjs';\nimport { Config } from '../config.mjs';\nimport { legacySendTransactionBridge } from '../transaction/legacy-bridge.mjs';\nimport { getSenderAddress, encodeTransactionNote } from '../transaction/transaction.mjs';\nimport { asJson, binaryStartsWith } from '../util.mjs';\nimport { UPDATABLE_TEMPLATE_NAME, DELETABLE_TEMPLATE_NAME } from './app.mjs';\nimport { getArc56Method, getArc56ReturnValue, getABITupleFromABIStruct, getABIDecodedValue, getABIEncodedValue } from './app-arc56.mjs';\nimport { arc32ToArc56 } from './app-spec.mjs';\nimport { EventType } from './lifecycle-events.mjs';\nimport { LogicError } from './logic-error.mjs';\n\nvar ABIMethod = algosdk.ABIMethod;\nvar AtomicTransactionComposer = algosdk.AtomicTransactionComposer;\nvar getApplicationAddress = algosdk.getApplicationAddress;\nvar Indexer = algosdk.Indexer;\nvar OnApplicationComplete = algosdk.OnApplicationComplete;\nvar SourceMap = algosdk.ProgramSourceMap;\n/**\n * Determines deploy time control (UPDATABLE, DELETABLE) value by inspecting application specification\n * @param approval TEAL Approval program, not the base64 version found on the appSpec\n * @param appSpec Application Specification\n * @param templateVariableName Template variable\n * @param callConfigKey Call config type\n * @returns true if applicable call config is found, false if not found or undefined if variable not present\n */\nfunction getDeployTimeControl(approval, appSpec, templateVariableName, callConfigKey) {\n    // variable not present, so unknown control value\n    if (!approval.includes(templateVariableName))\n        return undefined;\n    // a bare call for specified CallConfig is present and configured\n    const bareCallConfig = appSpec.bare_call_config[callConfigKey];\n    if (!!bareCallConfig && bareCallConfig !== 'NEVER')\n        return true;\n    // an ABI call for specified CallConfig is present and configured\n    return Object.values(appSpec.hints).some((h) => {\n        const abiCallConfig = h.call_config[callConfigKey];\n        return !!abiCallConfig && abiCallConfig !== 'NEVER';\n    });\n}\nconst BYTE_CBLOCK = 38;\nconst INT_CBLOCK = 32;\n/**\n * Get the offset of the last constant block at the beginning of the program\n * This value is used to calculate the program counter for an ARC56 program that has a pcOffsetMethod of \"cblocks\"\n *\n * @param program The program to parse\n * @returns The PC value of the opcode after the last constant block\n */\nfunction getConstantBlockOffset(program) {\n    const bytes = [...program];\n    const programSize = bytes.length;\n    bytes.shift(); // remove version\n    /** The PC of the opcode after the bytecblock */\n    let bytecblockOffset;\n    /** The PC of the opcode after the intcblock */\n    let intcblockOffset;\n    while (bytes.length > 0) {\n        /** The current byte from the beginning of the byte array */\n        const byte = bytes.shift();\n        // If the byte is a constant block...\n        if (byte === BYTE_CBLOCK || byte === INT_CBLOCK) {\n            const isBytecblock = byte === BYTE_CBLOCK;\n            /** The byte following the opcode is the number of values in the constant block */\n            const valuesRemaining = bytes.shift();\n            // Iterate over all the values in the constant block\n            for (let i = 0; i < valuesRemaining; i++) {\n                if (isBytecblock) {\n                    /** The byte following the opcode is the length of the next element */\n                    const length = bytes.shift();\n                    bytes.splice(0, length);\n                }\n                else {\n                    // intcblock is a uvarint, so we need to keep reading until we find the end (MSB is not set)\n                    while ((bytes.shift() & 0x80) !== 0) {\n                        // Do nothing...\n                    }\n                }\n            }\n            if (isBytecblock)\n                bytecblockOffset = programSize - bytes.length - 1;\n            else\n                intcblockOffset = programSize - bytes.length - 1;\n            if (bytes[0] !== BYTE_CBLOCK && bytes[0] !== INT_CBLOCK) {\n                // if the next opcode isn't a constant block, we're done\n                break;\n            }\n        }\n    }\n    return Math.max(bytecblockOffset ?? 0, intcblockOffset ?? 0);\n}\n/** ARC-56/ARC-32 application client that allows you to manage calls and\n * state for a specific deployed instance of an app (with a known app ID). */\nclass AppClient {\n    /**\n     * Create a new app client.\n     * @param params The parameters to create the app client\n     * @returns The `AppClient` instance\n     * @example\n     * ```typescript\n     * const appClient = new AppClient({\n     *   appId: 12345678n,\n     *   appSpec: appSpec,\n     *   algorand: AlgorandClient.mainNet(),\n     * })\n     */\n    constructor(params) {\n        this._appId = params.appId;\n        this._appAddress = algosdk.getApplicationAddress(this._appId);\n        this._appSpec = AppClient.normaliseAppSpec(params.appSpec);\n        this._appName = params.appName ?? this._appSpec.name;\n        this._algorand = params.algorand;\n        this._defaultSender = typeof params.defaultSender === 'string' ? Address.fromString(params.defaultSender) : params.defaultSender;\n        this._defaultSigner = params.defaultSigner;\n        this._approvalSourceMap = params.approvalSourceMap;\n        this._clearSourceMap = params.clearSourceMap;\n        this._localStateMethods = (address) => this.getStateMethods(() => this.getLocalState(address), () => this._appSpec.state.keys.local, () => this._appSpec.state.maps.local);\n        this._globalStateMethods = this.getStateMethods(() => this.getGlobalState(), () => this._appSpec.state.keys.global, () => this._appSpec.state.maps.global);\n        this._boxStateMethods = this.getBoxMethods();\n        this._paramsMethods = {\n            ...this.getMethodCallParamsMethods(),\n            /** Get parameters to define bare (raw) transactions to the current app */\n            bare: this.getBareParamsMethods(),\n        };\n        this._createTransactionsMethods = {\n            ...this.getMethodCallCreateTransactionMethods(),\n            /** Get transactions for bare (raw) calls to the current app */\n            bare: this.getBareCreateTransactionMethods(),\n        };\n        this._sendMethods = {\n            ...this.getMethodCallSendMethods(),\n            /** Send bare (raw) transactions to the current app */\n            bare: this.getBareSendMethods(),\n        };\n    }\n    /**\n     * Clone this app client with different params\n     *\n     * @param params The params to use for the the cloned app client. Omit a param to keep the original value. Set a param to override the original value. Setting to undefined will clear the original value.\n     * @returns A new app client with the altered params\n     * @example\n     * ```typescript\n     * const appClient2 = appClient.clone({ defaultSender: 'NEW_SENDER_ADDRESS' })\n     * ```\n     */\n    clone(params) {\n        return new AppClient({\n            appId: this._appId,\n            appSpec: this._appSpec,\n            algorand: this._algorand,\n            appName: this._appName,\n            defaultSender: this._defaultSender,\n            defaultSigner: this._defaultSigner,\n            approvalSourceMap: this._approvalSourceMap,\n            clearSourceMap: this._clearSourceMap,\n            ...params,\n        });\n    }\n    /**\n     * Returns a new `AppClient` client, resolving the app by creator address and name\n     * using AlgoKit app deployment semantics (i.e. looking for the app creation transaction note).\n     * @param params The parameters to create the app client\n     * @returns The `AppClient` instance\n     * @example\n     * ```typescript\n     * const appClient = await AppClient.fromCreatorAndName({\n     *   creatorAddress: 'CREATOR_ADDRESS',\n     *   name: 'APP_NAME',\n     *   appSpec: appSpec,\n     *   algorand: AlgorandClient.mainNet(),\n     * })\n     */\n    static async fromCreatorAndName(params) {\n        const appSpec = AppClient.normaliseAppSpec(params.appSpec);\n        const appLookup = params.appLookupCache ?? (await params.algorand.appDeployer.getCreatorAppsByName(params.creatorAddress, params.ignoreCache));\n        const appMetadata = appLookup.apps[params.appName ?? appSpec.name];\n        if (!appMetadata) {\n            throw new Error(`App not found for creator ${params.creatorAddress} and name ${params.appName ?? appSpec.name}`);\n        }\n        return new AppClient({\n            ...params,\n            algorand: params.algorand,\n            appId: appMetadata.appId,\n        });\n    }\n    /**\n     * Returns an `AppClient` instance for the current network based on\n     * pre-determined network-specific app IDs specified in the ARC-56 app spec.\n     *\n     * If no IDs are in the app spec or the network isn't recognised, an error is thrown.\n     * @param params The parameters to create the app client\n     * @returns The `AppClient` instance\n     * @example\n     * ```typescript\n     * const appClient = await AppClient.fromNetwork({\n     *   appSpec: appSpec,\n     *   algorand: AlgorandClient.mainNet(),\n     * })\n     */\n    static async fromNetwork(params) {\n        const network = await params.algorand.client.network();\n        const appSpec = AppClient.normaliseAppSpec(params.appSpec);\n        const networkNames = [network.genesisHash];\n        if (network.isLocalNet)\n            networkNames.push('localnet');\n        if (network.isTestNet)\n            networkNames.push('testnet');\n        if (network.isMainNet)\n            networkNames.push('mainnet');\n        const availableAppSpecNetworks = Object.keys(appSpec.networks ?? {});\n        const networkIndex = availableAppSpecNetworks.findIndex((n) => networkNames.includes(n));\n        if (networkIndex === -1) {\n            throw new Error(`No app ID found for network ${asJson(networkNames)} in the app spec`);\n        }\n        const appId = BigInt(appSpec.networks[networkIndex].appID);\n        return new AppClient({ ...params, appId, appSpec });\n    }\n    /**\n     * Takes a string or parsed JSON object that could be ARC-32 or ARC-56 format and\n     * normalises it into a parsed ARC-56 contract object.\n     * @param spec The spec to normalise\n     * @returns The normalised ARC-56 contract object\n     * @example\n     * ```typescript\n     * const arc56AppSpec = AppClient.normaliseAppSpec(appSpec)\n     * ```\n     */\n    static normaliseAppSpec(spec) {\n        const parsedSpec = typeof spec === 'string' ? JSON.parse(spec) : spec;\n        const appSpec = 'hints' in parsedSpec ? arc32ToArc56(parsedSpec) : parsedSpec;\n        return appSpec;\n    }\n    /** The ID of the app instance this client is linked to. */\n    get appId() {\n        return this._appId;\n    }\n    /** The app address of the app instance this client is linked to. */\n    get appAddress() {\n        return this._appAddress;\n    }\n    /** The name of the app (from the ARC-32 / ARC-56 app spec or override). */\n    get appName() {\n        return this._appName;\n    }\n    /** The ARC-56 app spec being used */\n    get appSpec() {\n        return this._appSpec;\n    }\n    /** A reference to the underlying `AlgorandClient` this app client is using. */\n    get algorand() {\n        return this._algorand;\n    }\n    /** Get parameters to create transactions for the current app.\n     *\n     * A good mental model for this is that these parameters represent a deferred transaction creation.\n     * @example Create a transaction in the future using Algorand Client\n     * ```typescript\n     * const myMethodCall = appClient.params.call({method: 'my_method', args: [123, 'hello']})\n     * // ...\n     * await algorand.send.AppMethodCall(myMethodCall)\n     * ```\n     * @example Define a nested transaction as an ABI argument\n     * ```typescript\n     * const myMethodCall = appClient.params.call({method: 'my_method', args: [123, 'hello']})\n     * await appClient.send.call({method: 'my_method2', args: [myMethodCall]})\n     * ```\n     */\n    get params() {\n        return this._paramsMethods;\n    }\n    /** Create transactions for the current app */\n    get createTransaction() {\n        return this._createTransactionsMethods;\n    }\n    /** Send transactions to the current app */\n    get send() {\n        return this._sendMethods;\n    }\n    /** Get state (local, global, box) from the current app */\n    get state() {\n        return {\n            /**\n             * Methods to access local state for the current app\n             * @param address The address of the account to get the local state for\n             */\n            local: this._localStateMethods,\n            /**\n             * Methods to access global state for the current app\n             */\n            global: this._globalStateMethods,\n            /**\n             * Methods to access box storage for the current app\n             */\n            box: this._boxStateMethods,\n        };\n    }\n    /**\n     * Funds Algo into the app account for this app.\n     *\n     * An alias for `appClient.send.fundAppAccount(params)`.\n     * @param params The parameters for the funding transaction\n     * @returns The result of the funding\n     * @example\n     * ```typescript\n     * await appClient.fundAppAccount({ amount: algo(1) })\n     * ```\n     */\n    async fundAppAccount(params) {\n        return this.send.fundAppAccount(params);\n    }\n    /**\n     * Returns raw global state for the current app.\n     * @returns The global state\n     * @example\n     * ```typescript\n     * const globalState = await appClient.getGlobalState()\n     * ```\n     */\n    async getGlobalState() {\n        return await this._algorand.app.getGlobalState(this.appId);\n    }\n    /**\n     * Returns raw local state for the given account address.\n     * @param address The address of the account to get the local state for\n     * @returns The local state\n     * @example\n     * ```typescript\n     * const localState = await appClient.getLocalState('ACCOUNT_ADDRESS')\n     * ```\n     */\n    async getLocalState(address) {\n        return await this._algorand.app.getLocalState(this.appId, address);\n    }\n    /**\n     * Returns the names of all current boxes for the current app.\n     * @returns The names of the boxes\n     * @example\n     * ```typescript\n     * const boxNames = await appClient.getBoxNames()\n     * ```\n     */\n    async getBoxNames() {\n        return await this._algorand.app.getBoxNames(this.appId);\n    }\n    /**\n     * Returns the value of the given box for the current app.\n     * @param name The identifier of the box to return\n     * @returns The current box value as a byte array\n     * @example\n     * ```typescript\n     * const boxValue = await appClient.getBoxValue('boxName')\n     * ```\n     */\n    async getBoxValue(name) {\n        return await this._algorand.app.getBoxValue(this.appId, name);\n    }\n    /**\n     * Returns the value of the given box for the current app.\n     * @param name The identifier of the box to return\n     * @param type\n     * @returns The current box value as a byte array\n     * @example\n     * ```typescript\n     * const boxValue = await appClient.getBoxValueFromABIType('boxName', new ABIUintType(32))\n     * ```\n     */\n    async getBoxValueFromABIType(name, type) {\n        return await this._algorand.app.getBoxValueFromABIType({\n            appId: this.appId,\n            boxName: name,\n            type,\n        });\n    }\n    /**\n     * Returns the values of all current boxes for the current app.\n     * Note: This will issue multiple HTTP requests (one per box) and it's not an atomic operation so values may be out of sync.\n     * @param filter Optional filter to filter which boxes' values are returned\n     * @returns The (name, value) pair of the boxes with values as raw byte arrays\n     * @example\n     * ```typescript\n     * const boxValues = await appClient.getBoxValues()\n     * ```\n     */\n    async getBoxValues(filter) {\n        const names = (await this.getBoxNames()).filter(filter ?? ((_) => true));\n        const values = await this._algorand.app.getBoxValues(this.appId, names.map((name) => name.nameRaw));\n        return names.map((name, i) => ({ name, value: values[i] }));\n    }\n    /**\n     * Returns the values of all current boxes for the current app decoded using an ABI Type.\n     * Note: This will issue multiple HTTP requests (one per box) and it's not an atomic operation so values may be out of sync.\n     * @param type The ABI type to decode the values with\n     * @param filter Optional filter to filter which boxes' values are returned\n     * @returns The (name, value) pair of the boxes with values as the ABI Value\n     * @example\n     * ```typescript\n     * const boxValues = await appClient.getBoxValuesFromABIType(new ABIUintType(32))\n     * ```\n     */\n    async getBoxValuesFromABIType(type, filter) {\n        const names = (await this.getBoxNames()).filter(filter ?? ((_) => true));\n        const values = await this._algorand.app.getBoxValuesFromABIType({\n            appId: this.appId,\n            boxNames: names.map((name) => name.nameRaw),\n            type,\n        });\n        return names.map((name, i) => ({ name, value: values[i] }));\n    }\n    /**\n     * Takes an error that may include a logic error from a call to the current app and re-exposes the\n     * error to include source code information via the source map and ARC-56 spec.\n     * @param e The error to parse\n     * @param isClearStateProgram Whether or not the code was running the clear state program (defaults to approval program)\n     * @returns The new error, or if there was no logic error or source map then the wrapped error with source details\n     */\n    async exposeLogicError(e, isClearStateProgram) {\n        const pcOffsetMethod = this._appSpec.sourceInfo?.[isClearStateProgram ? 'clear' : 'approval']?.pcOffsetMethod;\n        let program;\n        if (pcOffsetMethod === 'cblocks') {\n            // TODO: Cache this if we deploy the app and it's not updateable\n            const appInfo = await this._algorand.app.getById(this.appId);\n            program = isClearStateProgram ? appInfo.clearStateProgram : appInfo.approvalProgram;\n        }\n        return AppClient.exposeLogicError(e, this._appSpec, {\n            isClearStateProgram,\n            approvalSourceMap: this._approvalSourceMap,\n            clearSourceMap: this._clearSourceMap,\n            program,\n        });\n    }\n    /**\n     * Export the current source maps for the app.\n     * @returns The source maps\n     */\n    exportSourceMaps() {\n        if (!this._approvalSourceMap || !this._clearSourceMap) {\n            throw new Error(\"Unable to export source maps; they haven't been loaded into this client - you need to call create, update, or deploy first\");\n        }\n        return {\n            approvalSourceMap: this._approvalSourceMap,\n            clearSourceMap: this._clearSourceMap,\n        };\n    }\n    /**\n     * Import source maps for the app.\n     * @param sourceMaps The source maps to import\n     */\n    importSourceMaps(sourceMaps) {\n        this._approvalSourceMap = new SourceMap(sourceMaps.approvalSourceMap);\n        this._clearSourceMap = new SourceMap(sourceMaps.clearSourceMap);\n    }\n    /**\n     * Returns the ABI Method spec for the given method string for the app represented by this application client instance\n     * @param methodNameOrSignature The method name or method signature to call if an ABI call is being emitted.\n     * e.g. `my_method` or `my_method(unit64,string)bytes`\n     * @returns A tuple with: [ARC-56 `Method`, algosdk `ABIMethod`]\n     */\n    getABIMethod(methodNameOrSignature) {\n        return getArc56Method(methodNameOrSignature, this._appSpec);\n    }\n    /**\n     * Checks for decode errors on the SendAppTransactionResult and maps the return value to the specified type\n     * on the ARC-56 method, replacing the `return` property with the decoded type.\n     *\n     * If the return type is an ARC-56 struct then the struct will be returned.\n     *\n     * @param result The SendAppTransactionResult to be mapped\n     * @param method The method that was called\n     * @returns The smart contract response with an updated return value\n     */\n    async processMethodCallReturn(result, method) {\n        const resultValue = await result;\n        return { ...resultValue, return: getArc56ReturnValue(resultValue.return, method, this._appSpec.structs) };\n    }\n    /**\n     * Compiles the approval and clear state programs (if TEAL templates provided),\n     * performing any provided deploy-time parameter replacement and stores\n     * the source maps.\n     *\n     * If no TEAL templates provided it will use any byte code provided in the app spec.\n     *\n     * Will store any generated source maps for later use in debugging.\n     * @param compilation Any compilation parameters to use\n     * @returns The compiled code and any compilation results (including source maps)\n     */\n    async compile(compilation) {\n        const result = await AppClient.compile(this._appSpec, this._algorand.app, compilation);\n        if (result.compiledApproval) {\n            this._approvalSourceMap = result.compiledApproval.sourceMap;\n        }\n        if (result.compiledClear) {\n            this._clearSourceMap = result.compiledClear.sourceMap;\n        }\n        return result;\n    }\n    /**\n     * Takes an error that may include a logic error from a call to the current app and re-exposes the\n     * error to include source code information via the source map and ARC-56 spec.\n     * @param e The error to parse\n     * @param appSpec The app spec for the app\n     * @param details Additional information to inform the error\n     * @returns The new error, or if there was no logic error or source map then the wrapped error with source details\n     */\n    static exposeLogicError(e, appSpec, details) {\n        const { isClearStateProgram, approvalSourceMap, clearSourceMap, program } = details;\n        const sourceMap = isClearStateProgram ? clearSourceMap : approvalSourceMap;\n        const errorDetails = LogicError.parseLogicError(e);\n        // Return the error if we don't have a PC\n        if (errorDetails === undefined || errorDetails?.pc === undefined)\n            return e;\n        /** The PC value to find in the ARC56 SourceInfo */\n        let arc56Pc = errorDetails?.pc;\n        const programSourceInfo = isClearStateProgram ? appSpec.sourceInfo?.clear : appSpec.sourceInfo?.approval;\n        /** The offset to apply to the PC if using the cblocks pc offset method */\n        let cblocksOffset = 0;\n        // If the program uses cblocks offset, then we need to adjust the PC accordingly\n        if (programSourceInfo?.pcOffsetMethod === 'cblocks') {\n            if (program === undefined)\n                throw new Error('Program bytes are required to calculate the ARC56 cblocks PC offset');\n            cblocksOffset = getConstantBlockOffset(program);\n            arc56Pc = errorDetails.pc - cblocksOffset;\n        }\n        // Find the source info for this PC and get the error message\n        const sourceInfo = programSourceInfo?.sourceInfo.find((s) => s.pc.includes(arc56Pc));\n        const errorMessage = sourceInfo?.errorMessage;\n        // If we have the source we can display the TEAL in the error message\n        if (appSpec.source) {\n            let getLineForPc = (inputPc) => sourceMap?.getLocationForPc?.(inputPc)?.line;\n            // If the SourceMap is not defined, we need to provide our own function for going from a PC to TEAL based on ARC56 SourceInfo[]\n            if (sourceMap === undefined) {\n                getLineForPc = (inputPc) => {\n                    const teal = programSourceInfo?.sourceInfo.find((s) => s.pc.includes(inputPc - cblocksOffset))?.teal;\n                    if (teal === undefined)\n                        return undefined;\n                    return teal - 1;\n                };\n            }\n            e = new LogicError(errorDetails, Buffer.from(isClearStateProgram ? appSpec.source.clear : appSpec.source.approval, 'base64')\n                .toString()\n                .split('\\n'), getLineForPc);\n        }\n        if (errorMessage) {\n            const appId = asJson(e).match(/(?<=app=)\\d+/)?.[0] || '';\n            const txId = asJson(e).match(/(?<=transaction )\\S+(?=:)/)?.[0];\n            const error = new Error(`Runtime error when executing ${appSpec.name} (appId: ${appId}) in transaction ${txId}: ${errorMessage}`);\n            error.cause = e;\n            return error;\n        }\n        return e;\n    }\n    /**\n     * Compiles the approval and clear state programs (if TEAL templates provided),\n     * performing any provided deploy-time parameter replacement and returns\n     * the compiled code and any compilation results (including source maps).\n     *\n     * If no TEAL templates provided it will use any byte code provided in the app spec.\n     *\n     * Will store any generated source maps for later use in debugging.\n     * @param appSpec The app spec for the app\n     * @param appManager The app manager to use for compilation\n     * @param compilation Any compilation parameters to use\n     * @returns The compiled code and any compilation results (including source maps)\n     */\n    static async compile(appSpec, appManager, compilation) {\n        const { deployTimeParams, updatable, deletable } = compilation ?? {};\n        if (!appSpec.source) {\n            if (!appSpec.byteCode?.approval || !appSpec.byteCode?.clear) {\n                throw new Error(`Attempt to compile app ${appSpec.name} without source or byteCode`);\n            }\n            return {\n                approvalProgram: Buffer.from(appSpec.byteCode.approval, 'base64'),\n                clearStateProgram: Buffer.from(appSpec.byteCode.clear, 'base64'),\n            };\n        }\n        const approvalTemplate = Buffer.from(appSpec.source.approval, 'base64').toString('utf-8');\n        const compiledApproval = await appManager.compileTealTemplate(approvalTemplate, deployTimeParams, {\n            updatable,\n            deletable,\n        });\n        const clearTemplate = Buffer.from(appSpec.source.clear, 'base64').toString('utf-8');\n        const compiledClear = await appManager.compileTealTemplate(clearTemplate, deployTimeParams);\n        if (Config.debug) {\n            await Config.events.emitAsync(EventType.AppCompiled, {\n                sources: [\n                    { compiledTeal: compiledApproval, appName: appSpec.name, fileName: 'approval' },\n                    { compiledTeal: compiledClear, appName: appSpec.name, fileName: 'clear' },\n                ],\n            });\n        }\n        return {\n            approvalProgram: compiledApproval.compiledBase64ToBytes,\n            compiledApproval,\n            clearStateProgram: compiledClear.compiledBase64ToBytes,\n            compiledClear,\n        };\n    }\n    /**\n     * Returns ABI method arguments ready for a method call params object with default values populated\n     * and structs replaced with tuples.\n     *\n     * It does this by replacing any `undefined` values with the equivalent default value from the given ARC-56 app spec.\n     * @param methodNameOrSignature The method name or method signature to call if an ABI call is being emitted.\n     * e.g. `my_method` or `my_method(unit64,string)bytes`\n     * @param args The arguments to the method with `undefined` for any that should be populated with a default value\n     */\n    async getABIArgsWithDefaultValues(methodNameOrSignature, args, sender) {\n        const m = getArc56Method(methodNameOrSignature, this._appSpec);\n        return await Promise.all(args?.map(async (a, i) => {\n            const arg = m.args[i];\n            if (!arg) {\n                throw new Error(`Unexpected arg at position ${i}. ${m.name} only expects ${m.args.length} args`);\n            }\n            if (a !== undefined) {\n                // If a struct then convert to tuple for the underlying call\n                return arg.struct && typeof a === 'object' && !Array.isArray(a)\n                    ? getABITupleFromABIStruct(a, this._appSpec.structs[arg.struct], this._appSpec.structs)\n                    : a;\n            }\n            const defaultValue = arg.defaultValue;\n            if (defaultValue) {\n                switch (defaultValue.source) {\n                    case 'literal':\n                        return getABIDecodedValue(Buffer.from(defaultValue.data, 'base64'), m.method.args[i].defaultValue?.type ?? m.method.args[i].type, this._appSpec.structs);\n                    case 'method': {\n                        const method = this.getABIMethod(defaultValue.data);\n                        const result = await this.send.call({\n                            method: defaultValue.data,\n                            args: method.args.map(() => undefined),\n                            sender,\n                        });\n                        if (result.return === undefined) {\n                            throw new Error('Default value method call did not return a value');\n                        }\n                        if (typeof result.return === 'object' && !(result.return instanceof Uint8Array) && !Array.isArray(result.return)) {\n                            return getABITupleFromABIStruct(result.return, this._appSpec.structs[method.returns.struct], this._appSpec.structs);\n                        }\n                        return result.return;\n                    }\n                    case 'local':\n                    case 'global': {\n                        const state = defaultValue.source === 'global' ? await this.getGlobalState() : await this.getLocalState(sender);\n                        const value = Object.values(state).find((s) => s.keyBase64 === defaultValue.data);\n                        if (!value) {\n                            throw new Error(`Preparing default value for argument ${arg.name ?? `arg${i + 1}`} resulted in the failure: The key '${defaultValue.data}' could not be found in ${defaultValue.source} storage`);\n                        }\n                        return 'valueRaw' in value\n                            ? getABIDecodedValue(value.valueRaw, m.method.args[i].defaultValue?.type ?? m.method.args[i].type, this._appSpec.structs)\n                            : value.value;\n                    }\n                    case 'box': {\n                        const value = await this.getBoxValue(Buffer.from(defaultValue.data, 'base64'));\n                        return getABIDecodedValue(value, m.method.args[i].defaultValue?.type ?? m.method.args[i].type, this._appSpec.structs);\n                    }\n                }\n            }\n            if (!algosdk.abiTypeIsTransaction(arg.type)) {\n                throw new Error(`No value provided for required argument ${arg.name ?? `arg${i + 1}`} in call to method ${m.name}`);\n            }\n        }) ?? []);\n    }\n    getBareParamsMethods() {\n        return {\n            /** Return params for an update call, including deploy-time TEAL template replacements and compilation if provided */\n            update: async (params) => {\n                return this.getBareParams({\n                    ...params,\n                    ...(await this.compile(params)),\n                }, OnApplicationComplete.UpdateApplicationOC);\n            },\n            /** Return params for an opt-in call */\n            optIn: (params) => {\n                return this.getBareParams(params, OnApplicationComplete.OptInOC);\n            },\n            /** Return params for a delete call */\n            delete: (params) => {\n                return this.getBareParams(params, OnApplicationComplete.DeleteApplicationOC);\n            },\n            /** Return params for a clear state call */\n            clearState: (params) => {\n                return this.getBareParams(params, OnApplicationComplete.ClearStateOC);\n            },\n            /** Return params for a close out call */\n            closeOut: (params) => {\n                return this.getBareParams(params, OnApplicationComplete.CloseOutOC);\n            },\n            /** Return params for a call (defaults to no-op) */\n            call: (params) => {\n                return this.getBareParams(params, params?.onComplete ?? OnApplicationComplete.NoOpOC);\n            },\n        };\n    }\n    getBareCreateTransactionMethods() {\n        return {\n            /** Returns a transaction for an update call, including deploy-time TEAL template replacements and compilation if provided */\n            update: async (params) => {\n                return this._algorand.createTransaction.appUpdate(await this.params.bare.update(params));\n            },\n            /** Returns a transaction for an opt-in call */\n            optIn: (params) => {\n                return this._algorand.createTransaction.appCall(this.params.bare.optIn(params));\n            },\n            /** Returns a transaction for a delete call */\n            delete: (params) => {\n                return this._algorand.createTransaction.appDelete(this.params.bare.delete(params));\n            },\n            /** Returns a transaction for a clear state call */\n            clearState: (params) => {\n                return this._algorand.createTransaction.appCall(this.params.bare.clearState(params));\n            },\n            /** Returns a transaction for a close out call */\n            closeOut: (params) => {\n                return this._algorand.createTransaction.appCall(this.params.bare.closeOut(params));\n            },\n            /** Returns a transaction for a call (defaults to no-op) */\n            call: (params) => {\n                return this._algorand.createTransaction.appCall(this.params.bare.call(params));\n            },\n        };\n    }\n    getBareSendMethods() {\n        return {\n            /** Signs and sends an update call, including deploy-time TEAL template replacements and compilation if provided */\n            update: async (params) => {\n                const compiled = await this.compile(params);\n                return {\n                    ...(await this.handleCallErrors(async () => this._algorand.send.appUpdate(await this.params.bare.update(params)))),\n                    ...compiled,\n                };\n            },\n            /** Signs and sends an opt-in call */\n            optIn: (params) => {\n                return this.handleCallErrors(() => this._algorand.send.appCall(this.params.bare.optIn(params)));\n            },\n            /** Signs and sends a delete call */\n            delete: (params) => {\n                return this.handleCallErrors(() => this._algorand.send.appDelete(this.params.bare.delete(params)));\n            },\n            /** Signs and sends a clear state call */\n            clearState: (params) => {\n                return this.handleCallErrors(() => this._algorand.send.appCall(this.params.bare.clearState(params)));\n            },\n            /** Signs and sends a close out call */\n            closeOut: (params) => {\n                return this.handleCallErrors(() => this._algorand.send.appCall(this.params.bare.closeOut(params)));\n            },\n            /** Signs and sends a call (defaults to no-op) */\n            call: (params) => {\n                return this.handleCallErrors(() => this._algorand.send.appCall(this.params.bare.call(params)));\n            },\n        };\n    }\n    getMethodCallParamsMethods() {\n        return {\n            /**\n             * Return params for a payment transaction to fund the app account\n             * @param params The parameters for the fund app accont payment transaction\n             * @returns The parameters which can be used to create a fund app account payment transaction\n             */\n            fundAppAccount: (params) => {\n                return {\n                    ...params,\n                    sender: this.getSender(params.sender),\n                    signer: this.getSigner(params.sender, params.signer),\n                    receiver: this.appAddress,\n                };\n            },\n            /**\n             * Return params for an update ABI call, including deploy-time TEAL template replacements and compilation if provided\n             * @param params The parameters for the update ABI method call\n             * @returns The parameters which can be used to create an update ABI method call\n             */\n            update: async (params) => {\n                return (await this.getABIParams({\n                    ...params,\n                    ...(await this.compile(params)),\n                }, OnApplicationComplete.UpdateApplicationOC));\n            },\n            /**\n             * Return params for an opt-in ABI call\n             * @param params The parameters for the opt-in ABI method call\n             * @returns The parameters which can be used to create an opt-in ABI method call\n             */\n            optIn: async (params) => {\n                return (await this.getABIParams(params, OnApplicationComplete.OptInOC));\n            },\n            /**\n             * Return params for an delete ABI call\n             * @param params The parameters for the delete ABI method call\n             * @returns The parameters which can be used to create a delete ABI method call\n             */\n            delete: async (params) => {\n                return (await this.getABIParams(params, OnApplicationComplete.DeleteApplicationOC));\n            },\n            /** Return params for an close out ABI call\n             * @param params The parameters for the close out ABI method call\n             * @returns The parameters which can be used to create a close out ABI method call\n             */\n            closeOut: async (params) => {\n                return (await this.getABIParams(params, OnApplicationComplete.CloseOutOC));\n            },\n            /** Return params for an ABI call\n             * @param params The parameters for the ABI method call\n             * @returns The parameters which can be used to create an ABI method call\n             */\n            call: async (params) => {\n                return (await this.getABIParams(params, params.onComplete ?? OnApplicationComplete.NoOpOC));\n            },\n        };\n    }\n    getMethodCallSendMethods() {\n        return {\n            /** Sign and send transactions for a payment transaction to fund the app account\n             * @param params The parameters for the fund app account payment transaction\n             * @returns The result of send the fund app account payment transaction\n             */\n            fundAppAccount: (params) => {\n                return this._algorand.send.payment(this.params.fundAppAccount(params));\n            },\n            /**\n             * Sign and send transactions for an update ABI call, including deploy-time TEAL template replacements and compilation if provided\n             * @param params The parameters for the update ABI method call\n             * @returns The result of sending the update ABI method call\n             */\n            update: async (params) => {\n                const compiled = await this.compile(params);\n                return {\n                    ...(await this.handleCallErrors(async () => this.processMethodCallReturn(this._algorand.send.appUpdateMethodCall(await this.params.update({ ...params })), getArc56Method(params.method, this._appSpec)))),\n                    ...compiled,\n                };\n            },\n            /**\n             * Sign and send transactions for an opt-in ABI call\n             * @param params The parameters for the opt-in ABI method call\n             * @returns The result of sending the opt-in ABI method call\n             */\n            optIn: (params) => {\n                return this.handleCallErrors(async () => this.processMethodCallReturn(this._algorand.send.appCallMethodCall(await this.params.optIn(params)), getArc56Method(params.method, this._appSpec)));\n            },\n            /**\n             * Sign and send transactions for a delete ABI call\n             * @param params The parameters for the delete ABI method call\n             * @returns The result of sending the delete ABI method call\n             */\n            delete: (params) => {\n                return this.handleCallErrors(async () => this.processMethodCallReturn(this._algorand.send.appDeleteMethodCall(await this.params.delete(params)), getArc56Method(params.method, this._appSpec)));\n            },\n            /**\n             * Sign and send transactions for a close out ABI call\n             * @param params The parameters for the close out ABI method call\n             * @returns The result of sending the close out ABI method call\n             */\n            closeOut: (params) => {\n                return this.handleCallErrors(async () => this.processMethodCallReturn(this._algorand.send.appCallMethodCall(await this.params.closeOut(params)), getArc56Method(params.method, this._appSpec)));\n            },\n            /**\n             * Sign and send transactions for a call (defaults to no-op)\n             * @param params The parameters for the ABI method call\n             * @returns The result of sending the ABI method call\n             */\n            call: async (params) => {\n                // Read-only call - do it via simulate\n                if ((params.onComplete === OnApplicationComplete.NoOpOC || !params.onComplete) &&\n                    getArc56Method(params.method, this._appSpec).method.readonly) {\n                    const readonlyParams = {\n                        ...params,\n                    };\n                    // Read-only calls do not require fees to be paid, as they are only simulated on the network.\n                    // Therefore there is no value in calculating the minimum fee needed for a successful app call with inner transactions.\n                    // As a a result we only need to send a single simulate call,\n                    // however to do this successfully we need to ensure fees for the transaction are fully covered using maxFee.\n                    if (params.coverAppCallInnerTransactionFees) {\n                        if (params.maxFee === undefined) {\n                            throw Error(`Please provide a maxFee for the transaction when coverAppCallInnerTransactionFees is enabled.`);\n                        }\n                        readonlyParams.staticFee = params.maxFee;\n                        readonlyParams.extraFee = undefined;\n                    }\n                    try {\n                        const result = await this._algorand\n                            .newGroup()\n                            .addAppCallMethodCall(await this.params.call(readonlyParams))\n                            .simulate({\n                            allowUnnamedResources: params.populateAppCallResources ?? true,\n                            // Simulate calls for a readonly method shouldn't invoke signing\n                            skipSignatures: true,\n                        });\n                        return this.processMethodCallReturn({\n                            ...result,\n                            transaction: result.transactions.at(-1),\n                            confirmation: result.confirmations.at(-1),\n                            // eslint-disable-next-line @typescript-eslint/no-non-null-asserted-optional-chain\n                            return: (result.returns?.length ?? 0 > 0) ? result.returns?.at(-1) : undefined,\n                        }, getArc56Method(params.method, this._appSpec));\n                    }\n                    catch (e) {\n                        const error = e;\n                        if (params.coverAppCallInnerTransactionFees && error && error.message && error.message.match(/fee too small/)) {\n                            throw Error(`Fees were too small. You may need to increase the transaction maxFee.`);\n                        }\n                        throw e;\n                    }\n                }\n                return this.handleCallErrors(async () => this.processMethodCallReturn(this._algorand.send.appCallMethodCall(await this.params.call(params)), getArc56Method(params.method, this._appSpec)));\n            },\n        };\n    }\n    getMethodCallCreateTransactionMethods() {\n        return {\n            /** Return transaction for a payment transaction to fund the app account\n             * @param params The parameters for the fund app account payment transaction\n             * @returns A transaction which can be used to fund the app account\n             */\n            fundAppAccount: (params) => {\n                return this._algorand.createTransaction.payment(this.params.fundAppAccount(params));\n            },\n            /**\n             * Return transactions for an update ABI call, including deploy-time TEAL template replacements and compilation if provided\n             * @param params The parameters for the update ABI method call\n             * @returns The transactions which can be used to create an update ABI method call\n             */\n            update: async (params) => {\n                return this._algorand.createTransaction.appUpdateMethodCall(await this.params.update(params));\n            },\n            /**\n             * Return transactions for an opt-in ABI call\n             * @param params The parameters for the opt-in ABI method call\n             * @returns The transactions which can be used to create an opt-in ABI method call\n             */\n            optIn: async (params) => {\n                return this._algorand.createTransaction.appCallMethodCall(await this.params.optIn(params));\n            },\n            /**\n             * Return transactions for a delete ABI call\n             * @param params The parameters for the delete ABI method call\n             * @returns The transactions which can be used to create a delete ABI method call\n             */\n            delete: async (params) => {\n                return this._algorand.createTransaction.appDeleteMethodCall(await this.params.delete(params));\n            },\n            /**\n             * Return transactions for a close out ABI call\n             * @param params The parameters for the close out ABI method call\n             * @returns The transactions which can be used to create a close out ABI method call\n             */\n            closeOut: async (params) => {\n                return this._algorand.createTransaction.appCallMethodCall(await this.params.closeOut(params));\n            },\n            /**\n             * Return transactions for an ABI call (defaults to no-op)\n             * @param params The parameters for the ABI method call\n             * @returns The transactions which can be used to create an ABI method call\n             */\n            call: async (params) => {\n                return this._algorand.createTransaction.appCallMethodCall(await this.params.call(params));\n            },\n        };\n    }\n    /** Returns the sender for a call, using the provided sender or using the `defaultSender`\n     * if none provided and throws an error if neither provided */\n    getSender(sender) {\n        if (!sender && !this._defaultSender) {\n            throw new Error(`No sender provided and no default sender present in app client for call to app ${this._appName}`);\n        }\n        return typeof sender === 'string' ? Address.fromString(sender) : (sender ?? this._defaultSender);\n    }\n    /** Returns the signer for a call, using the provided signer or the `defaultSigner`\n     * if no signer was provided and the sender resolves to the default sender, the call will use default signer\n     * or `undefined` otherwise (so the signer is resolved from `AlgorandClient`) */\n    getSigner(sender, signer) {\n        return signer ?? (!sender || sender === this._defaultSender ? this._defaultSigner : undefined);\n    }\n    getBareParams(params, onComplete) {\n        return {\n            ...params,\n            appId: this._appId,\n            sender: this.getSender(params?.sender),\n            signer: this.getSigner(params?.sender, params?.signer),\n            onComplete,\n        };\n    }\n    async getABIParams(params, onComplete) {\n        const sender = this.getSender(params.sender);\n        const method = getArc56Method(params.method, this._appSpec);\n        const args = await this.getABIArgsWithDefaultValues(params.method, params.args, sender);\n        return {\n            ...params,\n            appId: this._appId,\n            sender: sender,\n            signer: this.getSigner(params.sender, params.signer),\n            method,\n            onComplete,\n            args,\n        };\n    }\n    /** Make the given call and catch any errors, augmenting with debugging information before re-throwing. */\n    async handleCallErrors(call) {\n        try {\n            return await call();\n        }\n        catch (e) {\n            const logicError = await this.exposeLogicError(e);\n            if (logicError instanceof LogicError) {\n                let currentLine = logicError.teal_line - logicError.lines - 1;\n                const stackWithLines = logicError.stack\n                    ?.split('\\n')\n                    .map((line) => `${(currentLine += 1)}: ${line}`)\n                    .join('\\n');\n                Config.logger.error(`${logicError.message}\\n\\n${stackWithLines}`);\n            }\n            throw logicError;\n        }\n    }\n    getBoxMethods() {\n        // eslint-disable-next-line @typescript-eslint/no-this-alias\n        const that = this;\n        const stateMethods = {\n            /**\n             * Returns all single-key state values in a record keyed by the key name and the value a decoded ABI value.\n             */\n            getAll: async () => {\n                return Object.fromEntries(await Promise.all(Object.keys(that._appSpec.state.keys.box).map(async (key) => [key, await stateMethods.getValue(key)])));\n            },\n            /**\n             * Returns a single state value for the current app with the value a decoded ABI value.\n             * @param name The name of the state value to retrieve the value for\n             * @returns\n             */\n            getValue: async (name) => {\n                const metadata = that._appSpec.state.keys.box[name];\n                const value = await that.getBoxValue(Buffer.from(metadata.key, 'base64'));\n                return getABIDecodedValue(value, metadata.valueType, that._appSpec.structs);\n            },\n            /**\n             *\n             * @param mapName The name of the map to read from\n             * @param key The key within the map (without any map prefix) as either a Buffer with the bytes or a value\n             *  that will be converted to bytes by encoding it using the specified ABI key type\n             *  in the ARC-56 spec\n             */\n            // eslint-disable-next-line @typescript-eslint/no-explicit-any\n            getMapValue: async (mapName, key) => {\n                const metadata = that._appSpec.state.maps.box[mapName];\n                const prefix = Buffer.from(metadata.prefix ?? '', 'base64');\n                const encodedKey = Buffer.concat([prefix, getABIEncodedValue(key, metadata.keyType, that._appSpec.structs)]);\n                const base64Key = Buffer.from(encodedKey).toString('base64');\n                const value = await that.getBoxValue(Buffer.from(base64Key, 'base64'));\n                return getABIDecodedValue(value, metadata.valueType, that._appSpec.structs);\n            },\n            /**\n             *\n             * @param mapName The name of the map to read from\n             * @param key The key within the map as either a Buffer with the bytes or a value\n             *  that will be converted to bytes by encoding it using the specified ABI key type\n             *  in the ARC-56 spec\n             * @param appState\n             */\n            getMap: async (mapName) => {\n                const metadata = that._appSpec.state.maps.box[mapName];\n                const prefix = Buffer.from(metadata.prefix ?? '', 'base64');\n                const boxNames = await that.getBoxNames();\n                return new Map(await Promise.all(boxNames\n                    .filter((b) => binaryStartsWith(b.nameRaw, prefix))\n                    .map(async (b) => {\n                    const encodedKey = Buffer.concat([prefix, b.nameRaw]);\n                    const base64Key = Buffer.from(encodedKey).toString('base64');\n                    return [\n                        getABIDecodedValue(b.nameRaw.slice(prefix.length), metadata.keyType, that._appSpec.structs),\n                        getABIDecodedValue(await that.getBoxValue(Buffer.from(base64Key, 'base64')), metadata.valueType, that._appSpec.structs),\n                    ];\n                })));\n            },\n        };\n        return stateMethods;\n    }\n    getStateMethods(stateGetter, keyGetter, mapGetter) {\n        // eslint-disable-next-line @typescript-eslint/no-this-alias\n        const that = this;\n        const stateMethods = {\n            /**\n             * Returns all single-key state values in a record keyed by the key name and the value a decoded ABI value.\n             */\n            getAll: async () => {\n                const appState = await stateGetter();\n                return Object.fromEntries(await Promise.all(Object.keys(keyGetter()).map(async (key) => [key, await stateMethods.getValue(key, appState)])));\n            },\n            /**\n             * Returns a single state value for the current app with the value a decoded ABI value.\n             * @param name The name of the state value to retrieve the value for\n             * @param appState Optional cached value of the current state\n             * @returns\n             */\n            getValue: async (name, appState) => {\n                const state = Object.values(appState ?? (await stateGetter()));\n                const metadata = keyGetter()[name];\n                const value = state.find((s) => s.keyBase64 === metadata.key);\n                if (value && 'valueRaw' in value) {\n                    return getABIDecodedValue(value.valueRaw, metadata.valueType, that._appSpec.structs);\n                }\n                return value?.value;\n            },\n            /**\n             * Returns a single value from the given map for the current app with the value a decoded ABI value.\n             * @param mapName The name of the map to read from\n             * @param key The key within the map (without any map prefix) as either a Buffer with the bytes or a value\n             *  that will be converted to bytes by encoding it using the specified ABI key type\n             *  in the ARC-56 spec\n             * @param appState Optional cached value of the current state\n             */\n            // eslint-disable-next-line @typescript-eslint/no-explicit-any\n            getMapValue: async (mapName, key, appState) => {\n                const state = Object.values(appState ?? (await stateGetter()));\n                const metadata = mapGetter()[mapName];\n                const prefix = Buffer.from(metadata.prefix ?? '', 'base64');\n                const encodedKey = Buffer.concat([prefix, getABIEncodedValue(key, metadata.keyType, that._appSpec.structs)]);\n                const base64Key = Buffer.from(encodedKey).toString('base64');\n                const value = state.find((s) => s.keyBase64 === base64Key);\n                if (value && 'valueRaw' in value) {\n                    return getABIDecodedValue(value.valueRaw, metadata.valueType, that._appSpec.structs);\n                }\n                return value?.value;\n            },\n            /**\n             * Returns all map values for the given map.\n             * @param mapName The name of the map to read from\n             * @param appState Optional cached value of the current state\n             * @returns A map of all key-value pairs in the map as a `Record<string, ABIValue>`\n             */\n            getMap: async (mapName) => {\n                const state = Object.values(await stateGetter());\n                const metadata = mapGetter()[mapName];\n                const prefix = Buffer.from(metadata.prefix ?? '', 'base64');\n                return new Map(state\n                    .filter((s) => binaryStartsWith(s.keyRaw, prefix))\n                    .map((s) => {\n                    const key = s.keyRaw.slice(prefix.length);\n                    return [\n                        getABIDecodedValue(key, metadata.keyType, this._appSpec.structs),\n                        getABIDecodedValue('valueRaw' in s ? s.valueRaw : s.value, metadata.valueType, this._appSpec.structs),\n                    ];\n                }));\n            },\n        };\n        return stateMethods;\n    }\n}\n/**\n * @deprecated Use `AppClient` instead e.g. via `algorand.client.getAppClientById` or\n * `algorand.client.getAppClientByCreatorAndName`.\n * If you want to `create` or `deploy` then use `AppFactory` e.g. via `algorand.client.getAppFactory`,\n * which will in turn give you an `AppClient` instance against the created/deployed app to make other calls.\n *\n * Application client - a class that wraps an ARC-0032 app spec and provides high productivity methods to deploy and call the app */\nclass ApplicationClient {\n    /**\n     * @deprecated Use `AppClient` instead e.g. via `algorand.client.getAppClientById` or\n     * `algorand.client.getAppClientByCreatorAndName`.\n     * If you want to `create` or `deploy` then use `AppFactory` e.g. via `algorand.client.getAppFactory`,\n     * which will in turn give you an `AppClient` instance against the created/deployed app to make other calls.\n     *\n     * Create a new ApplicationClient instance\n     * @param appDetails The details of the app\n     * @param algod An algod instance\n     */\n    constructor(appDetails, algod) {\n        const { app, sender, params, deployTimeParams, ...appIdentifier } = appDetails;\n        this.algod = algod;\n        this.appSpec = typeof app == 'string' ? JSON.parse(app) : app;\n        this._appName = appIdentifier.name ?? this.appSpec.contract.name;\n        this.deployTimeParams = deployTimeParams;\n        if (appIdentifier.resolveBy === 'id') {\n            if (appIdentifier.id < 0) {\n                throw new Error(`Attempt to create application client with invalid app id of ${appIdentifier.id}`);\n            }\n            this._appId = appIdentifier.id;\n        }\n        else {\n            this._appId = 0;\n            this._creator = appIdentifier.creatorAddress?.toString();\n            if (appIdentifier.findExistingUsing instanceof Indexer) {\n                this.indexer = appIdentifier.findExistingUsing;\n            }\n            else {\n                if (appIdentifier.findExistingUsing.creator !== this._creator) {\n                    throw new Error(`Attempt to create application client with invalid existingDeployments against a different creator (${appIdentifier.findExistingUsing.creator}) instead of expected creator ${this._creator}`);\n                }\n                this.existingDeployments = appIdentifier.findExistingUsing;\n            }\n        }\n        this._appAddress = algosdk.getApplicationAddress(this._appId).toString();\n        this.sender = sender;\n        this.params = params;\n    }\n    /**\n     * @deprecated Use `AppClient.compile()` instead.\n     *\n     * Compiles the approval and clear state programs and sets up the source map.\n     * @param compilation The deploy-time parameters for the compilation\n     * @returns The compiled approval and clear state programs\n     */\n    async compile(compilation) {\n        const { deployTimeParams, updatable, deletable } = compilation ?? {};\n        const approvalTemplate = Buffer.from(this.appSpec.source.approval, 'base64').toString('utf-8');\n        const approval = replaceDeployTimeControlParams(performTemplateSubstitution(approvalTemplate, deployTimeParams ?? this.deployTimeParams), {\n            updatable,\n            deletable,\n        });\n        const approvalCompiled = await compileTeal(approval, this.algod);\n        this._approvalSourceMap = approvalCompiled?.sourceMap;\n        const clearTemplate = Buffer.from(this.appSpec.source.clear, 'base64').toString('utf-8');\n        const clear = performTemplateSubstitution(clearTemplate, deployTimeParams ?? this.deployTimeParams);\n        const clearCompiled = await compileTeal(clear, this.algod);\n        this._clearSourceMap = clearCompiled?.sourceMap;\n        if (Config.debug) {\n            await Config.events.emitAsync(EventType.AppCompiled, {\n                sources: [\n                    { compiledTeal: approvalCompiled, appName: this._appName, fileName: 'approval' },\n                    { compiledTeal: clearCompiled, appName: this._appName, fileName: 'clear' },\n                ],\n            });\n        }\n        return { approvalCompiled, clearCompiled };\n    }\n    /**\n     * Export the current source maps for the app.\n     * @returns The source maps\n     */\n    exportSourceMaps() {\n        if (!this._approvalSourceMap || !this._clearSourceMap) {\n            throw new Error(\"Unable to export source maps; they haven't been loaded into this client - you need to call create, update, or deploy first\");\n        }\n        return {\n            approvalSourceMap: this._approvalSourceMap,\n            clearSourceMap: this._clearSourceMap,\n        };\n    }\n    /**\n     * Import source maps for the app.\n     * @param sourceMaps The source maps to import\n     */\n    importSourceMaps(sourceMaps) {\n        this._approvalSourceMap = new SourceMap(sourceMaps.approvalSourceMap);\n        this._clearSourceMap = new SourceMap(sourceMaps.clearSourceMap);\n    }\n    /**\n     * @deprecated Use `deploy` from an `AppFactory` instance instead.\n     *\n     * Idempotently deploy (create, update/delete if changed) an app against the given name via the given creator account, including deploy-time template placeholder substitutions.\n     *\n     * To understand the architecture decisions behind this functionality please see https://github.com/algorandfoundation/algokit-cli/blob/main/docs/architecture-decisions/2023-01-12_smart-contract-deployment.md\n     *\n     * **Note:** if there is a breaking state schema change to an existing app (and `onSchemaBreak` is set to `'replace'`) the existing app will be deleted and re-created.\n     *\n     * **Note:** if there is an update (different TEAL code) to an existing app (and `onUpdate` is set to `'replace'`) the existing app will be deleted and re-created.\n     * @param deploy Deployment details\n     * @returns The metadata and transaction result(s) of the deployment, or just the metadata if it didn't need to issue transactions\n     */\n    async deploy(deploy) {\n        const { schema, sender: deploySender, version, allowUpdate, allowDelete, sendParams, createArgs, createOnCompleteAction, updateArgs, deleteArgs, ...deployArgs } = deploy ?? {};\n        if (this._appId !== 0) {\n            throw new Error(`Attempt to deploy app which already has an app id of ${this._appId}`);\n        }\n        const sender = deploySender ?? this.sender;\n        if (!sender) {\n            throw new Error('No sender provided, unable to deploy app');\n        }\n        const from = sender ?? this.sender;\n        if (!this._creator) {\n            throw new Error(\"Attempt to `deploy` a contract without specifying `resolveBy: 'creatorAndName'` in the constructor\");\n        }\n        if (this._creator !== getSenderAddress(from)) {\n            throw new Error(`Attempt to deploy contract with a sender address (${getSenderAddress(from)}) that differs from the given creator address for this application client: ${this._creator}`);\n        }\n        const approval = Buffer.from(this.appSpec.source.approval, 'base64').toString('utf-8');\n        const compilation = {\n            deployTimeParams: deployArgs.deployTimeParams,\n            updatable: allowUpdate !== undefined\n                ? allowUpdate\n                : getDeployTimeControl(approval, this.appSpec, UPDATABLE_TEMPLATE_NAME, 'update_application'),\n            deletable: allowDelete !== undefined\n                ? allowDelete\n                : getDeployTimeControl(approval, this.appSpec, DELETABLE_TEMPLATE_NAME, 'delete_application'),\n        };\n        const { approvalCompiled, clearCompiled } = await this.compile(compilation);\n        try {\n            await this.getAppReference();\n            const result = await deployApp({\n                from: sender,\n                approvalProgram: approvalCompiled.compiledBase64ToBytes,\n                clearStateProgram: clearCompiled.compiledBase64ToBytes,\n                metadata: {\n                    name: this._appName,\n                    version: version ?? '1.0',\n                    updatable: compilation.updatable,\n                    deletable: compilation.deletable,\n                },\n                schema: {\n                    globalByteSlices: this.appSpec.state.global.num_byte_slices,\n                    globalInts: this.appSpec.state.global.num_uints,\n                    localByteSlices: this.appSpec.state.local.num_byte_slices,\n                    localInts: this.appSpec.state.local.num_uints,\n                    ...schema,\n                },\n                transactionParams: this.params,\n                ...(sendParams ?? {}),\n                existingDeployments: this.existingDeployments,\n                createArgs: await this.getCallArgs(createArgs, sender),\n                createOnCompleteAction: createOnCompleteAction,\n                updateArgs: await this.getCallArgs(updateArgs, sender),\n                deleteArgs: await this.getCallArgs(deleteArgs, sender),\n                ...deployArgs,\n            }, this.algod, this.indexer);\n            // Nothing needed to happen\n            if (result.operationPerformed === 'nothing') {\n                return result;\n            }\n            if (!this.existingDeployments) {\n                throw new Error('Expected existingDeployments to be present');\n            }\n            const { transaction, confirmation, operationPerformed, ...appMetadata } = result;\n            this.existingDeployments = {\n                creator: this.existingDeployments.creator,\n                apps: { ...this.existingDeployments.apps, [this._appName]: appMetadata },\n            };\n            return { ...result, ...{ compiledApproval: approvalCompiled, compiledClear: clearCompiled } };\n        }\n        catch (e) {\n            throw this.exposeLogicError(e);\n        }\n    }\n    /**\n     * @deprecated Use `create` from an `AppFactory` instance instead.\n     *\n     * Creates a smart contract app, returns the details of the created app.\n     * @param create The parameters to create the app with\n     * @returns The details of the created app, or the transaction to create it if `skipSending` and the compilation result\n     */\n    async create(create) {\n        const { sender: createSender, note, sendParams, deployTimeParams, updatable, deletable, onCompleteAction, schema, ...args } = create ?? {};\n        if (this._appId !== 0) {\n            throw new Error(`Attempt to create app which already has an app id of ${this._appId}`);\n        }\n        const sender = createSender ?? this.sender;\n        if (!sender) {\n            throw new Error('No sender provided, unable to create app');\n        }\n        const { approvalCompiled, clearCompiled } = await this.compile(create);\n        try {\n            const result = await createApp({\n                from: sender,\n                approvalProgram: approvalCompiled.compiledBase64ToBytes,\n                clearStateProgram: clearCompiled.compiledBase64ToBytes,\n                schema: {\n                    globalByteSlices: this.appSpec.state.global.num_byte_slices,\n                    globalInts: this.appSpec.state.global.num_uints,\n                    localByteSlices: this.appSpec.state.local.num_byte_slices,\n                    localInts: this.appSpec.state.local.num_uints,\n                    ...schema,\n                },\n                onCompleteAction,\n                args: await this.getCallArgs(args, sender),\n                note: note,\n                transactionParams: this.params,\n                ...(sendParams ?? {}),\n            }, this.algod);\n            if (result.confirmation) {\n                this._appId = result.confirmation.applicationIndex;\n                this._appAddress = getApplicationAddress(this._appId).toString();\n            }\n            return { ...result, ...{ compiledApproval: approvalCompiled, compiledClear: clearCompiled } };\n        }\n        catch (e) {\n            throw await this.exposeLogicError(e);\n        }\n    }\n    /**\n     * @deprecated Use `appClient.send.update` or `appClient.createTransaction.update` from an `AppClient` instance instead.\n     *\n     * Updates the smart contract app.\n     * @param update The parameters to update the app with\n     * @returns The transaction send result and the compilation result\n     */\n    async update(update) {\n        const { sender: updateSender, note, sendParams, deployTimeParams, updatable, deletable, ...args } = update ?? {};\n        if (this._appId === 0) {\n            throw new Error(`Attempt to update app which doesn't have an app id defined`);\n        }\n        const sender = updateSender ?? this.sender;\n        if (!sender) {\n            throw new Error('No sender provided, unable to create app');\n        }\n        const { approvalCompiled, clearCompiled } = await this.compile(update);\n        try {\n            const result = await updateApp({\n                appId: this._appId,\n                from: sender,\n                approvalProgram: approvalCompiled.compiledBase64ToBytes,\n                clearStateProgram: clearCompiled.compiledBase64ToBytes,\n                args: await this.getCallArgs(args, sender),\n                note: note,\n                transactionParams: this.params,\n                ...(sendParams ?? {}),\n            }, this.algod);\n            return { ...result, ...{ compiledApproval: approvalCompiled, compiledClear: clearCompiled } };\n        }\n        catch (e) {\n            throw await this.exposeLogicError(e);\n        }\n    }\n    /**\n     * @deprecated Use `appClient.send.call` or `appClient.createTransaction.call` from an `AppClient` instance instead.\n     *\n     * Issues a no_op (normal) call to the app.\n     * @param call The call details.\n     * @returns The result of the call\n     */\n    async call(call) {\n        if (\n        // ABI call\n        call?.method &&\n            // We aren't skipping the send\n            !call.sendParams?.skipSending &&\n            // There isn't an ATC passed in\n            !call.sendParams?.atc &&\n            // The method is readonly\n            this.appSpec.hints[this.getABIMethodSignature(this.getABIMethod(call.method))].read_only) {\n            const atc = new AtomicTransactionComposer();\n            await this.callOfType({ ...call, sendParams: { ...call.sendParams, atc } }, 'no_op');\n            const result = await atc.simulate(this.algod);\n            if (result.simulateResponse.txnGroups.some((group) => group.failureMessage)) {\n                throw new Error(result.simulateResponse.txnGroups.find((x) => x.failureMessage)?.failureMessage);\n            }\n            const txns = atc.buildGroup();\n            return {\n                transaction: txns[txns.length - 1].txn,\n                confirmation: result.simulateResponse.txnGroups[0].txnResults.at(-1)?.txnResult,\n                confirmations: result.simulateResponse.txnGroups[0].txnResults.map((t) => t.txnResult),\n                transactions: txns.map((t) => t.txn),\n                return: (result.methodResults?.length ?? 0 > 0) ? result.methodResults[result.methodResults.length - 1] : undefined,\n            };\n        }\n        return await this.callOfType(call, 'no_op');\n    }\n    /**\n     * @deprecated Use `appClient.send.optIn` or `appClient.createTransaction.optIn` from an `AppClient` instance instead.\n     *\n     * Issues a opt_in call to the app.\n     * @param call The call details.\n     * @returns The result of the call\n     */\n    async optIn(call) {\n        return await this.callOfType(call, 'opt_in');\n    }\n    /**\n     * @deprecated Use `appClient.send.closeOut` or `appClient.createTransaction.closeOut` from an `AppClient` instance instead.\n     *\n     * Issues a close_out call to the app.\n     * @param call The call details.\n     * @returns The result of the call\n     */\n    async closeOut(call) {\n        return await this.callOfType(call, 'close_out');\n    }\n    /**\n     * @deprecated Use `appClient.send.clearState` or `appClient.createTransaction.clearState` from an `AppClient` instance instead.\n     *\n     * Issues a clear_state call to the app.\n     * @param call The call details.\n     * @returns The result of the call\n     */\n    async clearState(call) {\n        return await this.callOfType(call, 'clear_state');\n    }\n    /**\n     * @deprecated Use `appClient.send.delete` or `appClient.createTransaction.delete` from an `AppClient` instance instead.\n     *\n     * Issues a delete_application call to the app.\n     * @param call The call details.\n     * @returns The result of the call\n     */\n    async delete(call) {\n        return await this.callOfType(call, 'delete_application');\n    }\n    /**\n     * @deprecated Use `appClient.send.call` or `appClient.createTransaction.call` from an `AppClient` instance instead.\n     *\n     * Issues a call to the app with the given call type.\n     * @param call The call details.\n     * @param callType The call type\n     * @returns The result of the call\n     */\n    async callOfType(call = {}, callType) {\n        const { sender: callSender, note, sendParams, ...args } = call;\n        const sender = callSender ?? this.sender;\n        if (!sender) {\n            throw new Error('No sender provided, unable to call app');\n        }\n        const appMetadata = await this.getAppReference();\n        if (appMetadata.appId === 0) {\n            throw new Error(`Attempt to call an app that can't be found '${this._appName}' for creator '${this._creator}'.`);\n        }\n        try {\n            return await callApp({\n                appId: appMetadata.appId,\n                callType: callType,\n                from: sender,\n                args: await this.getCallArgs(args, sender),\n                note: note,\n                transactionParams: this.params,\n                ...(sendParams ?? {}),\n            }, this.algod);\n        }\n        catch (e) {\n            throw this.exposeLogicError(e);\n        }\n    }\n    /**\n     * Funds Algo into the app account for this app.\n     * @param fund The parameters for the funding or the funding amount\n     * @returns The result of the funding\n     */\n    async fundAppAccount(fund) {\n        const { amount, sender, note, sendParams } = 'microAlgos' in fund ? { amount: fund } : fund;\n        if (!sender && !this.sender) {\n            throw new Error('No sender provided, unable to call app');\n        }\n        const ref = await this.getAppReference();\n        return legacySendTransactionBridge(this.algod, sender ?? this.sender, sendParams ?? {}, {\n            receiver: ref.appAddress,\n            sender: getSenderAddress(sender ?? this.sender),\n            amount: amount,\n            note: encodeTransactionNote(note),\n        }, (c) => c.payment, (c) => c.payment, this.params);\n    }\n    /**\n     * Returns global state for the current app.\n     * @returns The global state\n     */\n    async getGlobalState() {\n        const appRef = await this.getAppReference();\n        if (appRef.appId === 0) {\n            throw new Error('No app has been created yet, unable to get global state');\n        }\n        return getAppGlobalState(appRef.appId, this.algod);\n    }\n    /**\n     * Returns local state for the given account / account address.\n     * @returns The global state\n     */\n    async getLocalState(account) {\n        const appRef = await this.getAppReference();\n        if (appRef.appId === 0) {\n            throw new Error('No app has been created yet, unable to get global state');\n        }\n        return getAppLocalState(appRef.appId, account, this.algod);\n    }\n    /**\n     * Returns the names of all current boxes for the current app.\n     * @returns The names of the boxes\n     */\n    async getBoxNames() {\n        const appRef = await this.getAppReference();\n        if (appRef.appId === 0) {\n            throw new Error('No app has been created yet, unable to get global state');\n        }\n        return await getAppBoxNames(appRef.appId, this.algod);\n    }\n    /**\n     * Returns the value of the given box for the current app.\n     * @param name The name of the box to return either as a string, binary array or `BoxName`\n     * @returns The current box value as a byte array\n     */\n    async getBoxValue(name) {\n        const appRef = await this.getAppReference();\n        if (appRef.appId === 0) {\n            throw new Error('No app has been created yet, unable to get global state');\n        }\n        return await getAppBoxValue(appRef.appId, name, this.algod);\n    }\n    /**\n     * Returns the value of the given box for the current app.\n     * @param name The name of the box to return either as a string, binary array or `BoxName`\n     * @param type\n     * @returns The current box value as a byte array\n     */\n    async getBoxValueFromABIType(name, type) {\n        const appRef = await this.getAppReference();\n        if (appRef.appId === 0) {\n            throw new Error('No app has been created yet, unable to get global state');\n        }\n        return await getAppBoxValueFromABIType({ appId: appRef.appId, boxName: name, type }, this.algod);\n    }\n    /**\n     * Returns the values of all current boxes for the current app.\n     * Note: This will issue multiple HTTP requests (one per box) and it's not an atomic operation so values may be out of sync.\n     * @param filter Optional filter to filter which boxes' values are returned\n     * @returns The (name, value) pair of the boxes with values as raw byte arrays\n     */\n    async getBoxValues(filter) {\n        const appRef = await this.getAppReference();\n        if (appRef.appId === 0) {\n            throw new Error('No app has been created yet, unable to get global state');\n        }\n        const names = await this.getBoxNames();\n        return await Promise.all(names\n            .filter(filter ?? ((_) => true))\n            .map(async (boxName) => ({ name: boxName, value: await getAppBoxValue(appRef.appId, boxName, this.algod) })));\n    }\n    /**\n     * Returns the values of all current boxes for the current app decoded using an ABI Type.\n     * Note: This will issue multiple HTTP requests (one per box) and it's not an atomic operation so values may be out of sync.\n     * @param type The ABI type to decode the values with\n     * @param filter Optional filter to filter which boxes' values are returned\n     * @returns The (name, value) pair of the boxes with values as the ABI Value\n     */\n    async getBoxValuesFromABIType(type, filter) {\n        const appRef = await this.getAppReference();\n        if (appRef.appId === 0) {\n            throw new Error('No app has been created yet, unable to get global state');\n        }\n        const names = await this.getBoxNames();\n        return await Promise.all(names.filter(filter ?? ((_) => true)).map(async (boxName) => ({\n            name: boxName,\n            value: await getAppBoxValueFromABIType({ appId: appRef.appId, boxName, type }, this.algod),\n        })));\n    }\n    /**\n     * @deprecated Use `appClient.params.*` from an `AppClient` instance instead.\n     *\n     * Returns the arguments for an app call for the given ABI method or raw method specification.\n     * @param args The call args specific to this application client\n     * @param sender The sender of this call. Will be used to fetch any default argument values if applicable\n     * @returns The call args ready to pass into an app call\n     */\n    async getCallArgs(args, sender) {\n        if (!args) {\n            return undefined;\n        }\n        if (args.method) {\n            const abiMethod = this.getABIMethodParams(args.method);\n            if (!abiMethod) {\n                throw new Error(`Attempt to call ABI method ${args.method}, but it wasn't found`);\n            }\n            const methodSignature = this.getABIMethodSignature(abiMethod);\n            return {\n                ...args,\n                method: abiMethod,\n                methodArgs: await Promise.all(args.methodArgs.map(async (arg, index) => {\n                    if (arg !== undefined)\n                        return arg;\n                    const argName = abiMethod.args[index].name;\n                    const defaultValueStrategy = argName && this.appSpec.hints?.[methodSignature]?.default_arguments?.[argName];\n                    if (!defaultValueStrategy)\n                        throw new Error(`Argument at position ${index} with the name ${argName} is undefined and does not have a default value strategy`);\n                    switch (defaultValueStrategy.source) {\n                        case 'constant':\n                            return defaultValueStrategy.data;\n                        case 'abi-method': {\n                            const method = defaultValueStrategy.data;\n                            const result = await this.callOfType({\n                                method: this.getABIMethodSignature(method),\n                                methodArgs: method.args.map(() => undefined),\n                                sender,\n                            }, 'no_op');\n                            return result.return?.returnValue;\n                        }\n                        case 'local-state':\n                        case 'global-state': {\n                            const state = defaultValueStrategy.source === 'global-state' ? await this.getGlobalState() : await this.getLocalState(sender);\n                            const key = defaultValueStrategy.data;\n                            if (key in state) {\n                                return state[key].value;\n                            }\n                            else {\n                                throw new Error(`Preparing default value for argument at position ${index} with the name ${argName} resulted in the failure: The key '${key}' could not be found in ${defaultValueStrategy.source}`);\n                            }\n                        }\n                    }\n                })),\n            };\n        }\n        else {\n            return args;\n        }\n    }\n    /**\n     * @deprecated Use `appClient.getABIMethod` instead.\n     *\n     * Returns the ABI Method parameters for the given method name string for the app represented by this application client instance\n     * @param method Either the name of the method or the ABI method spec definition string\n     * @returns The ABI method params for the given method\n     */\n    getABIMethodParams(method) {\n        if (!method.includes('(')) {\n            const methods = this.appSpec.contract.methods.filter((m) => m.name === method);\n            if (methods.length > 1) {\n                throw new Error(`Received a call to method ${method} in contract ${this._appName}, but this resolved to multiple methods; please pass in an ABI signature instead: ${methods\n                    .map(this.getABIMethodSignature)\n                    .join(', ')}`);\n            }\n            return methods[0];\n        }\n        return this.appSpec.contract.methods.find((m) => this.getABIMethodSignature(m) === method);\n    }\n    /**\n     * Returns the ABI Method for the given method name string for the app represented by this application client instance\n     * @param method Either the name of the method or the ABI method spec definition string\n     * @returns The ABI method for the given method\n     */\n    getABIMethod(method) {\n        const methodParams = this.getABIMethodParams(method);\n        return methodParams ? new ABIMethod(methodParams) : undefined;\n    }\n    /**\n     * @deprecated Use `appClient.appId` and `appClient.appAddress` from an `AppClient` instance instead.\n     *\n     * Gets the reference information for the current application instance.\n     * `appId` will be 0 if it can't find an app.\n     * @returns The app reference, or if deployed using the `deploy` method, the app metadata too\n     */\n    async getAppReference() {\n        if (!this.existingDeployments && this._creator) {\n            this.existingDeployments = await getCreatorAppsByName(this._creator, this.indexer);\n        }\n        if (this.existingDeployments && this._appId === 0) {\n            const app = this.existingDeployments.apps[this._appName];\n            if (!app) {\n                return {\n                    appId: 0,\n                    appAddress: getApplicationAddress(0).toString(),\n                };\n            }\n            return app;\n        }\n        return {\n            appId: this._appId,\n            appAddress: this._appAddress,\n        };\n    }\n    /**\n     * Takes an error that may include a logic error from a smart contract call and re-exposes the error to include source code information via the source map.\n     * This is automatically used within `ApplicationClient` but if you pass `skipSending: true` e.g. if doing a group transaction\n     *  then you can use this in a try/catch block to get better debugging information.\n     * @param e The error to parse\n     * @param isClear Whether or not the code was running the clear state program\n     * @returns The new error, or if there was no logic error or source map then the wrapped error with source details\n     */\n    exposeLogicError(e, isClear) {\n        if ((!isClear && this._approvalSourceMap == undefined) || (isClear && this._clearSourceMap == undefined))\n            return e;\n        const errorDetails = LogicError.parseLogicError(e);\n        if (errorDetails !== undefined)\n            return new LogicError(errorDetails, Buffer.from(isClear ? this.appSpec.source.clear : this.appSpec.source.approval, 'base64')\n                .toString()\n                .split('\\n'), (pc) => (isClear ? this._clearSourceMap : this._approvalSourceMap)?.getLocationForPc(pc)?.line);\n        else\n            return e;\n    }\n    getABIMethodSignature(method) {\n        return 'getSignature' in method ? method.getSignature() : new ABIMethod(method).getSignature();\n    }\n}\n\nexport { AppClient, ApplicationClient };\n//# sourceMappingURL=app-client.mjs.map\n","/* eslint-disable */\n/**\n * This file was automatically generated by @algorandfoundation/algokit-client-generator.\n * DO NOT MODIFY IT BY HAND.\n * requires: @algorandfoundation/algokit-utils: ^7\n */\nimport { AlgorandClientInterface } from '@algorandfoundation/algokit-utils/types/algorand-client-interface'\nimport { ABIReturn, AppReturn, SendAppTransactionResult } from '@algorandfoundation/algokit-utils/types/app'\nimport { Arc56Contract, getArc56ReturnValue, getABIStructFromABITuple } from '@algorandfoundation/algokit-utils/types/app-arc56'\nimport {\n  AppClient as _AppClient,\n  AppClientMethodCallParams,\n  AppClientParams,\n  AppClientBareCallParams,\n  CallOnComplete,\n  AppClientCompilationParams,\n  ResolveAppClientByCreatorAndName,\n  ResolveAppClientByNetwork,\n  CloneAppClientParams,\n} from '@algorandfoundation/algokit-utils/types/app-client'\nimport { AppFactory as _AppFactory, AppFactoryAppClientParams, AppFactoryResolveAppClientByCreatorAndNameParams, AppFactoryDeployParams, AppFactoryParams, CreateSchema } from '@algorandfoundation/algokit-utils/types/app-factory'\nimport { TransactionComposer, AppCallMethodCall, AppMethodCallTransactionArgument, SimulateOptions, RawSimulateOptions, SkipSignaturesSimulateOptions } from '@algorandfoundation/algokit-utils/types/composer'\nimport { SendParams, SendSingleTransactionResult, SendAtomicTransactionComposerResults } from '@algorandfoundation/algokit-utils/types/transaction'\nimport { Address, encodeAddress, modelsv2, OnApplicationComplete, Transaction, TransactionSigner } from 'algosdk'\nimport SimulateResponse = modelsv2.SimulateResponse\n\nexport const APP_SPEC: Arc56Contract = {\"name\":\"NFDInstance\",\"desc\":\"\",\"methods\":[{\"name\":\"createApplication\",\"args\":[{\"name\":\"nfdName\",\"type\":\"string\"},{\"name\":\"seller\",\"type\":\"address\"},{\"name\":\"buyer\",\"type\":\"address\"},{\"name\":\"purchaseAmount\",\"type\":\"uint64\"},{\"name\":\"expTime\",\"type\":\"uint64\"},{\"name\":\"commission1Addr\",\"type\":\"address\"},{\"name\":\"commission1Pct\",\"type\":\"uint64\"},{\"name\":\"commission2Addr\",\"type\":\"address\"},{\"name\":\"commission2Pct\",\"type\":\"uint64\"},{\"name\":\"segmentRootAppId\",\"type\":\"uint64\"},{\"name\":\"segmentRootCommissionAddr\",\"type\":\"address\"}],\"returns\":{\"type\":\"void\"},\"actions\":{\"create\":[\"NoOp\"],\"call\":[]}},{\"name\":\"updateApplication\",\"args\":[{\"name\":\"versionNum\",\"type\":\"string\"}],\"returns\":{\"type\":\"void\"},\"actions\":{\"create\":[],\"call\":[\"UpdateApplication\"]}},{\"name\":\"gas\",\"args\":[],\"returns\":{\"type\":\"void\"},\"actions\":{\"create\":[],\"call\":[\"NoOp\"]}},{\"name\":\"mintAsa\",\"args\":[{\"name\":\"nfdName\",\"type\":\"string\"},{\"name\":\"url\",\"type\":\"string\"}],\"returns\":{\"type\":\"void\"},\"actions\":{\"create\":[],\"call\":[\"NoOp\"]}},{\"name\":\"deleteFields\",\"args\":[{\"name\":\"fieldNames\",\"type\":\"byte[][]\"}],\"returns\":{\"type\":\"void\"},\"actions\":{\"create\":[],\"call\":[\"NoOp\"]}},{\"name\":\"updateSegmentCount\",\"args\":[{\"name\":\"childNfdName\",\"type\":\"string\"},{\"name\":\"childNfdAppID\",\"type\":\"uint64\"}],\"returns\":{\"type\":\"void\"},\"actions\":{\"create\":[],\"call\":[\"NoOp\"]}},{\"name\":\"getFieldUpdateCost\",\"readonly\":true,\"args\":[{\"name\":\"fieldAndVals\",\"type\":\"byte[][]\"}],\"returns\":{\"type\":\"uint64\"},\"actions\":{\"create\":[],\"call\":[\"NoOp\"]}},{\"name\":\"updateFields\",\"args\":[{\"name\":\"fieldAndVals\",\"type\":\"byte[][]\"}],\"returns\":{\"type\":\"void\"},\"actions\":{\"create\":[],\"call\":[\"NoOp\"]}},{\"name\":\"readField\",\"readonly\":true,\"args\":[{\"name\":\"fieldName\",\"type\":\"byte[]\"}],\"returns\":{\"type\":\"byte[]\"},\"actions\":{\"create\":[],\"call\":[\"NoOp\"]}},{\"name\":\"offerForSale\",\"args\":[{\"name\":\"sellAmount\",\"type\":\"uint64\"},{\"name\":\"reservedFor\",\"type\":\"address\"}],\"returns\":{\"type\":\"void\"},\"events\":[{\"name\":\"nfd_offerForSale\",\"args\":[{\"name\":\"appId\",\"type\":\"uint64\"},{\"name\":\"name\",\"type\":\"string\"},{\"name\":\"seller\",\"type\":\"address\"},{\"name\":\"amount\",\"type\":\"uint64\"},{\"name\":\"reservedFor\",\"type\":\"address\"}],\"desc\":\"\"}],\"actions\":{\"create\":[],\"call\":[\"NoOp\"]}},{\"name\":\"cancelSale\",\"args\":[],\"returns\":{\"type\":\"void\"},\"events\":[{\"name\":\"nfd_saleCancelled\",\"args\":[{\"name\":\"appId\",\"type\":\"uint64\"},{\"name\":\"name\",\"type\":\"string\"}],\"desc\":\"\"}],\"actions\":{\"create\":[],\"call\":[\"NoOp\"]}},{\"name\":\"postOffer\",\"args\":[{\"name\":\"offer\",\"type\":\"uint64\"},{\"name\":\"note\",\"type\":\"string\"}],\"returns\":{\"type\":\"void\"},\"events\":[{\"name\":\"nfd_postedOffer\",\"args\":[{\"name\":\"appId\",\"type\":\"uint64\"},{\"name\":\"name\",\"type\":\"string\"},{\"name\":\"sender\",\"type\":\"address\"},{\"name\":\"amount\",\"type\":\"uint64\"},{\"name\":\"note\",\"type\":\"string\"}],\"desc\":\"\"}],\"actions\":{\"create\":[],\"call\":[\"NoOp\"]}},{\"name\":\"mintPayout\",\"args\":[{\"name\":\"oneYearPrice\",\"type\":\"uint64\"},{\"name\":\"segmentPlatformCostInAlgo\",\"type\":\"uint64\"}],\"returns\":{\"type\":\"(uint64,address,uint64,address,uint64)\",\"struct\":\"PayoutInfo\"},\"actions\":{\"create\":[],\"call\":[\"NoOp\"]}},{\"name\":\"purchase\",\"args\":[{\"name\":\"payment\",\"type\":\"pay\"}],\"returns\":{\"type\":\"void\"},\"events\":[{\"name\":\"nfd_purchased\",\"args\":[{\"name\":\"appId\",\"type\":\"uint64\"},{\"name\":\"name\",\"type\":\"string\"},{\"name\":\"seller\",\"type\":\"address\"},{\"name\":\"buyer\",\"type\":\"address\"},{\"name\":\"sellAmount\",\"type\":\"uint64\"},{\"name\":\"offerAmount\",\"type\":\"uint64\"},{\"name\":\"overpaymentRefund\",\"type\":\"uint64\"},{\"name\":\"convFeeAddr\",\"type\":\"address\"},{\"name\":\"convFeeAmount\",\"type\":\"uint64\"}],\"desc\":\"\"}],\"actions\":{\"create\":[],\"call\":[\"NoOp\"]}},{\"name\":\"isAddressInField\",\"readonly\":true,\"args\":[{\"name\":\"fieldName\",\"type\":\"string\"},{\"name\":\"address\",\"type\":\"address\"}],\"returns\":{\"type\":\"bool\"},\"actions\":{\"create\":[],\"call\":[\"NoOp\"]}},{\"name\":\"getRenewPrice\",\"readonly\":true,\"args\":[],\"returns\":{\"type\":\"uint64\"},\"actions\":{\"create\":[],\"call\":[\"NoOp\"]}},{\"name\":\"updateHash\",\"args\":[{\"name\":\"hash\",\"type\":\"byte[]\"}],\"returns\":{\"type\":\"void\"},\"actions\":{\"create\":[],\"call\":[\"NoOp\"]}},{\"name\":\"contractLock\",\"args\":[{\"name\":\"lock\",\"type\":\"bool\"}],\"returns\":{\"type\":\"void\"},\"actions\":{\"create\":[],\"call\":[\"NoOp\"]}},{\"name\":\"segmentLock\",\"args\":[{\"name\":\"lock\",\"type\":\"bool\"},{\"name\":\"usdPrice\",\"type\":\"uint64\"}],\"returns\":{\"type\":\"void\"},\"actions\":{\"create\":[],\"call\":[\"NoOp\"]}},{\"name\":\"vaultOptInLock\",\"args\":[{\"name\":\"lock\",\"type\":\"bool\"}],\"returns\":{\"type\":\"void\"},\"actions\":{\"create\":[],\"call\":[\"NoOp\"]}},{\"name\":\"vaultOptIn\",\"args\":[{\"name\":\"assets\",\"type\":\"uint64[]\"}],\"returns\":{\"type\":\"void\"},\"actions\":{\"create\":[],\"call\":[\"NoOp\"]}},{\"name\":\"vaultSend\",\"args\":[{\"name\":\"amount\",\"type\":\"uint64\"},{\"name\":\"receiver\",\"type\":\"address\"},{\"name\":\"note\",\"type\":\"string\"},{\"name\":\"asset\",\"type\":\"uint64\"},{\"name\":\"otherAssets\",\"type\":\"uint64[]\"}],\"returns\":{\"type\":\"void\"},\"actions\":{\"create\":[],\"call\":[\"NoOp\"]}},{\"name\":\"renew\",\"desc\":\"Renew adds more time to an existing NFDs expiration, or renews it if expired.\\n\\n\\nAs part of v2-v3 upgrade, the NFDs are converted from lifetime NFDs to renewal NFDs. The v2 contract is upgraded\\nto v3, then renew is called on the (now v3) nfd to turn it into a renewal (note the if curExpiration === 0 check)\\n\\n\\nIf already renewal, then it extends the current expiration time by the time specified (minimum 1 yr) (365 / price paid * mint price)\\nExpirations can never be more than NFD_MAX_EXPIRATION_DAYS days in the future.\\n\\n\\nIF the NFD is expired:\\n    x The current owner can take it back over at base price - and NFD metadata doesn't have to be cleared - they\\n    get it back as-is.\\n    x If not current owner, then the price goes from high of base price * 10,000 down to base price over 24 hrs where\\n    'buyer' has to pay at least that price.  The NFD MUST ALREADY HAVE ITS METADATA CLEARED!\",\"args\":[{\"name\":\"payment\",\"type\":\"pay\",\"desc\":\"The payment transaction from which the renewal period is determined..\"}],\"returns\":{\"type\":\"void\"},\"events\":[{\"name\":\"nfd_saleCancelled\",\"args\":[{\"name\":\"appId\",\"type\":\"uint64\"},{\"name\":\"name\",\"type\":\"string\"}],\"desc\":\"\"},{\"name\":\"nfd_renewed\",\"args\":[{\"name\":\"appId\",\"type\":\"uint64\"},{\"name\":\"name\",\"type\":\"string\"},{\"name\":\"origOwner\",\"type\":\"address\"},{\"name\":\"buyer\",\"type\":\"address\"},{\"name\":\"priceOneYear\",\"type\":\"uint64\"},{\"name\":\"renewAmount\",\"type\":\"uint64\"},{\"name\":\"expTime\",\"type\":\"uint64\"}],\"desc\":\"\"}],\"actions\":{\"create\":[],\"call\":[\"NoOp\"]}},{\"name\":\"setPrimaryAddress\",\"args\":[{\"name\":\"fieldName\",\"type\":\"string\"},{\"name\":\"address\",\"type\":\"address\"}],\"returns\":{\"type\":\"void\"},\"actions\":{\"create\":[],\"call\":[\"NoOp\"]}},{\"name\":\"registryAddingVerifiedAddress\",\"desc\":\"Approved call from registry instructing us to move the specified u.cav.xx field and add to the specified\\nverified field.\",\"args\":[{\"name\":\"fieldBeingVerified\",\"type\":\"string\",\"desc\":\"- MUST START with u.cav. (!)\\ngets 'added' to 'set' in next arg - must be fixed-sized bytes\"},{\"name\":\"fieldSetName\",\"type\":\"string\",\"desc\":\"(must BE v.ca[...].as)\"}],\"returns\":{\"type\":\"bool\",\"desc\":\"true if added or already present, false otherwise\"},\"events\":[{\"name\":\"nfd_addressLinked\",\"args\":[{\"name\":\"appId\",\"type\":\"uint64\"},{\"name\":\"name\",\"type\":\"string\"},{\"name\":\"address\",\"type\":\"address\"}],\"desc\":\"\"}],\"actions\":{\"create\":[],\"call\":[\"NoOp\"]}},{\"name\":\"registryRemovingVerifiedAddress\",\"desc\":\"Approved call from registry instructing us to REMOVE an address from the specified verified address set\",\"args\":[{\"name\":\"fieldBeingChanged\",\"type\":\"string\",\"desc\":\"The field being changed in the address registry.\"},{\"name\":\"address\",\"type\":\"address\",\"desc\":\"The address to be removed from the field.\"},{\"name\":\"mbrRefundDest\",\"type\":\"address\",\"desc\":\"the address to send reclaimed MBR (if any)\\n boolean - true if valid removed\"}],\"returns\":{\"type\":\"bool\"},\"events\":[{\"name\":\"nfd_addressUnlinked\",\"args\":[{\"name\":\"appId\",\"type\":\"uint64\"},{\"name\":\"name\",\"type\":\"string\"},{\"name\":\"address\",\"type\":\"address\"}],\"desc\":\"\"}],\"actions\":{\"create\":[],\"call\":[\"NoOp\"]}}],\"events\":[{\"name\":\"nfd_offerForSale\",\"args\":[{\"name\":\"appId\",\"type\":\"uint64\"},{\"name\":\"name\",\"type\":\"string\"},{\"name\":\"seller\",\"type\":\"address\"},{\"name\":\"amount\",\"type\":\"uint64\"},{\"name\":\"reservedFor\",\"type\":\"address\"}],\"desc\":\"\"},{\"name\":\"nfd_saleCancelled\",\"args\":[{\"name\":\"appId\",\"type\":\"uint64\"},{\"name\":\"name\",\"type\":\"string\"}],\"desc\":\"\"},{\"name\":\"nfd_postedOffer\",\"args\":[{\"name\":\"appId\",\"type\":\"uint64\"},{\"name\":\"name\",\"type\":\"string\"},{\"name\":\"sender\",\"type\":\"address\"},{\"name\":\"amount\",\"type\":\"uint64\"},{\"name\":\"note\",\"type\":\"string\"}],\"desc\":\"\"},{\"name\":\"nfd_purchased\",\"args\":[{\"name\":\"appId\",\"type\":\"uint64\"},{\"name\":\"name\",\"type\":\"string\"},{\"name\":\"seller\",\"type\":\"address\"},{\"name\":\"buyer\",\"type\":\"address\"},{\"name\":\"sellAmount\",\"type\":\"uint64\"},{\"name\":\"offerAmount\",\"type\":\"uint64\"},{\"name\":\"overpaymentRefund\",\"type\":\"uint64\"},{\"name\":\"convFeeAddr\",\"type\":\"address\"},{\"name\":\"convFeeAmount\",\"type\":\"uint64\"}],\"desc\":\"\"},{\"name\":\"nfd_renewed\",\"args\":[{\"name\":\"appId\",\"type\":\"uint64\"},{\"name\":\"name\",\"type\":\"string\"},{\"name\":\"origOwner\",\"type\":\"address\"},{\"name\":\"buyer\",\"type\":\"address\"},{\"name\":\"priceOneYear\",\"type\":\"uint64\"},{\"name\":\"renewAmount\",\"type\":\"uint64\"},{\"name\":\"expTime\",\"type\":\"uint64\"}],\"desc\":\"\"},{\"name\":\"nfd_addressLinked\",\"args\":[{\"name\":\"appId\",\"type\":\"uint64\"},{\"name\":\"name\",\"type\":\"string\"},{\"name\":\"address\",\"type\":\"address\"}],\"desc\":\"\"},{\"name\":\"nfd_addressUnlinked\",\"args\":[{\"name\":\"appId\",\"type\":\"uint64\"},{\"name\":\"name\",\"type\":\"string\"},{\"name\":\"address\",\"type\":\"address\"}],\"desc\":\"\"}],\"arcs\":[4,56],\"structs\":{\"PayoutInfo\":[{\"name\":\"amountToSeller\",\"type\":\"uint64\"},{\"name\":\"commissionAddress\",\"type\":\"address\"},{\"name\":\"amountToCommission\",\"type\":\"uint64\"},{\"name\":\"segmentRootOwner\",\"type\":\"address\"},{\"name\":\"amountToSegmentRoot\",\"type\":\"uint64\"}]},\"state\":{\"schema\":{\"global\":{\"bytes\":30,\"ints\":0},\"local\":{\"bytes\":0,\"ints\":0}},\"keys\":{\"global\":{},\"local\":{},\"box\":{}},\"maps\":{\"global\":{\"globalState\":{\"keyType\":\"AVMBytes\",\"valueType\":\"AVMBytes\"}},\"local\":{},\"box\":{\"boxes\":{\"keyType\":\"AVMBytes\",\"valueType\":\"AVMBytes\"}}}},\"bareActions\":{\"create\":[],\"call\":[]},\"sourceInfo\":{\"approval\":{\"sourceInfo\":[{\"teal\":25,\"source\":\"contracts/NFDInstance.algo.ts:17\",\"errorMessage\":\"The requested action is not implemented in this contract. Are you using the correct OnComplete? Did you set your app ID?\",\"pc\":[36]},{\"teal\":37,\"source\":\"contracts/NFDInstance.algo.ts:43\",\"errorMessage\":\"argument 0 (segmentRootCommissionAddr) for createApplication must be a address\",\"pc\":[44]},{\"teal\":55,\"source\":\"contracts/NFDInstance.algo.ts:40\",\"errorMessage\":\"argument 3 (commission2Addr) for createApplication must be a address\",\"pc\":[60]},{\"teal\":69,\"source\":\"contracts/NFDInstance.algo.ts:38\",\"errorMessage\":\"argument 5 (commission1Addr) for createApplication must be a address\",\"pc\":[72]},{\"teal\":87,\"source\":\"contracts/NFDInstance.algo.ts:35\",\"errorMessage\":\"argument 8 (buyer) for createApplication must be a address\",\"pc\":[88]},{\"teal\":97,\"source\":\"contracts/NFDInstance.algo.ts:34\",\"errorMessage\":\"argument 9 (seller) for createApplication must be a address\",\"pc\":[96]},{\"teal\":122,\"source\":\"contracts/NFDInstance.algo.ts:45\",\"errorMessage\":\"caller must be NFD registry!\",\"pc\":[117]},{\"teal\":224,\"source\":\"contracts/NFDInstance.algo.ts:60\",\"errorMessage\":\"commission must be between 1 and 50%\",\"pc\":[217]},{\"teal\":262,\"source\":\"contracts/NFDInstance.algo.ts:64\",\"errorMessage\":\"commission must be between 1 and 50%\",\"pc\":[251]},{\"teal\":370,\"source\":\"contracts/NFDInstance.algo.ts:90\",\"errorMessage\":\"parent commission address must be set if parent app id is set and parent is unlocked\",\"pc\":[382]},{\"teal\":384,\"source\":\"contracts/NFDInstance.algo.ts:97\",\"errorMessage\":\"the segment commission agent should be the parent nfd's seller\",\"pc\":[393]},{\"teal\":420,\"source\":\"contracts/NFDInstance.algo.ts:110\",\"errorMessage\":\"contract must be unlocked to upgrade\",\"pc\":[420]},{\"teal\":429,\"source\":\"contracts/NFDInstance.algo.ts:113\",\"errorMessage\":\"caller must be NFD registry!\",\"pc\":[426]},{\"teal\":459,\"source\":\"contracts/NFDInstance.algo.ts:120\",\"errorMessage\":\"can't still be in minting state\",\"pc\":[449]},{\"teal\":481,\"source\":\"contracts/NFDInstance.algo.ts:125\",\"errorMessage\":\"NFD can't be expired for these v1/v2 operations\",\"pc\":[467]},{\"teal\":677,\"source\":\"contracts/NFDInstance.algo.ts:180\",\"errorMessage\":\"unknown method\",\"pc\":[731]},{\"teal\":721,\"source\":\"contracts/NFDInstance.algo.ts:190\",\"errorMessage\":\"caller must be NFD registry!\",\"pc\":[768]},{\"teal\":942,\"source\":\"contracts/NFDInstance.algo.ts:224\",\"errorMessage\":\"field not removable or no permissions to remove\",\"pc\":[959]},{\"teal\":950,\"source\":\"contracts/NFDInstance.algo.ts:225\",\"errorMessage\":\"box value does not exist: this.boxes(name).size\",\"pc\":[963]},{\"teal\":1075,\"source\":\"contracts/NFDInstance.algo.ts:244\",\"errorMessage\":\"field not removable or no permissions to remove\",\"pc\":[1067]},{\"teal\":1130,\"source\":\"contracts/NFDInstance.algo.ts:258\",\"errorMessage\":\"caller must be NFD registry!\",\"pc\":[1111]},{\"teal\":1144,\"source\":\"contracts/NFDInstance.algo.ts:259\",\"errorMessage\":\"child NFD MUST still be in pre-claim state!\",\"pc\":[1121]},{\"teal\":1172,\"source\":\"contracts/NFDInstance.algo.ts:266\",\"errorMessage\":\"passed in child name must match name in created nfd state\",\"pc\":[1144]},{\"teal\":1209,\"source\":\"contracts/NFDInstance.algo.ts:276\",\"errorMessage\":\"parent must be suffix of child\",\"pc\":[1177]},{\"teal\":1381,\"source\":\"contracts/NFDInstance.algo.ts:298\",\"errorMessage\":\"box value does not exist: this.boxes(name).size\",\"pc\":[1346]},{\"teal\":1423,\"source\":\"contracts/NFDInstance.algo.ts:307\",\"errorMessage\":\"box value does not exist: this.boxes(name).size\",\"pc\":[1386]},{\"teal\":1537,\"source\":\"contracts/NFDInstance.algo.ts:323\",\"errorMessage\":\"can't update fields if NFD expired\",\"pc\":[1487]},{\"teal\":1644,\"source\":\"contracts/NFDInstance.algo.ts:333\",\"errorMessage\":\"invalid update call by registry\",\"pc\":[1615]},{\"teal\":1738,\"source\":\"contracts/NFDInstance.algo.ts:340\",\"errorMessage\":\"field not updatable or no permissions to update\",\"pc\":[1717]},{\"teal\":1799,\"source\":\"contracts/NFDInstance.algo.ts:353\",\"errorMessage\":\"can't update fields if NFD expired\",\"pc\":[1763]},{\"teal\":1844,\"source\":\"contracts/NFDInstance.algo.ts:359\",\"errorMessage\":\"field not updatable or no permissions to update\",\"pc\":[1803]},{\"teal\":1953,\"source\":\"contracts/NFDInstance.algo.ts:379\",\"errorMessage\":\"must be user-defined or verified field to fetch\",\"pc\":[1902]},{\"teal\":1971,\"source\":\"contracts/NFDInstance.algo.ts:384\",\"errorMessage\":\"box value does not exist: this.boxes(fieldName).value\",\"pc\":[1914]},{\"teal\":2005,\"source\":\"contracts/NFDInstance.algo.ts:392\",\"errorMessage\":\"box value does not exist: this.boxes(boxName).value\",\"pc\":[1944]},{\"teal\":2057,\"source\":\"contracts/NFDInstance.algo.ts:400\",\"errorMessage\":\"box value does not exist: this.boxes(boxName).value\",\"pc\":[1994]},{\"teal\":2093,\"source\":\"contracts/NFDInstance.algo.ts:407\",\"errorMessage\":\"argument 0 (reservedFor) for offerForSale must be a address\",\"pc\":[2021]},{\"teal\":2117,\"source\":\"contracts/NFDInstance.algo.ts:408\",\"errorMessage\":\"can't sell if NFD expired\",\"pc\":[2039]},{\"teal\":2165,\"source\":\"contracts/NFDInstance.algo.ts:419\",\"errorMessage\":\"can only be sold if no user-defined or verified properties remain\",\"pc\":[2089]},{\"teal\":2185,\"source\":\"contracts/NFDInstance.algo.ts:423\",\"errorMessage\":\"must be sold for at least MIN amount\",\"pc\":[2106]},{\"teal\":2323,\"source\":\"contracts/NFDInstance.algo.ts:465\",\"errorMessage\":\"can't update fields if NFD expired\",\"pc\":[2252]},{\"teal\":2340,\"source\":\"contracts/NFDInstance.algo.ts:467\",\"errorMessage\":\"must be for sale\",\"pc\":[2265]},{\"teal\":2484,\"source\":\"contracts/NFDInstance.algo.ts:492\",\"errorMessage\":\"caller must be NFD registry!\",\"pc\":[2420]},{\"teal\":2751,\"source\":\"contracts/NFDInstance.algo.ts:573\",\"errorMessage\":\"argument 0 (payment) for purchase must be a pay transaction\",\"pc\":[2652]},{\"teal\":2782,\"source\":\"contracts/NFDInstance.algo.ts:575\",\"errorMessage\":\"can't be expired\",\"pc\":[2677]},{\"teal\":2789,\"source\":\"contracts/NFDInstance.algo.ts:576\",\"errorMessage\":\"must be for sale\",\"pc\":[2681]},{\"teal\":2830,\"source\":\"contracts/NFDInstance.algo.ts:583\",\"errorMessage\":\"payment sender must be same as purchase caller\",\"pc\":[2733]},{\"teal\":2853,\"source\":\"contracts/NFDInstance.algo.ts:586\",\"errorMessage\":\"Reserved owner set, but sender isn't the reserved address\",\"pc\":[2749]},{\"teal\":2900,\"source\":\"contracts/NFDInstance.algo.ts:604\",\"errorMessage\":\"offer must be at least min amount\",\"pc\":[2795]},{\"teal\":2910,\"source\":\"contracts/NFDInstance.algo.ts:607\",\"errorMessage\":\"offer must be at least sell amount\",\"pc\":[2801]},{\"teal\":2935,\"source\":\"contracts/NFDInstance.algo.ts:614\",\"errorMessage\":\"transaction verification failed: {\\\"txn\\\":\\\"payment\\\",\\\"field\\\":\\\"amount\\\",\\\"expected\\\":\\\"origOfferamt\\\"}\",\"pc\":[2823]},{\"teal\":2944,\"source\":\"contracts/NFDInstance.algo.ts:614\",\"errorMessage\":\"transaction verification failed: {\\\"txn\\\":\\\"payment\\\",\\\"field\\\":\\\"receiver\\\",\\\"expected\\\":\\\"this.app.address\\\"}\",\"pc\":[2831]},{\"teal\":3406,\"source\":\"contracts/NFDInstance.algo.ts:730\",\"errorMessage\":\"argument 0 (address) for isAddressInField must be a address\",\"pc\":[3291]},{\"teal\":3458,\"source\":\"contracts/NFDInstance.algo.ts:735\",\"errorMessage\":\"box value does not exist: this.boxes(fieldName).value\",\"pc\":[3336]},{\"teal\":3711,\"source\":\"contracts/NFDInstance.algo.ts:856\",\"errorMessage\":\"must pass 32-byte hash that isn't 0\",\"pc\":[3553]},{\"teal\":3729,\"source\":\"contracts/NFDInstance.algo.ts:861\",\"errorMessage\":\"only txnlab or owner can request an nfd nft hash update\",\"pc\":[3567]},{\"teal\":3782,\"source\":\"contracts/NFDInstance.algo.ts:876\",\"errorMessage\":\"argument 0 (lock) for contractLock must be a bool\",\"pc\":[3603]},{\"teal\":3835,\"source\":\"contracts/NFDInstance.algo.ts:884\",\"errorMessage\":\"argument 1 (lock) for segmentLock must be a bool\",\"pc\":[3649]},{\"teal\":3930,\"source\":\"contracts/NFDInstance.algo.ts:895\",\"errorMessage\":\"amount must be at least NFD_MIN_SEGMENT_USD dollars in algo\",\"pc\":[3732]},{\"teal\":3952,\"source\":\"contracts/NFDInstance.algo.ts:907\",\"errorMessage\":\"argument 0 (lock) for vaultOptInLock must be a bool\",\"pc\":[3747]},{\"teal\":4032,\"source\":\"contracts/NFDInstance.algo.ts:925\",\"errorMessage\":\"sender must be owner when vault locked\",\"pc\":[3812]},{\"teal\":4042,\"source\":\"contracts/NFDInstance.algo.ts:931\",\"errorMessage\":\"part of opt-in for new asset, must have prior txn paying MBR\",\"pc\":[3817]},{\"teal\":4061,\"source\":\"contracts/NFDInstance.algo.ts:933\",\"errorMessage\":\"transaction verification failed: {\\\"txn\\\":\\\"this.txnGroup[this.txn.groupIndex - 1]\\\",\\\"field\\\":\\\"typeEnum\\\",\\\"expected\\\":\\\"pay\\\"}\",\"pc\":[3830]},{\"teal\":4070,\"source\":\"contracts/NFDInstance.algo.ts:934\",\"errorMessage\":\"transaction verification failed: {\\\"txn\\\":\\\"this.txnGroup[this.txn.groupIndex - 1]\\\",\\\"field\\\":\\\"receiver\\\",\\\"expected\\\":\\\"this.app.address\\\"}\",\"pc\":[3838]},{\"teal\":4084,\"source\":\"contracts/NFDInstance.algo.ts:935\",\"errorMessage\":\"transaction verification failed: {\\\"txn\\\":\\\"this.txnGroup[this.txn.groupIndex - 1]\\\",\\\"field\\\":\\\"amount\\\",\\\"expected\\\":\\\"100_000 * assets.length\\\"}\",\"pc\":[3853]},{\"teal\":4198,\"source\":\"contracts/NFDInstance.algo.ts:958\",\"errorMessage\":\"argument 3 (receiver) for vaultSend must be a address\",\"pc\":[3954]},{\"teal\":4247,\"source\":\"contracts/NFDInstance.algo.ts:968\",\"errorMessage\":\"can't specify other assets if sending algo from vault\",\"pc\":[3994]},{\"teal\":4329,\"source\":\"contracts/NFDInstance.algo.ts:980\",\"errorMessage\":\"can only send one asset if amount == 0\",\"pc\":[4061]},{\"teal\":4402,\"source\":\"contracts/NFDInstance.algo.ts:993\",\"errorMessage\":\"receiver must be owner\",\"pc\":[4128]},{\"teal\":4537,\"source\":\"contracts/NFDInstance.algo.ts:1029\",\"errorMessage\":\"argument 0 (payment) for renew must be a pay transaction\",\"pc\":[4237]},{\"teal\":4577,\"source\":\"contracts/NFDInstance.algo.ts:1030\",\"errorMessage\":\"transaction verification failed: {\\\"txn\\\":\\\"payment\\\",\\\"field\\\":\\\"receiver\\\",\\\"expected\\\":\\\"this.app.address\\\"}\",\"pc\":[4256]},{\"teal\":4706,\"source\":\"contracts/NFDInstance.algo.ts:1052\",\"errorMessage\":\"can't claim expired nfd unless all metadata is cleared\",\"pc\":[4386]},{\"teal\":4719,\"source\":\"contracts/NFDInstance.algo.ts:1058\",\"errorMessage\":\"must pay at least minimum renewal price\",\"pc\":[4394]},{\"teal\":4892,\"source\":\"contracts/NFDInstance.algo.ts:1098\",\"errorMessage\":\"global state value does not exist: parentAppId.globalState(NFD_KEY_OWNER)\",\"pc\":[4550]},{\"teal\":5039,\"source\":\"contracts/NFDInstance.algo.ts:1137\",\"errorMessage\":\"argument 0 (address) for setPrimaryAddress must be a address\",\"pc\":[4716]},{\"teal\":5126,\"source\":\"contracts/NFDInstance.algo.ts:1156\",\"errorMessage\":\"caller must be NFD registry!\",\"pc\":[4802]},{\"teal\":5140,\"source\":\"contracts/NFDInstance.algo.ts:1158\",\"errorMessage\":\"field being verified MUST START with u.cav\",\"pc\":[4820]},{\"teal\":5150,\"source\":\"contracts/NFDInstance.algo.ts:1159\",\"errorMessage\":\"destination field MUST START with v.ca[....]\",\"pc\":[4829]},{\"teal\":5165,\"source\":\"contracts/NFDInstance.algo.ts:1160\",\"errorMessage\":\"destination field must end END with .as\",\"pc\":[4844]},{\"teal\":5178,\"source\":\"contracts/NFDInstance.algo.ts:1161\",\"errorMessage\":\"referenced field to add as verified address must have value in box storage\",\"pc\":[4850]},{\"teal\":5193,\"source\":\"contracts/NFDInstance.algo.ts:1167\",\"errorMessage\":\"box value does not exist: this.boxes(fieldBeingVerified).value\",\"pc\":[4859]},{\"teal\":5253,\"source\":\"contracts/NFDInstance.algo.ts:1187\",\"errorMessage\":\"argument 0 (mbrRefundDest) for registryRemovingVerifiedAddress must be a address\",\"pc\":[4924]},{\"teal\":5263,\"source\":\"contracts/NFDInstance.algo.ts:1187\",\"errorMessage\":\"argument 1 (address) for registryRemovingVerifiedAddress must be a address\",\"pc\":[4932]},{\"teal\":5302,\"source\":\"contracts/NFDInstance.algo.ts:1188\",\"errorMessage\":\"caller must be NFD registry!\",\"pc\":[4962]},{\"teal\":5318,\"source\":\"contracts/NFDInstance.algo.ts:1191\",\"errorMessage\":\"can't be for sale\",\"pc\":[4974]},{\"teal\":5329,\"source\":\"contracts/NFDInstance.algo.ts:1193\",\"errorMessage\":\"verified field MUST START with v.ca[....]\",\"pc\":[4983]},{\"teal\":5347,\"source\":\"contracts/NFDInstance.algo.ts:1194\",\"errorMessage\":\"verified field must end END with .as\",\"pc\":[4998]},{\"teal\":5362,\"source\":\"contracts/NFDInstance.algo.ts:1200\",\"errorMessage\":\"box value does not exist: this.boxes(fieldBeingChanged).size\",\"pc\":[5007]},{\"teal\":5542,\"source\":\"contracts/NFDInstance.algo.ts:1247\",\"errorMessage\":\"sender must be owner\",\"pc\":[5175]},{\"teal\":5552,\"source\":\"contracts/NFDInstance.algo.ts:1250\",\"errorMessage\":\"part of opt-in for new asset, must have prior txn paying MBR\",\"pc\":[5180]},{\"teal\":5571,\"source\":\"contracts/NFDInstance.algo.ts:1252\",\"errorMessage\":\"transaction verification failed: {\\\"txn\\\":\\\"this.txnGroup[this.txn.groupIndex - 1]\\\",\\\"field\\\":\\\"typeEnum\\\",\\\"expected\\\":\\\"pay\\\"}\",\"pc\":[5193]},{\"teal\":5580,\"source\":\"contracts/NFDInstance.algo.ts:1253\",\"errorMessage\":\"transaction verification failed: {\\\"txn\\\":\\\"this.txnGroup[this.txn.groupIndex - 1]\\\",\\\"field\\\":\\\"receiver\\\",\\\"expected\\\":\\\"this.app.address\\\"}\",\"pc\":[5201]},{\"teal\":5593,\"source\":\"contracts/NFDInstance.algo.ts:1254\",\"errorMessage\":\"transaction verification failed: {\\\"txn\\\":\\\"this.txnGroup[this.txn.groupIndex - 1]\\\",\\\"field\\\":\\\"amount\\\",\\\"expected\\\":\\\"100_000 * (this.txn.numAppArgs - 1)\\\"}\",\"pc\":[5214]},{\"teal\":5730,\"source\":\"contracts/NFDInstance.algo.ts:1280\",\"errorMessage\":\"global state value does not exist: AppID.fromUint64(appId).globalState(key)\",\"pc\":[5317]},{\"teal\":5796,\"source\":\"contracts/NFDInstance.algo.ts:1313\",\"errorMessage\":\"internal fields can never be deleted\",\"pc\":[5371]},{\"teal\":5820,\"source\":\"contracts/NFDInstance.algo.ts:1320\",\"errorMessage\":\"must be owned\",\"pc\":[5388]},{\"teal\":5836,\"source\":\"contracts/NFDInstance.algo.ts:1323\",\"errorMessage\":\"can't be for sale\",\"pc\":[5400]},{\"teal\":5920,\"source\":\"contracts/NFDInstance.algo.ts:1357\",\"errorMessage\":\"internal fields can never be updated\",\"pc\":[5471]},{\"teal\":5977,\"source\":\"contracts/NFDInstance.algo.ts:1365\",\"errorMessage\":\"must be owned\",\"pc\":[5526]},{\"teal\":5985,\"source\":\"contracts/NFDInstance.algo.ts:1366\",\"errorMessage\":\"can't be for sale\",\"pc\":[5531]},{\"teal\":5995,\"source\":\"contracts/NFDInstance.algo.ts:1367\",\"errorMessage\":\"sender must be owner\",\"pc\":[5537]},{\"teal\":6031,\"source\":\"contracts/NFDInstance.algo.ts:1375\",\"errorMessage\":\"updating v.caAlgo field isn't allowed via regular field update\",\"pc\":[5567]},{\"teal\":6176,\"source\":\"contracts/NFDInstance.algo.ts:1426\",\"errorMessage\":\"can't be for sale\",\"pc\":[5688]},{\"teal\":6184,\"source\":\"contracts/NFDInstance.algo.ts:1427\",\"errorMessage\":\"can't be expired\",\"pc\":[5693]},{\"teal\":6296,\"source\":\"contracts/NFDInstance.algo.ts:1454\",\"errorMessage\":\"max expiration exceeded parameters defined by registry\",\"pc\":[5778]},{\"teal\":6529,\"source\":\"contracts/NFDInstance.algo.ts:1508\",\"errorMessage\":\"box value does not exist: this.boxes(key).value\",\"pc\":[5946]},{\"teal\":6547,\"source\":\"contracts/NFDInstance.algo.ts:1512\",\"errorMessage\":\"address 'set' should already have at least two values\",\"pc\":[5961]},{\"teal\":6629,\"source\":\"contracts/NFDInstance.algo.ts:1528\",\"errorMessage\":\"address must be found in set in order to move it\",\"pc\":[6029]},{\"teal\":6712,\"source\":\"contracts/NFDInstance.algo.ts:1552\",\"errorMessage\":\"box value does not exist: this.boxes(key).value\",\"pc\":[6095]},{\"teal\":6733,\"source\":\"contracts/NFDInstance.algo.ts:1555\",\"errorMessage\":\"existing set must be multiple of key being added\",\"pc\":[6114]},{\"teal\":6869,\"source\":\"contracts/NFDInstance.algo.ts:1586\",\"errorMessage\":\"box value does not exist: this.boxes(key).value\",\"pc\":[6221]},{\"teal\":7078,\"source\":\"contracts/NFDInstance.algo.ts:1624\",\"errorMessage\":\"sender must be owner\",\"pc\":[6390]},{\"teal\":7087,\"source\":\"contracts/NFDInstance.algo.ts:17\",\"errorMessage\":\"this contract does not implement the given ABI method for create NoOp\",\"pc\":[6405]},{\"teal\":7128,\"source\":\"contracts/NFDInstance.algo.ts:17\",\"errorMessage\":\"this contract does not implement the given ABI method for call UpdateApplication\",\"pc\":[6621]}],\"pcOffsetMethod\":\"cblocks\"},\"clear\":{\"sourceInfo\":[],\"pcOffsetMethod\":\"none\"}},\"templateVariables\":{\"adminAsaId\":{\"type\":\"uint64\"},\"registryAppId\":{\"type\":\"uint64\"}},\"scratchVariables\":{\"adminAsaId\":{\"type\":\"uint64\",\"slot\":200},\"registryAppId\":{\"type\":\"uint64\",\"slot\":201}},\"compilerInfo\":{\"compiler\":\"algod\",\"compilerVersion\":{\"major\":3,\"minor\":27,\"patch\":237217,\"commitHash\":\"0bc3d7e4\"}}} as unknown as Arc56Contract\n\n/**\n * A state record containing binary data\n */\nexport interface BinaryState {\n  /**\n   * Gets the state value as a Uint8Array\n   */\n  asByteArray(): Uint8Array | undefined\n  /**\n   * Gets the state value as a string\n   */\n  asString(): string | undefined\n}\n\nclass BinaryStateValue implements BinaryState {\n  constructor(private value: Uint8Array | undefined) {}\n\n  asByteArray(): Uint8Array | undefined {\n    return this.value\n  }\n\n  asString(): string | undefined {\n    return this.value !== undefined ? Buffer.from(this.value).toString('utf-8') : undefined\n  }\n}\n\n/**\n * Expands types for IntelliSense so they are more human readable\n * See https://stackoverflow.com/a/69288824\n */\nexport type Expand<T> = T extends (...args: infer A) => infer R\n  ? (...args: Expand<A>) => Expand<R>\n  : T extends infer O\n    ? { [K in keyof O]: O[K] }\n    : never\n\n\n// Type definitions for ARC-56 structs\n\nexport type PayoutInfo = {\n  amountToSeller: bigint,\n  commissionAddress: string,\n  amountToCommission: bigint,\n  segmentRootOwner: string,\n  amountToSegmentRoot: bigint\n}\n\n\n/**\n * Converts the ABI tuple representation of a PayoutInfo to the struct representation\n */\nexport function PayoutInfoFromTuple(abiTuple: [bigint, string, bigint, string, bigint]) {\n  return getABIStructFromABITuple(abiTuple, APP_SPEC.structs.PayoutInfo, APP_SPEC.structs) as PayoutInfo\n}\n\n/**\n * Deploy-time template variables\n */\nexport type TemplateVariables = {\n  adminAsaId: bigint,\n  registryAppId: bigint,\n}\n\n/**\n * The argument types for the NfdInstance contract\n */\nexport type NfdInstanceArgs = {\n  /**\n   * The object representation of the arguments for each method\n   */\n  obj: {\n    'createApplication(string,address,address,uint64,uint64,address,uint64,address,uint64,uint64,address)void': {\n      nfdName: string\n      seller: string\n      buyer: string\n      purchaseAmount: bigint | number\n      expTime: bigint | number\n      commission1Addr: string\n      commission1Pct: bigint | number\n      commission2Addr: string\n      commission2Pct: bigint | number\n      segmentRootAppId: bigint | number\n      segmentRootCommissionAddr: string\n    }\n    'updateApplication(string)void': {\n      versionNum: string\n    }\n    'gas()void': Record<string, never>\n    'mintAsa(string,string)void': {\n      nfdName: string\n      url: string\n    }\n    'deleteFields(byte[][])void': {\n      fieldNames: Uint8Array[]\n    }\n    'updateSegmentCount(string,uint64)void': {\n      childNfdName: string\n      childNfdAppId: bigint | number\n    }\n    'getFieldUpdateCost(byte[][])uint64': {\n      fieldAndVals: Uint8Array[]\n    }\n    'updateFields(byte[][])void': {\n      fieldAndVals: Uint8Array[]\n    }\n    'readField(byte[])byte[]': {\n      fieldName: Uint8Array\n    }\n    'offerForSale(uint64,address)void': {\n      sellAmount: bigint | number\n      reservedFor: string\n    }\n    'cancelSale()void': Record<string, never>\n    'postOffer(uint64,string)void': {\n      offer: bigint | number\n      note: string\n    }\n    'mintPayout(uint64,uint64)(uint64,address,uint64,address,uint64)': {\n      oneYearPrice: bigint | number\n      segmentPlatformCostInAlgo: bigint | number\n    }\n    'purchase(pay)void': {\n      payment: AppMethodCallTransactionArgument\n    }\n    'isAddressInField(string,address)bool': {\n      fieldName: string\n      address: string\n    }\n    'getRenewPrice()uint64': Record<string, never>\n    'updateHash(byte[])void': {\n      hash: Uint8Array\n    }\n    'contractLock(bool)void': {\n      lock: boolean\n    }\n    'segmentLock(bool,uint64)void': {\n      lock: boolean\n      usdPrice: bigint | number\n    }\n    'vaultOptInLock(bool)void': {\n      lock: boolean\n    }\n    'vaultOptIn(uint64[])void': {\n      assets: bigint[] | number[]\n    }\n    'vaultSend(uint64,address,string,uint64,uint64[])void': {\n      amount: bigint | number\n      receiver: string\n      note: string\n      asset: bigint | number\n      otherAssets: bigint[] | number[]\n    }\n    'renew(pay)void': {\n      /**\n       * The payment transaction from which the renewal period is determined..\n       */\n      payment: AppMethodCallTransactionArgument\n    }\n    'setPrimaryAddress(string,address)void': {\n      fieldName: string\n      address: string\n    }\n    'registryAddingVerifiedAddress(string,string)bool': {\n      /**\n      * - MUST START with u.cav. (!)\n      gets 'added' to 'set' in next arg - must be fixed-sized bytes\n\n       */\n      fieldBeingVerified: string\n      /**\n       * (must BE v.ca[...].as)\n       */\n      fieldSetName: string\n    }\n    'registryRemovingVerifiedAddress(string,address,address)bool': {\n      /**\n       * The field being changed in the address registry.\n       */\n      fieldBeingChanged: string\n      /**\n       * The address to be removed from the field.\n       */\n      address: string\n      /**\n      * the address to send reclaimed MBR (if any)\n      boolean - true if valid removed\n\n       */\n      mbrRefundDest: string\n    }\n  }\n  /**\n   * The tuple representation of the arguments for each method\n   */\n  tuple: {\n    'createApplication(string,address,address,uint64,uint64,address,uint64,address,uint64,uint64,address)void': [nfdName: string, seller: string, buyer: string, purchaseAmount: bigint | number, expTime: bigint | number, commission1Addr: string, commission1Pct: bigint | number, commission2Addr: string, commission2Pct: bigint | number, segmentRootAppId: bigint | number, segmentRootCommissionAddr: string]\n    'updateApplication(string)void': [versionNum: string]\n    'gas()void': []\n    'mintAsa(string,string)void': [nfdName: string, url: string]\n    'deleteFields(byte[][])void': [fieldNames: Uint8Array[]]\n    'updateSegmentCount(string,uint64)void': [childNfdName: string, childNfdAppId: bigint | number]\n    'getFieldUpdateCost(byte[][])uint64': [fieldAndVals: Uint8Array[]]\n    'updateFields(byte[][])void': [fieldAndVals: Uint8Array[]]\n    'readField(byte[])byte[]': [fieldName: Uint8Array]\n    'offerForSale(uint64,address)void': [sellAmount: bigint | number, reservedFor: string]\n    'cancelSale()void': []\n    'postOffer(uint64,string)void': [offer: bigint | number, note: string]\n    'mintPayout(uint64,uint64)(uint64,address,uint64,address,uint64)': [oneYearPrice: bigint | number, segmentPlatformCostInAlgo: bigint | number]\n    'purchase(pay)void': [payment: AppMethodCallTransactionArgument]\n    'isAddressInField(string,address)bool': [fieldName: string, address: string]\n    'getRenewPrice()uint64': []\n    'updateHash(byte[])void': [hash: Uint8Array]\n    'contractLock(bool)void': [lock: boolean]\n    'segmentLock(bool,uint64)void': [lock: boolean, usdPrice: bigint | number]\n    'vaultOptInLock(bool)void': [lock: boolean]\n    'vaultOptIn(uint64[])void': [assets: bigint[] | number[]]\n    'vaultSend(uint64,address,string,uint64,uint64[])void': [amount: bigint | number, receiver: string, note: string, asset: bigint | number, otherAssets: bigint[] | number[]]\n    'renew(pay)void': [payment: AppMethodCallTransactionArgument]\n    'setPrimaryAddress(string,address)void': [fieldName: string, address: string]\n    'registryAddingVerifiedAddress(string,string)bool': [fieldBeingVerified: string, fieldSetName: string]\n    'registryRemovingVerifiedAddress(string,address,address)bool': [fieldBeingChanged: string, address: string, mbrRefundDest: string]\n  }\n}\n\n/**\n * The return type for each method\n */\nexport type NfdInstanceReturns = {\n  'createApplication(string,address,address,uint64,uint64,address,uint64,address,uint64,uint64,address)void': void\n  'updateApplication(string)void': void\n  'gas()void': void\n  'mintAsa(string,string)void': void\n  'deleteFields(byte[][])void': void\n  'updateSegmentCount(string,uint64)void': void\n  'getFieldUpdateCost(byte[][])uint64': bigint\n  'updateFields(byte[][])void': void\n  'readField(byte[])byte[]': Uint8Array\n  'offerForSale(uint64,address)void': void\n  'cancelSale()void': void\n  'postOffer(uint64,string)void': void\n  'mintPayout(uint64,uint64)(uint64,address,uint64,address,uint64)': PayoutInfo\n  'purchase(pay)void': void\n  'isAddressInField(string,address)bool': boolean\n  'getRenewPrice()uint64': bigint\n  'updateHash(byte[])void': void\n  'contractLock(bool)void': void\n  'segmentLock(bool,uint64)void': void\n  'vaultOptInLock(bool)void': void\n  'vaultOptIn(uint64[])void': void\n  'vaultSend(uint64,address,string,uint64,uint64[])void': void\n  'renew(pay)void': void\n  'setPrimaryAddress(string,address)void': void\n  'registryAddingVerifiedAddress(string,string)bool': boolean\n  'registryRemovingVerifiedAddress(string,address,address)bool': boolean\n}\n\n/**\n * Defines the types of available calls and state of the NfdInstance smart contract.\n */\nexport type NfdInstanceTypes = {\n  /**\n   * Maps method signatures / names to their argument and return types.\n   */\n  methods:\n    & Record<'createApplication(string,address,address,uint64,uint64,address,uint64,address,uint64,uint64,address)void' | 'createApplication', {\n      argsObj: NfdInstanceArgs['obj']['createApplication(string,address,address,uint64,uint64,address,uint64,address,uint64,uint64,address)void']\n      argsTuple: NfdInstanceArgs['tuple']['createApplication(string,address,address,uint64,uint64,address,uint64,address,uint64,uint64,address)void']\n      returns: NfdInstanceReturns['createApplication(string,address,address,uint64,uint64,address,uint64,address,uint64,uint64,address)void']\n    }>\n    & Record<'updateApplication(string)void' | 'updateApplication', {\n      argsObj: NfdInstanceArgs['obj']['updateApplication(string)void']\n      argsTuple: NfdInstanceArgs['tuple']['updateApplication(string)void']\n      returns: NfdInstanceReturns['updateApplication(string)void']\n    }>\n    & Record<'gas()void' | 'gas', {\n      argsObj: NfdInstanceArgs['obj']['gas()void']\n      argsTuple: NfdInstanceArgs['tuple']['gas()void']\n      returns: NfdInstanceReturns['gas()void']\n    }>\n    & Record<'mintAsa(string,string)void' | 'mintAsa', {\n      argsObj: NfdInstanceArgs['obj']['mintAsa(string,string)void']\n      argsTuple: NfdInstanceArgs['tuple']['mintAsa(string,string)void']\n      returns: NfdInstanceReturns['mintAsa(string,string)void']\n    }>\n    & Record<'deleteFields(byte[][])void' | 'deleteFields', {\n      argsObj: NfdInstanceArgs['obj']['deleteFields(byte[][])void']\n      argsTuple: NfdInstanceArgs['tuple']['deleteFields(byte[][])void']\n      returns: NfdInstanceReturns['deleteFields(byte[][])void']\n    }>\n    & Record<'updateSegmentCount(string,uint64)void' | 'updateSegmentCount', {\n      argsObj: NfdInstanceArgs['obj']['updateSegmentCount(string,uint64)void']\n      argsTuple: NfdInstanceArgs['tuple']['updateSegmentCount(string,uint64)void']\n      returns: NfdInstanceReturns['updateSegmentCount(string,uint64)void']\n    }>\n    & Record<'getFieldUpdateCost(byte[][])uint64' | 'getFieldUpdateCost', {\n      argsObj: NfdInstanceArgs['obj']['getFieldUpdateCost(byte[][])uint64']\n      argsTuple: NfdInstanceArgs['tuple']['getFieldUpdateCost(byte[][])uint64']\n      returns: NfdInstanceReturns['getFieldUpdateCost(byte[][])uint64']\n    }>\n    & Record<'updateFields(byte[][])void' | 'updateFields', {\n      argsObj: NfdInstanceArgs['obj']['updateFields(byte[][])void']\n      argsTuple: NfdInstanceArgs['tuple']['updateFields(byte[][])void']\n      returns: NfdInstanceReturns['updateFields(byte[][])void']\n    }>\n    & Record<'readField(byte[])byte[]' | 'readField', {\n      argsObj: NfdInstanceArgs['obj']['readField(byte[])byte[]']\n      argsTuple: NfdInstanceArgs['tuple']['readField(byte[])byte[]']\n      returns: NfdInstanceReturns['readField(byte[])byte[]']\n    }>\n    & Record<'offerForSale(uint64,address)void' | 'offerForSale', {\n      argsObj: NfdInstanceArgs['obj']['offerForSale(uint64,address)void']\n      argsTuple: NfdInstanceArgs['tuple']['offerForSale(uint64,address)void']\n      returns: NfdInstanceReturns['offerForSale(uint64,address)void']\n    }>\n    & Record<'cancelSale()void' | 'cancelSale', {\n      argsObj: NfdInstanceArgs['obj']['cancelSale()void']\n      argsTuple: NfdInstanceArgs['tuple']['cancelSale()void']\n      returns: NfdInstanceReturns['cancelSale()void']\n    }>\n    & Record<'postOffer(uint64,string)void' | 'postOffer', {\n      argsObj: NfdInstanceArgs['obj']['postOffer(uint64,string)void']\n      argsTuple: NfdInstanceArgs['tuple']['postOffer(uint64,string)void']\n      returns: NfdInstanceReturns['postOffer(uint64,string)void']\n    }>\n    & Record<'mintPayout(uint64,uint64)(uint64,address,uint64,address,uint64)' | 'mintPayout', {\n      argsObj: NfdInstanceArgs['obj']['mintPayout(uint64,uint64)(uint64,address,uint64,address,uint64)']\n      argsTuple: NfdInstanceArgs['tuple']['mintPayout(uint64,uint64)(uint64,address,uint64,address,uint64)']\n      returns: NfdInstanceReturns['mintPayout(uint64,uint64)(uint64,address,uint64,address,uint64)']\n    }>\n    & Record<'purchase(pay)void' | 'purchase', {\n      argsObj: NfdInstanceArgs['obj']['purchase(pay)void']\n      argsTuple: NfdInstanceArgs['tuple']['purchase(pay)void']\n      returns: NfdInstanceReturns['purchase(pay)void']\n    }>\n    & Record<'isAddressInField(string,address)bool' | 'isAddressInField', {\n      argsObj: NfdInstanceArgs['obj']['isAddressInField(string,address)bool']\n      argsTuple: NfdInstanceArgs['tuple']['isAddressInField(string,address)bool']\n      returns: NfdInstanceReturns['isAddressInField(string,address)bool']\n    }>\n    & Record<'getRenewPrice()uint64' | 'getRenewPrice', {\n      argsObj: NfdInstanceArgs['obj']['getRenewPrice()uint64']\n      argsTuple: NfdInstanceArgs['tuple']['getRenewPrice()uint64']\n      returns: NfdInstanceReturns['getRenewPrice()uint64']\n    }>\n    & Record<'updateHash(byte[])void' | 'updateHash', {\n      argsObj: NfdInstanceArgs['obj']['updateHash(byte[])void']\n      argsTuple: NfdInstanceArgs['tuple']['updateHash(byte[])void']\n      returns: NfdInstanceReturns['updateHash(byte[])void']\n    }>\n    & Record<'contractLock(bool)void' | 'contractLock', {\n      argsObj: NfdInstanceArgs['obj']['contractLock(bool)void']\n      argsTuple: NfdInstanceArgs['tuple']['contractLock(bool)void']\n      returns: NfdInstanceReturns['contractLock(bool)void']\n    }>\n    & Record<'segmentLock(bool,uint64)void' | 'segmentLock', {\n      argsObj: NfdInstanceArgs['obj']['segmentLock(bool,uint64)void']\n      argsTuple: NfdInstanceArgs['tuple']['segmentLock(bool,uint64)void']\n      returns: NfdInstanceReturns['segmentLock(bool,uint64)void']\n    }>\n    & Record<'vaultOptInLock(bool)void' | 'vaultOptInLock', {\n      argsObj: NfdInstanceArgs['obj']['vaultOptInLock(bool)void']\n      argsTuple: NfdInstanceArgs['tuple']['vaultOptInLock(bool)void']\n      returns: NfdInstanceReturns['vaultOptInLock(bool)void']\n    }>\n    & Record<'vaultOptIn(uint64[])void' | 'vaultOptIn', {\n      argsObj: NfdInstanceArgs['obj']['vaultOptIn(uint64[])void']\n      argsTuple: NfdInstanceArgs['tuple']['vaultOptIn(uint64[])void']\n      returns: NfdInstanceReturns['vaultOptIn(uint64[])void']\n    }>\n    & Record<'vaultSend(uint64,address,string,uint64,uint64[])void' | 'vaultSend', {\n      argsObj: NfdInstanceArgs['obj']['vaultSend(uint64,address,string,uint64,uint64[])void']\n      argsTuple: NfdInstanceArgs['tuple']['vaultSend(uint64,address,string,uint64,uint64[])void']\n      returns: NfdInstanceReturns['vaultSend(uint64,address,string,uint64,uint64[])void']\n    }>\n    & Record<'renew(pay)void' | 'renew', {\n      argsObj: NfdInstanceArgs['obj']['renew(pay)void']\n      argsTuple: NfdInstanceArgs['tuple']['renew(pay)void']\n      returns: NfdInstanceReturns['renew(pay)void']\n    }>\n    & Record<'setPrimaryAddress(string,address)void' | 'setPrimaryAddress', {\n      argsObj: NfdInstanceArgs['obj']['setPrimaryAddress(string,address)void']\n      argsTuple: NfdInstanceArgs['tuple']['setPrimaryAddress(string,address)void']\n      returns: NfdInstanceReturns['setPrimaryAddress(string,address)void']\n    }>\n    & Record<'registryAddingVerifiedAddress(string,string)bool' | 'registryAddingVerifiedAddress', {\n      argsObj: NfdInstanceArgs['obj']['registryAddingVerifiedAddress(string,string)bool']\n      argsTuple: NfdInstanceArgs['tuple']['registryAddingVerifiedAddress(string,string)bool']\n      /**\n       * true if added or already present, false otherwise\n       */\n      returns: NfdInstanceReturns['registryAddingVerifiedAddress(string,string)bool']\n    }>\n    & Record<'registryRemovingVerifiedAddress(string,address,address)bool' | 'registryRemovingVerifiedAddress', {\n      argsObj: NfdInstanceArgs['obj']['registryRemovingVerifiedAddress(string,address,address)bool']\n      argsTuple: NfdInstanceArgs['tuple']['registryRemovingVerifiedAddress(string,address,address)bool']\n      returns: NfdInstanceReturns['registryRemovingVerifiedAddress(string,address,address)bool']\n    }>\n  /**\n   * Defines the shape of the state of the application.\n   */\n  state: {\n    global: {\n      keys: {}\n      maps: {\n        globalState: Map<Uint8Array | string, Uint8Array>\n      }\n    }\n    box: {\n      keys: {}\n      maps: {\n        boxes: Map<Uint8Array | string, Uint8Array>\n      }\n    }\n  }\n}\n\n/**\n * Defines the possible abi call signatures.\n */\nexport type NfdInstanceSignatures = keyof NfdInstanceTypes['methods']\n/**\n * Defines the possible abi call signatures for methods that return a non-void value.\n */\nexport type NfdInstanceNonVoidMethodSignatures = keyof NfdInstanceTypes['methods'] extends infer T ? T extends keyof NfdInstanceTypes['methods'] ? MethodReturn<T> extends void ? never : T  : never : never\n/**\n * Defines an object containing all relevant parameters for a single call to the contract.\n */\nexport type CallParams<TArgs> = Expand<\n  Omit<AppClientMethodCallParams, 'method' | 'args' | 'onComplete'> &\n    {\n      /** The args for the ABI method call, either as an ordered array or an object */\n      args: Expand<TArgs>\n    }\n>\n/**\n * Maps a method signature from the NfdInstance smart contract to the method's arguments in either tuple or struct form\n */\nexport type MethodArgs<TSignature extends NfdInstanceSignatures> = NfdInstanceTypes['methods'][TSignature]['argsObj' | 'argsTuple']\n/**\n * Maps a method signature from the NfdInstance smart contract to the method's return type\n */\nexport type MethodReturn<TSignature extends NfdInstanceSignatures> = NfdInstanceTypes['methods'][TSignature]['returns']\n\n/**\n * Defines the shape of the keyed global state of the application.\n */\nexport type GlobalKeysState = NfdInstanceTypes['state']['global']['keys']\n\n/**\n * Defines the shape of the keyed box state of the application.\n */\nexport type BoxKeysState = NfdInstanceTypes['state']['box']['keys']\n\n\n/**\n * Defines supported create method params for this smart contract\n */\nexport type NfdInstanceCreateCallParams =\n  | Expand<CallParams<NfdInstanceArgs['obj']['createApplication(string,address,address,uint64,uint64,address,uint64,address,uint64,uint64,address)void'] | NfdInstanceArgs['tuple']['createApplication(string,address,address,uint64,uint64,address,uint64,address,uint64,uint64,address)void']> & {method: 'createApplication'} & {onComplete?: OnApplicationComplete.NoOpOC} & CreateSchema>\n  | Expand<CallParams<NfdInstanceArgs['obj']['createApplication(string,address,address,uint64,uint64,address,uint64,address,uint64,uint64,address)void'] | NfdInstanceArgs['tuple']['createApplication(string,address,address,uint64,uint64,address,uint64,address,uint64,uint64,address)void']> & {method: 'createApplication(string,address,address,uint64,uint64,address,uint64,address,uint64,uint64,address)void'} & {onComplete?: OnApplicationComplete.NoOpOC} & CreateSchema>\n/**\n * Defines supported update method params for this smart contract\n */\nexport type NfdInstanceUpdateCallParams =\n  | Expand<CallParams<NfdInstanceArgs['obj']['updateApplication(string)void'] | NfdInstanceArgs['tuple']['updateApplication(string)void']> & {method: 'updateApplication'}>\n  | Expand<CallParams<NfdInstanceArgs['obj']['updateApplication(string)void'] | NfdInstanceArgs['tuple']['updateApplication(string)void']> & {method: 'updateApplication(string)void'}>\n/**\n * Defines arguments required for the deploy method.\n */\nexport type NfdInstanceDeployParams = Expand<Omit<AppFactoryDeployParams, 'createParams' | 'updateParams' | 'deleteParams'> & {\n  /**\n   * Create transaction parameters to use if a create needs to be issued as part of deployment; use `method` to define ABI call (if available) or leave out for a bare call (if available)\n   */\n  createParams?: NfdInstanceCreateCallParams\n  /**\n   * Update transaction parameters to use if a create needs to be issued as part of deployment; use `method` to define ABI call (if available) or leave out for a bare call (if available)\n   */\n  updateParams?: NfdInstanceUpdateCallParams\n}>\n\n\n/**\n * Exposes methods for constructing `AppClient` params objects for ABI calls to the NfdInstance smart contract\n */\nexport abstract class NfdInstanceParamsFactory {\n  /**\n   * Gets available create ABI call param factories\n   */\n  static get create() {\n    return {\n      _resolveByMethod<TParams extends NfdInstanceCreateCallParams & {method: string}>(params: TParams) {\n        switch(params.method) {\n          case 'createApplication':\n          case 'createApplication(string,address,address,uint64,uint64,address,uint64,address,uint64,uint64,address)void':\n            return NfdInstanceParamsFactory.create.createApplication(params)\n        }\n        throw new Error(`Unknown ' + verb + ' method`)\n      },\n\n      /**\n       * Constructs create ABI call params for the NFDInstance smart contract using the createApplication(string,address,address,uint64,uint64,address,uint64,address,uint64,uint64,address)void ABI method\n       *\n       * @param params Parameters for the call\n       * @returns An `AppClientMethodCallParams` object for the call\n       */\n      createApplication(params: CallParams<NfdInstanceArgs['obj']['createApplication(string,address,address,uint64,uint64,address,uint64,address,uint64,uint64,address)void'] | NfdInstanceArgs['tuple']['createApplication(string,address,address,uint64,uint64,address,uint64,address,uint64,uint64,address)void']> & AppClientCompilationParams & {onComplete?: OnApplicationComplete.NoOpOC}): AppClientMethodCallParams & AppClientCompilationParams & {onComplete?: OnApplicationComplete.NoOpOC} {\n        return {\n          ...params,\n          method: 'createApplication(string,address,address,uint64,uint64,address,uint64,address,uint64,uint64,address)void' as const,\n          args: Array.isArray(params.args) ? params.args : [params.args.nfdName, params.args.seller, params.args.buyer, params.args.purchaseAmount, params.args.expTime, params.args.commission1Addr, params.args.commission1Pct, params.args.commission2Addr, params.args.commission2Pct, params.args.segmentRootAppId, params.args.segmentRootCommissionAddr],\n        }\n      },\n    }\n  }\n\n  /**\n   * Gets available update ABI call param factories\n   */\n  static get update() {\n    return {\n      _resolveByMethod<TParams extends NfdInstanceUpdateCallParams & {method: string}>(params: TParams) {\n        switch(params.method) {\n          case 'updateApplication':\n          case 'updateApplication(string)void':\n            return NfdInstanceParamsFactory.update.updateApplication(params)\n        }\n        throw new Error(`Unknown ' + verb + ' method`)\n      },\n\n      /**\n       * Constructs update ABI call params for the NFDInstance smart contract using the updateApplication(string)void ABI method\n       *\n       * @param params Parameters for the call\n       * @returns An `AppClientMethodCallParams` object for the call\n       */\n      updateApplication(params: CallParams<NfdInstanceArgs['obj']['updateApplication(string)void'] | NfdInstanceArgs['tuple']['updateApplication(string)void']> & AppClientCompilationParams): AppClientMethodCallParams & AppClientCompilationParams {\n        return {\n          ...params,\n          method: 'updateApplication(string)void' as const,\n          args: Array.isArray(params.args) ? params.args : [params.args.versionNum],\n        }\n      },\n    }\n  }\n\n  /**\n   * Constructs a no op call for the gas()void ABI method\n   *\n   * @param params Parameters for the call\n   * @returns An `AppClientMethodCallParams` object for the call\n   */\n  static gas(params: CallParams<NfdInstanceArgs['obj']['gas()void'] | NfdInstanceArgs['tuple']['gas()void']> & CallOnComplete): AppClientMethodCallParams & CallOnComplete {\n    return {\n      ...params,\n      method: 'gas()void' as const,\n      args: Array.isArray(params.args) ? params.args : [],\n    }\n  }\n  /**\n   * Constructs a no op call for the mintAsa(string,string)void ABI method\n   *\n   * @param params Parameters for the call\n   * @returns An `AppClientMethodCallParams` object for the call\n   */\n  static mintAsa(params: CallParams<NfdInstanceArgs['obj']['mintAsa(string,string)void'] | NfdInstanceArgs['tuple']['mintAsa(string,string)void']> & CallOnComplete): AppClientMethodCallParams & CallOnComplete {\n    return {\n      ...params,\n      method: 'mintAsa(string,string)void' as const,\n      args: Array.isArray(params.args) ? params.args : [params.args.nfdName, params.args.url],\n    }\n  }\n  /**\n   * Constructs a no op call for the deleteFields(byte[][])void ABI method\n   *\n   * @param params Parameters for the call\n   * @returns An `AppClientMethodCallParams` object for the call\n   */\n  static deleteFields(params: CallParams<NfdInstanceArgs['obj']['deleteFields(byte[][])void'] | NfdInstanceArgs['tuple']['deleteFields(byte[][])void']> & CallOnComplete): AppClientMethodCallParams & CallOnComplete {\n    return {\n      ...params,\n      method: 'deleteFields(byte[][])void' as const,\n      args: Array.isArray(params.args) ? params.args : [params.args.fieldNames],\n    }\n  }\n  /**\n   * Constructs a no op call for the updateSegmentCount(string,uint64)void ABI method\n   *\n   * @param params Parameters for the call\n   * @returns An `AppClientMethodCallParams` object for the call\n   */\n  static updateSegmentCount(params: CallParams<NfdInstanceArgs['obj']['updateSegmentCount(string,uint64)void'] | NfdInstanceArgs['tuple']['updateSegmentCount(string,uint64)void']> & CallOnComplete): AppClientMethodCallParams & CallOnComplete {\n    return {\n      ...params,\n      method: 'updateSegmentCount(string,uint64)void' as const,\n      args: Array.isArray(params.args) ? params.args : [params.args.childNfdName, params.args.childNfdAppId],\n    }\n  }\n  /**\n   * Constructs a no op call for the getFieldUpdateCost(byte[][])uint64 ABI method\n   *\n   * @param params Parameters for the call\n   * @returns An `AppClientMethodCallParams` object for the call\n   */\n  static getFieldUpdateCost(params: CallParams<NfdInstanceArgs['obj']['getFieldUpdateCost(byte[][])uint64'] | NfdInstanceArgs['tuple']['getFieldUpdateCost(byte[][])uint64']> & CallOnComplete): AppClientMethodCallParams & CallOnComplete {\n    return {\n      ...params,\n      method: 'getFieldUpdateCost(byte[][])uint64' as const,\n      args: Array.isArray(params.args) ? params.args : [params.args.fieldAndVals],\n    }\n  }\n  /**\n   * Constructs a no op call for the updateFields(byte[][])void ABI method\n   *\n   * @param params Parameters for the call\n   * @returns An `AppClientMethodCallParams` object for the call\n   */\n  static updateFields(params: CallParams<NfdInstanceArgs['obj']['updateFields(byte[][])void'] | NfdInstanceArgs['tuple']['updateFields(byte[][])void']> & CallOnComplete): AppClientMethodCallParams & CallOnComplete {\n    return {\n      ...params,\n      method: 'updateFields(byte[][])void' as const,\n      args: Array.isArray(params.args) ? params.args : [params.args.fieldAndVals],\n    }\n  }\n  /**\n   * Constructs a no op call for the readField(byte[])byte[] ABI method\n   *\n   * @param params Parameters for the call\n   * @returns An `AppClientMethodCallParams` object for the call\n   */\n  static readField(params: CallParams<NfdInstanceArgs['obj']['readField(byte[])byte[]'] | NfdInstanceArgs['tuple']['readField(byte[])byte[]']> & CallOnComplete): AppClientMethodCallParams & CallOnComplete {\n    return {\n      ...params,\n      method: 'readField(byte[])byte[]' as const,\n      args: Array.isArray(params.args) ? params.args : [params.args.fieldName],\n    }\n  }\n  /**\n   * Constructs a no op call for the offerForSale(uint64,address)void ABI method\n   *\n   * @param params Parameters for the call\n   * @returns An `AppClientMethodCallParams` object for the call\n   */\n  static offerForSale(params: CallParams<NfdInstanceArgs['obj']['offerForSale(uint64,address)void'] | NfdInstanceArgs['tuple']['offerForSale(uint64,address)void']> & CallOnComplete): AppClientMethodCallParams & CallOnComplete {\n    return {\n      ...params,\n      method: 'offerForSale(uint64,address)void' as const,\n      args: Array.isArray(params.args) ? params.args : [params.args.sellAmount, params.args.reservedFor],\n    }\n  }\n  /**\n   * Constructs a no op call for the cancelSale()void ABI method\n   *\n   * @param params Parameters for the call\n   * @returns An `AppClientMethodCallParams` object for the call\n   */\n  static cancelSale(params: CallParams<NfdInstanceArgs['obj']['cancelSale()void'] | NfdInstanceArgs['tuple']['cancelSale()void']> & CallOnComplete): AppClientMethodCallParams & CallOnComplete {\n    return {\n      ...params,\n      method: 'cancelSale()void' as const,\n      args: Array.isArray(params.args) ? params.args : [],\n    }\n  }\n  /**\n   * Constructs a no op call for the postOffer(uint64,string)void ABI method\n   *\n   * @param params Parameters for the call\n   * @returns An `AppClientMethodCallParams` object for the call\n   */\n  static postOffer(params: CallParams<NfdInstanceArgs['obj']['postOffer(uint64,string)void'] | NfdInstanceArgs['tuple']['postOffer(uint64,string)void']> & CallOnComplete): AppClientMethodCallParams & CallOnComplete {\n    return {\n      ...params,\n      method: 'postOffer(uint64,string)void' as const,\n      args: Array.isArray(params.args) ? params.args : [params.args.offer, params.args.note],\n    }\n  }\n  /**\n   * Constructs a no op call for the mintPayout(uint64,uint64)(uint64,address,uint64,address,uint64) ABI method\n   *\n   * @param params Parameters for the call\n   * @returns An `AppClientMethodCallParams` object for the call\n   */\n  static mintPayout(params: CallParams<NfdInstanceArgs['obj']['mintPayout(uint64,uint64)(uint64,address,uint64,address,uint64)'] | NfdInstanceArgs['tuple']['mintPayout(uint64,uint64)(uint64,address,uint64,address,uint64)']> & CallOnComplete): AppClientMethodCallParams & CallOnComplete {\n    return {\n      ...params,\n      method: 'mintPayout(uint64,uint64)(uint64,address,uint64,address,uint64)' as const,\n      args: Array.isArray(params.args) ? params.args : [params.args.oneYearPrice, params.args.segmentPlatformCostInAlgo],\n    }\n  }\n  /**\n   * Constructs a no op call for the purchase(pay)void ABI method\n   *\n   * @param params Parameters for the call\n   * @returns An `AppClientMethodCallParams` object for the call\n   */\n  static purchase(params: CallParams<NfdInstanceArgs['obj']['purchase(pay)void'] | NfdInstanceArgs['tuple']['purchase(pay)void']> & CallOnComplete): AppClientMethodCallParams & CallOnComplete {\n    return {\n      ...params,\n      method: 'purchase(pay)void' as const,\n      args: Array.isArray(params.args) ? params.args : [params.args.payment],\n    }\n  }\n  /**\n   * Constructs a no op call for the isAddressInField(string,address)bool ABI method\n   *\n   * @param params Parameters for the call\n   * @returns An `AppClientMethodCallParams` object for the call\n   */\n  static isAddressInField(params: CallParams<NfdInstanceArgs['obj']['isAddressInField(string,address)bool'] | NfdInstanceArgs['tuple']['isAddressInField(string,address)bool']> & CallOnComplete): AppClientMethodCallParams & CallOnComplete {\n    return {\n      ...params,\n      method: 'isAddressInField(string,address)bool' as const,\n      args: Array.isArray(params.args) ? params.args : [params.args.fieldName, params.args.address],\n    }\n  }\n  /**\n   * Constructs a no op call for the getRenewPrice()uint64 ABI method\n   *\n   * @param params Parameters for the call\n   * @returns An `AppClientMethodCallParams` object for the call\n   */\n  static getRenewPrice(params: CallParams<NfdInstanceArgs['obj']['getRenewPrice()uint64'] | NfdInstanceArgs['tuple']['getRenewPrice()uint64']> & CallOnComplete): AppClientMethodCallParams & CallOnComplete {\n    return {\n      ...params,\n      method: 'getRenewPrice()uint64' as const,\n      args: Array.isArray(params.args) ? params.args : [],\n    }\n  }\n  /**\n   * Constructs a no op call for the updateHash(byte[])void ABI method\n   *\n   * @param params Parameters for the call\n   * @returns An `AppClientMethodCallParams` object for the call\n   */\n  static updateHash(params: CallParams<NfdInstanceArgs['obj']['updateHash(byte[])void'] | NfdInstanceArgs['tuple']['updateHash(byte[])void']> & CallOnComplete): AppClientMethodCallParams & CallOnComplete {\n    return {\n      ...params,\n      method: 'updateHash(byte[])void' as const,\n      args: Array.isArray(params.args) ? params.args : [params.args.hash],\n    }\n  }\n  /**\n   * Constructs a no op call for the contractLock(bool)void ABI method\n   *\n   * @param params Parameters for the call\n   * @returns An `AppClientMethodCallParams` object for the call\n   */\n  static contractLock(params: CallParams<NfdInstanceArgs['obj']['contractLock(bool)void'] | NfdInstanceArgs['tuple']['contractLock(bool)void']> & CallOnComplete): AppClientMethodCallParams & CallOnComplete {\n    return {\n      ...params,\n      method: 'contractLock(bool)void' as const,\n      args: Array.isArray(params.args) ? params.args : [params.args.lock],\n    }\n  }\n  /**\n   * Constructs a no op call for the segmentLock(bool,uint64)void ABI method\n   *\n   * @param params Parameters for the call\n   * @returns An `AppClientMethodCallParams` object for the call\n   */\n  static segmentLock(params: CallParams<NfdInstanceArgs['obj']['segmentLock(bool,uint64)void'] | NfdInstanceArgs['tuple']['segmentLock(bool,uint64)void']> & CallOnComplete): AppClientMethodCallParams & CallOnComplete {\n    return {\n      ...params,\n      method: 'segmentLock(bool,uint64)void' as const,\n      args: Array.isArray(params.args) ? params.args : [params.args.lock, params.args.usdPrice],\n    }\n  }\n  /**\n   * Constructs a no op call for the vaultOptInLock(bool)void ABI method\n   *\n   * @param params Parameters for the call\n   * @returns An `AppClientMethodCallParams` object for the call\n   */\n  static vaultOptInLock(params: CallParams<NfdInstanceArgs['obj']['vaultOptInLock(bool)void'] | NfdInstanceArgs['tuple']['vaultOptInLock(bool)void']> & CallOnComplete): AppClientMethodCallParams & CallOnComplete {\n    return {\n      ...params,\n      method: 'vaultOptInLock(bool)void' as const,\n      args: Array.isArray(params.args) ? params.args : [params.args.lock],\n    }\n  }\n  /**\n   * Constructs a no op call for the vaultOptIn(uint64[])void ABI method\n   *\n   * @param params Parameters for the call\n   * @returns An `AppClientMethodCallParams` object for the call\n   */\n  static vaultOptIn(params: CallParams<NfdInstanceArgs['obj']['vaultOptIn(uint64[])void'] | NfdInstanceArgs['tuple']['vaultOptIn(uint64[])void']> & CallOnComplete): AppClientMethodCallParams & CallOnComplete {\n    return {\n      ...params,\n      method: 'vaultOptIn(uint64[])void' as const,\n      args: Array.isArray(params.args) ? params.args : [params.args.assets],\n    }\n  }\n  /**\n   * Constructs a no op call for the vaultSend(uint64,address,string,uint64,uint64[])void ABI method\n   *\n   * @param params Parameters for the call\n   * @returns An `AppClientMethodCallParams` object for the call\n   */\n  static vaultSend(params: CallParams<NfdInstanceArgs['obj']['vaultSend(uint64,address,string,uint64,uint64[])void'] | NfdInstanceArgs['tuple']['vaultSend(uint64,address,string,uint64,uint64[])void']> & CallOnComplete): AppClientMethodCallParams & CallOnComplete {\n    return {\n      ...params,\n      method: 'vaultSend(uint64,address,string,uint64,uint64[])void' as const,\n      args: Array.isArray(params.args) ? params.args : [params.args.amount, params.args.receiver, params.args.note, params.args.asset, params.args.otherAssets],\n    }\n  }\n  /**\n   * Constructs a no op call for the renew(pay)void ABI method\n   *\n  * Renew adds more time to an existing NFDs expiration, or renews it if expired.\n  \n  \n  As part of v2-v3 upgrade, the NFDs are converted from lifetime NFDs to renewal NFDs. The v2 contract is upgraded\n  to v3, then renew is called on the (now v3) nfd to turn it into a renewal (note the if curExpiration === 0 check)\n  \n  \n  If already renewal, then it extends the current expiration time by the time specified (minimum 1 yr) (365 / price paid * mint price)\n  Expirations can never be more than NFD_MAX_EXPIRATION_DAYS days in the future.\n  \n  \n  IF the NFD is expired:\n     x The current owner can take it back over at base price - and NFD metadata doesn't have to be cleared - they\n     get it back as-is.\n     x If not current owner, then the price goes from high of base price * 10,000 down to base price over 24 hrs where\n     'buyer' has to pay at least that price.  The NFD MUST ALREADY HAVE ITS METADATA CLEARED!\n\n   *\n   * @param params Parameters for the call\n   * @returns An `AppClientMethodCallParams` object for the call\n   */\n  static renew(params: CallParams<NfdInstanceArgs['obj']['renew(pay)void'] | NfdInstanceArgs['tuple']['renew(pay)void']> & CallOnComplete): AppClientMethodCallParams & CallOnComplete {\n    return {\n      ...params,\n      method: 'renew(pay)void' as const,\n      args: Array.isArray(params.args) ? params.args : [params.args.payment],\n    }\n  }\n  /**\n   * Constructs a no op call for the setPrimaryAddress(string,address)void ABI method\n   *\n   * @param params Parameters for the call\n   * @returns An `AppClientMethodCallParams` object for the call\n   */\n  static setPrimaryAddress(params: CallParams<NfdInstanceArgs['obj']['setPrimaryAddress(string,address)void'] | NfdInstanceArgs['tuple']['setPrimaryAddress(string,address)void']> & CallOnComplete): AppClientMethodCallParams & CallOnComplete {\n    return {\n      ...params,\n      method: 'setPrimaryAddress(string,address)void' as const,\n      args: Array.isArray(params.args) ? params.args : [params.args.fieldName, params.args.address],\n    }\n  }\n  /**\n   * Constructs a no op call for the registryAddingVerifiedAddress(string,string)bool ABI method\n   *\n  * Approved call from registry instructing us to move the specified u.cav.xx field and add to the specified\n  verified field.\n\n   *\n   * @param params Parameters for the call\n   * @returns An `AppClientMethodCallParams` object for the call\n   */\n  static registryAddingVerifiedAddress(params: CallParams<NfdInstanceArgs['obj']['registryAddingVerifiedAddress(string,string)bool'] | NfdInstanceArgs['tuple']['registryAddingVerifiedAddress(string,string)bool']> & CallOnComplete): AppClientMethodCallParams & CallOnComplete {\n    return {\n      ...params,\n      method: 'registryAddingVerifiedAddress(string,string)bool' as const,\n      args: Array.isArray(params.args) ? params.args : [params.args.fieldBeingVerified, params.args.fieldSetName],\n    }\n  }\n  /**\n   * Constructs a no op call for the registryRemovingVerifiedAddress(string,address,address)bool ABI method\n   *\n   * Approved call from registry instructing us to REMOVE an address from the specified verified address set\n   *\n   * @param params Parameters for the call\n   * @returns An `AppClientMethodCallParams` object for the call\n   */\n  static registryRemovingVerifiedAddress(params: CallParams<NfdInstanceArgs['obj']['registryRemovingVerifiedAddress(string,address,address)bool'] | NfdInstanceArgs['tuple']['registryRemovingVerifiedAddress(string,address,address)bool']> & CallOnComplete): AppClientMethodCallParams & CallOnComplete {\n    return {\n      ...params,\n      method: 'registryRemovingVerifiedAddress(string,address,address)bool' as const,\n      args: Array.isArray(params.args) ? params.args : [params.args.fieldBeingChanged, params.args.address, params.args.mbrRefundDest],\n    }\n  }\n}\n\n/**\n * A factory to create and deploy one or more instance of the NFDInstance smart contract and to create one or more app clients to interact with those (or other) app instances\n */\nexport class NfdInstanceFactory {\n  /**\n   * The underlying `AppFactory` for when you want to have more flexibility\n   */\n  public readonly appFactory: _AppFactory\n\n  /**\n   * Creates a new instance of `NfdInstanceFactory`\n   *\n   * @param params The parameters to initialise the app factory with\n   */\n  constructor(params: Omit<AppFactoryParams, 'appSpec'>) {\n    this.appFactory = new _AppFactory({\n      ...params,\n      appSpec: APP_SPEC,\n    })\n  }\n  \n  /** The name of the app (from the ARC-32 / ARC-56 app spec or override). */\n  public get appName() {\n    return this.appFactory.appName\n  }\n  \n  /** The ARC-56 app spec being used */\n  get appSpec() {\n    return APP_SPEC\n  }\n  \n  /** A reference to the underlying `AlgorandClient` this app factory is using. */\n  public get algorand(): AlgorandClientInterface {\n    return this.appFactory.algorand\n  }\n  \n  /**\n   * Returns a new `AppClient` client for an app instance of the given ID.\n   *\n   * Automatically populates appName, defaultSender and source maps from the factory\n   * if not specified in the params.\n   * @param params The parameters to create the app client\n   * @returns The `AppClient`\n   */\n  public getAppClientById(params: AppFactoryAppClientParams) {\n    return new NfdInstanceClient(this.appFactory.getAppClientById(params))\n  }\n  \n  /**\n   * Returns a new `AppClient` client, resolving the app by creator address and name\n   * using AlgoKit app deployment semantics (i.e. looking for the app creation transaction note).\n   *\n   * Automatically populates appName, defaultSender and source maps from the factory\n   * if not specified in the params.\n   * @param params The parameters to create the app client\n   * @returns The `AppClient`\n   */\n  public async getAppClientByCreatorAndName(\n    params: AppFactoryResolveAppClientByCreatorAndNameParams,\n  ) {\n    return new NfdInstanceClient(await this.appFactory.getAppClientByCreatorAndName(params))\n  }\n\n  /**\n   * Idempotently deploys the NFDInstance smart contract.\n   *\n   * @param params The arguments for the contract calls and any additional parameters for the call\n   * @returns The deployment result\n   */\n  public async deploy(params: NfdInstanceDeployParams = {}) {\n    const result = await this.appFactory.deploy({\n      ...params,\n      createParams: params.createParams?.method ? NfdInstanceParamsFactory.create._resolveByMethod(params.createParams) : params.createParams ? params.createParams as (NfdInstanceCreateCallParams & { args: Uint8Array[] }) : undefined,\n      updateParams: params.updateParams?.method ? NfdInstanceParamsFactory.update._resolveByMethod(params.updateParams) : params.updateParams ? params.updateParams as (NfdInstanceUpdateCallParams & { args: Uint8Array[] }) : undefined,\n    })\n    return { result: result.result, appClient: new NfdInstanceClient(result.appClient) }\n  }\n\n  /**\n   * Get parameters to create transactions (create and deploy related calls) for the current app. A good mental model for this is that these parameters represent a deferred transaction creation.\n   */\n  readonly params = {\n    /**\n     * Gets available create methods\n     */\n    create: {\n      /**\n       * Creates a new instance of the NFDInstance smart contract using the createApplication(string,address,address,uint64,uint64,address,uint64,address,uint64,uint64,address)void ABI method.\n       *\n       * @param params The params for the smart contract call\n       * @returns The create params\n       */\n      createApplication: (params: CallParams<NfdInstanceArgs['obj']['createApplication(string,address,address,uint64,uint64,address,uint64,address,uint64,uint64,address)void'] | NfdInstanceArgs['tuple']['createApplication(string,address,address,uint64,uint64,address,uint64,address,uint64,uint64,address)void']> & AppClientCompilationParams & CreateSchema & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n        return this.appFactory.params.create(NfdInstanceParamsFactory.create.createApplication(params))\n      },\n    },\n\n    /**\n     * Gets available deployUpdate methods\n     */\n    deployUpdate: {\n      /**\n       * Updates an existing instance of the NFDInstance smart contract using the updateApplication(string)void ABI method.\n       *\n       * @param params The params for the smart contract call\n       * @returns The deployUpdate params\n       */\n      updateApplication: (params: CallParams<NfdInstanceArgs['obj']['updateApplication(string)void'] | NfdInstanceArgs['tuple']['updateApplication(string)void']> & AppClientCompilationParams) => {\n        return this.appFactory.params.deployUpdate(NfdInstanceParamsFactory.update.updateApplication(params))\n      },\n    },\n\n  }\n\n  /**\n   * Create transactions for the current app\n   */\n  readonly createTransaction = {\n    /**\n     * Gets available create methods\n     */\n    create: {\n      /**\n       * Creates a new instance of the NFDInstance smart contract using the createApplication(string,address,address,uint64,uint64,address,uint64,address,uint64,uint64,address)void ABI method.\n       *\n       * @param params The params for the smart contract call\n       * @returns The create transaction\n       */\n      createApplication: (params: CallParams<NfdInstanceArgs['obj']['createApplication(string,address,address,uint64,uint64,address,uint64,address,uint64,uint64,address)void'] | NfdInstanceArgs['tuple']['createApplication(string,address,address,uint64,uint64,address,uint64,address,uint64,uint64,address)void']> & AppClientCompilationParams & CreateSchema & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n        return this.appFactory.createTransaction.create(NfdInstanceParamsFactory.create.createApplication(params))\n      },\n    },\n\n  }\n\n  /**\n   * Send calls to the current app\n   */\n  readonly send = {\n    /**\n     * Gets available create methods\n     */\n    create: {\n      /**\n       * Creates a new instance of the NFDInstance smart contract using an ABI method call using the createApplication(string,address,address,uint64,uint64,address,uint64,address,uint64,uint64,address)void ABI method.\n       *\n       * @param params The params for the smart contract call\n       * @returns The create result\n       */\n      createApplication: async (params: CallParams<NfdInstanceArgs['obj']['createApplication(string,address,address,uint64,uint64,address,uint64,address,uint64,uint64,address)void'] | NfdInstanceArgs['tuple']['createApplication(string,address,address,uint64,uint64,address,uint64,address,uint64,uint64,address)void']> & AppClientCompilationParams & CreateSchema & SendParams & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n        const result = await this.appFactory.send.create(NfdInstanceParamsFactory.create.createApplication(params))\n        return { result: { ...result.result, return: result.result.return as unknown as (undefined | NfdInstanceReturns['createApplication(string,address,address,uint64,uint64,address,uint64,address,uint64,uint64,address)void']) }, appClient: new NfdInstanceClient(result.appClient) }\n      },\n    },\n\n  }\n\n}\n/**\n * A client to make calls to the NFDInstance smart contract\n */\nexport class NfdInstanceClient {\n  /**\n   * The underlying `AppClient` for when you want to have more flexibility\n   */\n  public readonly appClient: _AppClient\n\n  /**\n   * Creates a new instance of `NfdInstanceClient`\n   *\n   * @param appClient An `AppClient` instance which has been created with the NfdInstance app spec\n   */\n  constructor(appClient: _AppClient)\n  /**\n   * Creates a new instance of `NfdInstanceClient`\n   *\n   * @param params The parameters to initialise the app client with\n   */\n  constructor(params: Omit<AppClientParams, 'appSpec'>)\n  constructor(appClientOrParams: _AppClient | Omit<AppClientParams, 'appSpec'>) {\n    this.appClient = appClientOrParams instanceof _AppClient ? appClientOrParams : new _AppClient({\n      ...appClientOrParams,\n      appSpec: APP_SPEC,\n    })\n  }\n  \n  /**\n   * Checks for decode errors on the given return value and maps the return value to the return type for the given method\n   * @returns The typed return value or undefined if there was no value\n   */\n  decodeReturnValue<TSignature extends NfdInstanceNonVoidMethodSignatures>(method: TSignature, returnValue: ABIReturn | undefined) {\n    return returnValue !== undefined ? getArc56ReturnValue<MethodReturn<TSignature>>(returnValue, this.appClient.getABIMethod(method), APP_SPEC.structs) : undefined\n  }\n  \n  /**\n   * Returns a new `NfdInstanceClient` client, resolving the app by creator address and name\n   * using AlgoKit app deployment semantics (i.e. looking for the app creation transaction note).\n   * @param params The parameters to create the app client\n   */\n  public static async fromCreatorAndName(params: Omit<ResolveAppClientByCreatorAndName, 'appSpec'>): Promise<NfdInstanceClient> {\n    return new NfdInstanceClient(await _AppClient.fromCreatorAndName({...params, appSpec: APP_SPEC}))\n  }\n  \n  /**\n   * Returns an `NfdInstanceClient` instance for the current network based on\n   * pre-determined network-specific app IDs specified in the ARC-56 app spec.\n   *\n   * If no IDs are in the app spec or the network isn't recognised, an error is thrown.\n   * @param params The parameters to create the app client\n   */\n  static async fromNetwork(\n    params: Omit<ResolveAppClientByNetwork, 'appSpec'>\n  ): Promise<NfdInstanceClient> {\n    return new NfdInstanceClient(await _AppClient.fromNetwork({...params, appSpec: APP_SPEC}))\n  }\n  \n  /** The ID of the app instance this client is linked to. */\n  public get appId() {\n    return this.appClient.appId\n  }\n  \n  /** The app address of the app instance this client is linked to. */\n  public get appAddress() {\n    return this.appClient.appAddress\n  }\n  \n  /** The name of the app. */\n  public get appName() {\n    return this.appClient.appName\n  }\n  \n  /** The ARC-56 app spec being used */\n  public get appSpec() {\n    return this.appClient.appSpec\n  }\n  \n  /** A reference to the underlying `AlgorandClient` this app client is using. */\n  public get algorand(): AlgorandClientInterface {\n    return this.appClient.algorand\n  }\n\n  /**\n   * Get parameters to create transactions for the current app. A good mental model for this is that these parameters represent a deferred transaction creation.\n   */\n  readonly params = {\n    /**\n     * Gets available update methods\n     */\n    update: {\n      /**\n       * Updates an existing instance of the NFDInstance smart contract using the `updateApplication(string)void` ABI method.\n       *\n       * @param params The params for the smart contract call\n       * @returns The update params\n       */\n      updateApplication: (params: CallParams<NfdInstanceArgs['obj']['updateApplication(string)void'] | NfdInstanceArgs['tuple']['updateApplication(string)void']> & AppClientCompilationParams) => {\n        return this.appClient.params.update(NfdInstanceParamsFactory.update.updateApplication(params))\n      },\n\n    },\n\n    /**\n     * Makes a clear_state call to an existing instance of the NFDInstance smart contract.\n     *\n     * @param params The params for the bare (raw) call\n     * @returns The clearState result\n     */\n    clearState: (params?: Expand<AppClientBareCallParams>) => {\n      return this.appClient.params.bare.clearState(params)\n    },\n\n    /**\n     * Makes a call to the NFDInstance smart contract using the `gas()void` ABI method.\n     *\n     * @param params The params for the smart contract call\n     * @returns The call params\n     */\n    gas: (params: CallParams<NfdInstanceArgs['obj']['gas()void'] | NfdInstanceArgs['tuple']['gas()void']> & {onComplete?: OnApplicationComplete.NoOpOC} = {args: []}) => {\n      return this.appClient.params.call(NfdInstanceParamsFactory.gas(params))\n    },\n\n    /**\n     * Makes a call to the NFDInstance smart contract using the `mintAsa(string,string)void` ABI method.\n     *\n     * @param params The params for the smart contract call\n     * @returns The call params\n     */\n    mintAsa: (params: CallParams<NfdInstanceArgs['obj']['mintAsa(string,string)void'] | NfdInstanceArgs['tuple']['mintAsa(string,string)void']> & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      return this.appClient.params.call(NfdInstanceParamsFactory.mintAsa(params))\n    },\n\n    /**\n     * Makes a call to the NFDInstance smart contract using the `deleteFields(byte[][])void` ABI method.\n     *\n     * @param params The params for the smart contract call\n     * @returns The call params\n     */\n    deleteFields: (params: CallParams<NfdInstanceArgs['obj']['deleteFields(byte[][])void'] | NfdInstanceArgs['tuple']['deleteFields(byte[][])void']> & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      return this.appClient.params.call(NfdInstanceParamsFactory.deleteFields(params))\n    },\n\n    /**\n     * Makes a call to the NFDInstance smart contract using the `updateSegmentCount(string,uint64)void` ABI method.\n     *\n     * @param params The params for the smart contract call\n     * @returns The call params\n     */\n    updateSegmentCount: (params: CallParams<NfdInstanceArgs['obj']['updateSegmentCount(string,uint64)void'] | NfdInstanceArgs['tuple']['updateSegmentCount(string,uint64)void']> & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      return this.appClient.params.call(NfdInstanceParamsFactory.updateSegmentCount(params))\n    },\n\n    /**\n     * Makes a call to the NFDInstance smart contract using the `getFieldUpdateCost(byte[][])uint64` ABI method.\n     * \n     * This method is a readonly method; calling it with onComplete of NoOp will result in a simulated transaction rather than a real transaction.\n     *\n     * @param params The params for the smart contract call\n     * @returns The call params\n     */\n    getFieldUpdateCost: (params: CallParams<NfdInstanceArgs['obj']['getFieldUpdateCost(byte[][])uint64'] | NfdInstanceArgs['tuple']['getFieldUpdateCost(byte[][])uint64']> & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      return this.appClient.params.call(NfdInstanceParamsFactory.getFieldUpdateCost(params))\n    },\n\n    /**\n     * Makes a call to the NFDInstance smart contract using the `updateFields(byte[][])void` ABI method.\n     *\n     * @param params The params for the smart contract call\n     * @returns The call params\n     */\n    updateFields: (params: CallParams<NfdInstanceArgs['obj']['updateFields(byte[][])void'] | NfdInstanceArgs['tuple']['updateFields(byte[][])void']> & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      return this.appClient.params.call(NfdInstanceParamsFactory.updateFields(params))\n    },\n\n    /**\n     * Makes a call to the NFDInstance smart contract using the `readField(byte[])byte[]` ABI method.\n     * \n     * This method is a readonly method; calling it with onComplete of NoOp will result in a simulated transaction rather than a real transaction.\n     *\n     * @param params The params for the smart contract call\n     * @returns The call params\n     */\n    readField: (params: CallParams<NfdInstanceArgs['obj']['readField(byte[])byte[]'] | NfdInstanceArgs['tuple']['readField(byte[])byte[]']> & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      return this.appClient.params.call(NfdInstanceParamsFactory.readField(params))\n    },\n\n    /**\n     * Makes a call to the NFDInstance smart contract using the `offerForSale(uint64,address)void` ABI method.\n     *\n     * @param params The params for the smart contract call\n     * @returns The call params\n     */\n    offerForSale: (params: CallParams<NfdInstanceArgs['obj']['offerForSale(uint64,address)void'] | NfdInstanceArgs['tuple']['offerForSale(uint64,address)void']> & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      return this.appClient.params.call(NfdInstanceParamsFactory.offerForSale(params))\n    },\n\n    /**\n     * Makes a call to the NFDInstance smart contract using the `cancelSale()void` ABI method.\n     *\n     * @param params The params for the smart contract call\n     * @returns The call params\n     */\n    cancelSale: (params: CallParams<NfdInstanceArgs['obj']['cancelSale()void'] | NfdInstanceArgs['tuple']['cancelSale()void']> & {onComplete?: OnApplicationComplete.NoOpOC} = {args: []}) => {\n      return this.appClient.params.call(NfdInstanceParamsFactory.cancelSale(params))\n    },\n\n    /**\n     * Makes a call to the NFDInstance smart contract using the `postOffer(uint64,string)void` ABI method.\n     *\n     * @param params The params for the smart contract call\n     * @returns The call params\n     */\n    postOffer: (params: CallParams<NfdInstanceArgs['obj']['postOffer(uint64,string)void'] | NfdInstanceArgs['tuple']['postOffer(uint64,string)void']> & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      return this.appClient.params.call(NfdInstanceParamsFactory.postOffer(params))\n    },\n\n    /**\n     * Makes a call to the NFDInstance smart contract using the `mintPayout(uint64,uint64)(uint64,address,uint64,address,uint64)` ABI method.\n     *\n     * @param params The params for the smart contract call\n     * @returns The call params\n     */\n    mintPayout: (params: CallParams<NfdInstanceArgs['obj']['mintPayout(uint64,uint64)(uint64,address,uint64,address,uint64)'] | NfdInstanceArgs['tuple']['mintPayout(uint64,uint64)(uint64,address,uint64,address,uint64)']> & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      return this.appClient.params.call(NfdInstanceParamsFactory.mintPayout(params))\n    },\n\n    /**\n     * Makes a call to the NFDInstance smart contract using the `purchase(pay)void` ABI method.\n     *\n     * @param params The params for the smart contract call\n     * @returns The call params\n     */\n    purchase: (params: CallParams<NfdInstanceArgs['obj']['purchase(pay)void'] | NfdInstanceArgs['tuple']['purchase(pay)void']> & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      return this.appClient.params.call(NfdInstanceParamsFactory.purchase(params))\n    },\n\n    /**\n     * Makes a call to the NFDInstance smart contract using the `isAddressInField(string,address)bool` ABI method.\n     * \n     * This method is a readonly method; calling it with onComplete of NoOp will result in a simulated transaction rather than a real transaction.\n     *\n     * @param params The params for the smart contract call\n     * @returns The call params\n     */\n    isAddressInField: (params: CallParams<NfdInstanceArgs['obj']['isAddressInField(string,address)bool'] | NfdInstanceArgs['tuple']['isAddressInField(string,address)bool']> & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      return this.appClient.params.call(NfdInstanceParamsFactory.isAddressInField(params))\n    },\n\n    /**\n     * Makes a call to the NFDInstance smart contract using the `getRenewPrice()uint64` ABI method.\n     * \n     * This method is a readonly method; calling it with onComplete of NoOp will result in a simulated transaction rather than a real transaction.\n     *\n     * @param params The params for the smart contract call\n     * @returns The call params\n     */\n    getRenewPrice: (params: CallParams<NfdInstanceArgs['obj']['getRenewPrice()uint64'] | NfdInstanceArgs['tuple']['getRenewPrice()uint64']> & {onComplete?: OnApplicationComplete.NoOpOC} = {args: []}) => {\n      return this.appClient.params.call(NfdInstanceParamsFactory.getRenewPrice(params))\n    },\n\n    /**\n     * Makes a call to the NFDInstance smart contract using the `updateHash(byte[])void` ABI method.\n     *\n     * @param params The params for the smart contract call\n     * @returns The call params\n     */\n    updateHash: (params: CallParams<NfdInstanceArgs['obj']['updateHash(byte[])void'] | NfdInstanceArgs['tuple']['updateHash(byte[])void']> & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      return this.appClient.params.call(NfdInstanceParamsFactory.updateHash(params))\n    },\n\n    /**\n     * Makes a call to the NFDInstance smart contract using the `contractLock(bool)void` ABI method.\n     *\n     * @param params The params for the smart contract call\n     * @returns The call params\n     */\n    contractLock: (params: CallParams<NfdInstanceArgs['obj']['contractLock(bool)void'] | NfdInstanceArgs['tuple']['contractLock(bool)void']> & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      return this.appClient.params.call(NfdInstanceParamsFactory.contractLock(params))\n    },\n\n    /**\n     * Makes a call to the NFDInstance smart contract using the `segmentLock(bool,uint64)void` ABI method.\n     *\n     * @param params The params for the smart contract call\n     * @returns The call params\n     */\n    segmentLock: (params: CallParams<NfdInstanceArgs['obj']['segmentLock(bool,uint64)void'] | NfdInstanceArgs['tuple']['segmentLock(bool,uint64)void']> & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      return this.appClient.params.call(NfdInstanceParamsFactory.segmentLock(params))\n    },\n\n    /**\n     * Makes a call to the NFDInstance smart contract using the `vaultOptInLock(bool)void` ABI method.\n     *\n     * @param params The params for the smart contract call\n     * @returns The call params\n     */\n    vaultOptInLock: (params: CallParams<NfdInstanceArgs['obj']['vaultOptInLock(bool)void'] | NfdInstanceArgs['tuple']['vaultOptInLock(bool)void']> & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      return this.appClient.params.call(NfdInstanceParamsFactory.vaultOptInLock(params))\n    },\n\n    /**\n     * Makes a call to the NFDInstance smart contract using the `vaultOptIn(uint64[])void` ABI method.\n     *\n     * @param params The params for the smart contract call\n     * @returns The call params\n     */\n    vaultOptIn: (params: CallParams<NfdInstanceArgs['obj']['vaultOptIn(uint64[])void'] | NfdInstanceArgs['tuple']['vaultOptIn(uint64[])void']> & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      return this.appClient.params.call(NfdInstanceParamsFactory.vaultOptIn(params))\n    },\n\n    /**\n     * Makes a call to the NFDInstance smart contract using the `vaultSend(uint64,address,string,uint64,uint64[])void` ABI method.\n     *\n     * @param params The params for the smart contract call\n     * @returns The call params\n     */\n    vaultSend: (params: CallParams<NfdInstanceArgs['obj']['vaultSend(uint64,address,string,uint64,uint64[])void'] | NfdInstanceArgs['tuple']['vaultSend(uint64,address,string,uint64,uint64[])void']> & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      return this.appClient.params.call(NfdInstanceParamsFactory.vaultSend(params))\n    },\n\n    /**\n     * Makes a call to the NFDInstance smart contract using the `renew(pay)void` ABI method.\n     *\n    * Renew adds more time to an existing NFDs expiration, or renews it if expired.\n    \n    \n    As part of v2-v3 upgrade, the NFDs are converted from lifetime NFDs to renewal NFDs. The v2 contract is upgraded\n    to v3, then renew is called on the (now v3) nfd to turn it into a renewal (note the if curExpiration === 0 check)\n    \n    \n    If already renewal, then it extends the current expiration time by the time specified (minimum 1 yr) (365 / price paid * mint price)\n    Expirations can never be more than NFD_MAX_EXPIRATION_DAYS days in the future.\n    \n    \n    IF the NFD is expired:\n       x The current owner can take it back over at base price - and NFD metadata doesn't have to be cleared - they\n       get it back as-is.\n       x If not current owner, then the price goes from high of base price * 10,000 down to base price over 24 hrs where\n       'buyer' has to pay at least that price.  The NFD MUST ALREADY HAVE ITS METADATA CLEARED!\n\n     *\n     * @param params The params for the smart contract call\n     * @returns The call params\n     */\n    renew: (params: CallParams<NfdInstanceArgs['obj']['renew(pay)void'] | NfdInstanceArgs['tuple']['renew(pay)void']> & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      return this.appClient.params.call(NfdInstanceParamsFactory.renew(params))\n    },\n\n    /**\n     * Makes a call to the NFDInstance smart contract using the `setPrimaryAddress(string,address)void` ABI method.\n     *\n     * @param params The params for the smart contract call\n     * @returns The call params\n     */\n    setPrimaryAddress: (params: CallParams<NfdInstanceArgs['obj']['setPrimaryAddress(string,address)void'] | NfdInstanceArgs['tuple']['setPrimaryAddress(string,address)void']> & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      return this.appClient.params.call(NfdInstanceParamsFactory.setPrimaryAddress(params))\n    },\n\n    /**\n     * Makes a call to the NFDInstance smart contract using the `registryAddingVerifiedAddress(string,string)bool` ABI method.\n     *\n    * Approved call from registry instructing us to move the specified u.cav.xx field and add to the specified\n    verified field.\n\n     *\n     * @param params The params for the smart contract call\n     * @returns The call params: true if added or already present, false otherwise\n     */\n    registryAddingVerifiedAddress: (params: CallParams<NfdInstanceArgs['obj']['registryAddingVerifiedAddress(string,string)bool'] | NfdInstanceArgs['tuple']['registryAddingVerifiedAddress(string,string)bool']> & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      return this.appClient.params.call(NfdInstanceParamsFactory.registryAddingVerifiedAddress(params))\n    },\n\n    /**\n     * Makes a call to the NFDInstance smart contract using the `registryRemovingVerifiedAddress(string,address,address)bool` ABI method.\n     *\n     * Approved call from registry instructing us to REMOVE an address from the specified verified address set\n     *\n     * @param params The params for the smart contract call\n     * @returns The call params\n     */\n    registryRemovingVerifiedAddress: (params: CallParams<NfdInstanceArgs['obj']['registryRemovingVerifiedAddress(string,address,address)bool'] | NfdInstanceArgs['tuple']['registryRemovingVerifiedAddress(string,address,address)bool']> & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      return this.appClient.params.call(NfdInstanceParamsFactory.registryRemovingVerifiedAddress(params))\n    },\n\n  }\n\n  /**\n   * Create transactions for the current app\n   */\n  readonly createTransaction = {\n    /**\n     * Gets available update methods\n     */\n    update: {\n      /**\n       * Updates an existing instance of the NFDInstance smart contract using the `updateApplication(string)void` ABI method.\n       *\n       * @param params The params for the smart contract call\n       * @returns The update transaction\n       */\n      updateApplication: (params: CallParams<NfdInstanceArgs['obj']['updateApplication(string)void'] | NfdInstanceArgs['tuple']['updateApplication(string)void']> & AppClientCompilationParams) => {\n        return this.appClient.createTransaction.update(NfdInstanceParamsFactory.update.updateApplication(params))\n      },\n\n    },\n\n    /**\n     * Makes a clear_state call to an existing instance of the NFDInstance smart contract.\n     *\n     * @param params The params for the bare (raw) call\n     * @returns The clearState result\n     */\n    clearState: (params?: Expand<AppClientBareCallParams>) => {\n      return this.appClient.createTransaction.bare.clearState(params)\n    },\n\n    /**\n     * Makes a call to the NFDInstance smart contract using the `gas()void` ABI method.\n     *\n     * @param params The params for the smart contract call\n     * @returns The call transaction\n     */\n    gas: (params: CallParams<NfdInstanceArgs['obj']['gas()void'] | NfdInstanceArgs['tuple']['gas()void']> & {onComplete?: OnApplicationComplete.NoOpOC} = {args: []}) => {\n      return this.appClient.createTransaction.call(NfdInstanceParamsFactory.gas(params))\n    },\n\n    /**\n     * Makes a call to the NFDInstance smart contract using the `mintAsa(string,string)void` ABI method.\n     *\n     * @param params The params for the smart contract call\n     * @returns The call transaction\n     */\n    mintAsa: (params: CallParams<NfdInstanceArgs['obj']['mintAsa(string,string)void'] | NfdInstanceArgs['tuple']['mintAsa(string,string)void']> & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      return this.appClient.createTransaction.call(NfdInstanceParamsFactory.mintAsa(params))\n    },\n\n    /**\n     * Makes a call to the NFDInstance smart contract using the `deleteFields(byte[][])void` ABI method.\n     *\n     * @param params The params for the smart contract call\n     * @returns The call transaction\n     */\n    deleteFields: (params: CallParams<NfdInstanceArgs['obj']['deleteFields(byte[][])void'] | NfdInstanceArgs['tuple']['deleteFields(byte[][])void']> & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      return this.appClient.createTransaction.call(NfdInstanceParamsFactory.deleteFields(params))\n    },\n\n    /**\n     * Makes a call to the NFDInstance smart contract using the `updateSegmentCount(string,uint64)void` ABI method.\n     *\n     * @param params The params for the smart contract call\n     * @returns The call transaction\n     */\n    updateSegmentCount: (params: CallParams<NfdInstanceArgs['obj']['updateSegmentCount(string,uint64)void'] | NfdInstanceArgs['tuple']['updateSegmentCount(string,uint64)void']> & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      return this.appClient.createTransaction.call(NfdInstanceParamsFactory.updateSegmentCount(params))\n    },\n\n    /**\n     * Makes a call to the NFDInstance smart contract using the `getFieldUpdateCost(byte[][])uint64` ABI method.\n     * \n     * This method is a readonly method; calling it with onComplete of NoOp will result in a simulated transaction rather than a real transaction.\n     *\n     * @param params The params for the smart contract call\n     * @returns The call transaction\n     */\n    getFieldUpdateCost: (params: CallParams<NfdInstanceArgs['obj']['getFieldUpdateCost(byte[][])uint64'] | NfdInstanceArgs['tuple']['getFieldUpdateCost(byte[][])uint64']> & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      return this.appClient.createTransaction.call(NfdInstanceParamsFactory.getFieldUpdateCost(params))\n    },\n\n    /**\n     * Makes a call to the NFDInstance smart contract using the `updateFields(byte[][])void` ABI method.\n     *\n     * @param params The params for the smart contract call\n     * @returns The call transaction\n     */\n    updateFields: (params: CallParams<NfdInstanceArgs['obj']['updateFields(byte[][])void'] | NfdInstanceArgs['tuple']['updateFields(byte[][])void']> & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      return this.appClient.createTransaction.call(NfdInstanceParamsFactory.updateFields(params))\n    },\n\n    /**\n     * Makes a call to the NFDInstance smart contract using the `readField(byte[])byte[]` ABI method.\n     * \n     * This method is a readonly method; calling it with onComplete of NoOp will result in a simulated transaction rather than a real transaction.\n     *\n     * @param params The params for the smart contract call\n     * @returns The call transaction\n     */\n    readField: (params: CallParams<NfdInstanceArgs['obj']['readField(byte[])byte[]'] | NfdInstanceArgs['tuple']['readField(byte[])byte[]']> & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      return this.appClient.createTransaction.call(NfdInstanceParamsFactory.readField(params))\n    },\n\n    /**\n     * Makes a call to the NFDInstance smart contract using the `offerForSale(uint64,address)void` ABI method.\n     *\n     * @param params The params for the smart contract call\n     * @returns The call transaction\n     */\n    offerForSale: (params: CallParams<NfdInstanceArgs['obj']['offerForSale(uint64,address)void'] | NfdInstanceArgs['tuple']['offerForSale(uint64,address)void']> & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      return this.appClient.createTransaction.call(NfdInstanceParamsFactory.offerForSale(params))\n    },\n\n    /**\n     * Makes a call to the NFDInstance smart contract using the `cancelSale()void` ABI method.\n     *\n     * @param params The params for the smart contract call\n     * @returns The call transaction\n     */\n    cancelSale: (params: CallParams<NfdInstanceArgs['obj']['cancelSale()void'] | NfdInstanceArgs['tuple']['cancelSale()void']> & {onComplete?: OnApplicationComplete.NoOpOC} = {args: []}) => {\n      return this.appClient.createTransaction.call(NfdInstanceParamsFactory.cancelSale(params))\n    },\n\n    /**\n     * Makes a call to the NFDInstance smart contract using the `postOffer(uint64,string)void` ABI method.\n     *\n     * @param params The params for the smart contract call\n     * @returns The call transaction\n     */\n    postOffer: (params: CallParams<NfdInstanceArgs['obj']['postOffer(uint64,string)void'] | NfdInstanceArgs['tuple']['postOffer(uint64,string)void']> & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      return this.appClient.createTransaction.call(NfdInstanceParamsFactory.postOffer(params))\n    },\n\n    /**\n     * Makes a call to the NFDInstance smart contract using the `mintPayout(uint64,uint64)(uint64,address,uint64,address,uint64)` ABI method.\n     *\n     * @param params The params for the smart contract call\n     * @returns The call transaction\n     */\n    mintPayout: (params: CallParams<NfdInstanceArgs['obj']['mintPayout(uint64,uint64)(uint64,address,uint64,address,uint64)'] | NfdInstanceArgs['tuple']['mintPayout(uint64,uint64)(uint64,address,uint64,address,uint64)']> & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      return this.appClient.createTransaction.call(NfdInstanceParamsFactory.mintPayout(params))\n    },\n\n    /**\n     * Makes a call to the NFDInstance smart contract using the `purchase(pay)void` ABI method.\n     *\n     * @param params The params for the smart contract call\n     * @returns The call transaction\n     */\n    purchase: (params: CallParams<NfdInstanceArgs['obj']['purchase(pay)void'] | NfdInstanceArgs['tuple']['purchase(pay)void']> & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      return this.appClient.createTransaction.call(NfdInstanceParamsFactory.purchase(params))\n    },\n\n    /**\n     * Makes a call to the NFDInstance smart contract using the `isAddressInField(string,address)bool` ABI method.\n     * \n     * This method is a readonly method; calling it with onComplete of NoOp will result in a simulated transaction rather than a real transaction.\n     *\n     * @param params The params for the smart contract call\n     * @returns The call transaction\n     */\n    isAddressInField: (params: CallParams<NfdInstanceArgs['obj']['isAddressInField(string,address)bool'] | NfdInstanceArgs['tuple']['isAddressInField(string,address)bool']> & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      return this.appClient.createTransaction.call(NfdInstanceParamsFactory.isAddressInField(params))\n    },\n\n    /**\n     * Makes a call to the NFDInstance smart contract using the `getRenewPrice()uint64` ABI method.\n     * \n     * This method is a readonly method; calling it with onComplete of NoOp will result in a simulated transaction rather than a real transaction.\n     *\n     * @param params The params for the smart contract call\n     * @returns The call transaction\n     */\n    getRenewPrice: (params: CallParams<NfdInstanceArgs['obj']['getRenewPrice()uint64'] | NfdInstanceArgs['tuple']['getRenewPrice()uint64']> & {onComplete?: OnApplicationComplete.NoOpOC} = {args: []}) => {\n      return this.appClient.createTransaction.call(NfdInstanceParamsFactory.getRenewPrice(params))\n    },\n\n    /**\n     * Makes a call to the NFDInstance smart contract using the `updateHash(byte[])void` ABI method.\n     *\n     * @param params The params for the smart contract call\n     * @returns The call transaction\n     */\n    updateHash: (params: CallParams<NfdInstanceArgs['obj']['updateHash(byte[])void'] | NfdInstanceArgs['tuple']['updateHash(byte[])void']> & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      return this.appClient.createTransaction.call(NfdInstanceParamsFactory.updateHash(params))\n    },\n\n    /**\n     * Makes a call to the NFDInstance smart contract using the `contractLock(bool)void` ABI method.\n     *\n     * @param params The params for the smart contract call\n     * @returns The call transaction\n     */\n    contractLock: (params: CallParams<NfdInstanceArgs['obj']['contractLock(bool)void'] | NfdInstanceArgs['tuple']['contractLock(bool)void']> & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      return this.appClient.createTransaction.call(NfdInstanceParamsFactory.contractLock(params))\n    },\n\n    /**\n     * Makes a call to the NFDInstance smart contract using the `segmentLock(bool,uint64)void` ABI method.\n     *\n     * @param params The params for the smart contract call\n     * @returns The call transaction\n     */\n    segmentLock: (params: CallParams<NfdInstanceArgs['obj']['segmentLock(bool,uint64)void'] | NfdInstanceArgs['tuple']['segmentLock(bool,uint64)void']> & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      return this.appClient.createTransaction.call(NfdInstanceParamsFactory.segmentLock(params))\n    },\n\n    /**\n     * Makes a call to the NFDInstance smart contract using the `vaultOptInLock(bool)void` ABI method.\n     *\n     * @param params The params for the smart contract call\n     * @returns The call transaction\n     */\n    vaultOptInLock: (params: CallParams<NfdInstanceArgs['obj']['vaultOptInLock(bool)void'] | NfdInstanceArgs['tuple']['vaultOptInLock(bool)void']> & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      return this.appClient.createTransaction.call(NfdInstanceParamsFactory.vaultOptInLock(params))\n    },\n\n    /**\n     * Makes a call to the NFDInstance smart contract using the `vaultOptIn(uint64[])void` ABI method.\n     *\n     * @param params The params for the smart contract call\n     * @returns The call transaction\n     */\n    vaultOptIn: (params: CallParams<NfdInstanceArgs['obj']['vaultOptIn(uint64[])void'] | NfdInstanceArgs['tuple']['vaultOptIn(uint64[])void']> & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      return this.appClient.createTransaction.call(NfdInstanceParamsFactory.vaultOptIn(params))\n    },\n\n    /**\n     * Makes a call to the NFDInstance smart contract using the `vaultSend(uint64,address,string,uint64,uint64[])void` ABI method.\n     *\n     * @param params The params for the smart contract call\n     * @returns The call transaction\n     */\n    vaultSend: (params: CallParams<NfdInstanceArgs['obj']['vaultSend(uint64,address,string,uint64,uint64[])void'] | NfdInstanceArgs['tuple']['vaultSend(uint64,address,string,uint64,uint64[])void']> & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      return this.appClient.createTransaction.call(NfdInstanceParamsFactory.vaultSend(params))\n    },\n\n    /**\n     * Makes a call to the NFDInstance smart contract using the `renew(pay)void` ABI method.\n     *\n    * Renew adds more time to an existing NFDs expiration, or renews it if expired.\n    \n    \n    As part of v2-v3 upgrade, the NFDs are converted from lifetime NFDs to renewal NFDs. The v2 contract is upgraded\n    to v3, then renew is called on the (now v3) nfd to turn it into a renewal (note the if curExpiration === 0 check)\n    \n    \n    If already renewal, then it extends the current expiration time by the time specified (minimum 1 yr) (365 / price paid * mint price)\n    Expirations can never be more than NFD_MAX_EXPIRATION_DAYS days in the future.\n    \n    \n    IF the NFD is expired:\n       x The current owner can take it back over at base price - and NFD metadata doesn't have to be cleared - they\n       get it back as-is.\n       x If not current owner, then the price goes from high of base price * 10,000 down to base price over 24 hrs where\n       'buyer' has to pay at least that price.  The NFD MUST ALREADY HAVE ITS METADATA CLEARED!\n\n     *\n     * @param params The params for the smart contract call\n     * @returns The call transaction\n     */\n    renew: (params: CallParams<NfdInstanceArgs['obj']['renew(pay)void'] | NfdInstanceArgs['tuple']['renew(pay)void']> & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      return this.appClient.createTransaction.call(NfdInstanceParamsFactory.renew(params))\n    },\n\n    /**\n     * Makes a call to the NFDInstance smart contract using the `setPrimaryAddress(string,address)void` ABI method.\n     *\n     * @param params The params for the smart contract call\n     * @returns The call transaction\n     */\n    setPrimaryAddress: (params: CallParams<NfdInstanceArgs['obj']['setPrimaryAddress(string,address)void'] | NfdInstanceArgs['tuple']['setPrimaryAddress(string,address)void']> & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      return this.appClient.createTransaction.call(NfdInstanceParamsFactory.setPrimaryAddress(params))\n    },\n\n    /**\n     * Makes a call to the NFDInstance smart contract using the `registryAddingVerifiedAddress(string,string)bool` ABI method.\n     *\n    * Approved call from registry instructing us to move the specified u.cav.xx field and add to the specified\n    verified field.\n\n     *\n     * @param params The params for the smart contract call\n     * @returns The call transaction: true if added or already present, false otherwise\n     */\n    registryAddingVerifiedAddress: (params: CallParams<NfdInstanceArgs['obj']['registryAddingVerifiedAddress(string,string)bool'] | NfdInstanceArgs['tuple']['registryAddingVerifiedAddress(string,string)bool']> & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      return this.appClient.createTransaction.call(NfdInstanceParamsFactory.registryAddingVerifiedAddress(params))\n    },\n\n    /**\n     * Makes a call to the NFDInstance smart contract using the `registryRemovingVerifiedAddress(string,address,address)bool` ABI method.\n     *\n     * Approved call from registry instructing us to REMOVE an address from the specified verified address set\n     *\n     * @param params The params for the smart contract call\n     * @returns The call transaction\n     */\n    registryRemovingVerifiedAddress: (params: CallParams<NfdInstanceArgs['obj']['registryRemovingVerifiedAddress(string,address,address)bool'] | NfdInstanceArgs['tuple']['registryRemovingVerifiedAddress(string,address,address)bool']> & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      return this.appClient.createTransaction.call(NfdInstanceParamsFactory.registryRemovingVerifiedAddress(params))\n    },\n\n  }\n\n  /**\n   * Send calls to the current app\n   */\n  readonly send = {\n    /**\n     * Gets available update methods\n     */\n    update: {\n      /**\n       * Updates an existing instance of the NFDInstance smart contract using the `updateApplication(string)void` ABI method.\n       *\n       * @param params The params for the smart contract call\n       * @returns The update result\n       */\n      updateApplication: async (params: CallParams<NfdInstanceArgs['obj']['updateApplication(string)void'] | NfdInstanceArgs['tuple']['updateApplication(string)void']> & AppClientCompilationParams & SendParams) => {\n        const result = await this.appClient.send.update(NfdInstanceParamsFactory.update.updateApplication(params))\n        return {...result, return: result.return as unknown as (undefined | NfdInstanceReturns['updateApplication(string)void'])}\n      },\n\n    },\n\n    /**\n     * Makes a clear_state call to an existing instance of the NFDInstance smart contract.\n     *\n     * @param params The params for the bare (raw) call\n     * @returns The clearState result\n     */\n    clearState: (params?: Expand<AppClientBareCallParams & SendParams>) => {\n      return this.appClient.send.bare.clearState(params)\n    },\n\n    /**\n     * Makes a call to the NFDInstance smart contract using the `gas()void` ABI method.\n     *\n     * @param params The params for the smart contract call\n     * @returns The call result\n     */\n    gas: async (params: CallParams<NfdInstanceArgs['obj']['gas()void'] | NfdInstanceArgs['tuple']['gas()void']> & SendParams & {onComplete?: OnApplicationComplete.NoOpOC} = {args: []}) => {\n      const result = await this.appClient.send.call(NfdInstanceParamsFactory.gas(params))\n      return {...result, return: result.return as unknown as (undefined | NfdInstanceReturns['gas()void'])}\n    },\n\n    /**\n     * Makes a call to the NFDInstance smart contract using the `mintAsa(string,string)void` ABI method.\n     *\n     * @param params The params for the smart contract call\n     * @returns The call result\n     */\n    mintAsa: async (params: CallParams<NfdInstanceArgs['obj']['mintAsa(string,string)void'] | NfdInstanceArgs['tuple']['mintAsa(string,string)void']> & SendParams & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      const result = await this.appClient.send.call(NfdInstanceParamsFactory.mintAsa(params))\n      return {...result, return: result.return as unknown as (undefined | NfdInstanceReturns['mintAsa(string,string)void'])}\n    },\n\n    /**\n     * Makes a call to the NFDInstance smart contract using the `deleteFields(byte[][])void` ABI method.\n     *\n     * @param params The params for the smart contract call\n     * @returns The call result\n     */\n    deleteFields: async (params: CallParams<NfdInstanceArgs['obj']['deleteFields(byte[][])void'] | NfdInstanceArgs['tuple']['deleteFields(byte[][])void']> & SendParams & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      const result = await this.appClient.send.call(NfdInstanceParamsFactory.deleteFields(params))\n      return {...result, return: result.return as unknown as (undefined | NfdInstanceReturns['deleteFields(byte[][])void'])}\n    },\n\n    /**\n     * Makes a call to the NFDInstance smart contract using the `updateSegmentCount(string,uint64)void` ABI method.\n     *\n     * @param params The params for the smart contract call\n     * @returns The call result\n     */\n    updateSegmentCount: async (params: CallParams<NfdInstanceArgs['obj']['updateSegmentCount(string,uint64)void'] | NfdInstanceArgs['tuple']['updateSegmentCount(string,uint64)void']> & SendParams & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      const result = await this.appClient.send.call(NfdInstanceParamsFactory.updateSegmentCount(params))\n      return {...result, return: result.return as unknown as (undefined | NfdInstanceReturns['updateSegmentCount(string,uint64)void'])}\n    },\n\n    /**\n     * Makes a call to the NFDInstance smart contract using the `getFieldUpdateCost(byte[][])uint64` ABI method.\n     * \n     * This method is a readonly method; calling it with onComplete of NoOp will result in a simulated transaction rather than a real transaction.\n     *\n     * @param params The params for the smart contract call\n     * @returns The call result\n     */\n    getFieldUpdateCost: async (params: CallParams<NfdInstanceArgs['obj']['getFieldUpdateCost(byte[][])uint64'] | NfdInstanceArgs['tuple']['getFieldUpdateCost(byte[][])uint64']> & SendParams & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      const result = await this.appClient.send.call(NfdInstanceParamsFactory.getFieldUpdateCost(params))\n      return {...result, return: result.return as unknown as (undefined | NfdInstanceReturns['getFieldUpdateCost(byte[][])uint64'])}\n    },\n\n    /**\n     * Makes a call to the NFDInstance smart contract using the `updateFields(byte[][])void` ABI method.\n     *\n     * @param params The params for the smart contract call\n     * @returns The call result\n     */\n    updateFields: async (params: CallParams<NfdInstanceArgs['obj']['updateFields(byte[][])void'] | NfdInstanceArgs['tuple']['updateFields(byte[][])void']> & SendParams & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      const result = await this.appClient.send.call(NfdInstanceParamsFactory.updateFields(params))\n      return {...result, return: result.return as unknown as (undefined | NfdInstanceReturns['updateFields(byte[][])void'])}\n    },\n\n    /**\n     * Makes a call to the NFDInstance smart contract using the `readField(byte[])byte[]` ABI method.\n     * \n     * This method is a readonly method; calling it with onComplete of NoOp will result in a simulated transaction rather than a real transaction.\n     *\n     * @param params The params for the smart contract call\n     * @returns The call result\n     */\n    readField: async (params: CallParams<NfdInstanceArgs['obj']['readField(byte[])byte[]'] | NfdInstanceArgs['tuple']['readField(byte[])byte[]']> & SendParams & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      const result = await this.appClient.send.call(NfdInstanceParamsFactory.readField(params))\n      return {...result, return: result.return as unknown as (undefined | NfdInstanceReturns['readField(byte[])byte[]'])}\n    },\n\n    /**\n     * Makes a call to the NFDInstance smart contract using the `offerForSale(uint64,address)void` ABI method.\n     *\n     * @param params The params for the smart contract call\n     * @returns The call result\n     */\n    offerForSale: async (params: CallParams<NfdInstanceArgs['obj']['offerForSale(uint64,address)void'] | NfdInstanceArgs['tuple']['offerForSale(uint64,address)void']> & SendParams & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      const result = await this.appClient.send.call(NfdInstanceParamsFactory.offerForSale(params))\n      return {...result, return: result.return as unknown as (undefined | NfdInstanceReturns['offerForSale(uint64,address)void'])}\n    },\n\n    /**\n     * Makes a call to the NFDInstance smart contract using the `cancelSale()void` ABI method.\n     *\n     * @param params The params for the smart contract call\n     * @returns The call result\n     */\n    cancelSale: async (params: CallParams<NfdInstanceArgs['obj']['cancelSale()void'] | NfdInstanceArgs['tuple']['cancelSale()void']> & SendParams & {onComplete?: OnApplicationComplete.NoOpOC} = {args: []}) => {\n      const result = await this.appClient.send.call(NfdInstanceParamsFactory.cancelSale(params))\n      return {...result, return: result.return as unknown as (undefined | NfdInstanceReturns['cancelSale()void'])}\n    },\n\n    /**\n     * Makes a call to the NFDInstance smart contract using the `postOffer(uint64,string)void` ABI method.\n     *\n     * @param params The params for the smart contract call\n     * @returns The call result\n     */\n    postOffer: async (params: CallParams<NfdInstanceArgs['obj']['postOffer(uint64,string)void'] | NfdInstanceArgs['tuple']['postOffer(uint64,string)void']> & SendParams & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      const result = await this.appClient.send.call(NfdInstanceParamsFactory.postOffer(params))\n      return {...result, return: result.return as unknown as (undefined | NfdInstanceReturns['postOffer(uint64,string)void'])}\n    },\n\n    /**\n     * Makes a call to the NFDInstance smart contract using the `mintPayout(uint64,uint64)(uint64,address,uint64,address,uint64)` ABI method.\n     *\n     * @param params The params for the smart contract call\n     * @returns The call result\n     */\n    mintPayout: async (params: CallParams<NfdInstanceArgs['obj']['mintPayout(uint64,uint64)(uint64,address,uint64,address,uint64)'] | NfdInstanceArgs['tuple']['mintPayout(uint64,uint64)(uint64,address,uint64,address,uint64)']> & SendParams & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      const result = await this.appClient.send.call(NfdInstanceParamsFactory.mintPayout(params))\n      return {...result, return: result.return as unknown as (undefined | NfdInstanceReturns['mintPayout(uint64,uint64)(uint64,address,uint64,address,uint64)'])}\n    },\n\n    /**\n     * Makes a call to the NFDInstance smart contract using the `purchase(pay)void` ABI method.\n     *\n     * @param params The params for the smart contract call\n     * @returns The call result\n     */\n    purchase: async (params: CallParams<NfdInstanceArgs['obj']['purchase(pay)void'] | NfdInstanceArgs['tuple']['purchase(pay)void']> & SendParams & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      const result = await this.appClient.send.call(NfdInstanceParamsFactory.purchase(params))\n      return {...result, return: result.return as unknown as (undefined | NfdInstanceReturns['purchase(pay)void'])}\n    },\n\n    /**\n     * Makes a call to the NFDInstance smart contract using the `isAddressInField(string,address)bool` ABI method.\n     * \n     * This method is a readonly method; calling it with onComplete of NoOp will result in a simulated transaction rather than a real transaction.\n     *\n     * @param params The params for the smart contract call\n     * @returns The call result\n     */\n    isAddressInField: async (params: CallParams<NfdInstanceArgs['obj']['isAddressInField(string,address)bool'] | NfdInstanceArgs['tuple']['isAddressInField(string,address)bool']> & SendParams & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      const result = await this.appClient.send.call(NfdInstanceParamsFactory.isAddressInField(params))\n      return {...result, return: result.return as unknown as (undefined | NfdInstanceReturns['isAddressInField(string,address)bool'])}\n    },\n\n    /**\n     * Makes a call to the NFDInstance smart contract using the `getRenewPrice()uint64` ABI method.\n     * \n     * This method is a readonly method; calling it with onComplete of NoOp will result in a simulated transaction rather than a real transaction.\n     *\n     * @param params The params for the smart contract call\n     * @returns The call result\n     */\n    getRenewPrice: async (params: CallParams<NfdInstanceArgs['obj']['getRenewPrice()uint64'] | NfdInstanceArgs['tuple']['getRenewPrice()uint64']> & SendParams & {onComplete?: OnApplicationComplete.NoOpOC} = {args: []}) => {\n      const result = await this.appClient.send.call(NfdInstanceParamsFactory.getRenewPrice(params))\n      return {...result, return: result.return as unknown as (undefined | NfdInstanceReturns['getRenewPrice()uint64'])}\n    },\n\n    /**\n     * Makes a call to the NFDInstance smart contract using the `updateHash(byte[])void` ABI method.\n     *\n     * @param params The params for the smart contract call\n     * @returns The call result\n     */\n    updateHash: async (params: CallParams<NfdInstanceArgs['obj']['updateHash(byte[])void'] | NfdInstanceArgs['tuple']['updateHash(byte[])void']> & SendParams & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      const result = await this.appClient.send.call(NfdInstanceParamsFactory.updateHash(params))\n      return {...result, return: result.return as unknown as (undefined | NfdInstanceReturns['updateHash(byte[])void'])}\n    },\n\n    /**\n     * Makes a call to the NFDInstance smart contract using the `contractLock(bool)void` ABI method.\n     *\n     * @param params The params for the smart contract call\n     * @returns The call result\n     */\n    contractLock: async (params: CallParams<NfdInstanceArgs['obj']['contractLock(bool)void'] | NfdInstanceArgs['tuple']['contractLock(bool)void']> & SendParams & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      const result = await this.appClient.send.call(NfdInstanceParamsFactory.contractLock(params))\n      return {...result, return: result.return as unknown as (undefined | NfdInstanceReturns['contractLock(bool)void'])}\n    },\n\n    /**\n     * Makes a call to the NFDInstance smart contract using the `segmentLock(bool,uint64)void` ABI method.\n     *\n     * @param params The params for the smart contract call\n     * @returns The call result\n     */\n    segmentLock: async (params: CallParams<NfdInstanceArgs['obj']['segmentLock(bool,uint64)void'] | NfdInstanceArgs['tuple']['segmentLock(bool,uint64)void']> & SendParams & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      const result = await this.appClient.send.call(NfdInstanceParamsFactory.segmentLock(params))\n      return {...result, return: result.return as unknown as (undefined | NfdInstanceReturns['segmentLock(bool,uint64)void'])}\n    },\n\n    /**\n     * Makes a call to the NFDInstance smart contract using the `vaultOptInLock(bool)void` ABI method.\n     *\n     * @param params The params for the smart contract call\n     * @returns The call result\n     */\n    vaultOptInLock: async (params: CallParams<NfdInstanceArgs['obj']['vaultOptInLock(bool)void'] | NfdInstanceArgs['tuple']['vaultOptInLock(bool)void']> & SendParams & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      const result = await this.appClient.send.call(NfdInstanceParamsFactory.vaultOptInLock(params))\n      return {...result, return: result.return as unknown as (undefined | NfdInstanceReturns['vaultOptInLock(bool)void'])}\n    },\n\n    /**\n     * Makes a call to the NFDInstance smart contract using the `vaultOptIn(uint64[])void` ABI method.\n     *\n     * @param params The params for the smart contract call\n     * @returns The call result\n     */\n    vaultOptIn: async (params: CallParams<NfdInstanceArgs['obj']['vaultOptIn(uint64[])void'] | NfdInstanceArgs['tuple']['vaultOptIn(uint64[])void']> & SendParams & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      const result = await this.appClient.send.call(NfdInstanceParamsFactory.vaultOptIn(params))\n      return {...result, return: result.return as unknown as (undefined | NfdInstanceReturns['vaultOptIn(uint64[])void'])}\n    },\n\n    /**\n     * Makes a call to the NFDInstance smart contract using the `vaultSend(uint64,address,string,uint64,uint64[])void` ABI method.\n     *\n     * @param params The params for the smart contract call\n     * @returns The call result\n     */\n    vaultSend: async (params: CallParams<NfdInstanceArgs['obj']['vaultSend(uint64,address,string,uint64,uint64[])void'] | NfdInstanceArgs['tuple']['vaultSend(uint64,address,string,uint64,uint64[])void']> & SendParams & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      const result = await this.appClient.send.call(NfdInstanceParamsFactory.vaultSend(params))\n      return {...result, return: result.return as unknown as (undefined | NfdInstanceReturns['vaultSend(uint64,address,string,uint64,uint64[])void'])}\n    },\n\n    /**\n     * Makes a call to the NFDInstance smart contract using the `renew(pay)void` ABI method.\n     *\n    * Renew adds more time to an existing NFDs expiration, or renews it if expired.\n    \n    \n    As part of v2-v3 upgrade, the NFDs are converted from lifetime NFDs to renewal NFDs. The v2 contract is upgraded\n    to v3, then renew is called on the (now v3) nfd to turn it into a renewal (note the if curExpiration === 0 check)\n    \n    \n    If already renewal, then it extends the current expiration time by the time specified (minimum 1 yr) (365 / price paid * mint price)\n    Expirations can never be more than NFD_MAX_EXPIRATION_DAYS days in the future.\n    \n    \n    IF the NFD is expired:\n       x The current owner can take it back over at base price - and NFD metadata doesn't have to be cleared - they\n       get it back as-is.\n       x If not current owner, then the price goes from high of base price * 10,000 down to base price over 24 hrs where\n       'buyer' has to pay at least that price.  The NFD MUST ALREADY HAVE ITS METADATA CLEARED!\n\n     *\n     * @param params The params for the smart contract call\n     * @returns The call result\n     */\n    renew: async (params: CallParams<NfdInstanceArgs['obj']['renew(pay)void'] | NfdInstanceArgs['tuple']['renew(pay)void']> & SendParams & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      const result = await this.appClient.send.call(NfdInstanceParamsFactory.renew(params))\n      return {...result, return: result.return as unknown as (undefined | NfdInstanceReturns['renew(pay)void'])}\n    },\n\n    /**\n     * Makes a call to the NFDInstance smart contract using the `setPrimaryAddress(string,address)void` ABI method.\n     *\n     * @param params The params for the smart contract call\n     * @returns The call result\n     */\n    setPrimaryAddress: async (params: CallParams<NfdInstanceArgs['obj']['setPrimaryAddress(string,address)void'] | NfdInstanceArgs['tuple']['setPrimaryAddress(string,address)void']> & SendParams & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      const result = await this.appClient.send.call(NfdInstanceParamsFactory.setPrimaryAddress(params))\n      return {...result, return: result.return as unknown as (undefined | NfdInstanceReturns['setPrimaryAddress(string,address)void'])}\n    },\n\n    /**\n     * Makes a call to the NFDInstance smart contract using the `registryAddingVerifiedAddress(string,string)bool` ABI method.\n     *\n    * Approved call from registry instructing us to move the specified u.cav.xx field and add to the specified\n    verified field.\n\n     *\n     * @param params The params for the smart contract call\n     * @returns The call result: true if added or already present, false otherwise\n     */\n    registryAddingVerifiedAddress: async (params: CallParams<NfdInstanceArgs['obj']['registryAddingVerifiedAddress(string,string)bool'] | NfdInstanceArgs['tuple']['registryAddingVerifiedAddress(string,string)bool']> & SendParams & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      const result = await this.appClient.send.call(NfdInstanceParamsFactory.registryAddingVerifiedAddress(params))\n      return {...result, return: result.return as unknown as (undefined | NfdInstanceReturns['registryAddingVerifiedAddress(string,string)bool'])}\n    },\n\n    /**\n     * Makes a call to the NFDInstance smart contract using the `registryRemovingVerifiedAddress(string,address,address)bool` ABI method.\n     *\n     * Approved call from registry instructing us to REMOVE an address from the specified verified address set\n     *\n     * @param params The params for the smart contract call\n     * @returns The call result\n     */\n    registryRemovingVerifiedAddress: async (params: CallParams<NfdInstanceArgs['obj']['registryRemovingVerifiedAddress(string,address,address)bool'] | NfdInstanceArgs['tuple']['registryRemovingVerifiedAddress(string,address,address)bool']> & SendParams & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      const result = await this.appClient.send.call(NfdInstanceParamsFactory.registryRemovingVerifiedAddress(params))\n      return {...result, return: result.return as unknown as (undefined | NfdInstanceReturns['registryRemovingVerifiedAddress(string,address,address)bool'])}\n    },\n\n  }\n\n  /**\n   * Clone this app client with different params\n   *\n   * @param params The params to use for the the cloned app client. Omit a param to keep the original value. Set a param to override the original value. Setting to undefined will clear the original value.\n   * @returns A new app client with the altered params\n   */\n  public clone(params: CloneAppClientParams) {\n    return new NfdInstanceClient(this.appClient.clone(params))\n  }\n\n  /**\n   * Makes a readonly (simulated) call to the NFDInstance smart contract using the `getFieldUpdateCost(byte[][])uint64` ABI method.\n   * \n   * This method is a readonly method; calling it with onComplete of NoOp will result in a simulated transaction rather than a real transaction.\n   *\n   * @param params The params for the smart contract call\n   * @returns The call result\n   */\n  async getFieldUpdateCost(params: CallParams<NfdInstanceArgs['obj']['getFieldUpdateCost(byte[][])uint64'] | NfdInstanceArgs['tuple']['getFieldUpdateCost(byte[][])uint64']>) {\n    const result = await this.appClient.send.call(NfdInstanceParamsFactory.getFieldUpdateCost(params))\n    return result.return as unknown as NfdInstanceReturns['getFieldUpdateCost(byte[][])uint64']\n  }\n\n  /**\n   * Makes a readonly (simulated) call to the NFDInstance smart contract using the `readField(byte[])byte[]` ABI method.\n   * \n   * This method is a readonly method; calling it with onComplete of NoOp will result in a simulated transaction rather than a real transaction.\n   *\n   * @param params The params for the smart contract call\n   * @returns The call result\n   */\n  async readField(params: CallParams<NfdInstanceArgs['obj']['readField(byte[])byte[]'] | NfdInstanceArgs['tuple']['readField(byte[])byte[]']>) {\n    const result = await this.appClient.send.call(NfdInstanceParamsFactory.readField(params))\n    return result.return as unknown as NfdInstanceReturns['readField(byte[])byte[]']\n  }\n\n  /**\n   * Makes a readonly (simulated) call to the NFDInstance smart contract using the `isAddressInField(string,address)bool` ABI method.\n   * \n   * This method is a readonly method; calling it with onComplete of NoOp will result in a simulated transaction rather than a real transaction.\n   *\n   * @param params The params for the smart contract call\n   * @returns The call result\n   */\n  async isAddressInField(params: CallParams<NfdInstanceArgs['obj']['isAddressInField(string,address)bool'] | NfdInstanceArgs['tuple']['isAddressInField(string,address)bool']>) {\n    const result = await this.appClient.send.call(NfdInstanceParamsFactory.isAddressInField(params))\n    return result.return as unknown as NfdInstanceReturns['isAddressInField(string,address)bool']\n  }\n\n  /**\n   * Makes a readonly (simulated) call to the NFDInstance smart contract using the `getRenewPrice()uint64` ABI method.\n   * \n   * This method is a readonly method; calling it with onComplete of NoOp will result in a simulated transaction rather than a real transaction.\n   *\n   * @param params The params for the smart contract call\n   * @returns The call result\n   */\n  async getRenewPrice(params: CallParams<NfdInstanceArgs['obj']['getRenewPrice()uint64'] | NfdInstanceArgs['tuple']['getRenewPrice()uint64']> = {args: []}) {\n    const result = await this.appClient.send.call(NfdInstanceParamsFactory.getRenewPrice(params))\n    return result.return as unknown as NfdInstanceReturns['getRenewPrice()uint64']\n  }\n\n  /**\n   * Methods to access state for the current NFDInstance app\n   */\n  state = {\n    /**\n     * Methods to access global state for the current NFDInstance app\n     */\n    global: {\n      /**\n       * Get all current keyed values from global state\n       */\n      getAll: async (): Promise<Partial<Expand<GlobalKeysState>>> => {\n        const result = await this.appClient.state.global.getAll()\n        return {\n        }\n      },\n      /**\n       * Get values from the globalState map in global state\n       */\n      globalState: {\n        /**\n         * Get all current values of the globalState map in global state\n         */\n        getMap: async (): Promise<Map<Uint8Array, Uint8Array>> => { return (await this.appClient.state.global.getMap(\"globalState\")) as Map<Uint8Array, Uint8Array> },\n        /**\n         * Get a current value of the globalState map by key from global state\n         */\n        value: async (key: Uint8Array | string): Promise<Uint8Array | undefined> => { return await this.appClient.state.global.getMapValue(\"globalState\", key) as Uint8Array | undefined },\n      },\n    },\n    /**\n     * Methods to access box state for the current NFDInstance app\n     */\n    box: {\n      /**\n       * Get all current keyed values from box state\n       */\n      getAll: async (): Promise<Partial<Expand<BoxKeysState>>> => {\n        const result = await this.appClient.state.box.getAll()\n        return {\n        }\n      },\n      /**\n       * Get values from the boxes map in box state\n       */\n      boxes: {\n        /**\n         * Get all current values of the boxes map in box state\n         */\n        getMap: async (): Promise<Map<Uint8Array, Uint8Array>> => { return (await this.appClient.state.box.getMap(\"boxes\")) as Map<Uint8Array, Uint8Array> },\n        /**\n         * Get a current value of the boxes map by key from box state\n         */\n        value: async (key: Uint8Array | string): Promise<Uint8Array | undefined> => { return await this.appClient.state.box.getMapValue(\"boxes\", key) as Uint8Array | undefined },\n      },\n    },\n  }\n\n  public newGroup(): NfdInstanceComposer {\n    const client = this\n    const composer = this.algorand.newGroup()\n    let promiseChain:Promise<unknown> = Promise.resolve()\n    const resultMappers: Array<undefined | ((x: ABIReturn | undefined) => any)> = []\n    return {\n      /**\n       * Add a gas()void method call against the NFDInstance contract\n       */\n      gas(params: CallParams<NfdInstanceArgs['obj']['gas()void'] | NfdInstanceArgs['tuple']['gas()void']> & {onComplete?: OnApplicationComplete.NoOpOC}) {\n        promiseChain = promiseChain.then(async () => composer.addAppCallMethodCall(await client.params.gas(params)))\n        resultMappers.push(undefined)\n        return this\n      },\n      /**\n       * Add a mintAsa(string,string)void method call against the NFDInstance contract\n       */\n      mintAsa(params: CallParams<NfdInstanceArgs['obj']['mintAsa(string,string)void'] | NfdInstanceArgs['tuple']['mintAsa(string,string)void']> & {onComplete?: OnApplicationComplete.NoOpOC}) {\n        promiseChain = promiseChain.then(async () => composer.addAppCallMethodCall(await client.params.mintAsa(params)))\n        resultMappers.push(undefined)\n        return this\n      },\n      /**\n       * Add a deleteFields(byte[][])void method call against the NFDInstance contract\n       */\n      deleteFields(params: CallParams<NfdInstanceArgs['obj']['deleteFields(byte[][])void'] | NfdInstanceArgs['tuple']['deleteFields(byte[][])void']> & {onComplete?: OnApplicationComplete.NoOpOC}) {\n        promiseChain = promiseChain.then(async () => composer.addAppCallMethodCall(await client.params.deleteFields(params)))\n        resultMappers.push(undefined)\n        return this\n      },\n      /**\n       * Add a updateSegmentCount(string,uint64)void method call against the NFDInstance contract\n       */\n      updateSegmentCount(params: CallParams<NfdInstanceArgs['obj']['updateSegmentCount(string,uint64)void'] | NfdInstanceArgs['tuple']['updateSegmentCount(string,uint64)void']> & {onComplete?: OnApplicationComplete.NoOpOC}) {\n        promiseChain = promiseChain.then(async () => composer.addAppCallMethodCall(await client.params.updateSegmentCount(params)))\n        resultMappers.push(undefined)\n        return this\n      },\n      /**\n       * Add a getFieldUpdateCost(byte[][])uint64 method call against the NFDInstance contract\n       */\n      getFieldUpdateCost(params: CallParams<NfdInstanceArgs['obj']['getFieldUpdateCost(byte[][])uint64'] | NfdInstanceArgs['tuple']['getFieldUpdateCost(byte[][])uint64']> & {onComplete?: OnApplicationComplete.NoOpOC}) {\n        promiseChain = promiseChain.then(async () => composer.addAppCallMethodCall(await client.params.getFieldUpdateCost(params)))\n        resultMappers.push((v) => client.decodeReturnValue('getFieldUpdateCost(byte[][])uint64', v))\n        return this\n      },\n      /**\n       * Add a updateFields(byte[][])void method call against the NFDInstance contract\n       */\n      updateFields(params: CallParams<NfdInstanceArgs['obj']['updateFields(byte[][])void'] | NfdInstanceArgs['tuple']['updateFields(byte[][])void']> & {onComplete?: OnApplicationComplete.NoOpOC}) {\n        promiseChain = promiseChain.then(async () => composer.addAppCallMethodCall(await client.params.updateFields(params)))\n        resultMappers.push(undefined)\n        return this\n      },\n      /**\n       * Add a readField(byte[])byte[] method call against the NFDInstance contract\n       */\n      readField(params: CallParams<NfdInstanceArgs['obj']['readField(byte[])byte[]'] | NfdInstanceArgs['tuple']['readField(byte[])byte[]']> & {onComplete?: OnApplicationComplete.NoOpOC}) {\n        promiseChain = promiseChain.then(async () => composer.addAppCallMethodCall(await client.params.readField(params)))\n        resultMappers.push((v) => client.decodeReturnValue('readField(byte[])byte[]', v))\n        return this\n      },\n      /**\n       * Add a offerForSale(uint64,address)void method call against the NFDInstance contract\n       */\n      offerForSale(params: CallParams<NfdInstanceArgs['obj']['offerForSale(uint64,address)void'] | NfdInstanceArgs['tuple']['offerForSale(uint64,address)void']> & {onComplete?: OnApplicationComplete.NoOpOC}) {\n        promiseChain = promiseChain.then(async () => composer.addAppCallMethodCall(await client.params.offerForSale(params)))\n        resultMappers.push(undefined)\n        return this\n      },\n      /**\n       * Add a cancelSale()void method call against the NFDInstance contract\n       */\n      cancelSale(params: CallParams<NfdInstanceArgs['obj']['cancelSale()void'] | NfdInstanceArgs['tuple']['cancelSale()void']> & {onComplete?: OnApplicationComplete.NoOpOC}) {\n        promiseChain = promiseChain.then(async () => composer.addAppCallMethodCall(await client.params.cancelSale(params)))\n        resultMappers.push(undefined)\n        return this\n      },\n      /**\n       * Add a postOffer(uint64,string)void method call against the NFDInstance contract\n       */\n      postOffer(params: CallParams<NfdInstanceArgs['obj']['postOffer(uint64,string)void'] | NfdInstanceArgs['tuple']['postOffer(uint64,string)void']> & {onComplete?: OnApplicationComplete.NoOpOC}) {\n        promiseChain = promiseChain.then(async () => composer.addAppCallMethodCall(await client.params.postOffer(params)))\n        resultMappers.push(undefined)\n        return this\n      },\n      /**\n       * Add a mintPayout(uint64,uint64)(uint64,address,uint64,address,uint64) method call against the NFDInstance contract\n       */\n      mintPayout(params: CallParams<NfdInstanceArgs['obj']['mintPayout(uint64,uint64)(uint64,address,uint64,address,uint64)'] | NfdInstanceArgs['tuple']['mintPayout(uint64,uint64)(uint64,address,uint64,address,uint64)']> & {onComplete?: OnApplicationComplete.NoOpOC}) {\n        promiseChain = promiseChain.then(async () => composer.addAppCallMethodCall(await client.params.mintPayout(params)))\n        resultMappers.push((v) => client.decodeReturnValue('mintPayout(uint64,uint64)(uint64,address,uint64,address,uint64)', v))\n        return this\n      },\n      /**\n       * Add a purchase(pay)void method call against the NFDInstance contract\n       */\n      purchase(params: CallParams<NfdInstanceArgs['obj']['purchase(pay)void'] | NfdInstanceArgs['tuple']['purchase(pay)void']> & {onComplete?: OnApplicationComplete.NoOpOC}) {\n        promiseChain = promiseChain.then(async () => composer.addAppCallMethodCall(await client.params.purchase(params)))\n        resultMappers.push(undefined)\n        return this\n      },\n      /**\n       * Add a isAddressInField(string,address)bool method call against the NFDInstance contract\n       */\n      isAddressInField(params: CallParams<NfdInstanceArgs['obj']['isAddressInField(string,address)bool'] | NfdInstanceArgs['tuple']['isAddressInField(string,address)bool']> & {onComplete?: OnApplicationComplete.NoOpOC}) {\n        promiseChain = promiseChain.then(async () => composer.addAppCallMethodCall(await client.params.isAddressInField(params)))\n        resultMappers.push((v) => client.decodeReturnValue('isAddressInField(string,address)bool', v))\n        return this\n      },\n      /**\n       * Add a getRenewPrice()uint64 method call against the NFDInstance contract\n       */\n      getRenewPrice(params: CallParams<NfdInstanceArgs['obj']['getRenewPrice()uint64'] | NfdInstanceArgs['tuple']['getRenewPrice()uint64']> & {onComplete?: OnApplicationComplete.NoOpOC}) {\n        promiseChain = promiseChain.then(async () => composer.addAppCallMethodCall(await client.params.getRenewPrice(params)))\n        resultMappers.push((v) => client.decodeReturnValue('getRenewPrice()uint64', v))\n        return this\n      },\n      /**\n       * Add a updateHash(byte[])void method call against the NFDInstance contract\n       */\n      updateHash(params: CallParams<NfdInstanceArgs['obj']['updateHash(byte[])void'] | NfdInstanceArgs['tuple']['updateHash(byte[])void']> & {onComplete?: OnApplicationComplete.NoOpOC}) {\n        promiseChain = promiseChain.then(async () => composer.addAppCallMethodCall(await client.params.updateHash(params)))\n        resultMappers.push(undefined)\n        return this\n      },\n      /**\n       * Add a contractLock(bool)void method call against the NFDInstance contract\n       */\n      contractLock(params: CallParams<NfdInstanceArgs['obj']['contractLock(bool)void'] | NfdInstanceArgs['tuple']['contractLock(bool)void']> & {onComplete?: OnApplicationComplete.NoOpOC}) {\n        promiseChain = promiseChain.then(async () => composer.addAppCallMethodCall(await client.params.contractLock(params)))\n        resultMappers.push(undefined)\n        return this\n      },\n      /**\n       * Add a segmentLock(bool,uint64)void method call against the NFDInstance contract\n       */\n      segmentLock(params: CallParams<NfdInstanceArgs['obj']['segmentLock(bool,uint64)void'] | NfdInstanceArgs['tuple']['segmentLock(bool,uint64)void']> & {onComplete?: OnApplicationComplete.NoOpOC}) {\n        promiseChain = promiseChain.then(async () => composer.addAppCallMethodCall(await client.params.segmentLock(params)))\n        resultMappers.push(undefined)\n        return this\n      },\n      /**\n       * Add a vaultOptInLock(bool)void method call against the NFDInstance contract\n       */\n      vaultOptInLock(params: CallParams<NfdInstanceArgs['obj']['vaultOptInLock(bool)void'] | NfdInstanceArgs['tuple']['vaultOptInLock(bool)void']> & {onComplete?: OnApplicationComplete.NoOpOC}) {\n        promiseChain = promiseChain.then(async () => composer.addAppCallMethodCall(await client.params.vaultOptInLock(params)))\n        resultMappers.push(undefined)\n        return this\n      },\n      /**\n       * Add a vaultOptIn(uint64[])void method call against the NFDInstance contract\n       */\n      vaultOptIn(params: CallParams<NfdInstanceArgs['obj']['vaultOptIn(uint64[])void'] | NfdInstanceArgs['tuple']['vaultOptIn(uint64[])void']> & {onComplete?: OnApplicationComplete.NoOpOC}) {\n        promiseChain = promiseChain.then(async () => composer.addAppCallMethodCall(await client.params.vaultOptIn(params)))\n        resultMappers.push(undefined)\n        return this\n      },\n      /**\n       * Add a vaultSend(uint64,address,string,uint64,uint64[])void method call against the NFDInstance contract\n       */\n      vaultSend(params: CallParams<NfdInstanceArgs['obj']['vaultSend(uint64,address,string,uint64,uint64[])void'] | NfdInstanceArgs['tuple']['vaultSend(uint64,address,string,uint64,uint64[])void']> & {onComplete?: OnApplicationComplete.NoOpOC}) {\n        promiseChain = promiseChain.then(async () => composer.addAppCallMethodCall(await client.params.vaultSend(params)))\n        resultMappers.push(undefined)\n        return this\n      },\n      /**\n       * Add a renew(pay)void method call against the NFDInstance contract\n       */\n      renew(params: CallParams<NfdInstanceArgs['obj']['renew(pay)void'] | NfdInstanceArgs['tuple']['renew(pay)void']> & {onComplete?: OnApplicationComplete.NoOpOC}) {\n        promiseChain = promiseChain.then(async () => composer.addAppCallMethodCall(await client.params.renew(params)))\n        resultMappers.push(undefined)\n        return this\n      },\n      /**\n       * Add a setPrimaryAddress(string,address)void method call against the NFDInstance contract\n       */\n      setPrimaryAddress(params: CallParams<NfdInstanceArgs['obj']['setPrimaryAddress(string,address)void'] | NfdInstanceArgs['tuple']['setPrimaryAddress(string,address)void']> & {onComplete?: OnApplicationComplete.NoOpOC}) {\n        promiseChain = promiseChain.then(async () => composer.addAppCallMethodCall(await client.params.setPrimaryAddress(params)))\n        resultMappers.push(undefined)\n        return this\n      },\n      /**\n       * Add a registryAddingVerifiedAddress(string,string)bool method call against the NFDInstance contract\n       */\n      registryAddingVerifiedAddress(params: CallParams<NfdInstanceArgs['obj']['registryAddingVerifiedAddress(string,string)bool'] | NfdInstanceArgs['tuple']['registryAddingVerifiedAddress(string,string)bool']> & {onComplete?: OnApplicationComplete.NoOpOC}) {\n        promiseChain = promiseChain.then(async () => composer.addAppCallMethodCall(await client.params.registryAddingVerifiedAddress(params)))\n        resultMappers.push((v) => client.decodeReturnValue('registryAddingVerifiedAddress(string,string)bool', v))\n        return this\n      },\n      /**\n       * Add a registryRemovingVerifiedAddress(string,address,address)bool method call against the NFDInstance contract\n       */\n      registryRemovingVerifiedAddress(params: CallParams<NfdInstanceArgs['obj']['registryRemovingVerifiedAddress(string,address,address)bool'] | NfdInstanceArgs['tuple']['registryRemovingVerifiedAddress(string,address,address)bool']> & {onComplete?: OnApplicationComplete.NoOpOC}) {\n        promiseChain = promiseChain.then(async () => composer.addAppCallMethodCall(await client.params.registryRemovingVerifiedAddress(params)))\n        resultMappers.push((v) => client.decodeReturnValue('registryRemovingVerifiedAddress(string,address,address)bool', v))\n        return this\n      },\n      get update() {\n        return {\n          updateApplication: (params: CallParams<NfdInstanceArgs['obj']['updateApplication(string)void'] | NfdInstanceArgs['tuple']['updateApplication(string)void']> & AppClientCompilationParams) => {\n            promiseChain = promiseChain.then(async () => composer.addAppUpdateMethodCall(await client.params.update.updateApplication(params)))\n            resultMappers.push(undefined)\n            return this\n          },\n        }\n      },\n      /**\n       * Add a clear state call to the NFDInstance contract\n       */\n      clearState(params: AppClientBareCallParams) {\n        promiseChain = promiseChain.then(() => composer.addAppCall(client.params.clearState(params)))\n        return this\n      },\n      addTransaction(txn: Transaction, signer?: TransactionSigner) {\n        promiseChain = promiseChain.then(() => composer.addTransaction(txn, signer))\n        return this\n      },\n      async composer() {\n        await promiseChain\n        return composer\n      },\n      async simulate(options?: SimulateOptions) {\n        await promiseChain\n        const result = await (!options ? composer.simulate() : composer.simulate(options))\n        return {\n          ...result,\n          returns: result.returns?.map((val, i) => resultMappers[i] !== undefined ? resultMappers[i]!(val) : val.returnValue)\n        }\n      },\n      async send(params?: SendParams) {\n        await promiseChain\n        const result = await composer.send(params)\n        return {\n          ...result,\n          returns: result.returns?.map((val, i) => resultMappers[i] !== undefined ? resultMappers[i]!(val) : val.returnValue)\n        }\n      }\n    } as unknown as NfdInstanceComposer\n  }\n}\nexport type NfdInstanceComposer<TReturns extends [...any[]] = []> = {\n  /**\n   * Calls the gas()void ABI method.\n   *\n   * @param args The arguments for the contract call\n   * @param params Any additional parameters for the call\n   * @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions\n   */\n  gas(params?: CallParams<NfdInstanceArgs['obj']['gas()void'] | NfdInstanceArgs['tuple']['gas()void']>): NfdInstanceComposer<[...TReturns, NfdInstanceReturns['gas()void'] | undefined]>\n\n  /**\n   * Calls the mintAsa(string,string)void ABI method.\n   *\n   * @param args The arguments for the contract call\n   * @param params Any additional parameters for the call\n   * @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions\n   */\n  mintAsa(params?: CallParams<NfdInstanceArgs['obj']['mintAsa(string,string)void'] | NfdInstanceArgs['tuple']['mintAsa(string,string)void']>): NfdInstanceComposer<[...TReturns, NfdInstanceReturns['mintAsa(string,string)void'] | undefined]>\n\n  /**\n   * Calls the deleteFields(byte[][])void ABI method.\n   *\n   * @param args The arguments for the contract call\n   * @param params Any additional parameters for the call\n   * @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions\n   */\n  deleteFields(params?: CallParams<NfdInstanceArgs['obj']['deleteFields(byte[][])void'] | NfdInstanceArgs['tuple']['deleteFields(byte[][])void']>): NfdInstanceComposer<[...TReturns, NfdInstanceReturns['deleteFields(byte[][])void'] | undefined]>\n\n  /**\n   * Calls the updateSegmentCount(string,uint64)void ABI method.\n   *\n   * @param args The arguments for the contract call\n   * @param params Any additional parameters for the call\n   * @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions\n   */\n  updateSegmentCount(params?: CallParams<NfdInstanceArgs['obj']['updateSegmentCount(string,uint64)void'] | NfdInstanceArgs['tuple']['updateSegmentCount(string,uint64)void']>): NfdInstanceComposer<[...TReturns, NfdInstanceReturns['updateSegmentCount(string,uint64)void'] | undefined]>\n\n  /**\n   * Calls the getFieldUpdateCost(byte[][])uint64 ABI method.\n   *\n   * @param args The arguments for the contract call\n   * @param params Any additional parameters for the call\n   * @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions\n   */\n  getFieldUpdateCost(params?: CallParams<NfdInstanceArgs['obj']['getFieldUpdateCost(byte[][])uint64'] | NfdInstanceArgs['tuple']['getFieldUpdateCost(byte[][])uint64']>): NfdInstanceComposer<[...TReturns, NfdInstanceReturns['getFieldUpdateCost(byte[][])uint64'] | undefined]>\n\n  /**\n   * Calls the updateFields(byte[][])void ABI method.\n   *\n   * @param args The arguments for the contract call\n   * @param params Any additional parameters for the call\n   * @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions\n   */\n  updateFields(params?: CallParams<NfdInstanceArgs['obj']['updateFields(byte[][])void'] | NfdInstanceArgs['tuple']['updateFields(byte[][])void']>): NfdInstanceComposer<[...TReturns, NfdInstanceReturns['updateFields(byte[][])void'] | undefined]>\n\n  /**\n   * Calls the readField(byte[])byte[] ABI method.\n   *\n   * @param args The arguments for the contract call\n   * @param params Any additional parameters for the call\n   * @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions\n   */\n  readField(params?: CallParams<NfdInstanceArgs['obj']['readField(byte[])byte[]'] | NfdInstanceArgs['tuple']['readField(byte[])byte[]']>): NfdInstanceComposer<[...TReturns, NfdInstanceReturns['readField(byte[])byte[]'] | undefined]>\n\n  /**\n   * Calls the offerForSale(uint64,address)void ABI method.\n   *\n   * @param args The arguments for the contract call\n   * @param params Any additional parameters for the call\n   * @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions\n   */\n  offerForSale(params?: CallParams<NfdInstanceArgs['obj']['offerForSale(uint64,address)void'] | NfdInstanceArgs['tuple']['offerForSale(uint64,address)void']>): NfdInstanceComposer<[...TReturns, NfdInstanceReturns['offerForSale(uint64,address)void'] | undefined]>\n\n  /**\n   * Calls the cancelSale()void ABI method.\n   *\n   * @param args The arguments for the contract call\n   * @param params Any additional parameters for the call\n   * @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions\n   */\n  cancelSale(params?: CallParams<NfdInstanceArgs['obj']['cancelSale()void'] | NfdInstanceArgs['tuple']['cancelSale()void']>): NfdInstanceComposer<[...TReturns, NfdInstanceReturns['cancelSale()void'] | undefined]>\n\n  /**\n   * Calls the postOffer(uint64,string)void ABI method.\n   *\n   * @param args The arguments for the contract call\n   * @param params Any additional parameters for the call\n   * @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions\n   */\n  postOffer(params?: CallParams<NfdInstanceArgs['obj']['postOffer(uint64,string)void'] | NfdInstanceArgs['tuple']['postOffer(uint64,string)void']>): NfdInstanceComposer<[...TReturns, NfdInstanceReturns['postOffer(uint64,string)void'] | undefined]>\n\n  /**\n   * Calls the mintPayout(uint64,uint64)(uint64,address,uint64,address,uint64) ABI method.\n   *\n   * @param args The arguments for the contract call\n   * @param params Any additional parameters for the call\n   * @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions\n   */\n  mintPayout(params?: CallParams<NfdInstanceArgs['obj']['mintPayout(uint64,uint64)(uint64,address,uint64,address,uint64)'] | NfdInstanceArgs['tuple']['mintPayout(uint64,uint64)(uint64,address,uint64,address,uint64)']>): NfdInstanceComposer<[...TReturns, NfdInstanceReturns['mintPayout(uint64,uint64)(uint64,address,uint64,address,uint64)'] | undefined]>\n\n  /**\n   * Calls the purchase(pay)void ABI method.\n   *\n   * @param args The arguments for the contract call\n   * @param params Any additional parameters for the call\n   * @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions\n   */\n  purchase(params?: CallParams<NfdInstanceArgs['obj']['purchase(pay)void'] | NfdInstanceArgs['tuple']['purchase(pay)void']>): NfdInstanceComposer<[...TReturns, NfdInstanceReturns['purchase(pay)void'] | undefined]>\n\n  /**\n   * Calls the isAddressInField(string,address)bool ABI method.\n   *\n   * @param args The arguments for the contract call\n   * @param params Any additional parameters for the call\n   * @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions\n   */\n  isAddressInField(params?: CallParams<NfdInstanceArgs['obj']['isAddressInField(string,address)bool'] | NfdInstanceArgs['tuple']['isAddressInField(string,address)bool']>): NfdInstanceComposer<[...TReturns, NfdInstanceReturns['isAddressInField(string,address)bool'] | undefined]>\n\n  /**\n   * Calls the getRenewPrice()uint64 ABI method.\n   *\n   * @param args The arguments for the contract call\n   * @param params Any additional parameters for the call\n   * @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions\n   */\n  getRenewPrice(params?: CallParams<NfdInstanceArgs['obj']['getRenewPrice()uint64'] | NfdInstanceArgs['tuple']['getRenewPrice()uint64']>): NfdInstanceComposer<[...TReturns, NfdInstanceReturns['getRenewPrice()uint64'] | undefined]>\n\n  /**\n   * Calls the updateHash(byte[])void ABI method.\n   *\n   * @param args The arguments for the contract call\n   * @param params Any additional parameters for the call\n   * @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions\n   */\n  updateHash(params?: CallParams<NfdInstanceArgs['obj']['updateHash(byte[])void'] | NfdInstanceArgs['tuple']['updateHash(byte[])void']>): NfdInstanceComposer<[...TReturns, NfdInstanceReturns['updateHash(byte[])void'] | undefined]>\n\n  /**\n   * Calls the contractLock(bool)void ABI method.\n   *\n   * @param args The arguments for the contract call\n   * @param params Any additional parameters for the call\n   * @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions\n   */\n  contractLock(params?: CallParams<NfdInstanceArgs['obj']['contractLock(bool)void'] | NfdInstanceArgs['tuple']['contractLock(bool)void']>): NfdInstanceComposer<[...TReturns, NfdInstanceReturns['contractLock(bool)void'] | undefined]>\n\n  /**\n   * Calls the segmentLock(bool,uint64)void ABI method.\n   *\n   * @param args The arguments for the contract call\n   * @param params Any additional parameters for the call\n   * @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions\n   */\n  segmentLock(params?: CallParams<NfdInstanceArgs['obj']['segmentLock(bool,uint64)void'] | NfdInstanceArgs['tuple']['segmentLock(bool,uint64)void']>): NfdInstanceComposer<[...TReturns, NfdInstanceReturns['segmentLock(bool,uint64)void'] | undefined]>\n\n  /**\n   * Calls the vaultOptInLock(bool)void ABI method.\n   *\n   * @param args The arguments for the contract call\n   * @param params Any additional parameters for the call\n   * @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions\n   */\n  vaultOptInLock(params?: CallParams<NfdInstanceArgs['obj']['vaultOptInLock(bool)void'] | NfdInstanceArgs['tuple']['vaultOptInLock(bool)void']>): NfdInstanceComposer<[...TReturns, NfdInstanceReturns['vaultOptInLock(bool)void'] | undefined]>\n\n  /**\n   * Calls the vaultOptIn(uint64[])void ABI method.\n   *\n   * @param args The arguments for the contract call\n   * @param params Any additional parameters for the call\n   * @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions\n   */\n  vaultOptIn(params?: CallParams<NfdInstanceArgs['obj']['vaultOptIn(uint64[])void'] | NfdInstanceArgs['tuple']['vaultOptIn(uint64[])void']>): NfdInstanceComposer<[...TReturns, NfdInstanceReturns['vaultOptIn(uint64[])void'] | undefined]>\n\n  /**\n   * Calls the vaultSend(uint64,address,string,uint64,uint64[])void ABI method.\n   *\n   * @param args The arguments for the contract call\n   * @param params Any additional parameters for the call\n   * @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions\n   */\n  vaultSend(params?: CallParams<NfdInstanceArgs['obj']['vaultSend(uint64,address,string,uint64,uint64[])void'] | NfdInstanceArgs['tuple']['vaultSend(uint64,address,string,uint64,uint64[])void']>): NfdInstanceComposer<[...TReturns, NfdInstanceReturns['vaultSend(uint64,address,string,uint64,uint64[])void'] | undefined]>\n\n  /**\n   * Calls the renew(pay)void ABI method.\n   *\n  * Renew adds more time to an existing NFDs expiration, or renews it if expired.\n  \n  \n  As part of v2-v3 upgrade, the NFDs are converted from lifetime NFDs to renewal NFDs. The v2 contract is upgraded\n  to v3, then renew is called on the (now v3) nfd to turn it into a renewal (note the if curExpiration === 0 check)\n  \n  \n  If already renewal, then it extends the current expiration time by the time specified (minimum 1 yr) (365 / price paid * mint price)\n  Expirations can never be more than NFD_MAX_EXPIRATION_DAYS days in the future.\n  \n  \n  IF the NFD is expired:\n     x The current owner can take it back over at base price - and NFD metadata doesn't have to be cleared - they\n     get it back as-is.\n     x If not current owner, then the price goes from high of base price * 10,000 down to base price over 24 hrs where\n     'buyer' has to pay at least that price.  The NFD MUST ALREADY HAVE ITS METADATA CLEARED!\n\n   *\n   * @param args The arguments for the contract call\n   * @param params Any additional parameters for the call\n   * @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions\n   */\n  renew(params?: CallParams<NfdInstanceArgs['obj']['renew(pay)void'] | NfdInstanceArgs['tuple']['renew(pay)void']>): NfdInstanceComposer<[...TReturns, NfdInstanceReturns['renew(pay)void'] | undefined]>\n\n  /**\n   * Calls the setPrimaryAddress(string,address)void ABI method.\n   *\n   * @param args The arguments for the contract call\n   * @param params Any additional parameters for the call\n   * @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions\n   */\n  setPrimaryAddress(params?: CallParams<NfdInstanceArgs['obj']['setPrimaryAddress(string,address)void'] | NfdInstanceArgs['tuple']['setPrimaryAddress(string,address)void']>): NfdInstanceComposer<[...TReturns, NfdInstanceReturns['setPrimaryAddress(string,address)void'] | undefined]>\n\n  /**\n   * Calls the registryAddingVerifiedAddress(string,string)bool ABI method.\n   *\n  * Approved call from registry instructing us to move the specified u.cav.xx field and add to the specified\n  verified field.\n\n   *\n   * @param args The arguments for the contract call\n   * @param params Any additional parameters for the call\n   * @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions\n   */\n  registryAddingVerifiedAddress(params?: CallParams<NfdInstanceArgs['obj']['registryAddingVerifiedAddress(string,string)bool'] | NfdInstanceArgs['tuple']['registryAddingVerifiedAddress(string,string)bool']>): NfdInstanceComposer<[...TReturns, NfdInstanceReturns['registryAddingVerifiedAddress(string,string)bool'] | undefined]>\n\n  /**\n   * Calls the registryRemovingVerifiedAddress(string,address,address)bool ABI method.\n   *\n   * Approved call from registry instructing us to REMOVE an address from the specified verified address set\n   *\n   * @param args The arguments for the contract call\n   * @param params Any additional parameters for the call\n   * @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions\n   */\n  registryRemovingVerifiedAddress(params?: CallParams<NfdInstanceArgs['obj']['registryRemovingVerifiedAddress(string,address,address)bool'] | NfdInstanceArgs['tuple']['registryRemovingVerifiedAddress(string,address,address)bool']>): NfdInstanceComposer<[...TReturns, NfdInstanceReturns['registryRemovingVerifiedAddress(string,address,address)bool'] | undefined]>\n\n  /**\n   * Makes a clear_state call to an existing instance of the NFDInstance smart contract.\n   *\n   * @param args The arguments for the bare call\n   * @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions\n   */\n  clearState(params?: AppClientBareCallParams): NfdInstanceComposer<[...TReturns, undefined]>\n\n  /**\n   * Adds a transaction to the composer\n   *\n   * @param txn A transaction to add to the transaction group\n   * @param signer The optional signer to use when signing this transaction.\n   */\n  addTransaction(txn: Transaction, signer?: TransactionSigner): NfdInstanceComposer<TReturns>\n  /**\n   * Returns the underlying AtomicTransactionComposer instance\n   */\n  composer(): Promise<TransactionComposer>\n  /**\n   * Simulates the transaction group and returns the result\n   */\n  simulate(): Promise<NfdInstanceComposerResults<TReturns> & { simulateResponse: SimulateResponse }>\n  simulate(options: SkipSignaturesSimulateOptions): Promise<NfdInstanceComposerResults<TReturns> & { simulateResponse: SimulateResponse }>\n  simulate(options: RawSimulateOptions): Promise<NfdInstanceComposerResults<TReturns> & { simulateResponse: SimulateResponse }>\n  /**\n   * Sends the transaction group to the network and returns the results\n   */\n  send(params?: SendParams): Promise<NfdInstanceComposerResults<TReturns>>\n}\nexport type NfdInstanceComposerResults<TReturns extends [...any[]]> = Expand<SendAtomicTransactionComposerResults & {\n  returns: TReturns\n}>\n\n","/* eslint-disable */\n/**\n * This file was automatically generated by @algorandfoundation/algokit-client-generator.\n * DO NOT MODIFY IT BY HAND.\n * requires: @algorandfoundation/algokit-utils: ^7\n */\nimport { AlgorandClientInterface } from '@algorandfoundation/algokit-utils/types/algorand-client-interface'\nimport { ABIReturn, AppReturn, SendAppTransactionResult } from '@algorandfoundation/algokit-utils/types/app'\nimport { Arc56Contract, getArc56ReturnValue, getABIStructFromABITuple } from '@algorandfoundation/algokit-utils/types/app-arc56'\nimport {\n  AppClient as _AppClient,\n  AppClientMethodCallParams,\n  AppClientParams,\n  AppClientBareCallParams,\n  CallOnComplete,\n  AppClientCompilationParams,\n  ResolveAppClientByCreatorAndName,\n  ResolveAppClientByNetwork,\n  CloneAppClientParams,\n} from '@algorandfoundation/algokit-utils/types/app-client'\nimport { AppFactory as _AppFactory, AppFactoryAppClientParams, AppFactoryResolveAppClientByCreatorAndNameParams, AppFactoryDeployParams, AppFactoryParams, CreateSchema } from '@algorandfoundation/algokit-utils/types/app-factory'\nimport { TransactionComposer, AppCallMethodCall, AppMethodCallTransactionArgument, SimulateOptions, RawSimulateOptions, SkipSignaturesSimulateOptions } from '@algorandfoundation/algokit-utils/types/composer'\nimport { SendParams, SendSingleTransactionResult, SendAtomicTransactionComposerResults } from '@algorandfoundation/algokit-utils/types/transaction'\nimport { Address, encodeAddress, modelsv2, OnApplicationComplete, Transaction, TransactionSigner } from 'algosdk'\nimport SimulateResponse = modelsv2.SimulateResponse\n\nexport const APP_SPEC: Arc56Contract = {\"name\":\"NFDRegistry\",\"desc\":\"\",\"methods\":[{\"name\":\"updateApplication\",\"args\":[],\"returns\":{\"type\":\"void\"},\"actions\":{\"create\":[],\"call\":[\"UpdateApplication\"]}},{\"name\":\"gas\",\"args\":[],\"returns\":{\"type\":\"void\"},\"actions\":{\"create\":[],\"call\":[\"NoOp\"]}},{\"name\":\"getPrice\",\"desc\":\"Returns the price for a given NFD (single year), the max # of years allowed (Name for Display),\\nand extra algo required to cover MBR when purchasing.\",\"args\":[{\"name\":\"nfdName\",\"type\":\"string\",\"desc\":\"The NFD name for which to retrieve the price.\"},{\"name\":\"caller\",\"type\":\"address\",\"desc\":\"the address this request is on behalf of (since an nfd contract might call us it\\nneeds to be able to pass on the request on behalf of ITS caller - ie: getting price for an expired nfd will be\\ndifferent if its owner ir asking.\\n PriceInfo Type containing the price, carry cost, etc.\"}],\"returns\":{\"type\":\"(uint64,uint64,bool,bool,bool)\",\"struct\":\"PriceInfo\"},\"actions\":{\"create\":[],\"call\":[\"NoOp\"]}},{\"name\":\"getConstraints\",\"args\":[],\"returns\":{\"type\":\"(uint64,uint64,uint64,address,uint64,uint64,uint64)\",\"struct\":\"Constraints\"},\"actions\":{\"create\":[],\"call\":[\"NoOp\"]}},{\"name\":\"getNfdMbrCost\",\"desc\":\"Returns the MBR amounts needed to MINT an nfd.\\nThis value needs to be added to purchase price in mintNfd call.\\ngetPrice() returns it though.\",\"args\":[{\"name\":\"nfdName\",\"type\":\"string\"}],\"returns\":{\"type\":\"uint64\"},\"actions\":{\"create\":[],\"call\":[\"NoOp\"]}},{\"name\":\"getNfdLinkOnMintExtraMbrCost\",\"args\":[{\"name\":\"address\",\"type\":\"address\"}],\"returns\":{\"type\":\"(uint64,uint64)\",\"struct\":\"LinkOnMintExtraMbrCosts\"},\"actions\":{\"create\":[],\"call\":[\"NoOp\"]}},{\"name\":\"mintNfd\",\"desc\":\"Mint an NFD (NFT) and create a new NFD instance.\",\"args\":[{\"name\":\"purchaseTxn\",\"type\":\"pay\",\"desc\":\"The payment transaction covering the purchase amount of the nfd\"},{\"name\":\"nfdName\",\"type\":\"string\",\"desc\":\"The name of the NFD to mint\"},{\"name\":\"reservedFor\",\"type\":\"address\",\"desc\":\"The address that will own the NFD once minted (so you can buy for someone else)\"},{\"name\":\"linkOnMint\",\"type\":\"bool\",\"desc\":\"whether to auto-link the address (reserved for MUST MATCH payer!) at mint\\n uint64 - The ID of the newly created NFD instance.\"}],\"returns\":{\"type\":\"uint64\"},\"events\":[{\"name\":\"nfdRegistry_minted\",\"args\":[{\"name\":\"appId\",\"type\":\"uint64\"},{\"name\":\"name\",\"type\":\"string\"},{\"name\":\"priceOneYear\",\"type\":\"uint64\"},{\"name\":\"paidAmount\",\"type\":\"uint64\"},{\"name\":\"carryCost\",\"type\":\"uint64\"},{\"name\":\"seller\",\"type\":\"address\"},{\"name\":\"buyer\",\"type\":\"address\"},{\"name\":\"owner\",\"type\":\"address\"},{\"name\":\"expTime\",\"type\":\"uint64\"},{\"name\":\"amountToSeller\",\"type\":\"uint64\"},{\"name\":\"commissionAddress\",\"type\":\"address\"},{\"name\":\"amountToCommission\",\"type\":\"uint64\"},{\"name\":\"segmentRootOwner\",\"type\":\"address\"},{\"name\":\"amountToSegmentRoot\",\"type\":\"uint64\"}],\"desc\":\"\"}],\"actions\":{\"create\":[],\"call\":[\"NoOp\"]}},{\"name\":\"linkNfdAddress\",\"args\":[{\"name\":\"nfdName\",\"type\":\"string\"},{\"name\":\"nfdAppId\",\"type\":\"uint64\"},{\"name\":\"addrToVerify\",\"type\":\"address\"}],\"returns\":{\"type\":\"void\"},\"actions\":{\"create\":[],\"call\":[\"NoOp\"]}},{\"name\":\"unlinkNfdAddress\",\"args\":[{\"name\":\"nfdName\",\"type\":\"string\"},{\"name\":\"nfdAppId\",\"type\":\"uint64\"},{\"name\":\"addrToUnlink\",\"type\":\"address\"}],\"returns\":{\"type\":\"void\"},\"actions\":{\"create\":[],\"call\":[\"NoOp\"]}},{\"name\":\"ownershipAssign\",\"args\":[{\"name\":\"nfdName\",\"type\":\"string\"},{\"name\":\"nfdAppId\",\"type\":\"uint64\"}],\"returns\":{\"type\":\"void\"},\"actions\":{\"create\":[],\"call\":[\"NoOp\"]}},{\"name\":\"ownershipChanged\",\"desc\":\"This method is triggered when the ownership of an NFD (Non-Fungible Domain) changes.\\nIt is called by the NFD via the purchase method.  It can also be called by TxnLab admin for older 3.3\\nNFDs when it detects purchased events for 3.3\",\"args\":[{\"name\":\"nfdName\",\"type\":\"string\",\"desc\":\"The name of the NFD.\"},{\"name\":\"nfdAppId\",\"type\":\"uint64\",\"desc\":\"The unique application ID of the NFD.\"},{\"name\":\"seller\",\"type\":\"address\",\"desc\":\"The address of the prior owner (seller) of the nfd\"},{\"name\":\"buyer\",\"type\":\"address\",\"desc\":\"The address of the new owner of the NFD.\"}],\"returns\":{\"type\":\"void\"},\"actions\":{\"create\":[],\"call\":[\"NoOp\"]}},{\"name\":\"setAddressPrimaryNfd\",\"desc\":\"Makes the specified NFD the 'first' NFD in the reverse-address set so its the primary NFD for this address.\\nThe NFD must be valid, and the sender must be the address (or nfd owner if vault).  The NFD wouldn't already be\\nin the reverse-lookup set if it wasn't already valid.\",\"args\":[{\"name\":\"nfdName\",\"type\":\"string\"},{\"name\":\"nfdAppId\",\"type\":\"uint64\"},{\"name\":\"addrBeingModified\",\"type\":\"address\"}],\"returns\":{\"type\":\"void\"},\"events\":[{\"name\":\"nfdRegistry_addressPrimaryNfdChanged\",\"args\":[{\"name\":\"appId\",\"type\":\"uint64\"},{\"name\":\"name\",\"type\":\"string\"},{\"name\":\"address\",\"type\":\"address\"}],\"desc\":\"\"}],\"actions\":{\"create\":[],\"call\":[\"NoOp\"]}},{\"name\":\"upgradeNfd\",\"args\":[{\"name\":\"nfdName\",\"type\":\"string\"}],\"returns\":{\"type\":\"string\"},\"actions\":{\"create\":[],\"call\":[\"NoOp\"]}},{\"name\":\"isValidNfdAppId\",\"args\":[{\"name\":\"nfdName\",\"type\":\"string\"},{\"name\":\"nfdAppId\",\"type\":\"uint64\"}],\"returns\":{\"type\":\"bool\"},\"actions\":{\"create\":[],\"call\":[\"NoOp\"]}},{\"name\":\"getNameAppId\",\"args\":[{\"name\":\"nfdName\",\"type\":\"string\"}],\"returns\":{\"type\":\"uint64\"},\"actions\":{\"create\":[],\"call\":[\"NoOp\"]}},{\"name\":\"getAddressAppIds\",\"args\":[{\"name\":\"lookupAddress\",\"type\":\"address\"}],\"returns\":{\"type\":\"uint64[]\"},\"actions\":{\"create\":[],\"call\":[\"NoOp\"]}},{\"name\":\"nfdContractInit\",\"desc\":\"Initializes the NFD contract bytecode into the registry\",\"args\":[{\"name\":\"version\",\"type\":\"string\",\"desc\":\"The version of the contract.\"},{\"name\":\"size\",\"type\":\"uint64\",\"desc\":\"exact byte size of contract to load\"},{\"name\":\"clearCode\",\"type\":\"byte[]\",\"desc\":\"bytes of clear code\"}],\"returns\":{\"type\":\"void\"},\"actions\":{\"create\":[],\"call\":[\"NoOp\"]}},{\"name\":\"nfdContractLoad\",\"desc\":\"Loads contract data into the  box at the specified offset.\",\"args\":[{\"name\":\"version\",\"type\":\"string\",\"desc\":\"The version of the contract.\"},{\"name\":\"offset\",\"type\":\"uint64\",\"desc\":\"The offset at which to replace the contract data within the box.\"},{\"name\":\"data\",\"type\":\"byte[]\",\"desc\":\"The contract data to be loaded.\"}],\"returns\":{\"type\":\"void\"},\"actions\":{\"create\":[],\"call\":[\"NoOp\"]}},{\"name\":\"nfdContractCommit\",\"desc\":\"Commit a new version of the contract.\",\"args\":[{\"name\":\"version\",\"type\":\"string\",\"desc\":\"The version number of the contract to be committed.\"}],\"returns\":{\"type\":\"void\"},\"actions\":{\"create\":[],\"call\":[\"NoOp\"]}},{\"name\":\"usdInMicroAlgo\",\"args\":[{\"name\":\"usdCost\",\"type\":\"uint64\"}],\"returns\":{\"type\":\"uint64\"},\"actions\":{\"create\":[],\"call\":[\"NoOp\"]}},{\"name\":\"costToAddToAddress\",\"desc\":\"Returns the cost to add an NFD to the reverse-lookup data\",\"args\":[{\"name\":\"lookupAddress\",\"type\":\"address\",\"desc\":\"The address to add the NFD app id to\"}],\"returns\":{\"type\":\"uint64\"},\"actions\":{\"create\":[],\"call\":[\"NoOp\"]}},{\"name\":\"calcFuturePrice\",\"desc\":\"Calculates the future price based on the current price and the number of years.\",\"args\":[{\"name\":\"curPrice\",\"type\":\"uint64\",\"desc\":\"The current price in USD (in decimals). For example, if the current price is $2.00, the value should be 200.\"},{\"name\":\"forTime\",\"type\":\"uint64\",\"desc\":\"The timestamp to calc the future price based on - ie: 1 year past 'go live date' the price would have inflated by 1 year.\\n\\n\\n uint64 The future price calculated based on the current price and the specified number of years.\"}],\"returns\":{\"type\":\"uint64\"},\"actions\":{\"create\":[],\"call\":[\"NoOp\"]}},{\"name\":\"createApplication\",\"args\":[],\"returns\":{\"type\":\"void\"},\"actions\":{\"create\":[\"NoOp\"],\"call\":[]}}],\"events\":[{\"name\":\"nfdRegistry_minted\",\"args\":[{\"name\":\"appId\",\"type\":\"uint64\"},{\"name\":\"name\",\"type\":\"string\"},{\"name\":\"priceOneYear\",\"type\":\"uint64\"},{\"name\":\"paidAmount\",\"type\":\"uint64\"},{\"name\":\"carryCost\",\"type\":\"uint64\"},{\"name\":\"seller\",\"type\":\"address\"},{\"name\":\"buyer\",\"type\":\"address\"},{\"name\":\"owner\",\"type\":\"address\"},{\"name\":\"expTime\",\"type\":\"uint64\"},{\"name\":\"amountToSeller\",\"type\":\"uint64\"},{\"name\":\"commissionAddress\",\"type\":\"address\"},{\"name\":\"amountToCommission\",\"type\":\"uint64\"},{\"name\":\"segmentRootOwner\",\"type\":\"address\"},{\"name\":\"amountToSegmentRoot\",\"type\":\"uint64\"}],\"desc\":\"\"},{\"name\":\"nfdRegistry_addressPrimaryNfdChanged\",\"args\":[{\"name\":\"appId\",\"type\":\"uint64\"},{\"name\":\"name\",\"type\":\"string\"},{\"name\":\"address\",\"type\":\"address\"}],\"desc\":\"\"}],\"arcs\":[4,56],\"structs\":{\"PriceInfo\":[{\"name\":\"oneYearPrice\",\"type\":\"uint64\"},{\"name\":\"carryCost\",\"type\":\"uint64\"},{\"name\":\"exists\",\"type\":\"bool\"},{\"name\":\"isExpired\",\"type\":\"bool\"},{\"name\":\"inAuction\",\"type\":\"bool\"}],\"Constraints\":[{\"name\":\"segmentPlatformCostInUsd\",\"type\":\"uint64\"},{\"name\":\"segmentPlatformCostInAlgo\",\"type\":\"uint64\"},{\"name\":\"maxYearsAllowed\",\"type\":\"uint64\"},{\"name\":\"treasuryAddress\",\"type\":\"address\"},{\"name\":\"expiredAuctionDuration\",\"type\":\"uint64\"},{\"name\":\"expiredStartingPrice\",\"type\":\"uint64\"},{\"name\":\"maxMintCarryCost\",\"type\":\"uint64\"}],\"LinkOnMintExtraMbrCosts\":[{\"name\":\"linkingNfdMbrCost\",\"type\":\"uint64\"},{\"name\":\"linkingRegistryMbrCost\",\"type\":\"uint64\"}]},\"state\":{\"schema\":{\"global\":{\"bytes\":0,\"ints\":0},\"local\":{\"bytes\":16,\"ints\":0}},\"keys\":{\"global\":{},\"local\":{},\"box\":{}},\"maps\":{\"global\":{},\"local\":{\"localState\":{\"keyType\":\"AVMBytes\",\"valueType\":\"AVMBytes\"}},\"box\":{\"boxes\":{\"keyType\":\"AVMBytes\",\"valueType\":\"AVMBytes\"}}}},\"bareActions\":{\"create\":[],\"call\":[]},\"sourceInfo\":{\"approval\":{\"sourceInfo\":[{\"teal\":25,\"source\":\"contracts/NFDRegistry.algo.ts:51\",\"errorMessage\":\"The requested action is not implemented in this contract. Are you using the correct OnComplete? Did you set your app ID?\",\"pc\":[35]},{\"teal\":414,\"source\":\"contracts/NFDRegistry.algo.ts:179\",\"errorMessage\":\"invalid\",\"pc\":[516]},{\"teal\":510,\"source\":\"contracts/NFDRegistry.algo.ts:198\",\"errorMessage\":\"invalid method\",\"pc\":[637]},{\"teal\":514,\"source\":\"contracts/NFDRegistry.algo.ts:200\",\"errorMessage\":\"unknown method\",\"pc\":[638]},{\"teal\":542,\"source\":\"contracts/NFDRegistry.algo.ts:216\",\"errorMessage\":\"argument 0 (caller) for getPrice must be a address\",\"pc\":[658]},{\"teal\":736,\"source\":\"contracts/NFDRegistry.algo.ts:256\",\"errorMessage\":\"argument 0 (address) for getNfdLinkOnMintExtraMbrCost must be a address\",\"pc\":[909]},{\"teal\":780,\"source\":\"contracts/NFDRegistry.algo.ts:272\",\"errorMessage\":\"argument 0 (linkOnMint) for mintNfd must be a bool\",\"pc\":[947]},{\"teal\":792,\"source\":\"contracts/NFDRegistry.algo.ts:272\",\"errorMessage\":\"argument 1 (reservedFor) for mintNfd must be a address\",\"pc\":[958]},{\"teal\":808,\"source\":\"contracts/NFDRegistry.algo.ts:272\",\"errorMessage\":\"argument 3 (purchaseTxn) for mintNfd must be a pay transaction\",\"pc\":[974]},{\"teal\":843,\"source\":\"contracts/NFDRegistry.algo.ts:273\",\"errorMessage\":\"transaction verification failed: {\\\"txn\\\":\\\"purchaseTxn\\\",\\\"field\\\":\\\"receiver\\\",\\\"expected\\\":\\\"this.app.address\\\"}\",\"pc\":[996]},{\"teal\":931,\"source\":\"contracts/NFDRegistry.algo.ts:290\",\"errorMessage\":\"parent nfd/id must be found\",\"pc\":[1085]},{\"teal\":951,\"source\":\"contracts/NFDRegistry.algo.ts:294\",\"errorMessage\":\"global state value does not exist: AppID.fromUint64(parentAppId).globalState(NFD_KEY_SELLER)\",\"pc\":[1114]},{\"teal\":968,\"source\":\"contracts/NFDRegistry.algo.ts:298\",\"errorMessage\":\"global state value does not exist: AppID.fromUint64(parentAppId).globalState(NFD_KEY_OWNER)\",\"pc\":[1128]},{\"teal\":972,\"source\":\"contracts/NFDRegistry.algo.ts:297\",\"errorMessage\":\"only owner of root can mint segments if segments are locked\",\"pc\":[1130]},{\"teal\":996,\"source\":\"contracts/NFDRegistry.algo.ts:306\",\"errorMessage\":\"price can never be 0\",\"pc\":[1154]},{\"teal\":1052,\"source\":\"contracts/NFDRegistry.algo.ts:315\",\"errorMessage\":\"if linking on mint, the buyer MUST be who will be the owner (reservedFor)\",\"pc\":[1208]},{\"teal\":1081,\"source\":\"contracts/NFDRegistry.algo.ts:322\",\"errorMessage\":\"payment transaction must be at least enough to cover 30 days of nfd cost + carry cost\",\"pc\":[1232]},{\"teal\":1090,\"source\":\"contracts/NFDRegistry.algo.ts:330\",\"errorMessage\":\"box value does not exist: this.boxes(REGISTRY_CONTRACT_BOX_CURRENT_CONTRACT).value\",\"pc\":[1236]},{\"teal\":1103,\"source\":\"contracts/NFDRegistry.algo.ts:333\",\"errorMessage\":\"box value does not exist: this.boxes(REGISTRY_CONTRACT_BOX_CURRENT_CONTRACT).value\",\"pc\":[1244]},{\"teal\":1115,\"source\":\"contracts/NFDRegistry.algo.ts:335\",\"errorMessage\":\"box value does not exist: this.boxes(concat(REGISTRY_CONTRACT_BOX_CLEAR_NAMEPREFIX, currentContractVer)).value\",\"pc\":[1254]},{\"teal\":1124,\"source\":\"contracts/NFDRegistry.algo.ts:336\",\"errorMessage\":\"box value does not exist: this.boxes(approvProgName).size\",\"pc\":[1260]},{\"teal\":1470,\"source\":\"contracts/NFDRegistry.algo.ts:425\",\"errorMessage\":\"global state value does not exist: AppID.fromUint64(parentAppId).globalState(NFD_KEY_VERSION)\",\"pc\":[1602]},{\"teal\":1475,\"source\":\"contracts/NFDRegistry.algo.ts:424\",\"errorMessage\":\"nfd root not 3.x must be version 2.12 in order for segment minting to succeed\",\"pc\":[1610]},{\"teal\":1768,\"source\":\"contracts/NFDRegistry.algo.ts:479\",\"errorMessage\":\"argument 0 (addrToVerify) for linkNfdAddress must be a address\",\"pc\":[1967]},{\"teal\":1804,\"source\":\"contracts/NFDRegistry.algo.ts:481\",\"errorMessage\":\"global state value does not exist: AppID.fromUint64(nfdAppId).globalState(NFD_KEY_OWNER)\",\"pc\":[1999]},{\"teal\":1814,\"source\":\"contracts/NFDRegistry.algo.ts:483\",\"errorMessage\":\"referenced NFD name/id must be valid\",\"pc\":[2009]},{\"teal\":1834,\"source\":\"contracts/NFDRegistry.algo.ts:489\",\"errorMessage\":\"verifying vault account, sender must be NFD owner\",\"pc\":[2026]},{\"teal\":1845,\"source\":\"contracts/NFDRegistry.algo.ts:492\",\"errorMessage\":\"app call sender must match address being added/removed\",\"pc\":[2035]},{\"teal\":1859,\"source\":\"contracts/NFDRegistry.algo.ts:495\",\"errorMessage\":\"nfd verified caAlgo.0.as must contain address being added/removed\",\"pc\":[2045]},{\"teal\":1878,\"source\":\"contracts/NFDRegistry.algo.ts:510\",\"errorMessage\":\"should add nfd to reverse address\",\"pc\":[2064]},{\"teal\":1899,\"source\":\"contracts/NFDRegistry.algo.ts:520\",\"errorMessage\":\"argument 0 (addrToUnlink) for unlinkNfdAddress must be a address\",\"pc\":[2083]},{\"teal\":1929,\"source\":\"contracts/NFDRegistry.algo.ts:521\",\"errorMessage\":\"global state value does not exist: AppID.fromUint64(nfdAppId).globalState(NFD_KEY_OWNER)\",\"pc\":[2108]},{\"teal\":1939,\"source\":\"contracts/NFDRegistry.algo.ts:523\",\"errorMessage\":\"referenced NFD name/id must be valid\",\"pc\":[2118]},{\"teal\":1969,\"source\":\"contracts/NFDRegistry.algo.ts:529\",\"errorMessage\":\"Sender unlinking must be NFD owner OR address removing itself\",\"pc\":[2148]},{\"teal\":1983,\"source\":\"contracts/NFDRegistry.algo.ts:534\",\"errorMessage\":\"nfd verified caAlgo.0.as must contain address being removed\",\"pc\":[2158]},{\"teal\":2085,\"source\":\"contracts/NFDRegistry.algo.ts:558\",\"errorMessage\":\"referenced NFD name/id must be valid\",\"pc\":[2257]},{\"teal\":2098,\"source\":\"contracts/NFDRegistry.algo.ts:560\",\"errorMessage\":\"global state value does not exist: AppID.fromUint64(nfdAppId).globalState(NFD_KEY_OWNER)\",\"pc\":[2264]},{\"teal\":2128,\"source\":\"contracts/NFDRegistry.algo.ts:579\",\"errorMessage\":\"argument 0 (buyer) for ownershipChanged must be a address\",\"pc\":[2291]},{\"teal\":2138,\"source\":\"contracts/NFDRegistry.algo.ts:579\",\"errorMessage\":\"argument 1 (seller) for ownershipChanged must be a address\",\"pc\":[2300]},{\"teal\":2191,\"source\":\"contracts/NFDRegistry.algo.ts:583\",\"errorMessage\":\"referenced NFD name/id must be valid\",\"pc\":[2337]},{\"teal\":2201,\"source\":\"contracts/NFDRegistry.algo.ts:584\",\"errorMessage\":\"global state value does not exist: AppID.fromUint64(nfdAppId).globalState(NFD_KEY_VERSION)\",\"pc\":[2343]},{\"teal\":2216,\"source\":\"contracts/NFDRegistry.algo.ts:586\",\"errorMessage\":\"only txnlab can call this method to backfill ownership, 3.4+ handles it by calling from the nfd itself\",\"pc\":[2358]},{\"teal\":2266,\"source\":\"contracts/NFDRegistry.algo.ts:609\",\"errorMessage\":\"argument 0 (addrBeingModified) for setAddressPrimaryNfd must be a address\",\"pc\":[2406]},{\"teal\":2302,\"source\":\"contracts/NFDRegistry.algo.ts:610\",\"errorMessage\":\"referenced NFD name/id must be valid\",\"pc\":[2433]},{\"teal\":2311,\"source\":\"contracts/NFDRegistry.algo.ts:611\",\"errorMessage\":\"global state value does not exist: AppID.fromUint64(nfdAppId).globalState(NFD_KEY_OWNER)\",\"pc\":[2438]},{\"teal\":2332,\"source\":\"contracts/NFDRegistry.algo.ts:617\",\"errorMessage\":\"if changing primary nfd for vault account, sender must be NFD owner\",\"pc\":[2457]},{\"teal\":2346,\"source\":\"contracts/NFDRegistry.algo.ts:620\",\"errorMessage\":\"app call sender must match address being updated to change primary NFD\",\"pc\":[2466]},{\"teal\":2428,\"source\":\"contracts/NFDRegistry.algo.ts:641\",\"errorMessage\":\"global state value does not exist: AppID.fromUint64(nfdAppId).globalState(NFD_KEY_OWNER)\",\"pc\":[2558]},{\"teal\":2438,\"source\":\"contracts/NFDRegistry.algo.ts:642\",\"errorMessage\":\"global state value does not exist: AppID.fromUint64(nfdAppId).globalState(NFD_KEY_NAME)\",\"pc\":[2566]},{\"teal\":2459,\"source\":\"contracts/NFDRegistry.algo.ts:643\",\"errorMessage\":\"only NFD owner or TxnLab can upgrade NFD\",\"pc\":[2586]},{\"teal\":2476,\"source\":\"contracts/NFDRegistry.algo.ts:652\",\"errorMessage\":\"box value does not exist: this.boxes(REGISTRY_CONTRACT_BOX_CURRENT_CONTRACT).value\",\"pc\":[2598]},{\"teal\":2489,\"source\":\"contracts/NFDRegistry.algo.ts:654\",\"errorMessage\":\"global state value does not exist: AppID.fromUint64(nfdAppId).globalState(NFD_KEY_VERSION)\",\"pc\":[2606]},{\"teal\":2494,\"source\":\"contracts/NFDRegistry.algo.ts:653\",\"errorMessage\":\"contract already at this version\",\"pc\":[2610]},{\"teal\":2506,\"source\":\"contracts/NFDRegistry.algo.ts:659\",\"errorMessage\":\"box value does not exist: this.boxes(REGISTRY_CONTRACT_BOX_CURRENT_CONTRACT).value\",\"pc\":[2616]},{\"teal\":2518,\"source\":\"contracts/NFDRegistry.algo.ts:661\",\"errorMessage\":\"box value does not exist: this.boxes(concat(REGISTRY_CONTRACT_BOX_CLEAR_NAMEPREFIX, currentContractVer)).value\",\"pc\":[2626]},{\"teal\":2527,\"source\":\"contracts/NFDRegistry.algo.ts:662\",\"errorMessage\":\"box value does not exist: this.boxes(approvProgName).size\",\"pc\":[2632]},{\"teal\":2730,\"source\":\"contracts/NFDRegistry.algo.ts:697\",\"errorMessage\":\"box value does not exist: this.boxes(boxName).value\",\"pc\":[2809]},{\"teal\":2768,\"source\":\"contracts/NFDRegistry.algo.ts:702\",\"errorMessage\":\"argument 0 (lookupAddress) for getAddressAppIds must be a address\",\"pc\":[2837]},{\"teal\":2827,\"source\":\"contracts/NFDRegistry.algo.ts:708\",\"errorMessage\":\"box value does not exist: this.boxes(boxName).value\",\"pc\":[2888]},{\"teal\":3056,\"source\":\"contracts/NFDRegistry.algo.ts:758\",\"errorMessage\":\"global state value does not exist: AppID.fromUint64(this.algoUsdOracleAppId).globalState('ts')\",\"pc\":[3084]},{\"teal\":3066,\"source\":\"contracts/NFDRegistry.algo.ts:759\",\"errorMessage\":\"global state value does not exist: AppID.fromUint64(this.algoUsdOracleAppId).globalState('decimals')\",\"pc\":[3100]},{\"teal\":3076,\"source\":\"contracts/NFDRegistry.algo.ts:760\",\"errorMessage\":\"global state value does not exist: AppID.fromUint64(this.algoUsdOracleAppId).globalState('price')\",\"pc\":[3113]},{\"teal\":3141,\"source\":\"contracts/NFDRegistry.algo.ts:777\",\"errorMessage\":\"argument 0 (lookupAddress) for costToAddToAddress must be a address\",\"pc\":[3195]},{\"teal\":3383,\"source\":\"contracts/NFDRegistry.algo.ts:847\",\"errorMessage\":\"box value does not exist: this.boxes(key).value\",\"pc\":[3429]},{\"teal\":3494,\"source\":\"contracts/NFDRegistry.algo.ts:864\",\"errorMessage\":\"box value does not exist: this.boxes(key).value\",\"pc\":[3516]},{\"teal\":3900,\"source\":\"contracts/NFDRegistry.algo.ts:965\",\"errorMessage\":\"box value does not exist: this.boxes(boxName).value\",\"pc\":[3918]},{\"teal\":3922,\"source\":\"contracts/NFDRegistry.algo.ts:974\",\"errorMessage\":\"must be existing v1 name\",\"pc\":[3935]},{\"teal\":3932,\"source\":\"contracts/NFDRegistry.algo.ts:979\",\"errorMessage\":\"global state value does not exist: AppID.fromUint64(btoi(this.txn.applicationArgs![2])).globalState(REGISTRY_KEY_ASAID)\",\"pc\":[3950]},{\"teal\":4106,\"source\":\"contracts/NFDRegistry.algo.ts:1032\",\"errorMessage\":\"NFD already exists with this name\",\"pc\":[4102]},{\"teal\":4134,\"source\":\"contracts/NFDRegistry.algo.ts:1038\",\"errorMessage\":\"NFD has already been minted!\",\"pc\":[4122]},{\"teal\":4206,\"source\":\"contracts/NFDRegistry.algo.ts:1055\",\"errorMessage\":\"box value does not exist: this.boxes(key).value\",\"pc\":[4184]},{\"teal\":4224,\"source\":\"contracts/NFDRegistry.algo.ts:1059\",\"errorMessage\":\"int (appid) 'set' should already have at least two values\",\"pc\":[4198]},{\"teal\":4307,\"source\":\"contracts/NFDRegistry.algo.ts:1073\",\"errorMessage\":\"int (app id) must be found in set in order to move it\",\"pc\":[4267]},{\"teal\":4363,\"source\":\"contracts/NFDRegistry.algo.ts:1084\",\"errorMessage\":\"box value does not exist: this.boxes(key).value\",\"pc\":[4311]},{\"teal\":4742,\"source\":\"contracts/NFDRegistry.algo.ts:1166\",\"errorMessage\":\"if not at least 6 chars can't be valid - minimum length to have .algo\",\"pc\":[4637]},{\"teal\":4756,\"source\":\"contracts/NFDRegistry.algo.ts:1167\",\"errorMessage\":\"string must end w/ .algo\",\"pc\":[4656]},{\"teal\":4851,\"source\":\"contracts/NFDRegistry.algo.ts:1182\",\"errorMessage\":\"must be 1-27 chars in nfd root or segment name\",\"pc\":[4739]},{\"teal\":4895,\"source\":\"contracts/NFDRegistry.algo.ts:1185\",\"errorMessage\":\"must be 1-27 chars and at end of string\",\"pc\":[4781]},{\"teal\":4900,\"source\":\"contracts/NFDRegistry.algo.ts:1190\",\"errorMessage\":\"too many '.' chars in name\",\"pc\":[4785]},{\"teal\":4949,\"source\":\"contracts/NFDRegistry.algo.ts:1198\",\"errorMessage\":\"invalid character in name\",\"pc\":[4836]},{\"teal\":5089,\"source\":\"contracts/NFDRegistry.algo.ts:1219\",\"errorMessage\":\"box value does not exist: this.boxes(boxName).value\",\"pc\":[4971]},{\"teal\":5160,\"source\":\"contracts/NFDRegistry.algo.ts:1232\",\"errorMessage\":\"global state value does not exist: AppID.fromUint64(appId).globalState(key)\",\"pc\":[5031]},{\"teal\":5192,\"source\":\"contracts/NFDRegistry.algo.ts:1239\",\"errorMessage\":\"global state value does not exist: AppID.fromUint64(appId).globalState(key)\",\"pc\":[5054]},{\"teal\":5258,\"source\":\"contracts/NFDRegistry.algo.ts:1272\",\"errorMessage\":\"parent nfd/id must be found\",\"pc\":[5095]},{\"teal\":5325,\"source\":\"contracts/NFDRegistry.algo.ts:1287\",\"errorMessage\":\"segment mint cost must be at least NFD_MIN_SEGMENT_USD\",\"pc\":[5178]},{\"teal\":5426,\"source\":\"contracts/NFDRegistry.algo.ts:1309\",\"errorMessage\":\"invalid cost calc\",\"pc\":[5284]},{\"teal\":5476,\"source\":\"contracts/NFDRegistry.algo.ts:1320\",\"errorMessage\":\"global state value does not exist: AppID.fromUint64(nfdAppId).globalState(NFD_KEY_OWNER)\",\"pc\":[5327]},{\"teal\":5633,\"source\":\"contracts/NFDRegistry.algo.ts:1351\",\"errorMessage\":\"price always needs to be at least 1 algo\",\"pc\":[5480]},{\"teal\":6086,\"source\":\"contracts/NFDRegistry.algo.ts:1456\",\"errorMessage\":\"lsig has to have i.appid localstate\",\"pc\":[5951]},{\"teal\":6159,\"source\":\"contracts/NFDRegistry.algo.ts:1479\",\"errorMessage\":\"box value does not exist: this.boxes(boxName).value\",\"pc\":[6024]},{\"teal\":6168,\"source\":\"contracts/NFDRegistry.algo.ts:1480\",\"errorMessage\":\"box value does not exist: this.boxes(boxName).size\",\"pc\":[6030]},{\"teal\":6227,\"source\":\"contracts/NFDRegistry.algo.ts:1487\",\"errorMessage\":\"global state value does not exist: AppID.fromUint64(nfdAppId).globalState(NFD_KEY_NAME)\",\"pc\":[6076]},{\"teal\":6306,\"source\":\"contracts/NFDRegistry.algo.ts:1505\",\"errorMessage\":\"max expiration exceeded parameters defined by registry\",\"pc\":[6138]},{\"teal\":6333,\"source\":\"contracts/NFDRegistry.algo.ts:1513\",\"errorMessage\":\"global state value does not exist: AppID.fromUint64(appId).globalState(NFD_KEY_VERSION)\",\"pc\":[6155]},{\"teal\":6364,\"source\":\"contracts/NFDRegistry.algo.ts:51\",\"errorMessage\":\"this contract does not implement the given ABI method for create NoOp\",\"pc\":[6198]}],\"pcOffsetMethod\":\"cblocks\"},\"clear\":{\"sourceInfo\":[],\"pcOffsetMethod\":\"none\"}},\"templateVariables\":{\"adminAsaId\":{\"type\":\"uint64\"},\"nfdTreasuryAddr\":{\"type\":\"address\"},\"nfdCommission1Addr\":{\"type\":\"address\"},\"nfdCommission1Rate\":{\"type\":\"uint64\"},\"algoUsdOracleAppId\":{\"type\":\"uint64\"},\"developmentAllowShortMints\":{\"type\":\"uint64\"}},\"scratchVariables\":{\"adminAsaId\":{\"type\":\"uint64\",\"slot\":200},\"nfdTreasuryAddr\":{\"type\":\"address\",\"slot\":201},\"nfdCommission1Addr\":{\"type\":\"address\",\"slot\":202},\"nfdCommission1Rate\":{\"type\":\"uint64\",\"slot\":203},\"algoUsdOracleAppId\":{\"type\":\"uint64\",\"slot\":204},\"developmentAllowShortMints\":{\"type\":\"uint64\",\"slot\":205}},\"compilerInfo\":{\"compiler\":\"algod\",\"compilerVersion\":{\"major\":3,\"minor\":27,\"patch\":237217,\"commitHash\":\"0bc3d7e4\"}}} as unknown as Arc56Contract\n\n/**\n * A state record containing binary data\n */\nexport interface BinaryState {\n  /**\n   * Gets the state value as a Uint8Array\n   */\n  asByteArray(): Uint8Array | undefined\n  /**\n   * Gets the state value as a string\n   */\n  asString(): string | undefined\n}\n\nclass BinaryStateValue implements BinaryState {\n  constructor(private value: Uint8Array | undefined) {}\n\n  asByteArray(): Uint8Array | undefined {\n    return this.value\n  }\n\n  asString(): string | undefined {\n    return this.value !== undefined ? Buffer.from(this.value).toString('utf-8') : undefined\n  }\n}\n\n/**\n * Expands types for IntelliSense so they are more human readable\n * See https://stackoverflow.com/a/69288824\n */\nexport type Expand<T> = T extends (...args: infer A) => infer R\n  ? (...args: Expand<A>) => Expand<R>\n  : T extends infer O\n    ? { [K in keyof O]: O[K] }\n    : never\n\n\n// Type definitions for ARC-56 structs\n\nexport type PriceInfo = {\n  oneYearPrice: bigint,\n  carryCost: bigint,\n  exists: boolean,\n  isExpired: boolean,\n  inAuction: boolean\n}\n\n\n/**\n * Converts the ABI tuple representation of a PriceInfo to the struct representation\n */\nexport function PriceInfoFromTuple(abiTuple: [bigint, bigint, boolean, boolean, boolean]) {\n  return getABIStructFromABITuple(abiTuple, APP_SPEC.structs.PriceInfo, APP_SPEC.structs) as PriceInfo\n}\n\nexport type Constraints = {\n  segmentPlatformCostInUsd: bigint,\n  segmentPlatformCostInAlgo: bigint,\n  maxYearsAllowed: bigint,\n  treasuryAddress: string,\n  expiredAuctionDuration: bigint,\n  expiredStartingPrice: bigint,\n  maxMintCarryCost: bigint\n}\n\n\n/**\n * Converts the ABI tuple representation of a Constraints to the struct representation\n */\nexport function ConstraintsFromTuple(abiTuple: [bigint, bigint, bigint, string, bigint, bigint, bigint]) {\n  return getABIStructFromABITuple(abiTuple, APP_SPEC.structs.Constraints, APP_SPEC.structs) as Constraints\n}\n\nexport type LinkOnMintExtraMbrCosts = {\n  linkingNfdMbrCost: bigint,\n  linkingRegistryMbrCost: bigint\n}\n\n\n/**\n * Converts the ABI tuple representation of a LinkOnMintExtraMbrCosts to the struct representation\n */\nexport function LinkOnMintExtraMbrCostsFromTuple(abiTuple: [bigint, bigint]) {\n  return getABIStructFromABITuple(abiTuple, APP_SPEC.structs.LinkOnMintExtraMbrCosts, APP_SPEC.structs) as LinkOnMintExtraMbrCosts\n}\n\n/**\n * Deploy-time template variables\n */\nexport type TemplateVariables = {\n  adminAsaId: bigint,\n  nfdTreasuryAddr: string,\n  nfdCommission1Addr: string,\n  nfdCommission1Rate: bigint,\n  algoUsdOracleAppId: bigint,\n  developmentAllowShortMints: bigint,\n}\n\n/**\n * The argument types for the NfdRegistry contract\n */\nexport type NfdRegistryArgs = {\n  /**\n   * The object representation of the arguments for each method\n   */\n  obj: {\n    'updateApplication()void': Record<string, never>\n    'gas()void': Record<string, never>\n    'getPrice(string,address)(uint64,uint64,bool,bool,bool)': {\n      /**\n       * The NFD name for which to retrieve the price.\n       */\n      nfdName: string\n      /**\n      * the address this request is on behalf of (since an nfd contract might call us it\n      needs to be able to pass on the request on behalf of ITS caller - ie: getting price for an expired nfd will be\n      different if its owner ir asking.\n      PriceInfo Type containing the price, carry cost, etc.\n\n       */\n      caller: string\n    }\n    'getConstraints()(uint64,uint64,uint64,address,uint64,uint64,uint64)': Record<string, never>\n    'getNfdMbrCost(string)uint64': {\n      nfdName: string\n    }\n    'getNfdLinkOnMintExtraMbrCost(address)(uint64,uint64)': {\n      address: string\n    }\n    'mintNfd(pay,string,address,bool)uint64': {\n      /**\n       * The payment transaction covering the purchase amount of the nfd\n       */\n      purchaseTxn: AppMethodCallTransactionArgument\n      /**\n       * The name of the NFD to mint\n       */\n      nfdName: string\n      /**\n       * The address that will own the NFD once minted (so you can buy for someone else)\n       */\n      reservedFor: string\n      /**\n      * whether to auto-link the address (reserved for MUST MATCH payer!) at mint\n      uint64 - The ID of the newly created NFD instance.\n\n       */\n      linkOnMint: boolean\n    }\n    'linkNfdAddress(string,uint64,address)void': {\n      nfdName: string\n      nfdAppId: bigint | number\n      addrToVerify: string\n    }\n    'unlinkNfdAddress(string,uint64,address)void': {\n      nfdName: string\n      nfdAppId: bigint | number\n      addrToUnlink: string\n    }\n    'ownershipAssign(string,uint64)void': {\n      nfdName: string\n      nfdAppId: bigint | number\n    }\n    'ownershipChanged(string,uint64,address,address)void': {\n      /**\n       * The name of the NFD.\n       */\n      nfdName: string\n      /**\n       * The unique application ID of the NFD.\n       */\n      nfdAppId: bigint | number\n      /**\n       * The address of the prior owner (seller) of the nfd\n       */\n      seller: string\n      /**\n       * The address of the new owner of the NFD.\n       */\n      buyer: string\n    }\n    'setAddressPrimaryNfd(string,uint64,address)void': {\n      nfdName: string\n      nfdAppId: bigint | number\n      addrBeingModified: string\n    }\n    'upgradeNfd(string)string': {\n      nfdName: string\n    }\n    'isValidNfdAppId(string,uint64)bool': {\n      nfdName: string\n      nfdAppId: bigint | number\n    }\n    'getNameAppId(string)uint64': {\n      nfdName: string\n    }\n    'getAddressAppIds(address)uint64[]': {\n      lookupAddress: string\n    }\n    'nfdContractInit(string,uint64,byte[])void': {\n      /**\n       * The version of the contract.\n       */\n      version: string\n      /**\n       * exact byte size of contract to load\n       */\n      size: bigint | number\n      /**\n       * bytes of clear code\n       */\n      clearCode: Uint8Array\n    }\n    'nfdContractLoad(string,uint64,byte[])void': {\n      /**\n       * The version of the contract.\n       */\n      version: string\n      /**\n       * The offset at which to replace the contract data within the box.\n       */\n      offset: bigint | number\n      /**\n       * The contract data to be loaded.\n       */\n      data: Uint8Array\n    }\n    'nfdContractCommit(string)void': {\n      /**\n       * The version number of the contract to be committed.\n       */\n      version: string\n    }\n    'usdInMicroAlgo(uint64)uint64': {\n      usdCost: bigint | number\n    }\n    'costToAddToAddress(address)uint64': {\n      /**\n       * The address to add the NFD app id to\n       */\n      lookupAddress: string\n    }\n    'calcFuturePrice(uint64,uint64)uint64': {\n      /**\n       * The current price in USD (in decimals). For example, if the current price is $2.00, the value should be 200.\n       */\n      curPrice: bigint | number\n      /**\n      * The timestamp to calc the future price based on - ie: 1 year past 'go live date' the price would have inflated by 1 year.\n      \n      \n      uint64 The future price calculated based on the current price and the specified number of years.\n\n       */\n      forTime: bigint | number\n    }\n    'createApplication()void': Record<string, never>\n  }\n  /**\n   * The tuple representation of the arguments for each method\n   */\n  tuple: {\n    'updateApplication()void': []\n    'gas()void': []\n    'getPrice(string,address)(uint64,uint64,bool,bool,bool)': [nfdName: string, caller: string]\n    'getConstraints()(uint64,uint64,uint64,address,uint64,uint64,uint64)': []\n    'getNfdMbrCost(string)uint64': [nfdName: string]\n    'getNfdLinkOnMintExtraMbrCost(address)(uint64,uint64)': [address: string]\n    'mintNfd(pay,string,address,bool)uint64': [purchaseTxn: AppMethodCallTransactionArgument, nfdName: string, reservedFor: string, linkOnMint: boolean]\n    'linkNfdAddress(string,uint64,address)void': [nfdName: string, nfdAppId: bigint | number, addrToVerify: string]\n    'unlinkNfdAddress(string,uint64,address)void': [nfdName: string, nfdAppId: bigint | number, addrToUnlink: string]\n    'ownershipAssign(string,uint64)void': [nfdName: string, nfdAppId: bigint | number]\n    'ownershipChanged(string,uint64,address,address)void': [nfdName: string, nfdAppId: bigint | number, seller: string, buyer: string]\n    'setAddressPrimaryNfd(string,uint64,address)void': [nfdName: string, nfdAppId: bigint | number, addrBeingModified: string]\n    'upgradeNfd(string)string': [nfdName: string]\n    'isValidNfdAppId(string,uint64)bool': [nfdName: string, nfdAppId: bigint | number]\n    'getNameAppId(string)uint64': [nfdName: string]\n    'getAddressAppIds(address)uint64[]': [lookupAddress: string]\n    'nfdContractInit(string,uint64,byte[])void': [version: string, size: bigint | number, clearCode: Uint8Array]\n    'nfdContractLoad(string,uint64,byte[])void': [version: string, offset: bigint | number, data: Uint8Array]\n    'nfdContractCommit(string)void': [version: string]\n    'usdInMicroAlgo(uint64)uint64': [usdCost: bigint | number]\n    'costToAddToAddress(address)uint64': [lookupAddress: string]\n    'calcFuturePrice(uint64,uint64)uint64': [curPrice: bigint | number, forTime: bigint | number]\n    'createApplication()void': []\n  }\n}\n\n/**\n * The return type for each method\n */\nexport type NfdRegistryReturns = {\n  'updateApplication()void': void\n  'gas()void': void\n  'getPrice(string,address)(uint64,uint64,bool,bool,bool)': PriceInfo\n  'getConstraints()(uint64,uint64,uint64,address,uint64,uint64,uint64)': Constraints\n  'getNfdMbrCost(string)uint64': bigint\n  'getNfdLinkOnMintExtraMbrCost(address)(uint64,uint64)': LinkOnMintExtraMbrCosts\n  'mintNfd(pay,string,address,bool)uint64': bigint\n  'linkNfdAddress(string,uint64,address)void': void\n  'unlinkNfdAddress(string,uint64,address)void': void\n  'ownershipAssign(string,uint64)void': void\n  'ownershipChanged(string,uint64,address,address)void': void\n  'setAddressPrimaryNfd(string,uint64,address)void': void\n  'upgradeNfd(string)string': string\n  'isValidNfdAppId(string,uint64)bool': boolean\n  'getNameAppId(string)uint64': bigint\n  'getAddressAppIds(address)uint64[]': bigint[]\n  'nfdContractInit(string,uint64,byte[])void': void\n  'nfdContractLoad(string,uint64,byte[])void': void\n  'nfdContractCommit(string)void': void\n  'usdInMicroAlgo(uint64)uint64': bigint\n  'costToAddToAddress(address)uint64': bigint\n  'calcFuturePrice(uint64,uint64)uint64': bigint\n  'createApplication()void': void\n}\n\n/**\n * Defines the types of available calls and state of the NfdRegistry smart contract.\n */\nexport type NfdRegistryTypes = {\n  /**\n   * Maps method signatures / names to their argument and return types.\n   */\n  methods:\n    & Record<'updateApplication()void' | 'updateApplication', {\n      argsObj: NfdRegistryArgs['obj']['updateApplication()void']\n      argsTuple: NfdRegistryArgs['tuple']['updateApplication()void']\n      returns: NfdRegistryReturns['updateApplication()void']\n    }>\n    & Record<'gas()void' | 'gas', {\n      argsObj: NfdRegistryArgs['obj']['gas()void']\n      argsTuple: NfdRegistryArgs['tuple']['gas()void']\n      returns: NfdRegistryReturns['gas()void']\n    }>\n    & Record<'getPrice(string,address)(uint64,uint64,bool,bool,bool)' | 'getPrice', {\n      argsObj: NfdRegistryArgs['obj']['getPrice(string,address)(uint64,uint64,bool,bool,bool)']\n      argsTuple: NfdRegistryArgs['tuple']['getPrice(string,address)(uint64,uint64,bool,bool,bool)']\n      returns: NfdRegistryReturns['getPrice(string,address)(uint64,uint64,bool,bool,bool)']\n    }>\n    & Record<'getConstraints()(uint64,uint64,uint64,address,uint64,uint64,uint64)' | 'getConstraints', {\n      argsObj: NfdRegistryArgs['obj']['getConstraints()(uint64,uint64,uint64,address,uint64,uint64,uint64)']\n      argsTuple: NfdRegistryArgs['tuple']['getConstraints()(uint64,uint64,uint64,address,uint64,uint64,uint64)']\n      returns: NfdRegistryReturns['getConstraints()(uint64,uint64,uint64,address,uint64,uint64,uint64)']\n    }>\n    & Record<'getNfdMbrCost(string)uint64' | 'getNfdMbrCost', {\n      argsObj: NfdRegistryArgs['obj']['getNfdMbrCost(string)uint64']\n      argsTuple: NfdRegistryArgs['tuple']['getNfdMbrCost(string)uint64']\n      returns: NfdRegistryReturns['getNfdMbrCost(string)uint64']\n    }>\n    & Record<'getNfdLinkOnMintExtraMbrCost(address)(uint64,uint64)' | 'getNfdLinkOnMintExtraMbrCost', {\n      argsObj: NfdRegistryArgs['obj']['getNfdLinkOnMintExtraMbrCost(address)(uint64,uint64)']\n      argsTuple: NfdRegistryArgs['tuple']['getNfdLinkOnMintExtraMbrCost(address)(uint64,uint64)']\n      returns: NfdRegistryReturns['getNfdLinkOnMintExtraMbrCost(address)(uint64,uint64)']\n    }>\n    & Record<'mintNfd(pay,string,address,bool)uint64' | 'mintNfd', {\n      argsObj: NfdRegistryArgs['obj']['mintNfd(pay,string,address,bool)uint64']\n      argsTuple: NfdRegistryArgs['tuple']['mintNfd(pay,string,address,bool)uint64']\n      returns: NfdRegistryReturns['mintNfd(pay,string,address,bool)uint64']\n    }>\n    & Record<'linkNfdAddress(string,uint64,address)void' | 'linkNfdAddress', {\n      argsObj: NfdRegistryArgs['obj']['linkNfdAddress(string,uint64,address)void']\n      argsTuple: NfdRegistryArgs['tuple']['linkNfdAddress(string,uint64,address)void']\n      returns: NfdRegistryReturns['linkNfdAddress(string,uint64,address)void']\n    }>\n    & Record<'unlinkNfdAddress(string,uint64,address)void' | 'unlinkNfdAddress', {\n      argsObj: NfdRegistryArgs['obj']['unlinkNfdAddress(string,uint64,address)void']\n      argsTuple: NfdRegistryArgs['tuple']['unlinkNfdAddress(string,uint64,address)void']\n      returns: NfdRegistryReturns['unlinkNfdAddress(string,uint64,address)void']\n    }>\n    & Record<'ownershipAssign(string,uint64)void' | 'ownershipAssign', {\n      argsObj: NfdRegistryArgs['obj']['ownershipAssign(string,uint64)void']\n      argsTuple: NfdRegistryArgs['tuple']['ownershipAssign(string,uint64)void']\n      returns: NfdRegistryReturns['ownershipAssign(string,uint64)void']\n    }>\n    & Record<'ownershipChanged(string,uint64,address,address)void' | 'ownershipChanged', {\n      argsObj: NfdRegistryArgs['obj']['ownershipChanged(string,uint64,address,address)void']\n      argsTuple: NfdRegistryArgs['tuple']['ownershipChanged(string,uint64,address,address)void']\n      returns: NfdRegistryReturns['ownershipChanged(string,uint64,address,address)void']\n    }>\n    & Record<'setAddressPrimaryNfd(string,uint64,address)void' | 'setAddressPrimaryNfd', {\n      argsObj: NfdRegistryArgs['obj']['setAddressPrimaryNfd(string,uint64,address)void']\n      argsTuple: NfdRegistryArgs['tuple']['setAddressPrimaryNfd(string,uint64,address)void']\n      returns: NfdRegistryReturns['setAddressPrimaryNfd(string,uint64,address)void']\n    }>\n    & Record<'upgradeNfd(string)string' | 'upgradeNfd', {\n      argsObj: NfdRegistryArgs['obj']['upgradeNfd(string)string']\n      argsTuple: NfdRegistryArgs['tuple']['upgradeNfd(string)string']\n      returns: NfdRegistryReturns['upgradeNfd(string)string']\n    }>\n    & Record<'isValidNfdAppId(string,uint64)bool' | 'isValidNfdAppId', {\n      argsObj: NfdRegistryArgs['obj']['isValidNfdAppId(string,uint64)bool']\n      argsTuple: NfdRegistryArgs['tuple']['isValidNfdAppId(string,uint64)bool']\n      returns: NfdRegistryReturns['isValidNfdAppId(string,uint64)bool']\n    }>\n    & Record<'getNameAppId(string)uint64' | 'getNameAppId', {\n      argsObj: NfdRegistryArgs['obj']['getNameAppId(string)uint64']\n      argsTuple: NfdRegistryArgs['tuple']['getNameAppId(string)uint64']\n      returns: NfdRegistryReturns['getNameAppId(string)uint64']\n    }>\n    & Record<'getAddressAppIds(address)uint64[]' | 'getAddressAppIds', {\n      argsObj: NfdRegistryArgs['obj']['getAddressAppIds(address)uint64[]']\n      argsTuple: NfdRegistryArgs['tuple']['getAddressAppIds(address)uint64[]']\n      returns: NfdRegistryReturns['getAddressAppIds(address)uint64[]']\n    }>\n    & Record<'nfdContractInit(string,uint64,byte[])void' | 'nfdContractInit', {\n      argsObj: NfdRegistryArgs['obj']['nfdContractInit(string,uint64,byte[])void']\n      argsTuple: NfdRegistryArgs['tuple']['nfdContractInit(string,uint64,byte[])void']\n      returns: NfdRegistryReturns['nfdContractInit(string,uint64,byte[])void']\n    }>\n    & Record<'nfdContractLoad(string,uint64,byte[])void' | 'nfdContractLoad', {\n      argsObj: NfdRegistryArgs['obj']['nfdContractLoad(string,uint64,byte[])void']\n      argsTuple: NfdRegistryArgs['tuple']['nfdContractLoad(string,uint64,byte[])void']\n      returns: NfdRegistryReturns['nfdContractLoad(string,uint64,byte[])void']\n    }>\n    & Record<'nfdContractCommit(string)void' | 'nfdContractCommit', {\n      argsObj: NfdRegistryArgs['obj']['nfdContractCommit(string)void']\n      argsTuple: NfdRegistryArgs['tuple']['nfdContractCommit(string)void']\n      returns: NfdRegistryReturns['nfdContractCommit(string)void']\n    }>\n    & Record<'usdInMicroAlgo(uint64)uint64' | 'usdInMicroAlgo', {\n      argsObj: NfdRegistryArgs['obj']['usdInMicroAlgo(uint64)uint64']\n      argsTuple: NfdRegistryArgs['tuple']['usdInMicroAlgo(uint64)uint64']\n      returns: NfdRegistryReturns['usdInMicroAlgo(uint64)uint64']\n    }>\n    & Record<'costToAddToAddress(address)uint64' | 'costToAddToAddress', {\n      argsObj: NfdRegistryArgs['obj']['costToAddToAddress(address)uint64']\n      argsTuple: NfdRegistryArgs['tuple']['costToAddToAddress(address)uint64']\n      returns: NfdRegistryReturns['costToAddToAddress(address)uint64']\n    }>\n    & Record<'calcFuturePrice(uint64,uint64)uint64' | 'calcFuturePrice', {\n      argsObj: NfdRegistryArgs['obj']['calcFuturePrice(uint64,uint64)uint64']\n      argsTuple: NfdRegistryArgs['tuple']['calcFuturePrice(uint64,uint64)uint64']\n      returns: NfdRegistryReturns['calcFuturePrice(uint64,uint64)uint64']\n    }>\n    & Record<'createApplication()void' | 'createApplication', {\n      argsObj: NfdRegistryArgs['obj']['createApplication()void']\n      argsTuple: NfdRegistryArgs['tuple']['createApplication()void']\n      returns: NfdRegistryReturns['createApplication()void']\n    }>\n  /**\n   * Defines the shape of the state of the application.\n   */\n  state: {\n    local: {\n      keys: {}\n      maps: {\n        localState: Map<Uint8Array | string, Uint8Array>\n      }\n    }\n    box: {\n      keys: {}\n      maps: {\n        boxes: Map<Uint8Array | string, Uint8Array>\n      }\n    }\n  }\n}\n\n/**\n * Defines the possible abi call signatures.\n */\nexport type NfdRegistrySignatures = keyof NfdRegistryTypes['methods']\n/**\n * Defines the possible abi call signatures for methods that return a non-void value.\n */\nexport type NfdRegistryNonVoidMethodSignatures = keyof NfdRegistryTypes['methods'] extends infer T ? T extends keyof NfdRegistryTypes['methods'] ? MethodReturn<T> extends void ? never : T  : never : never\n/**\n * Defines an object containing all relevant parameters for a single call to the contract.\n */\nexport type CallParams<TArgs> = Expand<\n  Omit<AppClientMethodCallParams, 'method' | 'args' | 'onComplete'> &\n    {\n      /** The args for the ABI method call, either as an ordered array or an object */\n      args: Expand<TArgs>\n    }\n>\n/**\n * Maps a method signature from the NfdRegistry smart contract to the method's arguments in either tuple or struct form\n */\nexport type MethodArgs<TSignature extends NfdRegistrySignatures> = NfdRegistryTypes['methods'][TSignature]['argsObj' | 'argsTuple']\n/**\n * Maps a method signature from the NfdRegistry smart contract to the method's return type\n */\nexport type MethodReturn<TSignature extends NfdRegistrySignatures> = NfdRegistryTypes['methods'][TSignature]['returns']\n\n/**\n * Defines the shape of the keyed local state of the application.\n */\nexport type LocalKeysState = NfdRegistryTypes['state']['local']['keys']\n\n/**\n * Defines the shape of the keyed box state of the application.\n */\nexport type BoxKeysState = NfdRegistryTypes['state']['box']['keys']\n\n\n/**\n * Defines supported create method params for this smart contract\n */\nexport type NfdRegistryCreateCallParams =\n  | Expand<CallParams<NfdRegistryArgs['obj']['createApplication()void'] | NfdRegistryArgs['tuple']['createApplication()void']> & {method: 'createApplication'} & {onComplete?: OnApplicationComplete.NoOpOC} & CreateSchema>\n  | Expand<CallParams<NfdRegistryArgs['obj']['createApplication()void'] | NfdRegistryArgs['tuple']['createApplication()void']> & {method: 'createApplication()void'} & {onComplete?: OnApplicationComplete.NoOpOC} & CreateSchema>\n/**\n * Defines supported update method params for this smart contract\n */\nexport type NfdRegistryUpdateCallParams =\n  | Expand<CallParams<NfdRegistryArgs['obj']['updateApplication()void'] | NfdRegistryArgs['tuple']['updateApplication()void']> & {method: 'updateApplication'}>\n  | Expand<CallParams<NfdRegistryArgs['obj']['updateApplication()void'] | NfdRegistryArgs['tuple']['updateApplication()void']> & {method: 'updateApplication()void'}>\n/**\n * Defines arguments required for the deploy method.\n */\nexport type NfdRegistryDeployParams = Expand<Omit<AppFactoryDeployParams, 'createParams' | 'updateParams' | 'deleteParams'> & {\n  /**\n   * Create transaction parameters to use if a create needs to be issued as part of deployment; use `method` to define ABI call (if available) or leave out for a bare call (if available)\n   */\n  createParams?: NfdRegistryCreateCallParams\n  /**\n   * Update transaction parameters to use if a create needs to be issued as part of deployment; use `method` to define ABI call (if available) or leave out for a bare call (if available)\n   */\n  updateParams?: NfdRegistryUpdateCallParams\n}>\n\n\n/**\n * Exposes methods for constructing `AppClient` params objects for ABI calls to the NfdRegistry smart contract\n */\nexport abstract class NfdRegistryParamsFactory {\n  /**\n   * Gets available create ABI call param factories\n   */\n  static get create() {\n    return {\n      _resolveByMethod<TParams extends NfdRegistryCreateCallParams & {method: string}>(params: TParams) {\n        switch(params.method) {\n          case 'createApplication':\n          case 'createApplication()void':\n            return NfdRegistryParamsFactory.create.createApplication(params)\n        }\n        throw new Error(`Unknown ' + verb + ' method`)\n      },\n\n      /**\n       * Constructs create ABI call params for the NFDRegistry smart contract using the createApplication()void ABI method\n       *\n       * @param params Parameters for the call\n       * @returns An `AppClientMethodCallParams` object for the call\n       */\n      createApplication(params: CallParams<NfdRegistryArgs['obj']['createApplication()void'] | NfdRegistryArgs['tuple']['createApplication()void']> & AppClientCompilationParams & {onComplete?: OnApplicationComplete.NoOpOC}): AppClientMethodCallParams & AppClientCompilationParams & {onComplete?: OnApplicationComplete.NoOpOC} {\n        return {\n          ...params,\n          method: 'createApplication()void' as const,\n          args: Array.isArray(params.args) ? params.args : [],\n        }\n      },\n    }\n  }\n\n  /**\n   * Gets available update ABI call param factories\n   */\n  static get update() {\n    return {\n      _resolveByMethod<TParams extends NfdRegistryUpdateCallParams & {method: string}>(params: TParams) {\n        switch(params.method) {\n          case 'updateApplication':\n          case 'updateApplication()void':\n            return NfdRegistryParamsFactory.update.updateApplication(params)\n        }\n        throw new Error(`Unknown ' + verb + ' method`)\n      },\n\n      /**\n       * Constructs update ABI call params for the NFDRegistry smart contract using the updateApplication()void ABI method\n       *\n       * @param params Parameters for the call\n       * @returns An `AppClientMethodCallParams` object for the call\n       */\n      updateApplication(params: CallParams<NfdRegistryArgs['obj']['updateApplication()void'] | NfdRegistryArgs['tuple']['updateApplication()void']> & AppClientCompilationParams): AppClientMethodCallParams & AppClientCompilationParams {\n        return {\n          ...params,\n          method: 'updateApplication()void' as const,\n          args: Array.isArray(params.args) ? params.args : [],\n        }\n      },\n    }\n  }\n\n  /**\n   * Constructs a no op call for the gas()void ABI method\n   *\n   * @param params Parameters for the call\n   * @returns An `AppClientMethodCallParams` object for the call\n   */\n  static gas(params: CallParams<NfdRegistryArgs['obj']['gas()void'] | NfdRegistryArgs['tuple']['gas()void']> & CallOnComplete): AppClientMethodCallParams & CallOnComplete {\n    return {\n      ...params,\n      method: 'gas()void' as const,\n      args: Array.isArray(params.args) ? params.args : [],\n    }\n  }\n  /**\n   * Constructs a no op call for the getPrice(string,address)(uint64,uint64,bool,bool,bool) ABI method\n   *\n  * Returns the price for a given NFD (single year), the max # of years allowed (Name for Display),\n  and extra algo required to cover MBR when purchasing.\n\n   *\n   * @param params Parameters for the call\n   * @returns An `AppClientMethodCallParams` object for the call\n   */\n  static getPrice(params: CallParams<NfdRegistryArgs['obj']['getPrice(string,address)(uint64,uint64,bool,bool,bool)'] | NfdRegistryArgs['tuple']['getPrice(string,address)(uint64,uint64,bool,bool,bool)']> & CallOnComplete): AppClientMethodCallParams & CallOnComplete {\n    return {\n      ...params,\n      method: 'getPrice(string,address)(uint64,uint64,bool,bool,bool)' as const,\n      args: Array.isArray(params.args) ? params.args : [params.args.nfdName, params.args.caller],\n    }\n  }\n  /**\n   * Constructs a no op call for the getConstraints()(uint64,uint64,uint64,address,uint64,uint64,uint64) ABI method\n   *\n   * @param params Parameters for the call\n   * @returns An `AppClientMethodCallParams` object for the call\n   */\n  static getConstraints(params: CallParams<NfdRegistryArgs['obj']['getConstraints()(uint64,uint64,uint64,address,uint64,uint64,uint64)'] | NfdRegistryArgs['tuple']['getConstraints()(uint64,uint64,uint64,address,uint64,uint64,uint64)']> & CallOnComplete): AppClientMethodCallParams & CallOnComplete {\n    return {\n      ...params,\n      method: 'getConstraints()(uint64,uint64,uint64,address,uint64,uint64,uint64)' as const,\n      args: Array.isArray(params.args) ? params.args : [],\n    }\n  }\n  /**\n   * Constructs a no op call for the getNfdMbrCost(string)uint64 ABI method\n   *\n  * Returns the MBR amounts needed to MINT an nfd.\n  This value needs to be added to purchase price in mintNfd call.\n  getPrice() returns it though.\n\n   *\n   * @param params Parameters for the call\n   * @returns An `AppClientMethodCallParams` object for the call\n   */\n  static getNfdMbrCost(params: CallParams<NfdRegistryArgs['obj']['getNfdMbrCost(string)uint64'] | NfdRegistryArgs['tuple']['getNfdMbrCost(string)uint64']> & CallOnComplete): AppClientMethodCallParams & CallOnComplete {\n    return {\n      ...params,\n      method: 'getNfdMbrCost(string)uint64' as const,\n      args: Array.isArray(params.args) ? params.args : [params.args.nfdName],\n    }\n  }\n  /**\n   * Constructs a no op call for the getNfdLinkOnMintExtraMbrCost(address)(uint64,uint64) ABI method\n   *\n   * @param params Parameters for the call\n   * @returns An `AppClientMethodCallParams` object for the call\n   */\n  static getNfdLinkOnMintExtraMbrCost(params: CallParams<NfdRegistryArgs['obj']['getNfdLinkOnMintExtraMbrCost(address)(uint64,uint64)'] | NfdRegistryArgs['tuple']['getNfdLinkOnMintExtraMbrCost(address)(uint64,uint64)']> & CallOnComplete): AppClientMethodCallParams & CallOnComplete {\n    return {\n      ...params,\n      method: 'getNfdLinkOnMintExtraMbrCost(address)(uint64,uint64)' as const,\n      args: Array.isArray(params.args) ? params.args : [params.args.address],\n    }\n  }\n  /**\n   * Constructs a no op call for the mintNfd(pay,string,address,bool)uint64 ABI method\n   *\n   * Mint an NFD (NFT) and create a new NFD instance.\n   *\n   * @param params Parameters for the call\n   * @returns An `AppClientMethodCallParams` object for the call\n   */\n  static mintNfd(params: CallParams<NfdRegistryArgs['obj']['mintNfd(pay,string,address,bool)uint64'] | NfdRegistryArgs['tuple']['mintNfd(pay,string,address,bool)uint64']> & CallOnComplete): AppClientMethodCallParams & CallOnComplete {\n    return {\n      ...params,\n      method: 'mintNfd(pay,string,address,bool)uint64' as const,\n      args: Array.isArray(params.args) ? params.args : [params.args.purchaseTxn, params.args.nfdName, params.args.reservedFor, params.args.linkOnMint],\n    }\n  }\n  /**\n   * Constructs a no op call for the linkNfdAddress(string,uint64,address)void ABI method\n   *\n   * @param params Parameters for the call\n   * @returns An `AppClientMethodCallParams` object for the call\n   */\n  static linkNfdAddress(params: CallParams<NfdRegistryArgs['obj']['linkNfdAddress(string,uint64,address)void'] | NfdRegistryArgs['tuple']['linkNfdAddress(string,uint64,address)void']> & CallOnComplete): AppClientMethodCallParams & CallOnComplete {\n    return {\n      ...params,\n      method: 'linkNfdAddress(string,uint64,address)void' as const,\n      args: Array.isArray(params.args) ? params.args : [params.args.nfdName, params.args.nfdAppId, params.args.addrToVerify],\n    }\n  }\n  /**\n   * Constructs a no op call for the unlinkNfdAddress(string,uint64,address)void ABI method\n   *\n   * @param params Parameters for the call\n   * @returns An `AppClientMethodCallParams` object for the call\n   */\n  static unlinkNfdAddress(params: CallParams<NfdRegistryArgs['obj']['unlinkNfdAddress(string,uint64,address)void'] | NfdRegistryArgs['tuple']['unlinkNfdAddress(string,uint64,address)void']> & CallOnComplete): AppClientMethodCallParams & CallOnComplete {\n    return {\n      ...params,\n      method: 'unlinkNfdAddress(string,uint64,address)void' as const,\n      args: Array.isArray(params.args) ? params.args : [params.args.nfdName, params.args.nfdAppId, params.args.addrToUnlink],\n    }\n  }\n  /**\n   * Constructs a no op call for the ownershipAssign(string,uint64)void ABI method\n   *\n   * @param params Parameters for the call\n   * @returns An `AppClientMethodCallParams` object for the call\n   */\n  static ownershipAssign(params: CallParams<NfdRegistryArgs['obj']['ownershipAssign(string,uint64)void'] | NfdRegistryArgs['tuple']['ownershipAssign(string,uint64)void']> & CallOnComplete): AppClientMethodCallParams & CallOnComplete {\n    return {\n      ...params,\n      method: 'ownershipAssign(string,uint64)void' as const,\n      args: Array.isArray(params.args) ? params.args : [params.args.nfdName, params.args.nfdAppId],\n    }\n  }\n  /**\n   * Constructs a no op call for the ownershipChanged(string,uint64,address,address)void ABI method\n   *\n  * This method is triggered when the ownership of an NFD (Non-Fungible Domain) changes.\n  It is called by the NFD via the purchase method.  It can also be called by TxnLab admin for older 3.3\n  NFDs when it detects purchased events for 3.3\n\n   *\n   * @param params Parameters for the call\n   * @returns An `AppClientMethodCallParams` object for the call\n   */\n  static ownershipChanged(params: CallParams<NfdRegistryArgs['obj']['ownershipChanged(string,uint64,address,address)void'] | NfdRegistryArgs['tuple']['ownershipChanged(string,uint64,address,address)void']> & CallOnComplete): AppClientMethodCallParams & CallOnComplete {\n    return {\n      ...params,\n      method: 'ownershipChanged(string,uint64,address,address)void' as const,\n      args: Array.isArray(params.args) ? params.args : [params.args.nfdName, params.args.nfdAppId, params.args.seller, params.args.buyer],\n    }\n  }\n  /**\n   * Constructs a no op call for the setAddressPrimaryNfd(string,uint64,address)void ABI method\n   *\n  * Makes the specified NFD the 'first' NFD in the reverse-address set so its the primary NFD for this address.\n  The NFD must be valid, and the sender must be the address (or nfd owner if vault).  The NFD wouldn't already be\n  in the reverse-lookup set if it wasn't already valid.\n\n   *\n   * @param params Parameters for the call\n   * @returns An `AppClientMethodCallParams` object for the call\n   */\n  static setAddressPrimaryNfd(params: CallParams<NfdRegistryArgs['obj']['setAddressPrimaryNfd(string,uint64,address)void'] | NfdRegistryArgs['tuple']['setAddressPrimaryNfd(string,uint64,address)void']> & CallOnComplete): AppClientMethodCallParams & CallOnComplete {\n    return {\n      ...params,\n      method: 'setAddressPrimaryNfd(string,uint64,address)void' as const,\n      args: Array.isArray(params.args) ? params.args : [params.args.nfdName, params.args.nfdAppId, params.args.addrBeingModified],\n    }\n  }\n  /**\n   * Constructs a no op call for the upgradeNfd(string)string ABI method\n   *\n   * @param params Parameters for the call\n   * @returns An `AppClientMethodCallParams` object for the call\n   */\n  static upgradeNfd(params: CallParams<NfdRegistryArgs['obj']['upgradeNfd(string)string'] | NfdRegistryArgs['tuple']['upgradeNfd(string)string']> & CallOnComplete): AppClientMethodCallParams & CallOnComplete {\n    return {\n      ...params,\n      method: 'upgradeNfd(string)string' as const,\n      args: Array.isArray(params.args) ? params.args : [params.args.nfdName],\n    }\n  }\n  /**\n   * Constructs a no op call for the isValidNfdAppId(string,uint64)bool ABI method\n   *\n   * @param params Parameters for the call\n   * @returns An `AppClientMethodCallParams` object for the call\n   */\n  static isValidNfdAppId(params: CallParams<NfdRegistryArgs['obj']['isValidNfdAppId(string,uint64)bool'] | NfdRegistryArgs['tuple']['isValidNfdAppId(string,uint64)bool']> & CallOnComplete): AppClientMethodCallParams & CallOnComplete {\n    return {\n      ...params,\n      method: 'isValidNfdAppId(string,uint64)bool' as const,\n      args: Array.isArray(params.args) ? params.args : [params.args.nfdName, params.args.nfdAppId],\n    }\n  }\n  /**\n   * Constructs a no op call for the getNameAppId(string)uint64 ABI method\n   *\n   * @param params Parameters for the call\n   * @returns An `AppClientMethodCallParams` object for the call\n   */\n  static getNameAppId(params: CallParams<NfdRegistryArgs['obj']['getNameAppId(string)uint64'] | NfdRegistryArgs['tuple']['getNameAppId(string)uint64']> & CallOnComplete): AppClientMethodCallParams & CallOnComplete {\n    return {\n      ...params,\n      method: 'getNameAppId(string)uint64' as const,\n      args: Array.isArray(params.args) ? params.args : [params.args.nfdName],\n    }\n  }\n  /**\n   * Constructs a no op call for the getAddressAppIds(address)uint64[] ABI method\n   *\n   * @param params Parameters for the call\n   * @returns An `AppClientMethodCallParams` object for the call\n   */\n  static getAddressAppIds(params: CallParams<NfdRegistryArgs['obj']['getAddressAppIds(address)uint64[]'] | NfdRegistryArgs['tuple']['getAddressAppIds(address)uint64[]']> & CallOnComplete): AppClientMethodCallParams & CallOnComplete {\n    return {\n      ...params,\n      method: 'getAddressAppIds(address)uint64[]' as const,\n      args: Array.isArray(params.args) ? params.args : [params.args.lookupAddress],\n    }\n  }\n  /**\n   * Constructs a no op call for the nfdContractInit(string,uint64,byte[])void ABI method\n   *\n   * Initializes the NFD contract bytecode into the registry\n   *\n   * @param params Parameters for the call\n   * @returns An `AppClientMethodCallParams` object for the call\n   */\n  static nfdContractInit(params: CallParams<NfdRegistryArgs['obj']['nfdContractInit(string,uint64,byte[])void'] | NfdRegistryArgs['tuple']['nfdContractInit(string,uint64,byte[])void']> & CallOnComplete): AppClientMethodCallParams & CallOnComplete {\n    return {\n      ...params,\n      method: 'nfdContractInit(string,uint64,byte[])void' as const,\n      args: Array.isArray(params.args) ? params.args : [params.args.version, params.args.size, params.args.clearCode],\n    }\n  }\n  /**\n   * Constructs a no op call for the nfdContractLoad(string,uint64,byte[])void ABI method\n   *\n   * Loads contract data into the  box at the specified offset.\n   *\n   * @param params Parameters for the call\n   * @returns An `AppClientMethodCallParams` object for the call\n   */\n  static nfdContractLoad(params: CallParams<NfdRegistryArgs['obj']['nfdContractLoad(string,uint64,byte[])void'] | NfdRegistryArgs['tuple']['nfdContractLoad(string,uint64,byte[])void']> & CallOnComplete): AppClientMethodCallParams & CallOnComplete {\n    return {\n      ...params,\n      method: 'nfdContractLoad(string,uint64,byte[])void' as const,\n      args: Array.isArray(params.args) ? params.args : [params.args.version, params.args.offset, params.args.data],\n    }\n  }\n  /**\n   * Constructs a no op call for the nfdContractCommit(string)void ABI method\n   *\n   * Commit a new version of the contract.\n   *\n   * @param params Parameters for the call\n   * @returns An `AppClientMethodCallParams` object for the call\n   */\n  static nfdContractCommit(params: CallParams<NfdRegistryArgs['obj']['nfdContractCommit(string)void'] | NfdRegistryArgs['tuple']['nfdContractCommit(string)void']> & CallOnComplete): AppClientMethodCallParams & CallOnComplete {\n    return {\n      ...params,\n      method: 'nfdContractCommit(string)void' as const,\n      args: Array.isArray(params.args) ? params.args : [params.args.version],\n    }\n  }\n  /**\n   * Constructs a no op call for the usdInMicroAlgo(uint64)uint64 ABI method\n   *\n   * @param params Parameters for the call\n   * @returns An `AppClientMethodCallParams` object for the call\n   */\n  static usdInMicroAlgo(params: CallParams<NfdRegistryArgs['obj']['usdInMicroAlgo(uint64)uint64'] | NfdRegistryArgs['tuple']['usdInMicroAlgo(uint64)uint64']> & CallOnComplete): AppClientMethodCallParams & CallOnComplete {\n    return {\n      ...params,\n      method: 'usdInMicroAlgo(uint64)uint64' as const,\n      args: Array.isArray(params.args) ? params.args : [params.args.usdCost],\n    }\n  }\n  /**\n   * Constructs a no op call for the costToAddToAddress(address)uint64 ABI method\n   *\n   * Returns the cost to add an NFD to the reverse-lookup data\n   *\n   * @param params Parameters for the call\n   * @returns An `AppClientMethodCallParams` object for the call\n   */\n  static costToAddToAddress(params: CallParams<NfdRegistryArgs['obj']['costToAddToAddress(address)uint64'] | NfdRegistryArgs['tuple']['costToAddToAddress(address)uint64']> & CallOnComplete): AppClientMethodCallParams & CallOnComplete {\n    return {\n      ...params,\n      method: 'costToAddToAddress(address)uint64' as const,\n      args: Array.isArray(params.args) ? params.args : [params.args.lookupAddress],\n    }\n  }\n  /**\n   * Constructs a no op call for the calcFuturePrice(uint64,uint64)uint64 ABI method\n   *\n   * Calculates the future price based on the current price and the number of years.\n   *\n   * @param params Parameters for the call\n   * @returns An `AppClientMethodCallParams` object for the call\n   */\n  static calcFuturePrice(params: CallParams<NfdRegistryArgs['obj']['calcFuturePrice(uint64,uint64)uint64'] | NfdRegistryArgs['tuple']['calcFuturePrice(uint64,uint64)uint64']> & CallOnComplete): AppClientMethodCallParams & CallOnComplete {\n    return {\n      ...params,\n      method: 'calcFuturePrice(uint64,uint64)uint64' as const,\n      args: Array.isArray(params.args) ? params.args : [params.args.curPrice, params.args.forTime],\n    }\n  }\n}\n\n/**\n * A factory to create and deploy one or more instance of the NFDRegistry smart contract and to create one or more app clients to interact with those (or other) app instances\n */\nexport class NfdRegistryFactory {\n  /**\n   * The underlying `AppFactory` for when you want to have more flexibility\n   */\n  public readonly appFactory: _AppFactory\n\n  /**\n   * Creates a new instance of `NfdRegistryFactory`\n   *\n   * @param params The parameters to initialise the app factory with\n   */\n  constructor(params: Omit<AppFactoryParams, 'appSpec'>) {\n    this.appFactory = new _AppFactory({\n      ...params,\n      appSpec: APP_SPEC,\n    })\n  }\n  \n  /** The name of the app (from the ARC-32 / ARC-56 app spec or override). */\n  public get appName() {\n    return this.appFactory.appName\n  }\n  \n  /** The ARC-56 app spec being used */\n  get appSpec() {\n    return APP_SPEC\n  }\n  \n  /** A reference to the underlying `AlgorandClient` this app factory is using. */\n  public get algorand(): AlgorandClientInterface {\n    return this.appFactory.algorand\n  }\n  \n  /**\n   * Returns a new `AppClient` client for an app instance of the given ID.\n   *\n   * Automatically populates appName, defaultSender and source maps from the factory\n   * if not specified in the params.\n   * @param params The parameters to create the app client\n   * @returns The `AppClient`\n   */\n  public getAppClientById(params: AppFactoryAppClientParams) {\n    return new NfdRegistryClient(this.appFactory.getAppClientById(params))\n  }\n  \n  /**\n   * Returns a new `AppClient` client, resolving the app by creator address and name\n   * using AlgoKit app deployment semantics (i.e. looking for the app creation transaction note).\n   *\n   * Automatically populates appName, defaultSender and source maps from the factory\n   * if not specified in the params.\n   * @param params The parameters to create the app client\n   * @returns The `AppClient`\n   */\n  public async getAppClientByCreatorAndName(\n    params: AppFactoryResolveAppClientByCreatorAndNameParams,\n  ) {\n    return new NfdRegistryClient(await this.appFactory.getAppClientByCreatorAndName(params))\n  }\n\n  /**\n   * Idempotently deploys the NFDRegistry smart contract.\n   *\n   * @param params The arguments for the contract calls and any additional parameters for the call\n   * @returns The deployment result\n   */\n  public async deploy(params: NfdRegistryDeployParams = {}) {\n    const result = await this.appFactory.deploy({\n      ...params,\n      createParams: params.createParams?.method ? NfdRegistryParamsFactory.create._resolveByMethod(params.createParams) : params.createParams ? params.createParams as (NfdRegistryCreateCallParams & { args: Uint8Array[] }) : undefined,\n      updateParams: params.updateParams?.method ? NfdRegistryParamsFactory.update._resolveByMethod(params.updateParams) : params.updateParams ? params.updateParams as (NfdRegistryUpdateCallParams & { args: Uint8Array[] }) : undefined,\n    })\n    return { result: result.result, appClient: new NfdRegistryClient(result.appClient) }\n  }\n\n  /**\n   * Get parameters to create transactions (create and deploy related calls) for the current app. A good mental model for this is that these parameters represent a deferred transaction creation.\n   */\n  readonly params = {\n    /**\n     * Gets available create methods\n     */\n    create: {\n      /**\n       * Creates a new instance of the NFDRegistry smart contract using the createApplication()void ABI method.\n       *\n       * @param params The params for the smart contract call\n       * @returns The create params\n       */\n      createApplication: (params: CallParams<NfdRegistryArgs['obj']['createApplication()void'] | NfdRegistryArgs['tuple']['createApplication()void']> & AppClientCompilationParams & CreateSchema & {onComplete?: OnApplicationComplete.NoOpOC} = {args: []}) => {\n        return this.appFactory.params.create(NfdRegistryParamsFactory.create.createApplication(params))\n      },\n    },\n\n    /**\n     * Gets available deployUpdate methods\n     */\n    deployUpdate: {\n      /**\n       * Updates an existing instance of the NFDRegistry smart contract using the updateApplication()void ABI method.\n       *\n       * @param params The params for the smart contract call\n       * @returns The deployUpdate params\n       */\n      updateApplication: (params: CallParams<NfdRegistryArgs['obj']['updateApplication()void'] | NfdRegistryArgs['tuple']['updateApplication()void']> & AppClientCompilationParams = {args: []}) => {\n        return this.appFactory.params.deployUpdate(NfdRegistryParamsFactory.update.updateApplication(params))\n      },\n    },\n\n  }\n\n  /**\n   * Create transactions for the current app\n   */\n  readonly createTransaction = {\n    /**\n     * Gets available create methods\n     */\n    create: {\n      /**\n       * Creates a new instance of the NFDRegistry smart contract using the createApplication()void ABI method.\n       *\n       * @param params The params for the smart contract call\n       * @returns The create transaction\n       */\n      createApplication: (params: CallParams<NfdRegistryArgs['obj']['createApplication()void'] | NfdRegistryArgs['tuple']['createApplication()void']> & AppClientCompilationParams & CreateSchema & {onComplete?: OnApplicationComplete.NoOpOC} = {args: []}) => {\n        return this.appFactory.createTransaction.create(NfdRegistryParamsFactory.create.createApplication(params))\n      },\n    },\n\n  }\n\n  /**\n   * Send calls to the current app\n   */\n  readonly send = {\n    /**\n     * Gets available create methods\n     */\n    create: {\n      /**\n       * Creates a new instance of the NFDRegistry smart contract using an ABI method call using the createApplication()void ABI method.\n       *\n       * @param params The params for the smart contract call\n       * @returns The create result\n       */\n      createApplication: async (params: CallParams<NfdRegistryArgs['obj']['createApplication()void'] | NfdRegistryArgs['tuple']['createApplication()void']> & AppClientCompilationParams & CreateSchema & SendParams & {onComplete?: OnApplicationComplete.NoOpOC} = {args: []}) => {\n        const result = await this.appFactory.send.create(NfdRegistryParamsFactory.create.createApplication(params))\n        return { result: { ...result.result, return: result.result.return as unknown as (undefined | NfdRegistryReturns['createApplication()void']) }, appClient: new NfdRegistryClient(result.appClient) }\n      },\n    },\n\n  }\n\n}\n/**\n * A client to make calls to the NFDRegistry smart contract\n */\nexport class NfdRegistryClient {\n  /**\n   * The underlying `AppClient` for when you want to have more flexibility\n   */\n  public readonly appClient: _AppClient\n\n  /**\n   * Creates a new instance of `NfdRegistryClient`\n   *\n   * @param appClient An `AppClient` instance which has been created with the NfdRegistry app spec\n   */\n  constructor(appClient: _AppClient)\n  /**\n   * Creates a new instance of `NfdRegistryClient`\n   *\n   * @param params The parameters to initialise the app client with\n   */\n  constructor(params: Omit<AppClientParams, 'appSpec'>)\n  constructor(appClientOrParams: _AppClient | Omit<AppClientParams, 'appSpec'>) {\n    this.appClient = appClientOrParams instanceof _AppClient ? appClientOrParams : new _AppClient({\n      ...appClientOrParams,\n      appSpec: APP_SPEC,\n    })\n  }\n  \n  /**\n   * Checks for decode errors on the given return value and maps the return value to the return type for the given method\n   * @returns The typed return value or undefined if there was no value\n   */\n  decodeReturnValue<TSignature extends NfdRegistryNonVoidMethodSignatures>(method: TSignature, returnValue: ABIReturn | undefined) {\n    return returnValue !== undefined ? getArc56ReturnValue<MethodReturn<TSignature>>(returnValue, this.appClient.getABIMethod(method), APP_SPEC.structs) : undefined\n  }\n  \n  /**\n   * Returns a new `NfdRegistryClient` client, resolving the app by creator address and name\n   * using AlgoKit app deployment semantics (i.e. looking for the app creation transaction note).\n   * @param params The parameters to create the app client\n   */\n  public static async fromCreatorAndName(params: Omit<ResolveAppClientByCreatorAndName, 'appSpec'>): Promise<NfdRegistryClient> {\n    return new NfdRegistryClient(await _AppClient.fromCreatorAndName({...params, appSpec: APP_SPEC}))\n  }\n  \n  /**\n   * Returns an `NfdRegistryClient` instance for the current network based on\n   * pre-determined network-specific app IDs specified in the ARC-56 app spec.\n   *\n   * If no IDs are in the app spec or the network isn't recognised, an error is thrown.\n   * @param params The parameters to create the app client\n   */\n  static async fromNetwork(\n    params: Omit<ResolveAppClientByNetwork, 'appSpec'>\n  ): Promise<NfdRegistryClient> {\n    return new NfdRegistryClient(await _AppClient.fromNetwork({...params, appSpec: APP_SPEC}))\n  }\n  \n  /** The ID of the app instance this client is linked to. */\n  public get appId() {\n    return this.appClient.appId\n  }\n  \n  /** The app address of the app instance this client is linked to. */\n  public get appAddress() {\n    return this.appClient.appAddress\n  }\n  \n  /** The name of the app. */\n  public get appName() {\n    return this.appClient.appName\n  }\n  \n  /** The ARC-56 app spec being used */\n  public get appSpec() {\n    return this.appClient.appSpec\n  }\n  \n  /** A reference to the underlying `AlgorandClient` this app client is using. */\n  public get algorand(): AlgorandClientInterface {\n    return this.appClient.algorand\n  }\n\n  /**\n   * Get parameters to create transactions for the current app. A good mental model for this is that these parameters represent a deferred transaction creation.\n   */\n  readonly params = {\n    /**\n     * Gets available update methods\n     */\n    update: {\n      /**\n       * Updates an existing instance of the NFDRegistry smart contract using the `updateApplication()void` ABI method.\n       *\n       * @param params The params for the smart contract call\n       * @returns The update params\n       */\n      updateApplication: (params: CallParams<NfdRegistryArgs['obj']['updateApplication()void'] | NfdRegistryArgs['tuple']['updateApplication()void']> & AppClientCompilationParams = {args: []}) => {\n        return this.appClient.params.update(NfdRegistryParamsFactory.update.updateApplication(params))\n      },\n\n    },\n\n    /**\n     * Makes a clear_state call to an existing instance of the NFDRegistry smart contract.\n     *\n     * @param params The params for the bare (raw) call\n     * @returns The clearState result\n     */\n    clearState: (params?: Expand<AppClientBareCallParams>) => {\n      return this.appClient.params.bare.clearState(params)\n    },\n\n    /**\n     * Makes a call to the NFDRegistry smart contract using the `gas()void` ABI method.\n     *\n     * @param params The params for the smart contract call\n     * @returns The call params\n     */\n    gas: (params: CallParams<NfdRegistryArgs['obj']['gas()void'] | NfdRegistryArgs['tuple']['gas()void']> & {onComplete?: OnApplicationComplete.NoOpOC} = {args: []}) => {\n      return this.appClient.params.call(NfdRegistryParamsFactory.gas(params))\n    },\n\n    /**\n     * Makes a call to the NFDRegistry smart contract using the `getPrice(string,address)(uint64,uint64,bool,bool,bool)` ABI method.\n     *\n    * Returns the price for a given NFD (single year), the max # of years allowed (Name for Display),\n    and extra algo required to cover MBR when purchasing.\n\n     *\n     * @param params The params for the smart contract call\n     * @returns The call params\n     */\n    getPrice: (params: CallParams<NfdRegistryArgs['obj']['getPrice(string,address)(uint64,uint64,bool,bool,bool)'] | NfdRegistryArgs['tuple']['getPrice(string,address)(uint64,uint64,bool,bool,bool)']> & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      return this.appClient.params.call(NfdRegistryParamsFactory.getPrice(params))\n    },\n\n    /**\n     * Makes a call to the NFDRegistry smart contract using the `getConstraints()(uint64,uint64,uint64,address,uint64,uint64,uint64)` ABI method.\n     *\n     * @param params The params for the smart contract call\n     * @returns The call params\n     */\n    getConstraints: (params: CallParams<NfdRegistryArgs['obj']['getConstraints()(uint64,uint64,uint64,address,uint64,uint64,uint64)'] | NfdRegistryArgs['tuple']['getConstraints()(uint64,uint64,uint64,address,uint64,uint64,uint64)']> & {onComplete?: OnApplicationComplete.NoOpOC} = {args: []}) => {\n      return this.appClient.params.call(NfdRegistryParamsFactory.getConstraints(params))\n    },\n\n    /**\n     * Makes a call to the NFDRegistry smart contract using the `getNfdMbrCost(string)uint64` ABI method.\n     *\n    * Returns the MBR amounts needed to MINT an nfd.\n    This value needs to be added to purchase price in mintNfd call.\n    getPrice() returns it though.\n\n     *\n     * @param params The params for the smart contract call\n     * @returns The call params\n     */\n    getNfdMbrCost: (params: CallParams<NfdRegistryArgs['obj']['getNfdMbrCost(string)uint64'] | NfdRegistryArgs['tuple']['getNfdMbrCost(string)uint64']> & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      return this.appClient.params.call(NfdRegistryParamsFactory.getNfdMbrCost(params))\n    },\n\n    /**\n     * Makes a call to the NFDRegistry smart contract using the `getNfdLinkOnMintExtraMbrCost(address)(uint64,uint64)` ABI method.\n     *\n     * @param params The params for the smart contract call\n     * @returns The call params\n     */\n    getNfdLinkOnMintExtraMbrCost: (params: CallParams<NfdRegistryArgs['obj']['getNfdLinkOnMintExtraMbrCost(address)(uint64,uint64)'] | NfdRegistryArgs['tuple']['getNfdLinkOnMintExtraMbrCost(address)(uint64,uint64)']> & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      return this.appClient.params.call(NfdRegistryParamsFactory.getNfdLinkOnMintExtraMbrCost(params))\n    },\n\n    /**\n     * Makes a call to the NFDRegistry smart contract using the `mintNfd(pay,string,address,bool)uint64` ABI method.\n     *\n     * Mint an NFD (NFT) and create a new NFD instance.\n     *\n     * @param params The params for the smart contract call\n     * @returns The call params\n     */\n    mintNfd: (params: CallParams<NfdRegistryArgs['obj']['mintNfd(pay,string,address,bool)uint64'] | NfdRegistryArgs['tuple']['mintNfd(pay,string,address,bool)uint64']> & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      return this.appClient.params.call(NfdRegistryParamsFactory.mintNfd(params))\n    },\n\n    /**\n     * Makes a call to the NFDRegistry smart contract using the `linkNfdAddress(string,uint64,address)void` ABI method.\n     *\n     * @param params The params for the smart contract call\n     * @returns The call params\n     */\n    linkNfdAddress: (params: CallParams<NfdRegistryArgs['obj']['linkNfdAddress(string,uint64,address)void'] | NfdRegistryArgs['tuple']['linkNfdAddress(string,uint64,address)void']> & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      return this.appClient.params.call(NfdRegistryParamsFactory.linkNfdAddress(params))\n    },\n\n    /**\n     * Makes a call to the NFDRegistry smart contract using the `unlinkNfdAddress(string,uint64,address)void` ABI method.\n     *\n     * @param params The params for the smart contract call\n     * @returns The call params\n     */\n    unlinkNfdAddress: (params: CallParams<NfdRegistryArgs['obj']['unlinkNfdAddress(string,uint64,address)void'] | NfdRegistryArgs['tuple']['unlinkNfdAddress(string,uint64,address)void']> & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      return this.appClient.params.call(NfdRegistryParamsFactory.unlinkNfdAddress(params))\n    },\n\n    /**\n     * Makes a call to the NFDRegistry smart contract using the `ownershipAssign(string,uint64)void` ABI method.\n     *\n     * @param params The params for the smart contract call\n     * @returns The call params\n     */\n    ownershipAssign: (params: CallParams<NfdRegistryArgs['obj']['ownershipAssign(string,uint64)void'] | NfdRegistryArgs['tuple']['ownershipAssign(string,uint64)void']> & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      return this.appClient.params.call(NfdRegistryParamsFactory.ownershipAssign(params))\n    },\n\n    /**\n     * Makes a call to the NFDRegistry smart contract using the `ownershipChanged(string,uint64,address,address)void` ABI method.\n     *\n    * This method is triggered when the ownership of an NFD (Non-Fungible Domain) changes.\n    It is called by the NFD via the purchase method.  It can also be called by TxnLab admin for older 3.3\n    NFDs when it detects purchased events for 3.3\n\n     *\n     * @param params The params for the smart contract call\n     * @returns The call params\n     */\n    ownershipChanged: (params: CallParams<NfdRegistryArgs['obj']['ownershipChanged(string,uint64,address,address)void'] | NfdRegistryArgs['tuple']['ownershipChanged(string,uint64,address,address)void']> & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      return this.appClient.params.call(NfdRegistryParamsFactory.ownershipChanged(params))\n    },\n\n    /**\n     * Makes a call to the NFDRegistry smart contract using the `setAddressPrimaryNfd(string,uint64,address)void` ABI method.\n     *\n    * Makes the specified NFD the 'first' NFD in the reverse-address set so its the primary NFD for this address.\n    The NFD must be valid, and the sender must be the address (or nfd owner if vault).  The NFD wouldn't already be\n    in the reverse-lookup set if it wasn't already valid.\n\n     *\n     * @param params The params for the smart contract call\n     * @returns The call params\n     */\n    setAddressPrimaryNfd: (params: CallParams<NfdRegistryArgs['obj']['setAddressPrimaryNfd(string,uint64,address)void'] | NfdRegistryArgs['tuple']['setAddressPrimaryNfd(string,uint64,address)void']> & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      return this.appClient.params.call(NfdRegistryParamsFactory.setAddressPrimaryNfd(params))\n    },\n\n    /**\n     * Makes a call to the NFDRegistry smart contract using the `upgradeNfd(string)string` ABI method.\n     *\n     * @param params The params for the smart contract call\n     * @returns The call params\n     */\n    upgradeNfd: (params: CallParams<NfdRegistryArgs['obj']['upgradeNfd(string)string'] | NfdRegistryArgs['tuple']['upgradeNfd(string)string']> & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      return this.appClient.params.call(NfdRegistryParamsFactory.upgradeNfd(params))\n    },\n\n    /**\n     * Makes a call to the NFDRegistry smart contract using the `isValidNfdAppId(string,uint64)bool` ABI method.\n     *\n     * @param params The params for the smart contract call\n     * @returns The call params\n     */\n    isValidNfdAppId: (params: CallParams<NfdRegistryArgs['obj']['isValidNfdAppId(string,uint64)bool'] | NfdRegistryArgs['tuple']['isValidNfdAppId(string,uint64)bool']> & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      return this.appClient.params.call(NfdRegistryParamsFactory.isValidNfdAppId(params))\n    },\n\n    /**\n     * Makes a call to the NFDRegistry smart contract using the `getNameAppId(string)uint64` ABI method.\n     *\n     * @param params The params for the smart contract call\n     * @returns The call params\n     */\n    getNameAppId: (params: CallParams<NfdRegistryArgs['obj']['getNameAppId(string)uint64'] | NfdRegistryArgs['tuple']['getNameAppId(string)uint64']> & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      return this.appClient.params.call(NfdRegistryParamsFactory.getNameAppId(params))\n    },\n\n    /**\n     * Makes a call to the NFDRegistry smart contract using the `getAddressAppIds(address)uint64[]` ABI method.\n     *\n     * @param params The params for the smart contract call\n     * @returns The call params\n     */\n    getAddressAppIds: (params: CallParams<NfdRegistryArgs['obj']['getAddressAppIds(address)uint64[]'] | NfdRegistryArgs['tuple']['getAddressAppIds(address)uint64[]']> & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      return this.appClient.params.call(NfdRegistryParamsFactory.getAddressAppIds(params))\n    },\n\n    /**\n     * Makes a call to the NFDRegistry smart contract using the `nfdContractInit(string,uint64,byte[])void` ABI method.\n     *\n     * Initializes the NFD contract bytecode into the registry\n     *\n     * @param params The params for the smart contract call\n     * @returns The call params\n     */\n    nfdContractInit: (params: CallParams<NfdRegistryArgs['obj']['nfdContractInit(string,uint64,byte[])void'] | NfdRegistryArgs['tuple']['nfdContractInit(string,uint64,byte[])void']> & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      return this.appClient.params.call(NfdRegistryParamsFactory.nfdContractInit(params))\n    },\n\n    /**\n     * Makes a call to the NFDRegistry smart contract using the `nfdContractLoad(string,uint64,byte[])void` ABI method.\n     *\n     * Loads contract data into the  box at the specified offset.\n     *\n     * @param params The params for the smart contract call\n     * @returns The call params\n     */\n    nfdContractLoad: (params: CallParams<NfdRegistryArgs['obj']['nfdContractLoad(string,uint64,byte[])void'] | NfdRegistryArgs['tuple']['nfdContractLoad(string,uint64,byte[])void']> & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      return this.appClient.params.call(NfdRegistryParamsFactory.nfdContractLoad(params))\n    },\n\n    /**\n     * Makes a call to the NFDRegistry smart contract using the `nfdContractCommit(string)void` ABI method.\n     *\n     * Commit a new version of the contract.\n     *\n     * @param params The params for the smart contract call\n     * @returns The call params\n     */\n    nfdContractCommit: (params: CallParams<NfdRegistryArgs['obj']['nfdContractCommit(string)void'] | NfdRegistryArgs['tuple']['nfdContractCommit(string)void']> & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      return this.appClient.params.call(NfdRegistryParamsFactory.nfdContractCommit(params))\n    },\n\n    /**\n     * Makes a call to the NFDRegistry smart contract using the `usdInMicroAlgo(uint64)uint64` ABI method.\n     *\n     * @param params The params for the smart contract call\n     * @returns The call params\n     */\n    usdInMicroAlgo: (params: CallParams<NfdRegistryArgs['obj']['usdInMicroAlgo(uint64)uint64'] | NfdRegistryArgs['tuple']['usdInMicroAlgo(uint64)uint64']> & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      return this.appClient.params.call(NfdRegistryParamsFactory.usdInMicroAlgo(params))\n    },\n\n    /**\n     * Makes a call to the NFDRegistry smart contract using the `costToAddToAddress(address)uint64` ABI method.\n     *\n     * Returns the cost to add an NFD to the reverse-lookup data\n     *\n     * @param params The params for the smart contract call\n     * @returns The call params\n     */\n    costToAddToAddress: (params: CallParams<NfdRegistryArgs['obj']['costToAddToAddress(address)uint64'] | NfdRegistryArgs['tuple']['costToAddToAddress(address)uint64']> & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      return this.appClient.params.call(NfdRegistryParamsFactory.costToAddToAddress(params))\n    },\n\n    /**\n     * Makes a call to the NFDRegistry smart contract using the `calcFuturePrice(uint64,uint64)uint64` ABI method.\n     *\n     * Calculates the future price based on the current price and the number of years.\n     *\n     * @param params The params for the smart contract call\n     * @returns The call params\n     */\n    calcFuturePrice: (params: CallParams<NfdRegistryArgs['obj']['calcFuturePrice(uint64,uint64)uint64'] | NfdRegistryArgs['tuple']['calcFuturePrice(uint64,uint64)uint64']> & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      return this.appClient.params.call(NfdRegistryParamsFactory.calcFuturePrice(params))\n    },\n\n  }\n\n  /**\n   * Create transactions for the current app\n   */\n  readonly createTransaction = {\n    /**\n     * Gets available update methods\n     */\n    update: {\n      /**\n       * Updates an existing instance of the NFDRegistry smart contract using the `updateApplication()void` ABI method.\n       *\n       * @param params The params for the smart contract call\n       * @returns The update transaction\n       */\n      updateApplication: (params: CallParams<NfdRegistryArgs['obj']['updateApplication()void'] | NfdRegistryArgs['tuple']['updateApplication()void']> & AppClientCompilationParams = {args: []}) => {\n        return this.appClient.createTransaction.update(NfdRegistryParamsFactory.update.updateApplication(params))\n      },\n\n    },\n\n    /**\n     * Makes a clear_state call to an existing instance of the NFDRegistry smart contract.\n     *\n     * @param params The params for the bare (raw) call\n     * @returns The clearState result\n     */\n    clearState: (params?: Expand<AppClientBareCallParams>) => {\n      return this.appClient.createTransaction.bare.clearState(params)\n    },\n\n    /**\n     * Makes a call to the NFDRegistry smart contract using the `gas()void` ABI method.\n     *\n     * @param params The params for the smart contract call\n     * @returns The call transaction\n     */\n    gas: (params: CallParams<NfdRegistryArgs['obj']['gas()void'] | NfdRegistryArgs['tuple']['gas()void']> & {onComplete?: OnApplicationComplete.NoOpOC} = {args: []}) => {\n      return this.appClient.createTransaction.call(NfdRegistryParamsFactory.gas(params))\n    },\n\n    /**\n     * Makes a call to the NFDRegistry smart contract using the `getPrice(string,address)(uint64,uint64,bool,bool,bool)` ABI method.\n     *\n    * Returns the price for a given NFD (single year), the max # of years allowed (Name for Display),\n    and extra algo required to cover MBR when purchasing.\n\n     *\n     * @param params The params for the smart contract call\n     * @returns The call transaction\n     */\n    getPrice: (params: CallParams<NfdRegistryArgs['obj']['getPrice(string,address)(uint64,uint64,bool,bool,bool)'] | NfdRegistryArgs['tuple']['getPrice(string,address)(uint64,uint64,bool,bool,bool)']> & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      return this.appClient.createTransaction.call(NfdRegistryParamsFactory.getPrice(params))\n    },\n\n    /**\n     * Makes a call to the NFDRegistry smart contract using the `getConstraints()(uint64,uint64,uint64,address,uint64,uint64,uint64)` ABI method.\n     *\n     * @param params The params for the smart contract call\n     * @returns The call transaction\n     */\n    getConstraints: (params: CallParams<NfdRegistryArgs['obj']['getConstraints()(uint64,uint64,uint64,address,uint64,uint64,uint64)'] | NfdRegistryArgs['tuple']['getConstraints()(uint64,uint64,uint64,address,uint64,uint64,uint64)']> & {onComplete?: OnApplicationComplete.NoOpOC} = {args: []}) => {\n      return this.appClient.createTransaction.call(NfdRegistryParamsFactory.getConstraints(params))\n    },\n\n    /**\n     * Makes a call to the NFDRegistry smart contract using the `getNfdMbrCost(string)uint64` ABI method.\n     *\n    * Returns the MBR amounts needed to MINT an nfd.\n    This value needs to be added to purchase price in mintNfd call.\n    getPrice() returns it though.\n\n     *\n     * @param params The params for the smart contract call\n     * @returns The call transaction\n     */\n    getNfdMbrCost: (params: CallParams<NfdRegistryArgs['obj']['getNfdMbrCost(string)uint64'] | NfdRegistryArgs['tuple']['getNfdMbrCost(string)uint64']> & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      return this.appClient.createTransaction.call(NfdRegistryParamsFactory.getNfdMbrCost(params))\n    },\n\n    /**\n     * Makes a call to the NFDRegistry smart contract using the `getNfdLinkOnMintExtraMbrCost(address)(uint64,uint64)` ABI method.\n     *\n     * @param params The params for the smart contract call\n     * @returns The call transaction\n     */\n    getNfdLinkOnMintExtraMbrCost: (params: CallParams<NfdRegistryArgs['obj']['getNfdLinkOnMintExtraMbrCost(address)(uint64,uint64)'] | NfdRegistryArgs['tuple']['getNfdLinkOnMintExtraMbrCost(address)(uint64,uint64)']> & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      return this.appClient.createTransaction.call(NfdRegistryParamsFactory.getNfdLinkOnMintExtraMbrCost(params))\n    },\n\n    /**\n     * Makes a call to the NFDRegistry smart contract using the `mintNfd(pay,string,address,bool)uint64` ABI method.\n     *\n     * Mint an NFD (NFT) and create a new NFD instance.\n     *\n     * @param params The params for the smart contract call\n     * @returns The call transaction\n     */\n    mintNfd: (params: CallParams<NfdRegistryArgs['obj']['mintNfd(pay,string,address,bool)uint64'] | NfdRegistryArgs['tuple']['mintNfd(pay,string,address,bool)uint64']> & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      return this.appClient.createTransaction.call(NfdRegistryParamsFactory.mintNfd(params))\n    },\n\n    /**\n     * Makes a call to the NFDRegistry smart contract using the `linkNfdAddress(string,uint64,address)void` ABI method.\n     *\n     * @param params The params for the smart contract call\n     * @returns The call transaction\n     */\n    linkNfdAddress: (params: CallParams<NfdRegistryArgs['obj']['linkNfdAddress(string,uint64,address)void'] | NfdRegistryArgs['tuple']['linkNfdAddress(string,uint64,address)void']> & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      return this.appClient.createTransaction.call(NfdRegistryParamsFactory.linkNfdAddress(params))\n    },\n\n    /**\n     * Makes a call to the NFDRegistry smart contract using the `unlinkNfdAddress(string,uint64,address)void` ABI method.\n     *\n     * @param params The params for the smart contract call\n     * @returns The call transaction\n     */\n    unlinkNfdAddress: (params: CallParams<NfdRegistryArgs['obj']['unlinkNfdAddress(string,uint64,address)void'] | NfdRegistryArgs['tuple']['unlinkNfdAddress(string,uint64,address)void']> & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      return this.appClient.createTransaction.call(NfdRegistryParamsFactory.unlinkNfdAddress(params))\n    },\n\n    /**\n     * Makes a call to the NFDRegistry smart contract using the `ownershipAssign(string,uint64)void` ABI method.\n     *\n     * @param params The params for the smart contract call\n     * @returns The call transaction\n     */\n    ownershipAssign: (params: CallParams<NfdRegistryArgs['obj']['ownershipAssign(string,uint64)void'] | NfdRegistryArgs['tuple']['ownershipAssign(string,uint64)void']> & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      return this.appClient.createTransaction.call(NfdRegistryParamsFactory.ownershipAssign(params))\n    },\n\n    /**\n     * Makes a call to the NFDRegistry smart contract using the `ownershipChanged(string,uint64,address,address)void` ABI method.\n     *\n    * This method is triggered when the ownership of an NFD (Non-Fungible Domain) changes.\n    It is called by the NFD via the purchase method.  It can also be called by TxnLab admin for older 3.3\n    NFDs when it detects purchased events for 3.3\n\n     *\n     * @param params The params for the smart contract call\n     * @returns The call transaction\n     */\n    ownershipChanged: (params: CallParams<NfdRegistryArgs['obj']['ownershipChanged(string,uint64,address,address)void'] | NfdRegistryArgs['tuple']['ownershipChanged(string,uint64,address,address)void']> & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      return this.appClient.createTransaction.call(NfdRegistryParamsFactory.ownershipChanged(params))\n    },\n\n    /**\n     * Makes a call to the NFDRegistry smart contract using the `setAddressPrimaryNfd(string,uint64,address)void` ABI method.\n     *\n    * Makes the specified NFD the 'first' NFD in the reverse-address set so its the primary NFD for this address.\n    The NFD must be valid, and the sender must be the address (or nfd owner if vault).  The NFD wouldn't already be\n    in the reverse-lookup set if it wasn't already valid.\n\n     *\n     * @param params The params for the smart contract call\n     * @returns The call transaction\n     */\n    setAddressPrimaryNfd: (params: CallParams<NfdRegistryArgs['obj']['setAddressPrimaryNfd(string,uint64,address)void'] | NfdRegistryArgs['tuple']['setAddressPrimaryNfd(string,uint64,address)void']> & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      return this.appClient.createTransaction.call(NfdRegistryParamsFactory.setAddressPrimaryNfd(params))\n    },\n\n    /**\n     * Makes a call to the NFDRegistry smart contract using the `upgradeNfd(string)string` ABI method.\n     *\n     * @param params The params for the smart contract call\n     * @returns The call transaction\n     */\n    upgradeNfd: (params: CallParams<NfdRegistryArgs['obj']['upgradeNfd(string)string'] | NfdRegistryArgs['tuple']['upgradeNfd(string)string']> & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      return this.appClient.createTransaction.call(NfdRegistryParamsFactory.upgradeNfd(params))\n    },\n\n    /**\n     * Makes a call to the NFDRegistry smart contract using the `isValidNfdAppId(string,uint64)bool` ABI method.\n     *\n     * @param params The params for the smart contract call\n     * @returns The call transaction\n     */\n    isValidNfdAppId: (params: CallParams<NfdRegistryArgs['obj']['isValidNfdAppId(string,uint64)bool'] | NfdRegistryArgs['tuple']['isValidNfdAppId(string,uint64)bool']> & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      return this.appClient.createTransaction.call(NfdRegistryParamsFactory.isValidNfdAppId(params))\n    },\n\n    /**\n     * Makes a call to the NFDRegistry smart contract using the `getNameAppId(string)uint64` ABI method.\n     *\n     * @param params The params for the smart contract call\n     * @returns The call transaction\n     */\n    getNameAppId: (params: CallParams<NfdRegistryArgs['obj']['getNameAppId(string)uint64'] | NfdRegistryArgs['tuple']['getNameAppId(string)uint64']> & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      return this.appClient.createTransaction.call(NfdRegistryParamsFactory.getNameAppId(params))\n    },\n\n    /**\n     * Makes a call to the NFDRegistry smart contract using the `getAddressAppIds(address)uint64[]` ABI method.\n     *\n     * @param params The params for the smart contract call\n     * @returns The call transaction\n     */\n    getAddressAppIds: (params: CallParams<NfdRegistryArgs['obj']['getAddressAppIds(address)uint64[]'] | NfdRegistryArgs['tuple']['getAddressAppIds(address)uint64[]']> & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      return this.appClient.createTransaction.call(NfdRegistryParamsFactory.getAddressAppIds(params))\n    },\n\n    /**\n     * Makes a call to the NFDRegistry smart contract using the `nfdContractInit(string,uint64,byte[])void` ABI method.\n     *\n     * Initializes the NFD contract bytecode into the registry\n     *\n     * @param params The params for the smart contract call\n     * @returns The call transaction\n     */\n    nfdContractInit: (params: CallParams<NfdRegistryArgs['obj']['nfdContractInit(string,uint64,byte[])void'] | NfdRegistryArgs['tuple']['nfdContractInit(string,uint64,byte[])void']> & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      return this.appClient.createTransaction.call(NfdRegistryParamsFactory.nfdContractInit(params))\n    },\n\n    /**\n     * Makes a call to the NFDRegistry smart contract using the `nfdContractLoad(string,uint64,byte[])void` ABI method.\n     *\n     * Loads contract data into the  box at the specified offset.\n     *\n     * @param params The params for the smart contract call\n     * @returns The call transaction\n     */\n    nfdContractLoad: (params: CallParams<NfdRegistryArgs['obj']['nfdContractLoad(string,uint64,byte[])void'] | NfdRegistryArgs['tuple']['nfdContractLoad(string,uint64,byte[])void']> & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      return this.appClient.createTransaction.call(NfdRegistryParamsFactory.nfdContractLoad(params))\n    },\n\n    /**\n     * Makes a call to the NFDRegistry smart contract using the `nfdContractCommit(string)void` ABI method.\n     *\n     * Commit a new version of the contract.\n     *\n     * @param params The params for the smart contract call\n     * @returns The call transaction\n     */\n    nfdContractCommit: (params: CallParams<NfdRegistryArgs['obj']['nfdContractCommit(string)void'] | NfdRegistryArgs['tuple']['nfdContractCommit(string)void']> & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      return this.appClient.createTransaction.call(NfdRegistryParamsFactory.nfdContractCommit(params))\n    },\n\n    /**\n     * Makes a call to the NFDRegistry smart contract using the `usdInMicroAlgo(uint64)uint64` ABI method.\n     *\n     * @param params The params for the smart contract call\n     * @returns The call transaction\n     */\n    usdInMicroAlgo: (params: CallParams<NfdRegistryArgs['obj']['usdInMicroAlgo(uint64)uint64'] | NfdRegistryArgs['tuple']['usdInMicroAlgo(uint64)uint64']> & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      return this.appClient.createTransaction.call(NfdRegistryParamsFactory.usdInMicroAlgo(params))\n    },\n\n    /**\n     * Makes a call to the NFDRegistry smart contract using the `costToAddToAddress(address)uint64` ABI method.\n     *\n     * Returns the cost to add an NFD to the reverse-lookup data\n     *\n     * @param params The params for the smart contract call\n     * @returns The call transaction\n     */\n    costToAddToAddress: (params: CallParams<NfdRegistryArgs['obj']['costToAddToAddress(address)uint64'] | NfdRegistryArgs['tuple']['costToAddToAddress(address)uint64']> & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      return this.appClient.createTransaction.call(NfdRegistryParamsFactory.costToAddToAddress(params))\n    },\n\n    /**\n     * Makes a call to the NFDRegistry smart contract using the `calcFuturePrice(uint64,uint64)uint64` ABI method.\n     *\n     * Calculates the future price based on the current price and the number of years.\n     *\n     * @param params The params for the smart contract call\n     * @returns The call transaction\n     */\n    calcFuturePrice: (params: CallParams<NfdRegistryArgs['obj']['calcFuturePrice(uint64,uint64)uint64'] | NfdRegistryArgs['tuple']['calcFuturePrice(uint64,uint64)uint64']> & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      return this.appClient.createTransaction.call(NfdRegistryParamsFactory.calcFuturePrice(params))\n    },\n\n  }\n\n  /**\n   * Send calls to the current app\n   */\n  readonly send = {\n    /**\n     * Gets available update methods\n     */\n    update: {\n      /**\n       * Updates an existing instance of the NFDRegistry smart contract using the `updateApplication()void` ABI method.\n       *\n       * @param params The params for the smart contract call\n       * @returns The update result\n       */\n      updateApplication: async (params: CallParams<NfdRegistryArgs['obj']['updateApplication()void'] | NfdRegistryArgs['tuple']['updateApplication()void']> & AppClientCompilationParams & SendParams = {args: []}) => {\n        const result = await this.appClient.send.update(NfdRegistryParamsFactory.update.updateApplication(params))\n        return {...result, return: result.return as unknown as (undefined | NfdRegistryReturns['updateApplication()void'])}\n      },\n\n    },\n\n    /**\n     * Makes a clear_state call to an existing instance of the NFDRegistry smart contract.\n     *\n     * @param params The params for the bare (raw) call\n     * @returns The clearState result\n     */\n    clearState: (params?: Expand<AppClientBareCallParams & SendParams>) => {\n      return this.appClient.send.bare.clearState(params)\n    },\n\n    /**\n     * Makes a call to the NFDRegistry smart contract using the `gas()void` ABI method.\n     *\n     * @param params The params for the smart contract call\n     * @returns The call result\n     */\n    gas: async (params: CallParams<NfdRegistryArgs['obj']['gas()void'] | NfdRegistryArgs['tuple']['gas()void']> & SendParams & {onComplete?: OnApplicationComplete.NoOpOC} = {args: []}) => {\n      const result = await this.appClient.send.call(NfdRegistryParamsFactory.gas(params))\n      return {...result, return: result.return as unknown as (undefined | NfdRegistryReturns['gas()void'])}\n    },\n\n    /**\n     * Makes a call to the NFDRegistry smart contract using the `getPrice(string,address)(uint64,uint64,bool,bool,bool)` ABI method.\n     *\n    * Returns the price for a given NFD (single year), the max # of years allowed (Name for Display),\n    and extra algo required to cover MBR when purchasing.\n\n     *\n     * @param params The params for the smart contract call\n     * @returns The call result\n     */\n    getPrice: async (params: CallParams<NfdRegistryArgs['obj']['getPrice(string,address)(uint64,uint64,bool,bool,bool)'] | NfdRegistryArgs['tuple']['getPrice(string,address)(uint64,uint64,bool,bool,bool)']> & SendParams & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      const result = await this.appClient.send.call(NfdRegistryParamsFactory.getPrice(params))\n      return {...result, return: result.return as unknown as (undefined | NfdRegistryReturns['getPrice(string,address)(uint64,uint64,bool,bool,bool)'])}\n    },\n\n    /**\n     * Makes a call to the NFDRegistry smart contract using the `getConstraints()(uint64,uint64,uint64,address,uint64,uint64,uint64)` ABI method.\n     *\n     * @param params The params for the smart contract call\n     * @returns The call result\n     */\n    getConstraints: async (params: CallParams<NfdRegistryArgs['obj']['getConstraints()(uint64,uint64,uint64,address,uint64,uint64,uint64)'] | NfdRegistryArgs['tuple']['getConstraints()(uint64,uint64,uint64,address,uint64,uint64,uint64)']> & SendParams & {onComplete?: OnApplicationComplete.NoOpOC} = {args: []}) => {\n      const result = await this.appClient.send.call(NfdRegistryParamsFactory.getConstraints(params))\n      return {...result, return: result.return as unknown as (undefined | NfdRegistryReturns['getConstraints()(uint64,uint64,uint64,address,uint64,uint64,uint64)'])}\n    },\n\n    /**\n     * Makes a call to the NFDRegistry smart contract using the `getNfdMbrCost(string)uint64` ABI method.\n     *\n    * Returns the MBR amounts needed to MINT an nfd.\n    This value needs to be added to purchase price in mintNfd call.\n    getPrice() returns it though.\n\n     *\n     * @param params The params for the smart contract call\n     * @returns The call result\n     */\n    getNfdMbrCost: async (params: CallParams<NfdRegistryArgs['obj']['getNfdMbrCost(string)uint64'] | NfdRegistryArgs['tuple']['getNfdMbrCost(string)uint64']> & SendParams & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      const result = await this.appClient.send.call(NfdRegistryParamsFactory.getNfdMbrCost(params))\n      return {...result, return: result.return as unknown as (undefined | NfdRegistryReturns['getNfdMbrCost(string)uint64'])}\n    },\n\n    /**\n     * Makes a call to the NFDRegistry smart contract using the `getNfdLinkOnMintExtraMbrCost(address)(uint64,uint64)` ABI method.\n     *\n     * @param params The params for the smart contract call\n     * @returns The call result\n     */\n    getNfdLinkOnMintExtraMbrCost: async (params: CallParams<NfdRegistryArgs['obj']['getNfdLinkOnMintExtraMbrCost(address)(uint64,uint64)'] | NfdRegistryArgs['tuple']['getNfdLinkOnMintExtraMbrCost(address)(uint64,uint64)']> & SendParams & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      const result = await this.appClient.send.call(NfdRegistryParamsFactory.getNfdLinkOnMintExtraMbrCost(params))\n      return {...result, return: result.return as unknown as (undefined | NfdRegistryReturns['getNfdLinkOnMintExtraMbrCost(address)(uint64,uint64)'])}\n    },\n\n    /**\n     * Makes a call to the NFDRegistry smart contract using the `mintNfd(pay,string,address,bool)uint64` ABI method.\n     *\n     * Mint an NFD (NFT) and create a new NFD instance.\n     *\n     * @param params The params for the smart contract call\n     * @returns The call result\n     */\n    mintNfd: async (params: CallParams<NfdRegistryArgs['obj']['mintNfd(pay,string,address,bool)uint64'] | NfdRegistryArgs['tuple']['mintNfd(pay,string,address,bool)uint64']> & SendParams & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      const result = await this.appClient.send.call(NfdRegistryParamsFactory.mintNfd(params))\n      return {...result, return: result.return as unknown as (undefined | NfdRegistryReturns['mintNfd(pay,string,address,bool)uint64'])}\n    },\n\n    /**\n     * Makes a call to the NFDRegistry smart contract using the `linkNfdAddress(string,uint64,address)void` ABI method.\n     *\n     * @param params The params for the smart contract call\n     * @returns The call result\n     */\n    linkNfdAddress: async (params: CallParams<NfdRegistryArgs['obj']['linkNfdAddress(string,uint64,address)void'] | NfdRegistryArgs['tuple']['linkNfdAddress(string,uint64,address)void']> & SendParams & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      const result = await this.appClient.send.call(NfdRegistryParamsFactory.linkNfdAddress(params))\n      return {...result, return: result.return as unknown as (undefined | NfdRegistryReturns['linkNfdAddress(string,uint64,address)void'])}\n    },\n\n    /**\n     * Makes a call to the NFDRegistry smart contract using the `unlinkNfdAddress(string,uint64,address)void` ABI method.\n     *\n     * @param params The params for the smart contract call\n     * @returns The call result\n     */\n    unlinkNfdAddress: async (params: CallParams<NfdRegistryArgs['obj']['unlinkNfdAddress(string,uint64,address)void'] | NfdRegistryArgs['tuple']['unlinkNfdAddress(string,uint64,address)void']> & SendParams & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      const result = await this.appClient.send.call(NfdRegistryParamsFactory.unlinkNfdAddress(params))\n      return {...result, return: result.return as unknown as (undefined | NfdRegistryReturns['unlinkNfdAddress(string,uint64,address)void'])}\n    },\n\n    /**\n     * Makes a call to the NFDRegistry smart contract using the `ownershipAssign(string,uint64)void` ABI method.\n     *\n     * @param params The params for the smart contract call\n     * @returns The call result\n     */\n    ownershipAssign: async (params: CallParams<NfdRegistryArgs['obj']['ownershipAssign(string,uint64)void'] | NfdRegistryArgs['tuple']['ownershipAssign(string,uint64)void']> & SendParams & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      const result = await this.appClient.send.call(NfdRegistryParamsFactory.ownershipAssign(params))\n      return {...result, return: result.return as unknown as (undefined | NfdRegistryReturns['ownershipAssign(string,uint64)void'])}\n    },\n\n    /**\n     * Makes a call to the NFDRegistry smart contract using the `ownershipChanged(string,uint64,address,address)void` ABI method.\n     *\n    * This method is triggered when the ownership of an NFD (Non-Fungible Domain) changes.\n    It is called by the NFD via the purchase method.  It can also be called by TxnLab admin for older 3.3\n    NFDs when it detects purchased events for 3.3\n\n     *\n     * @param params The params for the smart contract call\n     * @returns The call result\n     */\n    ownershipChanged: async (params: CallParams<NfdRegistryArgs['obj']['ownershipChanged(string,uint64,address,address)void'] | NfdRegistryArgs['tuple']['ownershipChanged(string,uint64,address,address)void']> & SendParams & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      const result = await this.appClient.send.call(NfdRegistryParamsFactory.ownershipChanged(params))\n      return {...result, return: result.return as unknown as (undefined | NfdRegistryReturns['ownershipChanged(string,uint64,address,address)void'])}\n    },\n\n    /**\n     * Makes a call to the NFDRegistry smart contract using the `setAddressPrimaryNfd(string,uint64,address)void` ABI method.\n     *\n    * Makes the specified NFD the 'first' NFD in the reverse-address set so its the primary NFD for this address.\n    The NFD must be valid, and the sender must be the address (or nfd owner if vault).  The NFD wouldn't already be\n    in the reverse-lookup set if it wasn't already valid.\n\n     *\n     * @param params The params for the smart contract call\n     * @returns The call result\n     */\n    setAddressPrimaryNfd: async (params: CallParams<NfdRegistryArgs['obj']['setAddressPrimaryNfd(string,uint64,address)void'] | NfdRegistryArgs['tuple']['setAddressPrimaryNfd(string,uint64,address)void']> & SendParams & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      const result = await this.appClient.send.call(NfdRegistryParamsFactory.setAddressPrimaryNfd(params))\n      return {...result, return: result.return as unknown as (undefined | NfdRegistryReturns['setAddressPrimaryNfd(string,uint64,address)void'])}\n    },\n\n    /**\n     * Makes a call to the NFDRegistry smart contract using the `upgradeNfd(string)string` ABI method.\n     *\n     * @param params The params for the smart contract call\n     * @returns The call result\n     */\n    upgradeNfd: async (params: CallParams<NfdRegistryArgs['obj']['upgradeNfd(string)string'] | NfdRegistryArgs['tuple']['upgradeNfd(string)string']> & SendParams & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      const result = await this.appClient.send.call(NfdRegistryParamsFactory.upgradeNfd(params))\n      return {...result, return: result.return as unknown as (undefined | NfdRegistryReturns['upgradeNfd(string)string'])}\n    },\n\n    /**\n     * Makes a call to the NFDRegistry smart contract using the `isValidNfdAppId(string,uint64)bool` ABI method.\n     *\n     * @param params The params for the smart contract call\n     * @returns The call result\n     */\n    isValidNfdAppId: async (params: CallParams<NfdRegistryArgs['obj']['isValidNfdAppId(string,uint64)bool'] | NfdRegistryArgs['tuple']['isValidNfdAppId(string,uint64)bool']> & SendParams & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      const result = await this.appClient.send.call(NfdRegistryParamsFactory.isValidNfdAppId(params))\n      return {...result, return: result.return as unknown as (undefined | NfdRegistryReturns['isValidNfdAppId(string,uint64)bool'])}\n    },\n\n    /**\n     * Makes a call to the NFDRegistry smart contract using the `getNameAppId(string)uint64` ABI method.\n     *\n     * @param params The params for the smart contract call\n     * @returns The call result\n     */\n    getNameAppId: async (params: CallParams<NfdRegistryArgs['obj']['getNameAppId(string)uint64'] | NfdRegistryArgs['tuple']['getNameAppId(string)uint64']> & SendParams & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      const result = await this.appClient.send.call(NfdRegistryParamsFactory.getNameAppId(params))\n      return {...result, return: result.return as unknown as (undefined | NfdRegistryReturns['getNameAppId(string)uint64'])}\n    },\n\n    /**\n     * Makes a call to the NFDRegistry smart contract using the `getAddressAppIds(address)uint64[]` ABI method.\n     *\n     * @param params The params for the smart contract call\n     * @returns The call result\n     */\n    getAddressAppIds: async (params: CallParams<NfdRegistryArgs['obj']['getAddressAppIds(address)uint64[]'] | NfdRegistryArgs['tuple']['getAddressAppIds(address)uint64[]']> & SendParams & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      const result = await this.appClient.send.call(NfdRegistryParamsFactory.getAddressAppIds(params))\n      return {...result, return: result.return as unknown as (undefined | NfdRegistryReturns['getAddressAppIds(address)uint64[]'])}\n    },\n\n    /**\n     * Makes a call to the NFDRegistry smart contract using the `nfdContractInit(string,uint64,byte[])void` ABI method.\n     *\n     * Initializes the NFD contract bytecode into the registry\n     *\n     * @param params The params for the smart contract call\n     * @returns The call result\n     */\n    nfdContractInit: async (params: CallParams<NfdRegistryArgs['obj']['nfdContractInit(string,uint64,byte[])void'] | NfdRegistryArgs['tuple']['nfdContractInit(string,uint64,byte[])void']> & SendParams & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      const result = await this.appClient.send.call(NfdRegistryParamsFactory.nfdContractInit(params))\n      return {...result, return: result.return as unknown as (undefined | NfdRegistryReturns['nfdContractInit(string,uint64,byte[])void'])}\n    },\n\n    /**\n     * Makes a call to the NFDRegistry smart contract using the `nfdContractLoad(string,uint64,byte[])void` ABI method.\n     *\n     * Loads contract data into the  box at the specified offset.\n     *\n     * @param params The params for the smart contract call\n     * @returns The call result\n     */\n    nfdContractLoad: async (params: CallParams<NfdRegistryArgs['obj']['nfdContractLoad(string,uint64,byte[])void'] | NfdRegistryArgs['tuple']['nfdContractLoad(string,uint64,byte[])void']> & SendParams & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      const result = await this.appClient.send.call(NfdRegistryParamsFactory.nfdContractLoad(params))\n      return {...result, return: result.return as unknown as (undefined | NfdRegistryReturns['nfdContractLoad(string,uint64,byte[])void'])}\n    },\n\n    /**\n     * Makes a call to the NFDRegistry smart contract using the `nfdContractCommit(string)void` ABI method.\n     *\n     * Commit a new version of the contract.\n     *\n     * @param params The params for the smart contract call\n     * @returns The call result\n     */\n    nfdContractCommit: async (params: CallParams<NfdRegistryArgs['obj']['nfdContractCommit(string)void'] | NfdRegistryArgs['tuple']['nfdContractCommit(string)void']> & SendParams & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      const result = await this.appClient.send.call(NfdRegistryParamsFactory.nfdContractCommit(params))\n      return {...result, return: result.return as unknown as (undefined | NfdRegistryReturns['nfdContractCommit(string)void'])}\n    },\n\n    /**\n     * Makes a call to the NFDRegistry smart contract using the `usdInMicroAlgo(uint64)uint64` ABI method.\n     *\n     * @param params The params for the smart contract call\n     * @returns The call result\n     */\n    usdInMicroAlgo: async (params: CallParams<NfdRegistryArgs['obj']['usdInMicroAlgo(uint64)uint64'] | NfdRegistryArgs['tuple']['usdInMicroAlgo(uint64)uint64']> & SendParams & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      const result = await this.appClient.send.call(NfdRegistryParamsFactory.usdInMicroAlgo(params))\n      return {...result, return: result.return as unknown as (undefined | NfdRegistryReturns['usdInMicroAlgo(uint64)uint64'])}\n    },\n\n    /**\n     * Makes a call to the NFDRegistry smart contract using the `costToAddToAddress(address)uint64` ABI method.\n     *\n     * Returns the cost to add an NFD to the reverse-lookup data\n     *\n     * @param params The params for the smart contract call\n     * @returns The call result\n     */\n    costToAddToAddress: async (params: CallParams<NfdRegistryArgs['obj']['costToAddToAddress(address)uint64'] | NfdRegistryArgs['tuple']['costToAddToAddress(address)uint64']> & SendParams & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      const result = await this.appClient.send.call(NfdRegistryParamsFactory.costToAddToAddress(params))\n      return {...result, return: result.return as unknown as (undefined | NfdRegistryReturns['costToAddToAddress(address)uint64'])}\n    },\n\n    /**\n     * Makes a call to the NFDRegistry smart contract using the `calcFuturePrice(uint64,uint64)uint64` ABI method.\n     *\n     * Calculates the future price based on the current price and the number of years.\n     *\n     * @param params The params for the smart contract call\n     * @returns The call result\n     */\n    calcFuturePrice: async (params: CallParams<NfdRegistryArgs['obj']['calcFuturePrice(uint64,uint64)uint64'] | NfdRegistryArgs['tuple']['calcFuturePrice(uint64,uint64)uint64']> & SendParams & {onComplete?: OnApplicationComplete.NoOpOC}) => {\n      const result = await this.appClient.send.call(NfdRegistryParamsFactory.calcFuturePrice(params))\n      return {...result, return: result.return as unknown as (undefined | NfdRegistryReturns['calcFuturePrice(uint64,uint64)uint64'])}\n    },\n\n  }\n\n  /**\n   * Clone this app client with different params\n   *\n   * @param params The params to use for the the cloned app client. Omit a param to keep the original value. Set a param to override the original value. Setting to undefined will clear the original value.\n   * @returns A new app client with the altered params\n   */\n  public clone(params: CloneAppClientParams) {\n    return new NfdRegistryClient(this.appClient.clone(params))\n  }\n\n  /**\n   * Methods to access state for the current NFDRegistry app\n   */\n  state = {\n    /**\n     * Methods to access local state for the current NFDRegistry app\n     */\n    local: (address: string | Address) => {\n      const encodedAddress = typeof address === 'string' ? address : encodeAddress(address.publicKey)\n      return {\n        /**\n         * Get all current keyed values from local state\n         */\n        getAll: async (): Promise<Partial<Expand<LocalKeysState>>> => {\n          const result = await this.appClient.state.local(encodedAddress).getAll()\n          return {\n          }\n        },\n        /**\n         * Get values from the localState map in local state\n         */\n        localState: {\n          /**\n           * Get all current values of the localState map in local state\n           */\n          getMap: async (): Promise<Map<Uint8Array, Uint8Array>> => { return (await this.appClient.state.local(encodedAddress).getMap(\"localState\")) as Map<Uint8Array, Uint8Array> },\n          /**\n           * Get a current value of the localState map by key from local state\n           */\n          value: async (key: Uint8Array | string): Promise<Uint8Array | undefined> => { return await this.appClient.state.local(encodedAddress).getMapValue(\"localState\", key) as Uint8Array | undefined },\n        },\n      }\n    },\n    /**\n     * Methods to access box state for the current NFDRegistry app\n     */\n    box: {\n      /**\n       * Get all current keyed values from box state\n       */\n      getAll: async (): Promise<Partial<Expand<BoxKeysState>>> => {\n        const result = await this.appClient.state.box.getAll()\n        return {\n        }\n      },\n      /**\n       * Get values from the boxes map in box state\n       */\n      boxes: {\n        /**\n         * Get all current values of the boxes map in box state\n         */\n        getMap: async (): Promise<Map<Uint8Array, Uint8Array>> => { return (await this.appClient.state.box.getMap(\"boxes\")) as Map<Uint8Array, Uint8Array> },\n        /**\n         * Get a current value of the boxes map by key from box state\n         */\n        value: async (key: Uint8Array | string): Promise<Uint8Array | undefined> => { return await this.appClient.state.box.getMapValue(\"boxes\", key) as Uint8Array | undefined },\n      },\n    },\n  }\n\n  public newGroup(): NfdRegistryComposer {\n    const client = this\n    const composer = this.algorand.newGroup()\n    let promiseChain:Promise<unknown> = Promise.resolve()\n    const resultMappers: Array<undefined | ((x: ABIReturn | undefined) => any)> = []\n    return {\n      /**\n       * Add a gas()void method call against the NFDRegistry contract\n       */\n      gas(params: CallParams<NfdRegistryArgs['obj']['gas()void'] | NfdRegistryArgs['tuple']['gas()void']> & {onComplete?: OnApplicationComplete.NoOpOC}) {\n        promiseChain = promiseChain.then(async () => composer.addAppCallMethodCall(await client.params.gas(params)))\n        resultMappers.push(undefined)\n        return this\n      },\n      /**\n       * Add a getPrice(string,address)(uint64,uint64,bool,bool,bool) method call against the NFDRegistry contract\n       */\n      getPrice(params: CallParams<NfdRegistryArgs['obj']['getPrice(string,address)(uint64,uint64,bool,bool,bool)'] | NfdRegistryArgs['tuple']['getPrice(string,address)(uint64,uint64,bool,bool,bool)']> & {onComplete?: OnApplicationComplete.NoOpOC}) {\n        promiseChain = promiseChain.then(async () => composer.addAppCallMethodCall(await client.params.getPrice(params)))\n        resultMappers.push((v) => client.decodeReturnValue('getPrice(string,address)(uint64,uint64,bool,bool,bool)', v))\n        return this\n      },\n      /**\n       * Add a getConstraints()(uint64,uint64,uint64,address,uint64,uint64,uint64) method call against the NFDRegistry contract\n       */\n      getConstraints(params: CallParams<NfdRegistryArgs['obj']['getConstraints()(uint64,uint64,uint64,address,uint64,uint64,uint64)'] | NfdRegistryArgs['tuple']['getConstraints()(uint64,uint64,uint64,address,uint64,uint64,uint64)']> & {onComplete?: OnApplicationComplete.NoOpOC}) {\n        promiseChain = promiseChain.then(async () => composer.addAppCallMethodCall(await client.params.getConstraints(params)))\n        resultMappers.push((v) => client.decodeReturnValue('getConstraints()(uint64,uint64,uint64,address,uint64,uint64,uint64)', v))\n        return this\n      },\n      /**\n       * Add a getNfdMbrCost(string)uint64 method call against the NFDRegistry contract\n       */\n      getNfdMbrCost(params: CallParams<NfdRegistryArgs['obj']['getNfdMbrCost(string)uint64'] | NfdRegistryArgs['tuple']['getNfdMbrCost(string)uint64']> & {onComplete?: OnApplicationComplete.NoOpOC}) {\n        promiseChain = promiseChain.then(async () => composer.addAppCallMethodCall(await client.params.getNfdMbrCost(params)))\n        resultMappers.push((v) => client.decodeReturnValue('getNfdMbrCost(string)uint64', v))\n        return this\n      },\n      /**\n       * Add a getNfdLinkOnMintExtraMbrCost(address)(uint64,uint64) method call against the NFDRegistry contract\n       */\n      getNfdLinkOnMintExtraMbrCost(params: CallParams<NfdRegistryArgs['obj']['getNfdLinkOnMintExtraMbrCost(address)(uint64,uint64)'] | NfdRegistryArgs['tuple']['getNfdLinkOnMintExtraMbrCost(address)(uint64,uint64)']> & {onComplete?: OnApplicationComplete.NoOpOC}) {\n        promiseChain = promiseChain.then(async () => composer.addAppCallMethodCall(await client.params.getNfdLinkOnMintExtraMbrCost(params)))\n        resultMappers.push((v) => client.decodeReturnValue('getNfdLinkOnMintExtraMbrCost(address)(uint64,uint64)', v))\n        return this\n      },\n      /**\n       * Add a mintNfd(pay,string,address,bool)uint64 method call against the NFDRegistry contract\n       */\n      mintNfd(params: CallParams<NfdRegistryArgs['obj']['mintNfd(pay,string,address,bool)uint64'] | NfdRegistryArgs['tuple']['mintNfd(pay,string,address,bool)uint64']> & {onComplete?: OnApplicationComplete.NoOpOC}) {\n        promiseChain = promiseChain.then(async () => composer.addAppCallMethodCall(await client.params.mintNfd(params)))\n        resultMappers.push((v) => client.decodeReturnValue('mintNfd(pay,string,address,bool)uint64', v))\n        return this\n      },\n      /**\n       * Add a linkNfdAddress(string,uint64,address)void method call against the NFDRegistry contract\n       */\n      linkNfdAddress(params: CallParams<NfdRegistryArgs['obj']['linkNfdAddress(string,uint64,address)void'] | NfdRegistryArgs['tuple']['linkNfdAddress(string,uint64,address)void']> & {onComplete?: OnApplicationComplete.NoOpOC}) {\n        promiseChain = promiseChain.then(async () => composer.addAppCallMethodCall(await client.params.linkNfdAddress(params)))\n        resultMappers.push(undefined)\n        return this\n      },\n      /**\n       * Add a unlinkNfdAddress(string,uint64,address)void method call against the NFDRegistry contract\n       */\n      unlinkNfdAddress(params: CallParams<NfdRegistryArgs['obj']['unlinkNfdAddress(string,uint64,address)void'] | NfdRegistryArgs['tuple']['unlinkNfdAddress(string,uint64,address)void']> & {onComplete?: OnApplicationComplete.NoOpOC}) {\n        promiseChain = promiseChain.then(async () => composer.addAppCallMethodCall(await client.params.unlinkNfdAddress(params)))\n        resultMappers.push(undefined)\n        return this\n      },\n      /**\n       * Add a ownershipAssign(string,uint64)void method call against the NFDRegistry contract\n       */\n      ownershipAssign(params: CallParams<NfdRegistryArgs['obj']['ownershipAssign(string,uint64)void'] | NfdRegistryArgs['tuple']['ownershipAssign(string,uint64)void']> & {onComplete?: OnApplicationComplete.NoOpOC}) {\n        promiseChain = promiseChain.then(async () => composer.addAppCallMethodCall(await client.params.ownershipAssign(params)))\n        resultMappers.push(undefined)\n        return this\n      },\n      /**\n       * Add a ownershipChanged(string,uint64,address,address)void method call against the NFDRegistry contract\n       */\n      ownershipChanged(params: CallParams<NfdRegistryArgs['obj']['ownershipChanged(string,uint64,address,address)void'] | NfdRegistryArgs['tuple']['ownershipChanged(string,uint64,address,address)void']> & {onComplete?: OnApplicationComplete.NoOpOC}) {\n        promiseChain = promiseChain.then(async () => composer.addAppCallMethodCall(await client.params.ownershipChanged(params)))\n        resultMappers.push(undefined)\n        return this\n      },\n      /**\n       * Add a setAddressPrimaryNfd(string,uint64,address)void method call against the NFDRegistry contract\n       */\n      setAddressPrimaryNfd(params: CallParams<NfdRegistryArgs['obj']['setAddressPrimaryNfd(string,uint64,address)void'] | NfdRegistryArgs['tuple']['setAddressPrimaryNfd(string,uint64,address)void']> & {onComplete?: OnApplicationComplete.NoOpOC}) {\n        promiseChain = promiseChain.then(async () => composer.addAppCallMethodCall(await client.params.setAddressPrimaryNfd(params)))\n        resultMappers.push(undefined)\n        return this\n      },\n      /**\n       * Add a upgradeNfd(string)string method call against the NFDRegistry contract\n       */\n      upgradeNfd(params: CallParams<NfdRegistryArgs['obj']['upgradeNfd(string)string'] | NfdRegistryArgs['tuple']['upgradeNfd(string)string']> & {onComplete?: OnApplicationComplete.NoOpOC}) {\n        promiseChain = promiseChain.then(async () => composer.addAppCallMethodCall(await client.params.upgradeNfd(params)))\n        resultMappers.push((v) => client.decodeReturnValue('upgradeNfd(string)string', v))\n        return this\n      },\n      /**\n       * Add a isValidNfdAppId(string,uint64)bool method call against the NFDRegistry contract\n       */\n      isValidNfdAppId(params: CallParams<NfdRegistryArgs['obj']['isValidNfdAppId(string,uint64)bool'] | NfdRegistryArgs['tuple']['isValidNfdAppId(string,uint64)bool']> & {onComplete?: OnApplicationComplete.NoOpOC}) {\n        promiseChain = promiseChain.then(async () => composer.addAppCallMethodCall(await client.params.isValidNfdAppId(params)))\n        resultMappers.push((v) => client.decodeReturnValue('isValidNfdAppId(string,uint64)bool', v))\n        return this\n      },\n      /**\n       * Add a getNameAppId(string)uint64 method call against the NFDRegistry contract\n       */\n      getNameAppId(params: CallParams<NfdRegistryArgs['obj']['getNameAppId(string)uint64'] | NfdRegistryArgs['tuple']['getNameAppId(string)uint64']> & {onComplete?: OnApplicationComplete.NoOpOC}) {\n        promiseChain = promiseChain.then(async () => composer.addAppCallMethodCall(await client.params.getNameAppId(params)))\n        resultMappers.push((v) => client.decodeReturnValue('getNameAppId(string)uint64', v))\n        return this\n      },\n      /**\n       * Add a getAddressAppIds(address)uint64[] method call against the NFDRegistry contract\n       */\n      getAddressAppIds(params: CallParams<NfdRegistryArgs['obj']['getAddressAppIds(address)uint64[]'] | NfdRegistryArgs['tuple']['getAddressAppIds(address)uint64[]']> & {onComplete?: OnApplicationComplete.NoOpOC}) {\n        promiseChain = promiseChain.then(async () => composer.addAppCallMethodCall(await client.params.getAddressAppIds(params)))\n        resultMappers.push((v) => client.decodeReturnValue('getAddressAppIds(address)uint64[]', v))\n        return this\n      },\n      /**\n       * Add a nfdContractInit(string,uint64,byte[])void method call against the NFDRegistry contract\n       */\n      nfdContractInit(params: CallParams<NfdRegistryArgs['obj']['nfdContractInit(string,uint64,byte[])void'] | NfdRegistryArgs['tuple']['nfdContractInit(string,uint64,byte[])void']> & {onComplete?: OnApplicationComplete.NoOpOC}) {\n        promiseChain = promiseChain.then(async () => composer.addAppCallMethodCall(await client.params.nfdContractInit(params)))\n        resultMappers.push(undefined)\n        return this\n      },\n      /**\n       * Add a nfdContractLoad(string,uint64,byte[])void method call against the NFDRegistry contract\n       */\n      nfdContractLoad(params: CallParams<NfdRegistryArgs['obj']['nfdContractLoad(string,uint64,byte[])void'] | NfdRegistryArgs['tuple']['nfdContractLoad(string,uint64,byte[])void']> & {onComplete?: OnApplicationComplete.NoOpOC}) {\n        promiseChain = promiseChain.then(async () => composer.addAppCallMethodCall(await client.params.nfdContractLoad(params)))\n        resultMappers.push(undefined)\n        return this\n      },\n      /**\n       * Add a nfdContractCommit(string)void method call against the NFDRegistry contract\n       */\n      nfdContractCommit(params: CallParams<NfdRegistryArgs['obj']['nfdContractCommit(string)void'] | NfdRegistryArgs['tuple']['nfdContractCommit(string)void']> & {onComplete?: OnApplicationComplete.NoOpOC}) {\n        promiseChain = promiseChain.then(async () => composer.addAppCallMethodCall(await client.params.nfdContractCommit(params)))\n        resultMappers.push(undefined)\n        return this\n      },\n      /**\n       * Add a usdInMicroAlgo(uint64)uint64 method call against the NFDRegistry contract\n       */\n      usdInMicroAlgo(params: CallParams<NfdRegistryArgs['obj']['usdInMicroAlgo(uint64)uint64'] | NfdRegistryArgs['tuple']['usdInMicroAlgo(uint64)uint64']> & {onComplete?: OnApplicationComplete.NoOpOC}) {\n        promiseChain = promiseChain.then(async () => composer.addAppCallMethodCall(await client.params.usdInMicroAlgo(params)))\n        resultMappers.push((v) => client.decodeReturnValue('usdInMicroAlgo(uint64)uint64', v))\n        return this\n      },\n      /**\n       * Add a costToAddToAddress(address)uint64 method call against the NFDRegistry contract\n       */\n      costToAddToAddress(params: CallParams<NfdRegistryArgs['obj']['costToAddToAddress(address)uint64'] | NfdRegistryArgs['tuple']['costToAddToAddress(address)uint64']> & {onComplete?: OnApplicationComplete.NoOpOC}) {\n        promiseChain = promiseChain.then(async () => composer.addAppCallMethodCall(await client.params.costToAddToAddress(params)))\n        resultMappers.push((v) => client.decodeReturnValue('costToAddToAddress(address)uint64', v))\n        return this\n      },\n      /**\n       * Add a calcFuturePrice(uint64,uint64)uint64 method call against the NFDRegistry contract\n       */\n      calcFuturePrice(params: CallParams<NfdRegistryArgs['obj']['calcFuturePrice(uint64,uint64)uint64'] | NfdRegistryArgs['tuple']['calcFuturePrice(uint64,uint64)uint64']> & {onComplete?: OnApplicationComplete.NoOpOC}) {\n        promiseChain = promiseChain.then(async () => composer.addAppCallMethodCall(await client.params.calcFuturePrice(params)))\n        resultMappers.push((v) => client.decodeReturnValue('calcFuturePrice(uint64,uint64)uint64', v))\n        return this\n      },\n      get update() {\n        return {\n          updateApplication: (params: CallParams<NfdRegistryArgs['obj']['updateApplication()void'] | NfdRegistryArgs['tuple']['updateApplication()void']> & AppClientCompilationParams) => {\n            promiseChain = promiseChain.then(async () => composer.addAppUpdateMethodCall(await client.params.update.updateApplication(params)))\n            resultMappers.push(undefined)\n            return this\n          },\n        }\n      },\n      /**\n       * Add a clear state call to the NFDRegistry contract\n       */\n      clearState(params: AppClientBareCallParams) {\n        promiseChain = promiseChain.then(() => composer.addAppCall(client.params.clearState(params)))\n        return this\n      },\n      addTransaction(txn: Transaction, signer?: TransactionSigner) {\n        promiseChain = promiseChain.then(() => composer.addTransaction(txn, signer))\n        return this\n      },\n      async composer() {\n        await promiseChain\n        return composer\n      },\n      async simulate(options?: SimulateOptions) {\n        await promiseChain\n        const result = await (!options ? composer.simulate() : composer.simulate(options))\n        return {\n          ...result,\n          returns: result.returns?.map((val, i) => resultMappers[i] !== undefined ? resultMappers[i]!(val) : val.returnValue)\n        }\n      },\n      async send(params?: SendParams) {\n        await promiseChain\n        const result = await composer.send(params)\n        return {\n          ...result,\n          returns: result.returns?.map((val, i) => resultMappers[i] !== undefined ? resultMappers[i]!(val) : val.returnValue)\n        }\n      }\n    } as unknown as NfdRegistryComposer\n  }\n}\nexport type NfdRegistryComposer<TReturns extends [...any[]] = []> = {\n  /**\n   * Calls the gas()void ABI method.\n   *\n   * @param args The arguments for the contract call\n   * @param params Any additional parameters for the call\n   * @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions\n   */\n  gas(params?: CallParams<NfdRegistryArgs['obj']['gas()void'] | NfdRegistryArgs['tuple']['gas()void']>): NfdRegistryComposer<[...TReturns, NfdRegistryReturns['gas()void'] | undefined]>\n\n  /**\n   * Calls the getPrice(string,address)(uint64,uint64,bool,bool,bool) ABI method.\n   *\n  * Returns the price for a given NFD (single year), the max # of years allowed (Name for Display),\n  and extra algo required to cover MBR when purchasing.\n\n   *\n   * @param args The arguments for the contract call\n   * @param params Any additional parameters for the call\n   * @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions\n   */\n  getPrice(params?: CallParams<NfdRegistryArgs['obj']['getPrice(string,address)(uint64,uint64,bool,bool,bool)'] | NfdRegistryArgs['tuple']['getPrice(string,address)(uint64,uint64,bool,bool,bool)']>): NfdRegistryComposer<[...TReturns, NfdRegistryReturns['getPrice(string,address)(uint64,uint64,bool,bool,bool)'] | undefined]>\n\n  /**\n   * Calls the getConstraints()(uint64,uint64,uint64,address,uint64,uint64,uint64) ABI method.\n   *\n   * @param args The arguments for the contract call\n   * @param params Any additional parameters for the call\n   * @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions\n   */\n  getConstraints(params?: CallParams<NfdRegistryArgs['obj']['getConstraints()(uint64,uint64,uint64,address,uint64,uint64,uint64)'] | NfdRegistryArgs['tuple']['getConstraints()(uint64,uint64,uint64,address,uint64,uint64,uint64)']>): NfdRegistryComposer<[...TReturns, NfdRegistryReturns['getConstraints()(uint64,uint64,uint64,address,uint64,uint64,uint64)'] | undefined]>\n\n  /**\n   * Calls the getNfdMbrCost(string)uint64 ABI method.\n   *\n  * Returns the MBR amounts needed to MINT an nfd.\n  This value needs to be added to purchase price in mintNfd call.\n  getPrice() returns it though.\n\n   *\n   * @param args The arguments for the contract call\n   * @param params Any additional parameters for the call\n   * @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions\n   */\n  getNfdMbrCost(params?: CallParams<NfdRegistryArgs['obj']['getNfdMbrCost(string)uint64'] | NfdRegistryArgs['tuple']['getNfdMbrCost(string)uint64']>): NfdRegistryComposer<[...TReturns, NfdRegistryReturns['getNfdMbrCost(string)uint64'] | undefined]>\n\n  /**\n   * Calls the getNfdLinkOnMintExtraMbrCost(address)(uint64,uint64) ABI method.\n   *\n   * @param args The arguments for the contract call\n   * @param params Any additional parameters for the call\n   * @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions\n   */\n  getNfdLinkOnMintExtraMbrCost(params?: CallParams<NfdRegistryArgs['obj']['getNfdLinkOnMintExtraMbrCost(address)(uint64,uint64)'] | NfdRegistryArgs['tuple']['getNfdLinkOnMintExtraMbrCost(address)(uint64,uint64)']>): NfdRegistryComposer<[...TReturns, NfdRegistryReturns['getNfdLinkOnMintExtraMbrCost(address)(uint64,uint64)'] | undefined]>\n\n  /**\n   * Calls the mintNfd(pay,string,address,bool)uint64 ABI method.\n   *\n   * Mint an NFD (NFT) and create a new NFD instance.\n   *\n   * @param args The arguments for the contract call\n   * @param params Any additional parameters for the call\n   * @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions\n   */\n  mintNfd(params?: CallParams<NfdRegistryArgs['obj']['mintNfd(pay,string,address,bool)uint64'] | NfdRegistryArgs['tuple']['mintNfd(pay,string,address,bool)uint64']>): NfdRegistryComposer<[...TReturns, NfdRegistryReturns['mintNfd(pay,string,address,bool)uint64'] | undefined]>\n\n  /**\n   * Calls the linkNfdAddress(string,uint64,address)void ABI method.\n   *\n   * @param args The arguments for the contract call\n   * @param params Any additional parameters for the call\n   * @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions\n   */\n  linkNfdAddress(params?: CallParams<NfdRegistryArgs['obj']['linkNfdAddress(string,uint64,address)void'] | NfdRegistryArgs['tuple']['linkNfdAddress(string,uint64,address)void']>): NfdRegistryComposer<[...TReturns, NfdRegistryReturns['linkNfdAddress(string,uint64,address)void'] | undefined]>\n\n  /**\n   * Calls the unlinkNfdAddress(string,uint64,address)void ABI method.\n   *\n   * @param args The arguments for the contract call\n   * @param params Any additional parameters for the call\n   * @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions\n   */\n  unlinkNfdAddress(params?: CallParams<NfdRegistryArgs['obj']['unlinkNfdAddress(string,uint64,address)void'] | NfdRegistryArgs['tuple']['unlinkNfdAddress(string,uint64,address)void']>): NfdRegistryComposer<[...TReturns, NfdRegistryReturns['unlinkNfdAddress(string,uint64,address)void'] | undefined]>\n\n  /**\n   * Calls the ownershipAssign(string,uint64)void ABI method.\n   *\n   * @param args The arguments for the contract call\n   * @param params Any additional parameters for the call\n   * @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions\n   */\n  ownershipAssign(params?: CallParams<NfdRegistryArgs['obj']['ownershipAssign(string,uint64)void'] | NfdRegistryArgs['tuple']['ownershipAssign(string,uint64)void']>): NfdRegistryComposer<[...TReturns, NfdRegistryReturns['ownershipAssign(string,uint64)void'] | undefined]>\n\n  /**\n   * Calls the ownershipChanged(string,uint64,address,address)void ABI method.\n   *\n  * This method is triggered when the ownership of an NFD (Non-Fungible Domain) changes.\n  It is called by the NFD via the purchase method.  It can also be called by TxnLab admin for older 3.3\n  NFDs when it detects purchased events for 3.3\n\n   *\n   * @param args The arguments for the contract call\n   * @param params Any additional parameters for the call\n   * @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions\n   */\n  ownershipChanged(params?: CallParams<NfdRegistryArgs['obj']['ownershipChanged(string,uint64,address,address)void'] | NfdRegistryArgs['tuple']['ownershipChanged(string,uint64,address,address)void']>): NfdRegistryComposer<[...TReturns, NfdRegistryReturns['ownershipChanged(string,uint64,address,address)void'] | undefined]>\n\n  /**\n   * Calls the setAddressPrimaryNfd(string,uint64,address)void ABI method.\n   *\n  * Makes the specified NFD the 'first' NFD in the reverse-address set so its the primary NFD for this address.\n  The NFD must be valid, and the sender must be the address (or nfd owner if vault).  The NFD wouldn't already be\n  in the reverse-lookup set if it wasn't already valid.\n\n   *\n   * @param args The arguments for the contract call\n   * @param params Any additional parameters for the call\n   * @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions\n   */\n  setAddressPrimaryNfd(params?: CallParams<NfdRegistryArgs['obj']['setAddressPrimaryNfd(string,uint64,address)void'] | NfdRegistryArgs['tuple']['setAddressPrimaryNfd(string,uint64,address)void']>): NfdRegistryComposer<[...TReturns, NfdRegistryReturns['setAddressPrimaryNfd(string,uint64,address)void'] | undefined]>\n\n  /**\n   * Calls the upgradeNfd(string)string ABI method.\n   *\n   * @param args The arguments for the contract call\n   * @param params Any additional parameters for the call\n   * @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions\n   */\n  upgradeNfd(params?: CallParams<NfdRegistryArgs['obj']['upgradeNfd(string)string'] | NfdRegistryArgs['tuple']['upgradeNfd(string)string']>): NfdRegistryComposer<[...TReturns, NfdRegistryReturns['upgradeNfd(string)string'] | undefined]>\n\n  /**\n   * Calls the isValidNfdAppId(string,uint64)bool ABI method.\n   *\n   * @param args The arguments for the contract call\n   * @param params Any additional parameters for the call\n   * @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions\n   */\n  isValidNfdAppId(params?: CallParams<NfdRegistryArgs['obj']['isValidNfdAppId(string,uint64)bool'] | NfdRegistryArgs['tuple']['isValidNfdAppId(string,uint64)bool']>): NfdRegistryComposer<[...TReturns, NfdRegistryReturns['isValidNfdAppId(string,uint64)bool'] | undefined]>\n\n  /**\n   * Calls the getNameAppId(string)uint64 ABI method.\n   *\n   * @param args The arguments for the contract call\n   * @param params Any additional parameters for the call\n   * @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions\n   */\n  getNameAppId(params?: CallParams<NfdRegistryArgs['obj']['getNameAppId(string)uint64'] | NfdRegistryArgs['tuple']['getNameAppId(string)uint64']>): NfdRegistryComposer<[...TReturns, NfdRegistryReturns['getNameAppId(string)uint64'] | undefined]>\n\n  /**\n   * Calls the getAddressAppIds(address)uint64[] ABI method.\n   *\n   * @param args The arguments for the contract call\n   * @param params Any additional parameters for the call\n   * @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions\n   */\n  getAddressAppIds(params?: CallParams<NfdRegistryArgs['obj']['getAddressAppIds(address)uint64[]'] | NfdRegistryArgs['tuple']['getAddressAppIds(address)uint64[]']>): NfdRegistryComposer<[...TReturns, NfdRegistryReturns['getAddressAppIds(address)uint64[]'] | undefined]>\n\n  /**\n   * Calls the nfdContractInit(string,uint64,byte[])void ABI method.\n   *\n   * Initializes the NFD contract bytecode into the registry\n   *\n   * @param args The arguments for the contract call\n   * @param params Any additional parameters for the call\n   * @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions\n   */\n  nfdContractInit(params?: CallParams<NfdRegistryArgs['obj']['nfdContractInit(string,uint64,byte[])void'] | NfdRegistryArgs['tuple']['nfdContractInit(string,uint64,byte[])void']>): NfdRegistryComposer<[...TReturns, NfdRegistryReturns['nfdContractInit(string,uint64,byte[])void'] | undefined]>\n\n  /**\n   * Calls the nfdContractLoad(string,uint64,byte[])void ABI method.\n   *\n   * Loads contract data into the  box at the specified offset.\n   *\n   * @param args The arguments for the contract call\n   * @param params Any additional parameters for the call\n   * @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions\n   */\n  nfdContractLoad(params?: CallParams<NfdRegistryArgs['obj']['nfdContractLoad(string,uint64,byte[])void'] | NfdRegistryArgs['tuple']['nfdContractLoad(string,uint64,byte[])void']>): NfdRegistryComposer<[...TReturns, NfdRegistryReturns['nfdContractLoad(string,uint64,byte[])void'] | undefined]>\n\n  /**\n   * Calls the nfdContractCommit(string)void ABI method.\n   *\n   * Commit a new version of the contract.\n   *\n   * @param args The arguments for the contract call\n   * @param params Any additional parameters for the call\n   * @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions\n   */\n  nfdContractCommit(params?: CallParams<NfdRegistryArgs['obj']['nfdContractCommit(string)void'] | NfdRegistryArgs['tuple']['nfdContractCommit(string)void']>): NfdRegistryComposer<[...TReturns, NfdRegistryReturns['nfdContractCommit(string)void'] | undefined]>\n\n  /**\n   * Calls the usdInMicroAlgo(uint64)uint64 ABI method.\n   *\n   * @param args The arguments for the contract call\n   * @param params Any additional parameters for the call\n   * @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions\n   */\n  usdInMicroAlgo(params?: CallParams<NfdRegistryArgs['obj']['usdInMicroAlgo(uint64)uint64'] | NfdRegistryArgs['tuple']['usdInMicroAlgo(uint64)uint64']>): NfdRegistryComposer<[...TReturns, NfdRegistryReturns['usdInMicroAlgo(uint64)uint64'] | undefined]>\n\n  /**\n   * Calls the costToAddToAddress(address)uint64 ABI method.\n   *\n   * Returns the cost to add an NFD to the reverse-lookup data\n   *\n   * @param args The arguments for the contract call\n   * @param params Any additional parameters for the call\n   * @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions\n   */\n  costToAddToAddress(params?: CallParams<NfdRegistryArgs['obj']['costToAddToAddress(address)uint64'] | NfdRegistryArgs['tuple']['costToAddToAddress(address)uint64']>): NfdRegistryComposer<[...TReturns, NfdRegistryReturns['costToAddToAddress(address)uint64'] | undefined]>\n\n  /**\n   * Calls the calcFuturePrice(uint64,uint64)uint64 ABI method.\n   *\n   * Calculates the future price based on the current price and the number of years.\n   *\n   * @param args The arguments for the contract call\n   * @param params Any additional parameters for the call\n   * @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions\n   */\n  calcFuturePrice(params?: CallParams<NfdRegistryArgs['obj']['calcFuturePrice(uint64,uint64)uint64'] | NfdRegistryArgs['tuple']['calcFuturePrice(uint64,uint64)uint64']>): NfdRegistryComposer<[...TReturns, NfdRegistryReturns['calcFuturePrice(uint64,uint64)uint64'] | undefined]>\n\n  /**\n   * Makes a clear_state call to an existing instance of the NFDRegistry smart contract.\n   *\n   * @param args The arguments for the bare call\n   * @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions\n   */\n  clearState(params?: AppClientBareCallParams): NfdRegistryComposer<[...TReturns, undefined]>\n\n  /**\n   * Adds a transaction to the composer\n   *\n   * @param txn A transaction to add to the transaction group\n   * @param signer The optional signer to use when signing this transaction.\n   */\n  addTransaction(txn: Transaction, signer?: TransactionSigner): NfdRegistryComposer<TReturns>\n  /**\n   * Returns the underlying AtomicTransactionComposer instance\n   */\n  composer(): Promise<TransactionComposer>\n  /**\n   * Simulates the transaction group and returns the result\n   */\n  simulate(): Promise<NfdRegistryComposerResults<TReturns> & { simulateResponse: SimulateResponse }>\n  simulate(options: SkipSignaturesSimulateOptions): Promise<NfdRegistryComposerResults<TReturns> & { simulateResponse: SimulateResponse }>\n  simulate(options: RawSimulateOptions): Promise<NfdRegistryComposerResults<TReturns> & { simulateResponse: SimulateResponse }>\n  /**\n   * Sends the transaction group to the network and returns the results\n   */\n  send(params?: SendParams): Promise<NfdRegistryComposerResults<TReturns>>\n}\nexport type NfdRegistryComposerResults<TReturns extends [...any[]]> = Expand<SendAtomicTransactionComposerResults & {\n  returns: TReturns\n}>\n\n","import { AlgorandClient } from '@algorandfoundation/algokit-utils'\nimport { TransactionSignerAccount } from '@algorandfoundation/algokit-utils/types/account'\nimport { Address } from 'algosdk'\n\nimport { DefaultSender, NfdRegistryId } from '../constants'\nimport { NfdInstanceClient } from '../contracts/NFDInstanceClient'\nimport { NfdRegistryClient } from '../contracts/NFDRegistryClient'\nimport { getAllBoxes } from '../utils/internal/boxes'\nimport {\n  decodeAppIdFromNameBox,\n  getNameBoxName,\n} from '../utils/internal/registry-box'\nimport { isValidName } from '../utils/nfd'\n\nimport type { NfdClient } from '../client'\nimport type { Constraints } from '../contracts/NFDRegistryClient'\nimport type { AppBox } from '../utils/internal/boxes'\n\nexport type { AppBox } from '../utils/internal/boxes'\n\n/**\n * Base module class that all other modules will extend\n */\nexport abstract class BaseModule {\n  protected readonly client: NfdClient\n  protected readonly algorand: AlgorandClient\n  protected readonly registryId: bigint\n  private readonly _defaultSender: string\n\n  constructor(client: NfdClient) {\n    this.client = client\n    this.algorand = client.algorand\n    this.registryId = client.registryId\n\n    // Determine the default sender based on the registry ID\n    this._defaultSender =\n      this.registryId === BigInt(NfdRegistryId.TESTNET)\n        ? DefaultSender.TESTNET\n        : DefaultSender.MAINNET\n  }\n\n  /**\n   * Get the current signer\n   * @returns The current signer or null if not set\n   */\n  protected getSigner(): TransactionSignerAccount | null {\n    return this.client.signer\n  }\n\n  /**\n   * Ensure a signer is set before proceeding\n   * @returns The current signer\n   * @throws If no signer is set\n   */\n  protected requireSigner(): TransactionSignerAccount {\n    const signer = this.getSigner()\n    if (!signer) {\n      throw new Error('Signer required. Call setSigner() first.')\n    }\n    return signer\n  }\n\n  /**\n   * Get a registry client\n   * @param defaultSender - Optional default sender address\n   * @returns The NFD registry client\n   */\n  protected getRegistryClient(\n    defaultSender: string | Address = this._defaultSender,\n  ): NfdRegistryClient {\n    return this.algorand.client.getTypedAppClientById(NfdRegistryClient, {\n      appId: this.registryId,\n      defaultSender,\n    })\n  }\n\n  /**\n   * Get an NFD instance client\n   * @param nfdAppId - The NFD's application ID\n   * @param defaultSender - Optional default sender address\n   * @returns The NFD instance client\n   */\n  protected getInstanceClient(\n    nfdAppId: bigint,\n    defaultSender: string | Address = this._defaultSender,\n  ): NfdInstanceClient {\n    return this.algorand.client.getTypedAppClientById(NfdInstanceClient, {\n      appId: nfdAppId,\n      defaultSender,\n    })\n  }\n\n  /**\n   * Get the box name for an NFD in the registry\n   * @param nfdName - The NFD name to get the box name for\n   * @returns The box name as a Uint8Array\n   */\n  protected getRegistryBoxNameForNFD(nfdName: string): Promise<Uint8Array> {\n    return getNameBoxName(nfdName)\n  }\n\n  /**\n   * Get every box for an application, with values included\n   *\n   * Uses the `include=values` query parameter so that names and values arrive\n   * together, which takes one request per page rather than one request per box.\n   * Pages after the first are pinned to the round the first page was read at, so\n   * a multi-page read is consistent.\n   *\n   * @param appId - The application ID to read boxes from\n   * @returns Every box for the application\n   * @throws If the node returns boxes without values, or does not advance the\n   * pagination cursor\n   */\n  protected getAllBoxes(appId: bigint): Promise<AppBox[]> {\n    return getAllBoxes(this.algorand.client.algod, appId)\n  }\n\n  /**\n   * Get an NFD's application ID from its name\n   * @param name - The NFD name\n   * @returns The NFD's application ID or null if not found\n   */\n  protected async getAppIdFromName(name: string): Promise<bigint | null> {\n    const registryClient = this.getRegistryClient()\n    const boxName = await this.getRegistryBoxNameForNFD(name)\n    try {\n      const appIdBytes = await registryClient.appClient.getBoxValue(boxName)\n      if (!appIdBytes) {\n        return null\n      }\n      // Take the second 8 bytes for the app ID (bytes 8-15)\n      return decodeAppIdFromNameBox(appIdBytes)\n    } catch (error) {\n      // Check if error is a 404 response\n      if (error instanceof Error && error.message.includes('404')) {\n        return null\n      }\n      // Re-throw other errors\n      throw error\n    }\n  }\n\n  /**\n   * Parse a name or app ID input into a bigint app ID\n   *\n   * Resolving a name costs one registry box read; a numeric input costs\n   * nothing. Callers that only need the app ID should use this rather than a\n   * full `resolve()`, which additionally reads global state and every box.\n   *\n   * @param nameOrAppId - The NFD name or application ID to parse\n   * @returns The NFD's application ID as a bigint\n   * @throws If the input is an invalid NFD name or the NFD does not exist\n   */\n  protected async parseAppId(\n    nameOrAppId: string | number | bigint,\n  ): Promise<bigint> {\n    // If it's already a number or bigint, just return it\n    if (typeof nameOrAppId !== 'string') {\n      return BigInt(nameOrAppId)\n    }\n\n    // A wholly numeric string is an app ID. The test has to be the whole\n    // string: NFD names may be all digits, and `parseInt('123.algo')` reads\n    // that as app ID 123 — a valid app that is never the NFD asked for.\n    if (/^\\d+$/.test(nameOrAppId)) {\n      return BigInt(nameOrAppId)\n    }\n\n    // Validate and lookup NFD name\n    if (!isValidName(nameOrAppId)) {\n      throw new Error(\n        `Invalid NFD name: ${nameOrAppId}. Name must be in the format 'name.algo' or 'segment.name.algo'`,\n      )\n    }\n\n    const appId = await this.getAppIdFromName(nameOrAppId)\n    if (appId === null) {\n      throw new Error(`NFD not found: ${nameOrAppId}`)\n    }\n\n    return appId\n  }\n\n  /**\n   * Get the protocol constraints from the NFD registry\n   * @returns The protocol constraints\n   * @throws If an error occurs while fetching the constraints\n   */\n  protected async getConstraints(): Promise<Constraints> {\n    const registryClient = this.getRegistryClient()\n\n    try {\n      const result = await registryClient.newGroup().getConstraints().simulate({\n        skipSignatures: true,\n        allowUnnamedResources: true,\n      })\n\n      if (!result.returns) {\n        throw new Error('No data returned')\n      }\n\n      const constraints = result.returns[0]\n      if (!constraints) {\n        throw new Error('No constraints returned')\n      }\n\n      return constraints\n    } catch (error) {\n      throw new Error(\n        `Failed to get protocol constraints: ${error instanceof Error ? error.message : String(error)}`,\n      )\n    }\n  }\n}\n","import { getAllBoxes } from '../utils/internal/boxes'\nimport { buildNfdRecord } from '../utils/internal/nfd-record'\n\nimport { BaseModule } from './base'\n\nimport type { Nfd } from '../types'\nimport type { AppBox } from '../utils/internal/boxes'\n\n/**\n * Options for resolving an NFD\n */\nexport interface ResolveOptions {\n  /**\n   * The view type to use for the response\n   * - 'tiny': Only include internal, caAlgo, and url properties\n   * - 'brief': Include internal, caAlgo, url, avatar, and reservedFor properties\n   * - 'full': Include all properties\n   */\n  view?: 'tiny' | 'brief' | 'full'\n}\n\n/**\n * An NFD resolved from chain, together with the boxes it was built from\n */\nexport interface ResolveResult {\n  /** The resolved NFD record */\n  nfd: Nfd\n  /** Every box on the NFD instance app, regardless of the view used */\n  boxes: AppBox[]\n}\n\n/**\n * Module for NFD lookup and resolution operations\n */\nexport class LookupModule extends BaseModule {\n  /**\n   * Resolve an NFD by name or application ID by reading directly from the blockchain\n   * @param nameOrAppId - The NFD name or application ID to resolve\n   * @param options - Optional parameters\n   * @returns The NFD record\n   * @throws If the NFD name is invalid or not found\n   */\n  public async resolve(\n    nameOrAppId: string | number | bigint,\n    options: ResolveOptions = {},\n  ): Promise<Nfd> {\n    const { nfd } = await this.resolveWithBoxes(nameOrAppId, options)\n    return nfd\n  }\n\n  /**\n   * Resolve an NFD and also return the boxes it was built from\n   *\n   * Callers that need a raw box value (rather than the parsed property) can\n   * take it from the returned boxes instead of issuing a second read.\n   *\n   * @param nameOrAppId - The NFD name or application ID to resolve\n   * @param options - Optional parameters\n   * @returns The NFD record and every box on its instance app\n   * @throws If the NFD name is invalid or not found\n   */\n  public async resolveWithBoxes(\n    nameOrAppId: string | number | bigint,\n    options: ResolveOptions = {},\n  ): Promise<ResolveResult> {\n    // Get the NFD app ID\n    const nfdAppId = await this.parseAppId(nameOrAppId)\n\n    // Get the NFD instance client\n    const instanceClient = this.getInstanceClient(nfdAppId)\n\n    // Get the global state and every box (names and values together) in order\n    // to read all properties. The view only decides which boxes are parsed,\n    // not how many requests are made.\n    const [globalState, boxes] = await Promise.all([\n      instanceClient.appClient.getGlobalState(),\n      getAllBoxes(this.algorand.client.algod, nfdAppId),\n    ])\n\n    const nfd = buildNfdRecord({\n      appId: nfdAppId,\n      appAddress: instanceClient.appAddress.toString(),\n      globalState,\n      boxes,\n      view: options.view,\n    })\n\n    return { nfd, boxes }\n  }\n}\n","import algosdk from 'algosdk';\n\n/** Wrapper class to ensure safe, explicit conversion between µAlgo, Algo and numbers */\nclass AlgoAmount {\n    /** Return the amount as a number in µAlgo */\n    get microAlgos() {\n        return this.amountInMicroAlgo;\n    }\n    /** Return the amount as a number in µAlgo */\n    get microAlgo() {\n        return this.amountInMicroAlgo;\n    }\n    /** Return the amount as a number in Algo */\n    get algos() {\n        return algosdk.microalgosToAlgos(Number(this.amountInMicroAlgo));\n    }\n    /** Return the amount as a number in Algo */\n    get algo() {\n        return algosdk.microalgosToAlgos(Number(this.amountInMicroAlgo));\n    }\n    /**\n     * Create a new `AlgoAmount` instance.\n     *\n     * @param amount - An object specifying the amount in Algo or µALGO. Use the key 'algo' for Algo amounts and 'microAlgo' for µALGO.\n     * @returns A new instance of `AlgoAmount` representing the specified amount.\n     * @example\n     * ```typescript\n     * const amount = new AlgoAmount({ algo: 5 });\n     * ```\n     */\n    constructor(amount) {\n        this.amountInMicroAlgo =\n            'microAlgos' in amount\n                ? BigInt(amount.microAlgos)\n                : 'microAlgo' in amount\n                    ? BigInt(amount.microAlgo)\n                    : 'algos' in amount\n                        ? BigInt(algosdk.algosToMicroalgos(Number(amount.algos)))\n                        : BigInt(algosdk.algosToMicroalgos(Number(amount.algo)));\n    }\n    toString() {\n        return `${this.microAlgo.toLocaleString('en-US')} µALGO`;\n    }\n    /** valueOf allows you to use `AlgoAmount` in comparison operations such as `<` and `>=` etc.,\n     * but it's not recommended to use this to convert to a number, it's much safer to explicitly call\n     * the algos or microAlgos properties\n     */\n    valueOf() {\n        return Number(this.microAlgo);\n    }\n    /** Create a `AlgoAmount` object representing the given number of Algo */\n    static Algos(amount) {\n        return new AlgoAmount({ algos: amount });\n    }\n    /** Create a `AlgoAmount` object representing the given number of Algo */\n    static Algo(amount) {\n        return new AlgoAmount({ algos: amount });\n    }\n    /** Create a `AlgoAmount` object representing the given number of µAlgo */\n    static MicroAlgos(amount) {\n        return new AlgoAmount({ microAlgos: amount });\n    }\n    /** Create a `AlgoAmount` object representing the given number of µAlgo */\n    static MicroAlgo(amount) {\n        return new AlgoAmount({ microAlgos: amount });\n    }\n}\n\nexport { AlgoAmount };\n//# sourceMappingURL=amount.mjs.map\n","/**\n * Error parser utility for Algorand transaction errors\n * Provides user-friendly error messages for common Algorand transaction errors\n */\n\n/**\n * Common error patterns and their user-friendly messages\n */\nconst ERROR_PATTERNS: Record<string, string> = {\n  'fee too small':\n    'Transaction fee is too small. This usually happens when the transaction requires more resources than expected.',\n  'account .* balance .* below min':\n    'Insufficient balance: The account does not have enough ALGO to cover the minimum balance requirement.',\n  overspend:\n    'Insufficient balance: The account does not have enough ALGO to complete this transaction.',\n  'txn dead: round .* outside of':\n    'Transaction sent outside valid round range. This usually happens when a transaction takes too long to be confirmed.',\n  'logic eval error':\n    'Smart contract execution failed. The transaction could not be processed by the smart contract.',\n  'transaction rejected by ApprovalProgram':\n    'Transaction rejected by the smart contract.',\n}\n\n/**\n * Parse an error message and return a user-friendly version\n * @param error - The error object or string to parse\n * @returns A user-friendly error message\n */\nexport function parseTransactionError(error: unknown): string {\n  // Convert error to string\n  const errorMessage = error instanceof Error ? error.message : String(error)\n\n  // Process specific error patterns\n  // Insufficient balance error with details\n  const insufficientBalancePattern =\n    /account (\\w+) balance (\\d+) below min (\\d+) \\((\\d+) assets\\)/\n  let match = errorMessage.match(insufficientBalancePattern)\n  if (match) {\n    const account = match[1]\n    const balance = parseInt(match[2]) / 1_000_000 // Convert microAlgos to Algos\n    const min = parseInt(match[3]) / 1_000_000\n    const assets = match[4]\n    return `Insufficient balance: Account ${account} has ${balance} ALGO which is below the minimum ${min} ALGO required (${assets} assets)`\n  }\n\n  // Overspend error with details\n  const overspendPattern =\n    /account (\\w+), data.*MicroAlgos:\\{Raw:(\\d+)\\}[^}]*\\}[^}]*\\}[^}]*\\}[^}]*\\}[^}]*\\}[^}]*\\}, tried to spend \\{(\\d+)\\}/s\n  match = errorMessage.match(overspendPattern)\n  if (match) {\n    const account = match[1]\n    const balance = parseInt(match[2]) / 1_000_000\n    const triedToSpend = parseInt(match[3]) / 1_000_000\n    return `Insufficient balance: Account ${account} has ${balance} ALGO available but attempted to spend ${triedToSpend} ALGO`\n  }\n\n  // Transaction sent outside range error\n  const outsideRangePattern = /txn dead: round (\\d+) outside of (\\d+)--(\\d+)/\n  match = errorMessage.match(outsideRangePattern)\n  if (match) {\n    const round = match[1]\n    const rangeStart = match[2]\n    const rangeEnd = match[3]\n    return `Transaction sent outside valid round range: round ${round} outside of ${rangeStart}–${rangeEnd}`\n  }\n\n  // Smart contract logic eval error\n  const smartContractErrorPattern = /transaction (\\w+): logic eval error: (.+)/\n  match = errorMessage.match(smartContractErrorPattern)\n  if (match) {\n    const txnId = match[1]\n    const details = match[2]\n    return `Smart contract logic eval error: ${details}. Transaction: ${txnId}`\n  }\n\n  // Transaction rejected by smart contract error\n  const rejectedByContractPattern =\n    /transaction (\\w+): transaction rejected by ApprovalProgram/\n  match = errorMessage.match(rejectedByContractPattern)\n  if (match) {\n    const txnId = match[1]\n    return `Transaction rejected by smart contract. Transaction: ${txnId}`\n  }\n\n  // Check for general patterns if no specific regex matched\n  for (const [pattern, friendlyMessage] of Object.entries(ERROR_PATTERNS)) {\n    if (\n      errorMessage.toLowerCase().includes(pattern.toLowerCase()) ||\n      new RegExp(pattern, 'i').test(errorMessage)\n    ) {\n      return friendlyMessage\n    }\n  }\n\n  // If no specific pattern is found, return a cleaned-up version of the original error\n  // Remove the long stack trace and object dumps that often appear in Algorand errors\n  const cleanedError = errorMessage\n    .replace(/\\[.*?\\]/g, '') // Remove array contents in square brackets\n    .replace(/\\{.*?\\}/g, '') // Remove object contents in curly braces\n    .replace(/transactions\\..*?{/g, '{') // Remove transaction object references\n    .replace(/\\s+/g, ' ') // Replace multiple spaces with a single space\n    .trim()\n\n  // If the cleaned error is still very long, truncate it\n  if (cleanedError.length > 150) {\n    return cleanedError.substring(0, 150) + '...'\n  }\n\n  return cleanedError\n}\n\n/**\n * Wrap a function with error parsing\n * @param fn - The function to wrap\n * @returns A wrapped function that parses errors\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function withErrorParsing<T extends (...args: any[]) => Promise<any>>(\n  fn: T,\n): (...args: Parameters<T>) => Promise<Awaited<ReturnType<T>>> {\n  return async (...args: Parameters<T>): Promise<Awaited<ReturnType<T>>> => {\n    try {\n      return await fn(...args)\n    } catch (error) {\n      throw new Error(parseTransactionError(error))\n    }\n  }\n}\n","/**\n * Coerce an amount to a bigint, rejecting values the contract cannot accept\n *\n * `BigInt(1.5)` throws a bare `RangeError: The number 1.5 cannot be converted\n * to a BigInt because it is not an integer`, which says nothing about which\n * argument was wrong. Every public method taking a `bigint | number` amount\n * goes through here so the caller gets the parameter name instead.\n *\n * @param value - The value to coerce\n * @param label - The parameter name to use in error messages\n * @returns The value as a bigint\n * @throws If the value is not a non-negative, finite whole number\n */\nexport function toAmount(value: bigint | number, label: string): bigint {\n  if (typeof value === 'number') {\n    if (!Number.isFinite(value)) {\n      throw new Error(`${label} must be a finite number, got ${value}`)\n    }\n    if (!Number.isInteger(value)) {\n      throw new Error(`${label} must be a whole number, got ${value}`)\n    }\n    if (!Number.isSafeInteger(value)) {\n      throw new Error(\n        `${label} exceeds the safe integer range and would lose precision, got ${value}. Pass a bigint instead.`,\n      )\n    }\n  }\n\n  const amount = BigInt(value)\n  if (amount < 0n) {\n    throw new Error(`${label} must not be negative, got ${amount}`)\n  }\n\n  return amount\n}\n","import { AlgoAmount } from '@algorandfoundation/algokit-utils/types/amount'\nimport { Address, type Transaction } from 'algosdk'\n\nimport {\n  ALGORAND_ZERO_ADDRESS,\n  APP_CALL_STATIC_FEE,\n  RENEW_STATIC_FEE,\n  VAULT_FEE_PER_ASSET,\n  VAULT_OPT_IN_MBR,\n} from '../constants'\nimport { parseTransactionError } from '../utils/error-parser'\nimport { strToUint8Array, concatUint8Arrays } from '../utils/internal/bytes'\nimport { toAmount } from '../utils/internal/numbers'\nimport { isValidName } from '../utils/nfd'\n\nimport { BaseModule } from './base'\nimport { LookupModule } from './lookup'\n\nimport type { AppBox } from './base'\nimport type { NfdClient } from '../client'\nimport type {\n  Nfd,\n  ListForSaleOptions,\n  SendToVaultOptions,\n  SendFromVaultOptions,\n} from '../types'\n\n/**\n * Manager for operations on a specific NFD\n */\nexport class NfdManager extends BaseModule {\n  private _nfd: Nfd | null = null\n  private _boxes: AppBox[] | null = null\n  private readonly _nameOrAppId: string | number | bigint\n\n  constructor(client: NfdClient, nameOrAppId: string | number | bigint) {\n    super(client)\n    this._nameOrAppId = nameOrAppId\n  }\n\n  /**\n   * Get the NFD instance\n   * @returns The NFD instance\n   * @throws If the NFD cannot be resolved\n   */\n  private async getNfd(): Promise<Nfd> {\n    if (!this._nfd) {\n      // Keep the boxes from the same read so operations that need a raw box\n      // value do not have to fetch it again\n      const { nfd, boxes } = await new LookupModule(\n        this.client,\n      ).resolveWithBoxes(this._nameOrAppId, { view: 'full' })\n      this._nfd = nfd\n      this._boxes = boxes\n    }\n    return this._nfd\n  }\n\n  /**\n   * Get the raw value of a box read during the last `getNfd()`\n   * @param name - The box name\n   * @returns The box value, or an empty array if the NFD has no such box\n   */\n  private getResolvedBoxValue(name: string): Uint8Array {\n    return (\n      this._boxes?.find((box) => box.name === name)?.value ?? new Uint8Array()\n    )\n  }\n\n  /**\n   * Drop the cached NFD so the next `getNfd()` re-reads it from chain. Clears\n   * the cached boxes too, so they can never pair with a newer NFD.\n   */\n  private invalidate(): void {\n    this._nfd = null\n    this._boxes = null\n  }\n\n  /**\n   * Assert the NFD is neither listed for sale nor expired\n   *\n   * The instance contract gates most owner-driven writes behind\n   * `notForSaleOrExpired()`, so a live listing or a lapsed expiration blocks\n   * them until the owner cancels the sale or renews. Checking here turns an\n   * opaque `assert` failure into an error that names the cause and the cure.\n   *\n   * @param nfd - The resolved NFD\n   * @param action - What the caller was trying to do, for the message\n   * @throws If the NFD is for sale or expired\n   */\n  private assertNotForSaleOrExpired(nfd: Nfd, action: string): void {\n    if (nfd.expired) {\n      throw new Error(\n        `Cannot ${action} because the NFD has expired. Call renew() first.`,\n      )\n    }\n    if (nfd.sellAmount) {\n      throw new Error(\n        `Cannot ${action} while the NFD is listed for sale. Call cancelSale() first.`,\n      )\n    }\n  }\n\n  /**\n   * Assert the NFD is not mid-mint\n   *\n   * @param nfd - The resolved NFD\n   * @param action - What the caller was trying to do, for the message\n   * @throws If the NFD is still minting\n   */\n  private assertNotMinting(nfd: Nfd, action: string): void {\n    if (nfd.state === 'minting') {\n      throw new Error(`Cannot ${action} while the NFD is still minting`)\n    }\n  }\n\n  /**\n   * Split fields and values if any values exceed the byte limit\n   * @param fieldsAndValues - Array of alternating field names and values\n   * @returns Array of field names and values, potentially split into chunks\n   * @private\n   */\n  private splitFields(fieldsAndValues: string[]): string[] {\n    const result: string[] = []\n\n    for (let i = 0; i < fieldsAndValues.length; i += 2) {\n      const field = fieldsAndValues[i]\n      const value = fieldsAndValues[i + 1]\n\n      // If value is small enough, add it directly\n      if (value.length <= 128) {\n        result.push(field, value)\n        continue\n      }\n\n      // Split large values into chunks\n      const chunks = Math.ceil(value.length / 128)\n      for (let j = 0; j < chunks; j++) {\n        const start = j * 128\n        const end = Math.min(start + 128, value.length)\n        const chunk = value.substring(start, end)\n        const chunkField = `${field}.${j + 1}`\n        result.push(chunkField, chunk)\n      }\n\n      // Add a count field\n      result.push(`${field}.count`, chunks.toString())\n    }\n\n    return result\n  }\n\n  /**\n   * Link an Algorand address to the NFD\n   * @param address - The Algorand address to link\n   * @returns The updated NFD\n   * @throws If the address cannot be linked\n   */\n  public async linkAddress(address: string | Address): Promise<Nfd> {\n    const signer = this.requireSigner()\n    const nfd = await this.getNfd()\n\n    // Ensure the default signer is the owner\n    if (signer.addr.toString() !== nfd.owner) {\n      throw new Error('Only the owner can link addresses to this NFD')\n    }\n\n    // Get the Address to link\n    const addressToLink =\n      typeof address === 'string' ? Address.fromString(address) : address\n\n    // If address to link is not the default signer (owner), add a signer for it.\n    // Compare the encoded addresses: two Address instances for the same account\n    // are never reference-equal.\n    if (signer.addr.toString() !== addressToLink.toString()) {\n      this.algorand.setSigner(addressToLink, signer.signer)\n    }\n\n    // Get the NFD instance client\n    if (!nfd.appID) {\n      throw new Error('NFD has no application ID')\n    }\n    const nfdAppId = BigInt(nfd.appID)\n    const nfdInstanceClient = this.getInstanceClient(nfdAppId, signer.addr)\n\n    // Prepare the fields to update\n    const fieldsToUpdate: Uint8Array[] = [\n      strToUint8Array('u.cav.algo.a'),\n      addressToLink.publicKey,\n    ]\n\n    // Current v.caAlgo.0.as box value/size, already read by getNfd() above.\n    // The raw bytes are needed rather than nfd.caAlgo because empty (zero\n    // filled) address slots count toward the size the update is costed against.\n    const curCaAlgo = this.getResolvedBoxValue('v.caAlgo.0.as')\n\n    // Calculate the eventual fields after the update\n    const eventualFields: Uint8Array[] = [\n      fieldsToUpdate[0],\n      fieldsToUpdate[1],\n      strToUint8Array('v.caAlgo.0.as'),\n      concatUint8Arrays(curCaAlgo, addressToLink.publicKey),\n    ]\n\n    // Get the cost of the update\n    const updateCostResult = await nfdInstanceClient\n      .newGroup()\n      .getFieldUpdateCost({ args: { fieldAndVals: eventualFields } })\n      .simulate({ skipSignatures: true, allowUnnamedResources: true })\n\n    const updateCost = updateCostResult.returns[0] || 0n\n\n    // Create a transaction group for the update\n    const nfdNewGroup = nfdInstanceClient.newGroup()\n\n    // Add payment transaction for the update cost\n    const updatePaymentTxn = await this.algorand.createTransaction.payment({\n      sender: signer.addr,\n      receiver: nfdInstanceClient.appAddress,\n      amount: AlgoAmount.MicroAlgos(updateCost),\n    })\n\n    nfdNewGroup.addTransaction(updatePaymentTxn)\n    nfdNewGroup.updateFields({ args: { fieldAndVals: fieldsToUpdate } })\n\n    // Get the registry client\n    const registryClient = this.getRegistryClient(signer.addr)\n\n    // Get the cost to add to registry\n    const regMbrCostResult = await registryClient\n      .newGroup()\n      .costToAddToAddress({ args: { lookupAddress: addressToLink.toString() } })\n      .simulate({ skipSignatures: true, allowUnnamedResources: true })\n\n    const regMbrCost = regMbrCostResult.returns[0] || 0n\n\n    // Add payment transaction if needed\n    if (regMbrCost > 0n) {\n      const regPaymentTxn = await this.algorand.createTransaction.payment({\n        sender: signer.addr,\n        receiver: registryClient.appAddress,\n        amount: AlgoAmount.MicroAlgos(regMbrCost),\n      })\n\n      nfdNewGroup.addTransaction(regPaymentTxn)\n    }\n\n    // Create the link transaction\n    const linkRegAddress =\n      await registryClient.createTransaction.linkNfdAddress({\n        args: {\n          nfdName: nfd.name,\n          nfdAppId: nfdInstanceClient.appId,\n          addrToVerify: addressToLink.toString(),\n        },\n        sender: addressToLink,\n        staticFee: AlgoAmount.MicroAlgos(3000),\n      })\n\n    try {\n      // Send the transaction group\n      await nfdNewGroup\n        .addTransaction(linkRegAddress.transactions[0])\n        .send({ populateAppCallResources: true })\n    } catch (error) {\n      throw new Error(`Failed to link address: ${parseTransactionError(error)}`)\n    }\n\n    // Refresh the NFD data\n    this.invalidate()\n    return this.getNfd()\n  }\n\n  /**\n   * Unlink an Algorand address from the NFD\n   * @param address - The Algorand address to unlink\n   * @returns The updated NFD\n   * @throws If the address cannot be unlinked\n   */\n  public async unlinkAddress(address: string | Address): Promise<Nfd> {\n    const signer = this.requireSigner()\n    const nfd = await this.getNfd()\n\n    // Ensure the default signer is the owner\n    if (signer.addr.toString() !== nfd.owner) {\n      throw new Error('Only the owner can unlink addresses from this NFD')\n    }\n\n    // Get the Address to unlink\n    const addressToUnlink =\n      typeof address === 'string' ? Address.fromString(address) : address\n\n    // Get the NFD instance client\n    if (!nfd.appID) {\n      throw new Error('NFD has no application ID')\n    }\n    const nfdAppId = BigInt(nfd.appID)\n    const nfdInstanceClient = this.getInstanceClient(nfdAppId, signer.addr)\n\n    // Get the registry client\n    const registryClient = this.getRegistryClient(signer.addr)\n\n    try {\n      // Create and execute the unlink transaction\n      await registryClient\n        .newGroup()\n        .unlinkNfdAddress({\n          args: {\n            nfdName: nfd.name,\n            nfdAppId: nfdInstanceClient.appId,\n            addrToUnlink: addressToUnlink.toString(),\n          },\n          staticFee: AlgoAmount.MicroAlgos(5000),\n        })\n        .send({ populateAppCallResources: true })\n    } catch (error) {\n      throw new Error(\n        `Failed to unlink address: ${parseTransactionError(error)}`,\n      )\n    }\n\n    // Refresh the NFD data\n    this.invalidate()\n    return this.getNfd()\n  }\n\n  /**\n   * Set user-defined metadata for the NFD\n   * @param metadata - Object containing metadata key-value pairs to set\n   * @returns The updated NFD\n   * @throws If the metadata cannot be set\n   */\n  public async setMetadata(metadata: Record<string, string>): Promise<Nfd> {\n    const signer = this.requireSigner()\n    const nfd = await this.getNfd()\n\n    // Ensure the default signer is the owner\n    if (signer.addr.toString() !== nfd.owner) {\n      throw new Error('Only the owner can set metadata for this NFD')\n    }\n\n    // Get the NFD instance client\n    if (!nfd.appID) {\n      throw new Error('NFD has no application ID')\n    }\n    const nfdAppId = BigInt(nfd.appID)\n    const nfdInstanceClient = this.getInstanceClient(nfdAppId, signer.addr)\n\n    // Convert metadata object to array of fields and values\n    const fieldsAndValues: string[] = []\n    for (const [key, value] of Object.entries(metadata)) {\n      fieldsAndValues.push(`u.${key}`, value)\n    }\n\n    // Split fields if any values exceed the byte limit\n    const fieldsToUpdate = this.splitFields(fieldsAndValues)\n\n    // Calculate update cost for all fields\n    let updateCost = 0n\n    const newGroup = nfdInstanceClient.newGroup()\n\n    // Get cost for each field update\n    for (let i = 0; i < fieldsToUpdate.length; i += 2) {\n      newGroup.getFieldUpdateCost({\n        args: {\n          fieldAndVals: [\n            strToUint8Array(fieldsToUpdate[i]),\n            strToUint8Array(fieldsToUpdate[i + 1]),\n          ],\n        },\n        note: i.toString(),\n      })\n    }\n\n    // Simulate to get costs\n    const simReturn = await newGroup.simulate({\n      skipSignatures: true,\n      allowUnnamedResources: true,\n    })\n\n    const simResult = simReturn.returns\n\n    // Sum up all costs\n    for (let i = 0; i < fieldsToUpdate.length / 2; i += 1) {\n      if (simResult[i]) {\n        updateCost += BigInt(simResult[i])\n      }\n    }\n\n    // Create a transaction group for the update\n    const updateGroup = nfdInstanceClient.newGroup()\n\n    // Add payment transaction for the update cost\n    const updatePaymentTxn = await this.algorand.createTransaction.payment({\n      sender: signer.addr.toString(),\n      receiver: nfdInstanceClient.appAddress,\n      amount: AlgoAmount.MicroAlgos(updateCost),\n    })\n\n    updateGroup.addTransaction(updatePaymentTxn)\n\n    // Add each field update\n    for (let i = 0; i < fieldsToUpdate.length; i += 2) {\n      updateGroup.updateFields({\n        args: {\n          fieldAndVals: [\n            strToUint8Array(fieldsToUpdate[i]),\n            strToUint8Array(fieldsToUpdate[i + 1]),\n          ],\n        },\n      })\n    }\n\n    try {\n      // Execute the transaction\n      await updateGroup.send({ populateAppCallResources: true })\n    } catch (error) {\n      throw new Error(`Failed to set metadata: ${parseTransactionError(error)}`)\n    }\n\n    // Refresh the NFD data\n    this.invalidate()\n    return this.getNfd()\n  }\n\n  /**\n   * Set a specific address as the primary address for the NFD\n   * @param address - The Algorand address to set as primary\n   * @returns The updated NFD\n   * @throws If the address cannot be set as primary\n   */\n  public async setPrimaryAddress(address: string | Address): Promise<Nfd> {\n    const signer = this.requireSigner()\n    const nfd = await this.getNfd()\n\n    // Ensure the default signer is the owner\n    if (signer.addr.toString() !== nfd.owner) {\n      throw new Error('Only the owner can set the primary address for this NFD')\n    }\n\n    // Get the Address to set as primary\n    const addressToSet =\n      typeof address === 'string' ? Address.fromString(address) : address\n\n    // Get the NFD instance client\n    if (!nfd.appID) {\n      throw new Error('NFD has no application ID')\n    }\n    const nfdAppId = BigInt(nfd.appID)\n    const nfdInstanceClient = this.getInstanceClient(nfdAppId, signer.addr)\n\n    // The only supported field for now is 'v.caAlgo.0.as'\n    const fieldName = 'v.caAlgo.0.as'\n\n    try {\n      // Create and execute the setPrimaryAddress transaction\n      await nfdInstanceClient\n        .newGroup()\n        .setPrimaryAddress({\n          args: {\n            fieldName,\n            address: addressToSet.toString(),\n          },\n          staticFee: AlgoAmount.MicroAlgos(3000),\n        })\n        .send({ populateAppCallResources: true })\n    } catch (error) {\n      throw new Error(\n        `Failed to set primary address: ${parseTransactionError(error)}`,\n      )\n    }\n\n    // Refresh the NFD data\n    this.invalidate()\n    return this.getNfd()\n  }\n\n  /**\n   * Set this NFD as the primary NFD for a specific address\n   * @param address - The Algorand address to set this NFD as primary for\n   * @returns The updated NFD\n   * @throws If the NFD cannot be set as primary for the address\n   */\n  public async setPrimaryNfd(address: string | Address): Promise<Nfd> {\n    const signer = this.requireSigner()\n    const nfd = await this.getNfd()\n\n    // Get the Address to set this NFD as primary for\n    const targetAddress =\n      typeof address === 'string' ? Address.fromString(address) : address\n\n    // Get the NFD app ID\n    if (!nfd.appID) {\n      throw new Error('NFD has no application ID')\n    }\n    const nfdAppId = BigInt(nfd.appID)\n\n    // Get the registry client\n    const registryClient = this.getRegistryClient(signer.addr)\n\n    try {\n      await registryClient\n        .newGroup()\n        .setAddressPrimaryNfd({\n          sender: targetAddress,\n          args: {\n            nfdName: nfd.name,\n            nfdAppId,\n            addrBeingModified: targetAddress.toString(),\n          },\n          staticFee: AlgoAmount.MicroAlgos(3000),\n        })\n        .send({ populateAppCallResources: true })\n    } catch (error) {\n      throw new Error(\n        `Failed to set primary NFD: ${parseTransactionError(error)}`,\n      )\n    }\n\n    // Refresh the NFD data\n    this.invalidate()\n    return this.getNfd()\n  }\n\n  /**\n   * Get the renewal price for the NFD (per year, in microAlgos)\n   * @returns The renewal price per year in microAlgos\n   * @throws If the price cannot be retrieved\n   */\n  public async getRenewalPrice(): Promise<bigint> {\n    const nfd = await this.getNfd()\n\n    if (!nfd.appID) {\n      throw new Error('NFD has no application ID')\n    }\n    const nfdAppId = BigInt(nfd.appID)\n    const nfdInstanceClient = this.getInstanceClient(nfdAppId)\n\n    try {\n      const result = await nfdInstanceClient\n        .newGroup()\n        .getRenewPrice()\n        .simulate({ skipSignatures: true, allowUnnamedResources: true })\n\n      const price = result.returns[0]\n      if (price === undefined) {\n        throw new Error('No price returned')\n      }\n\n      return BigInt(price)\n    } catch (error) {\n      throw new Error(\n        `Failed to get renewal price: ${parseTransactionError(error)}`,\n      )\n    }\n  }\n\n  /**\n   * Renew the NFD\n   *\n   * The contract derives the new expiration from the amount paid, capped by\n   * the registry's `maxYearsAllowed`, so the upper bound is read from the\n   * registry rather than assumed.\n   *\n   * @param years - Number of whole years to renew for (default 1)\n   * @returns The updated NFD\n   * @throws If `years` is not a whole number of at least 1, exceeds the\n   *   registry's maximum, or the renewal fails\n   */\n  public async renew(years: number = 1): Promise<Nfd> {\n    const signer = this.requireSigner()\n\n    if (!Number.isInteger(years) || years < 1) {\n      throw new Error(\n        `Renewal years must be a whole number of at least 1, got ${years}`,\n      )\n    }\n\n    const { maxYearsAllowed } = await this.getConstraints()\n    if (BigInt(years) > maxYearsAllowed) {\n      throw new Error(\n        `Renewal years must be at most ${maxYearsAllowed}, got ${years}`,\n      )\n    }\n\n    const nfd = await this.getNfd()\n\n    if (!nfd.appID) {\n      throw new Error('NFD has no application ID')\n    }\n    const nfdAppId = BigInt(nfd.appID)\n    const nfdInstanceClient = this.getInstanceClient(nfdAppId, signer.addr)\n\n    // Get the renewal price per year\n    const pricePerYear = await this.getRenewalPrice()\n    const totalPrice = pricePerYear * BigInt(years)\n\n    // Create the payment transaction\n    const paymentTxn = await this.algorand.createTransaction.payment({\n      sender: signer.addr,\n      receiver: nfdInstanceClient.appAddress,\n      amount: AlgoAmount.MicroAlgos(totalPrice),\n    })\n\n    try {\n      await nfdInstanceClient\n        .newGroup()\n        .renew({\n          args: { payment: paymentTxn },\n          staticFee: AlgoAmount.MicroAlgos(RENEW_STATIC_FEE),\n        })\n        .send({ populateAppCallResources: true })\n    } catch (error) {\n      throw new Error(`Failed to renew NFD: ${parseTransactionError(error)}`)\n    }\n\n    // Refresh the NFD data\n    this.invalidate()\n    return this.getNfd()\n  }\n\n  /**\n   * List the NFD for sale on the marketplace\n   *\n   * The contract refuses to sell an NFD that still has properties, so every\n   * user-defined and verified field has to be cleared first. Calling this on\n   * an NFD already listed re-prices it.\n   *\n   * @param price - The sale price in microAlgos\n   * @param options - Optional sale configuration\n   * @returns The updated NFD\n   * @throws If the NFD is expired, still minting, or still has properties, or\n   *   if the listing fails\n   */\n  public async listForSale(\n    price: bigint | number,\n    options: ListForSaleOptions = {},\n  ): Promise<Nfd> {\n    const signer = this.requireSigner()\n    const sellAmount = toAmount(price, 'Sale price')\n    const nfd = await this.getNfd()\n\n    if (signer.addr.toString() !== nfd.owner) {\n      throw new Error('Only the owner can list this NFD for sale')\n    }\n\n    if (nfd.expired) {\n      throw new Error(\n        'Cannot list an expired NFD for sale. Call renew() first.',\n      )\n    }\n    this.assertNotMinting(nfd, 'list this NFD for sale')\n\n    // offerForSale asserts the NFD has no boxes left. getNfd() already read\n    // them, so the count is free here.\n    const boxCount = this._boxes?.length ?? 0\n    if (boxCount > 0) {\n      throw new Error(\n        `An NFD can only be sold once its properties are cleared, but ${boxCount} remain. Clear the user-defined and verified fields first.`,\n      )\n    }\n\n    if (!nfd.appID) {\n      throw new Error('NFD has no application ID')\n    }\n    const nfdAppId = BigInt(nfd.appID)\n    const nfdInstanceClient = this.getInstanceClient(nfdAppId, signer.addr)\n\n    const reservedFor = options.reservedFor ?? ALGORAND_ZERO_ADDRESS\n\n    try {\n      await nfdInstanceClient\n        .newGroup()\n        .offerForSale({\n          args: {\n            sellAmount,\n            reservedFor,\n          },\n          staticFee: AlgoAmount.MicroAlgos(APP_CALL_STATIC_FEE),\n        })\n        .send({ populateAppCallResources: true })\n    } catch (error) {\n      throw new Error(\n        `Failed to list NFD for sale: ${parseTransactionError(error)}`,\n      )\n    }\n\n    // Refresh the NFD data\n    this.invalidate()\n    return this.getNfd()\n  }\n\n  /**\n   * Cancel the sale listing for the NFD\n   * @returns The updated NFD\n   * @throws If the NFD is not listed for sale, is expired or still minting, or\n   *   the cancellation fails\n   */\n  public async cancelSale(): Promise<Nfd> {\n    const signer = this.requireSigner()\n    const nfd = await this.getNfd()\n\n    if (signer.addr.toString() !== nfd.owner) {\n      throw new Error('Only the owner can cancel the sale of this NFD')\n    }\n\n    if (!nfd.sellAmount) {\n      throw new Error('NFD is not listed for sale')\n    }\n\n    if (nfd.expired) {\n      throw new Error(\n        'Cannot cancel the sale of an expired NFD. Call renew() first.',\n      )\n    }\n    this.assertNotMinting(nfd, 'cancel the sale of this NFD')\n\n    if (!nfd.appID) {\n      throw new Error('NFD has no application ID')\n    }\n    const nfdAppId = BigInt(nfd.appID)\n    const nfdInstanceClient = this.getInstanceClient(nfdAppId, signer.addr)\n\n    try {\n      await nfdInstanceClient\n        .newGroup()\n        .cancelSale({\n          args: {},\n          staticFee: AlgoAmount.MicroAlgos(APP_CALL_STATIC_FEE),\n        })\n        .send({ populateAppCallResources: true })\n    } catch (error) {\n      throw new Error(`Failed to cancel sale: ${parseTransactionError(error)}`)\n    }\n\n    // Refresh the NFD data\n    this.invalidate()\n    return this.getNfd()\n  }\n\n  /**\n   * Lock or unlock segment minting for the NFD\n   *\n   * Unlocking sets the price anyone may mint a segment at, and the contract\n   * requires it to be at least the registry's `segmentPlatformCostInUsd`, so\n   * the default of 0 is only valid when locking.\n   *\n   * @param lock - Whether to lock (true) or unlock (false) segment minting\n   * @param usdPrice - The price in USD cents for minting segments (e.g., 300 = $3.00). Set to 0 if locking.\n   * @returns The updated NFD\n   * @throws If unlocking below the registry minimum, if the NFD is for sale or\n   *   expired, or if the operation fails\n   */\n  public async lockSegment(lock: boolean, usdPrice: number = 0): Promise<Nfd> {\n    const signer = this.requireSigner()\n    const segmentPrice = toAmount(usdPrice, 'Segment price')\n    const nfd = await this.getNfd()\n\n    if (signer.addr.toString() !== nfd.owner) {\n      throw new Error('Only the owner can lock/unlock segments for this NFD')\n    }\n\n    this.assertNotForSaleOrExpired(nfd, 'lock/unlock segments for this NFD')\n\n    if (!lock) {\n      const { segmentPlatformCostInUsd } = await this.getConstraints()\n      if (segmentPrice < segmentPlatformCostInUsd) {\n        throw new Error(\n          `Segment price must be at least ${segmentPlatformCostInUsd} USD cents when unlocking segment minting, got ${segmentPrice}`,\n        )\n      }\n    }\n\n    if (!nfd.appID) {\n      throw new Error('NFD has no application ID')\n    }\n    const nfdAppId = BigInt(nfd.appID)\n    const nfdInstanceClient = this.getInstanceClient(nfdAppId, signer.addr)\n\n    try {\n      await nfdInstanceClient\n        .newGroup()\n        .segmentLock({\n          args: {\n            lock,\n            usdPrice: segmentPrice,\n          },\n          staticFee: AlgoAmount.MicroAlgos(APP_CALL_STATIC_FEE),\n        })\n        .send({ populateAppCallResources: true })\n    } catch (error) {\n      throw new Error(\n        `Failed to ${lock ? 'lock' : 'unlock'} segments: ${parseTransactionError(error)}`,\n      )\n    }\n\n    // Refresh the NFD data\n    this.invalidate()\n    return this.getNfd()\n  }\n\n  /**\n   * Lock or unlock vault opt-ins for the NFD\n   * @param lock - Whether to lock (true) or unlock (false) vault opt-ins.\n   *   When locked, only the owner can opt the vault into assets.\n   *   When unlocked, anyone can opt the vault into assets.\n   * @returns The updated NFD\n   * @throws If the NFD is for sale or expired, or the operation fails\n   */\n  public async lockVault(lock: boolean): Promise<Nfd> {\n    const signer = this.requireSigner()\n    const nfd = await this.getNfd()\n\n    if (signer.addr.toString() !== nfd.owner) {\n      throw new Error('Only the owner can lock/unlock the vault for this NFD')\n    }\n\n    this.assertNotForSaleOrExpired(nfd, 'lock/unlock the vault for this NFD')\n\n    if (!nfd.appID) {\n      throw new Error('NFD has no application ID')\n    }\n    const nfdAppId = BigInt(nfd.appID)\n    const nfdInstanceClient = this.getInstanceClient(nfdAppId, signer.addr)\n\n    try {\n      await nfdInstanceClient\n        .newGroup()\n        .vaultOptInLock({\n          args: { lock },\n          staticFee: AlgoAmount.MicroAlgos(APP_CALL_STATIC_FEE),\n        })\n        .send({ populateAppCallResources: true })\n    } catch (error) {\n      throw new Error(\n        `Failed to ${lock ? 'lock' : 'unlock'} vault: ${parseTransactionError(error)}`,\n      )\n    }\n\n    // Refresh the NFD data\n    this.invalidate()\n    return this.getNfd()\n  }\n\n  /**\n   * Opt the NFD vault into assets, and optionally transfer one of them\n   *\n   * `options.amount` sends that many base units of the asset to the vault in\n   * the same group. Since the amount applies to one asset, it can only be\n   * given alongside a single asset — call this once per asset to send several.\n   *\n   * The vault's minimum balance rises by {@link VAULT_OPT_IN_MBR} per asset,\n   * and the contract requires the caller to fund it in the same group. That\n   * payment is charged for every asset passed, whether or not the vault is\n   * already opted into it, so filter out assets the vault already holds.\n   *\n   * @param assets - ASA IDs to opt the vault into. `0` (ALGO) needs no opt-in\n   *   and is only meaningful together with `amount`.\n   * @param options - Options for the vault operation\n   * @returns The updated NFD\n   * @throws If `assets` is empty, if `amount` is given with more than one\n   *   asset, if the NFD is for sale or expired, or if the operation fails\n   */\n  public async sendToVault(\n    assets: number[],\n    options: SendToVaultOptions = {},\n  ): Promise<Nfd> {\n    const signer = this.requireSigner()\n\n    if (assets.length === 0) {\n      throw new Error('At least one asset must be specified')\n    }\n\n    const sendsAsset = !options.optInOnly && options.amount !== undefined\n    if (sendsAsset && assets.length > 1) {\n      throw new Error(\n        'An amount can only be sent with a single asset. Call sendToVault once per asset, or omit amount to opt the vault in without transferring.',\n      )\n    }\n\n    const amount =\n      options.optInOnly || options.amount === undefined\n        ? 0n\n        : toAmount(options.amount, 'Transfer amount')\n\n    // ALGO needs no opt-in, so it never goes into the vaultOptIn call\n    const assetsToOptIn = assets.filter((assetId) => assetId !== 0)\n\n    if (assetsToOptIn.length === 0 && !sendsAsset) {\n      throw new Error(\n        'Nothing to do: ALGO (asset 0) needs no opt-in, so sending it requires an amount.',\n      )\n    }\n\n    const nfd = await this.getNfd()\n\n    this.assertNotForSaleOrExpired(nfd, 'send to the vault')\n\n    if (!nfd.appID) {\n      throw new Error('NFD has no application ID')\n    }\n\n    // Both the MBR payment and the transfer are paid to the vault account\n    const vaultAddress = nfd.nfdAccount\n    if (!vaultAddress) {\n      throw new Error('NFD has no vault account')\n    }\n\n    const nfdAppId = BigInt(nfd.appID)\n    const nfdInstanceClient = this.getInstanceClient(nfdAppId, signer.addr)\n\n    // Build the payments up front so a failure to construct one is not\n    // reported as though the transaction itself had failed\n\n    // vaultOptIn verifies the transaction immediately before it pays the\n    // vault's added minimum balance, and rejects being first in the group\n    let mbrTxn: Transaction | undefined\n    if (assetsToOptIn.length > 0) {\n      mbrTxn = await this.algorand.createTransaction.payment({\n        sender: signer.addr,\n        receiver: vaultAddress,\n        amount: AlgoAmount.MicroAlgos(\n          VAULT_OPT_IN_MBR * BigInt(assetsToOptIn.length),\n        ),\n      })\n    }\n\n    let transferTxn: Transaction | undefined\n    if (sendsAsset) {\n      const assetId = assets[0]\n      transferTxn =\n        assetId === 0\n          ? await this.algorand.createTransaction.payment({\n              sender: signer.addr,\n              receiver: vaultAddress,\n              amount: AlgoAmount.MicroAlgos(amount),\n              note: options.note,\n            })\n          : await this.algorand.createTransaction.assetTransfer({\n              sender: signer.addr,\n              receiver: vaultAddress,\n              assetId: BigInt(assetId),\n              amount,\n              note: options.note,\n            })\n    }\n\n    // One inner transaction per asset the contract opts into\n    const totalFee =\n      APP_CALL_STATIC_FEE + VAULT_FEE_PER_ASSET * BigInt(assetsToOptIn.length)\n\n    try {\n      const group = nfdInstanceClient.newGroup()\n\n      // Order matters: the MBR payment has to sit directly before the opt-in\n      if (mbrTxn) {\n        group.addTransaction(mbrTxn)\n        group.vaultOptIn({\n          args: { assets: assetsToOptIn.map(BigInt) },\n          staticFee: AlgoAmount.MicroAlgos(totalFee),\n        })\n      }\n\n      if (transferTxn) {\n        group.addTransaction(transferTxn)\n      }\n\n      await group.send({ populateAppCallResources: true })\n    } catch (error) {\n      throw new Error(\n        `Failed to send to vault: ${parseTransactionError(error)}`,\n      )\n    }\n\n    // Refresh the NFD data\n    this.invalidate()\n    return this.getNfd()\n  }\n\n  /**\n   * Resolve a vault receiver to an Algorand address\n   *\n   * `vaultSend`'s receiver argument is an ABI `address`, so an NFD name has to\n   * be resolved to one first. `receiverType` picks which of the receiving\n   * NFD's accounts to send to.\n   *\n   * @param receiver - An Algorand address, or an NFD name to resolve\n   * @param receiverType - Which account of a receiving NFD to send to:\n   *   its deposit account (`'account'`) or its vault (`'nfdVault'`)\n   * @returns The receiving Algorand address\n   * @throws If the receiver is neither a valid address nor a resolvable NFD\n   *   name, or `'nfdVault'` is used with a plain address\n   */\n  private async resolveVaultReceiver(\n    receiver: string,\n    receiverType: 'account' | 'nfdVault' = 'account',\n  ): Promise<string> {\n    if (!isValidName(receiver)) {\n      if (receiverType === 'nfdVault') {\n        throw new Error(\n          `receiverType 'nfdVault' needs an NFD name as the receiver, got the address ${receiver}`,\n        )\n      }\n\n      // Reject a malformed address here rather than letting ABI encoding fail\n      // inside the send, where it reads as a transaction failure\n      try {\n        Address.fromString(receiver)\n      } catch {\n        throw new Error(\n          `Receiver must be an Algorand address or an NFD name, got ${receiver}`,\n        )\n      }\n\n      return receiver\n    }\n\n    const receiverNfd = await this.client.resolve(receiver, { view: 'tiny' })\n\n    if (receiverType === 'nfdVault') {\n      if (!receiverNfd.nfdAccount) {\n        throw new Error(`NFD ${receiver} has no vault account`)\n      }\n      return receiverNfd.nfdAccount\n    }\n\n    const depositAccount = receiverNfd.depositAccount ?? receiverNfd.owner\n    if (!depositAccount) {\n      throw new Error(`NFD ${receiver} has no deposit account`)\n    }\n    return depositAccount\n  }\n\n  /**\n   * Send assets from the NFD vault to a receiver\n   *\n   * `options.amount` applies to a single asset. Passing several assets means\n   * \"send the full balance of each\", which the contract only accepts with no\n   * amount — it closes the vault out of every asset in the list.\n   *\n   * @param assets - ASA IDs to send from the vault, or `[0]` to send ALGO\n   * @param receiver - The receiving Algorand address, or an NFD name to\n   *   resolve to one\n   * @param options - Options for the vault operation\n   * @returns The updated NFD\n   * @throws If `assets` is empty, if `amount` is given with more than one\n   *   asset, if ALGO is combined with other assets or sent without an amount,\n   *   if the NFD is for sale or expired, if the receiver cannot be resolved,\n   *   or if the operation fails\n   */\n  public async sendFromVault(\n    assets: number[],\n    receiver: string,\n    options: SendFromVaultOptions = {},\n  ): Promise<Nfd> {\n    const signer = this.requireSigner()\n\n    if (assets.length === 0) {\n      throw new Error('At least one asset must be specified')\n    }\n\n    const amount =\n      options.amount === undefined\n        ? 0n\n        : toAmount(options.amount, 'Transfer amount')\n\n    // vaultSend applies the amount to a single asset; with more than one it\n    // closes out each in full, which the contract requires amount 0 for\n    if (amount !== 0n && assets.length > 1) {\n      throw new Error(\n        'An amount can only be sent with a single asset. Call sendFromVault once per asset, or omit amount to send the full balance of each.',\n      )\n    }\n\n    // ALGO has no close-out path in the contract: it is sent by explicit\n    // amount, on its own\n    if (assets.includes(0)) {\n      if (assets.length > 1) {\n        throw new Error(\n          'ALGO (asset 0) must be sent from the vault on its own, not alongside other assets',\n        )\n      }\n      if (amount === 0n) {\n        throw new Error(\n          'Sending ALGO (asset 0) from the vault requires an amount',\n        )\n      }\n    }\n\n    const nfd = await this.getNfd()\n\n    if (signer.addr.toString() !== nfd.owner) {\n      throw new Error('Only the owner can send from the vault')\n    }\n\n    this.assertNotForSaleOrExpired(nfd, 'send from the vault')\n\n    if (!nfd.appID) {\n      throw new Error('NFD has no application ID')\n    }\n\n    const receiverAddress = await this.resolveVaultReceiver(\n      receiver,\n      options.receiverType,\n    )\n\n    // The contract claws its own ASA back rather than transferring it, and\n    // only ever to the owner\n    if (\n      nfd.asaID &&\n      assets.includes(nfd.asaID) &&\n      receiverAddress !== nfd.owner\n    ) {\n      throw new Error(\n        `The NFD's own ASA (${nfd.asaID}) can only be sent from the vault to the owner`,\n      )\n    }\n\n    const nfdAppId = BigInt(nfd.appID)\n    const nfdInstanceClient = this.getInstanceClient(nfdAppId, signer.addr)\n\n    const primaryAsset = BigInt(assets[0])\n    const otherAssets = assets.slice(1).map(BigInt)\n\n    // One inner transaction per asset the contract sends\n    const totalFee =\n      APP_CALL_STATIC_FEE + VAULT_FEE_PER_ASSET * BigInt(assets.length)\n\n    try {\n      await nfdInstanceClient\n        .newGroup()\n        .vaultSend({\n          args: {\n            amount,\n            receiver: receiverAddress,\n            note: options.note ?? '',\n            asset: primaryAsset,\n            otherAssets,\n          },\n          staticFee: AlgoAmount.MicroAlgos(totalFee),\n        })\n        .send({ populateAppCallResources: true })\n    } catch (error) {\n      throw new Error(\n        `Failed to send from vault: ${parseTransactionError(error)}`,\n      )\n    }\n\n    // Refresh the NFD data\n    this.invalidate()\n    return this.getNfd()\n  }\n}\n","/**\n * Asset constants for the NFD SDK\n */\n\n/**\n * Default avatar image as base64 data URI\n */\nexport const DEFAULT_AVATAR_DATA_URI =\n  'data:image/jpeg;base64,/9j/4QBORXhpZgAATU0AKgAAAAgAAwEaAAUAAAABAAAAMgEbAAUAAAABAAAAOgEoAAMAAAABAAIAAAAAAAAACvyAAAAnEAAK/IAAACcQAAAAAP/tAEBQaG90b3Nob3AgMy4wADhCSU0EBgAAAAAABwAGAQEAAQEAOEJJTQQlAAAAAAAQAAAAAAAAAAAAAAAAAAAAAP/iDFhJQ0NfUFJPRklMRQABAQAADEhMaW5vAhAAAG1udHJSR0IgWFlaIAfOAAIACQAGADEAAGFjc3BNU0ZUAAAAAElFQyBzUkdCAAAAAAAAAAAAAAAAAAD21gABAAAAANMtSFAgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEW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wh0HNX0VVS+1O1E+ftKiqeZTuNW7MsdkaLYM0+ZRYUVS6oGT3JEkZLhDDNVPMuENtTmR7qoGTzLnUiIjdC4jvyOS9gHAoAUAwVMNFSqYDQ6cnRVP0p2ZUpofAZqtTkFatRDbkAJcuJTkqgfaqy5GTAbxOS4jujNUqda1cq9o+dVG4AuE7xRJLf5kwG9JVLJojelkuIsNiY6MW2+Q7vpqnITPQKpxVMNFm2BWc4j7aol2GSdt4oiI3Y5qpc6kdwNtK4y5GS4IMcAVxS5QmgM8VxnmXCGXFJhqQEBzp5HDJNAM+a45VOK//2Q=='\n","/**\n * IPFS URL resolution utilities for the NFD SDK\n */\n\n// Default IPFS gateway to use as fallback\nconst IPFS_GATEWAY_URL = 'https://ipfs.algonode.dev'\n\n/**\n * Check availability of an IPFS resource and return appropriate URL\n * Tries images.nf.domains first, falls back to IPFS gateway\n * Only returns URLs for image content types\n *\n * @param url - IPFS URL to check\n * @returns URL to use (either images.nf.domains or fallback gateway)\n */\nexport const checkIpfsAvailability = async (url: string): Promise<string> => {\n  if (!url.startsWith('ipfs://')) {\n    return url\n  }\n\n  const cid = url.replace('ipfs://', '')\n  const nfdUrl = `https://images.nf.domains/ipfs/${cid}`\n  const gatewayUrl = `${IPFS_GATEWAY_URL}/ipfs/${cid}`\n\n  // Helper to check if content type is an image\n  const isImageContentType = (contentType: string): boolean => {\n    return contentType.startsWith('image/')\n  }\n\n  // Try images.nf.domains first\n  try {\n    const response = await fetch(nfdUrl, { method: 'HEAD' })\n    if (response.ok) {\n      const contentType = response.headers.get('content-type')\n      if (contentType && isImageContentType(contentType)) {\n        return nfdUrl\n      }\n    }\n  } catch {\n    console.info(\n      `CID ${cid} is not cached on images.nf.domains, trying IPFS gateway...`,\n    )\n  }\n\n  // Try IPFS gateway\n  try {\n    const response = await fetch(gatewayUrl, { method: 'HEAD' })\n    if (response.ok) {\n      const contentType = response.headers.get('content-type')\n\n      // If it's an image, return the gateway URL\n      if (contentType && isImageContentType(contentType)) {\n        return gatewayUrl\n      }\n\n      // If it's JSON, try to get image URL from metadata\n      if (contentType === 'application/json') {\n        try {\n          const jsonResponse = await fetch(gatewayUrl)\n          const metadata = await jsonResponse.json()\n\n          // Get image URL from metadata\n          const imageUrl = metadata.image\n          if (imageUrl) {\n            // If it's an IPFS URL, process it recursively\n            if (imageUrl.startsWith('ipfs://')) {\n              const imageCid = imageUrl.replace('ipfs://', '')\n              const imageGatewayUrl = `${IPFS_GATEWAY_URL}/ipfs/${imageCid}`\n\n              // Verify it's an image\n              const imageResponse = await fetch(imageGatewayUrl, {\n                method: 'HEAD',\n              })\n              if (imageResponse.ok) {\n                const imageContentType =\n                  imageResponse.headers.get('content-type')\n                if (imageContentType && isImageContentType(imageContentType)) {\n                  return imageGatewayUrl\n                }\n              }\n            }\n            // If it's already an HTTP URL and it's an image, return it\n            else if (imageUrl.startsWith('http')) {\n              try {\n                const imageResponse = await fetch(imageUrl, { method: 'HEAD' })\n                if (imageResponse.ok) {\n                  const imageContentType =\n                    imageResponse.headers.get('content-type')\n                  if (\n                    imageContentType &&\n                    isImageContentType(imageContentType)\n                  ) {\n                    return imageUrl\n                  }\n                }\n              } catch {\n                console.error('Error checking HTTP image URL')\n              }\n            }\n          }\n        } catch {\n          console.error('Error processing JSON metadata')\n        }\n      }\n    }\n  } catch {\n    console.error(`Error checking gateway for CID ${cid}`)\n  }\n\n  // Fallback to IPFS gateway without guarantee it's an image\n  return gatewayUrl\n}\n\n/**\n * Checks if a string is a valid IPFS URL\n * @param url The URL to check\n * @returns True if the URL is a valid IPFS URL\n */\nexport function isIpfsUrl(url: string): boolean {\n  return url ? url.startsWith('ipfs://') : false\n}\n","import { DEFAULT_AVATAR_DATA_URI } from '../assets'\nimport { checkIpfsAvailability } from '../utils/ipfs'\n\nimport { BaseModule } from './base'\n\nimport type { NfdClient } from '../client'\nimport type { Nfd, NfdImageResult } from '../types'\n\n/**\n * Module for NFD metadata operations, including avatar and banner image resolution\n */\nexport class MetadataModule extends BaseModule {\n  constructor(client: NfdClient) {\n    super(client)\n  }\n\n  /**\n   * Get the avatar image information for an NFD\n   * @param nameOrAppId - The NFD name or application ID\n   * @returns The avatar image result with raw value, HTTPS URL, verification status, and ASA ID\n   * @remarks The URL will always be provided - either the actual avatar or a default fallback image\n   */\n  public async getAvatarImage(\n    nameOrAppId: string | number | bigint,\n  ): Promise<NfdImageResult>\n\n  /**\n   * Get the avatar image information for an NFD\n   * @param nfd - The NFD data object (for optimized parsing without additional resolve)\n   * @returns The avatar image result with raw value, HTTPS URL, verification status, and ASA ID\n   * @remarks The URL will always be provided - either the actual avatar or a default fallback image\n   */\n  public async getAvatarImage(nfd: Nfd): Promise<NfdImageResult>\n\n  /**\n   * Get the avatar image information for an NFD\n   * @param input - Either NFD name/application ID or NFD data object\n   * @returns The avatar image result with raw value, HTTPS URL, verification status, and ASA ID\n   */\n  public async getAvatarImage(\n    input: string | number | bigint | Nfd,\n  ): Promise<NfdImageResult> {\n    if (this.isNfdObject(input)) {\n      // Fast path: parse from existing NFD data\n      return this.parseImageFromNfd(input, 'avatar')\n    } else {\n      // Slow path: resolve NFD first, then parse\n      const nfd = await this.client.resolve(input, { view: 'full' })\n      return this.parseImageFromNfd(nfd, 'avatar')\n    }\n  }\n\n  /**\n   * Get the banner image information for an NFD\n   * @param nameOrAppId - The NFD name or application ID\n   * @returns The banner image result with raw value, HTTPS URL, verification status, and ASA ID\n   */\n  public async getBannerImage(\n    nameOrAppId: string | number | bigint,\n  ): Promise<NfdImageResult>\n\n  /**\n   * Get the banner image information for an NFD\n   * @param nfd - The NFD data object (for optimized parsing without additional resolve)\n   * @returns The banner image result with raw value, HTTPS URL, verification status, and ASA ID\n   */\n  public async getBannerImage(nfd: Nfd): Promise<NfdImageResult>\n\n  /**\n   * Get the banner image information for an NFD\n   * @param input - Either NFD name/application ID or NFD data object\n   * @returns The banner image result with raw value, HTTPS URL, verification status, and ASA ID\n   */\n  public async getBannerImage(\n    input: string | number | bigint | Nfd,\n  ): Promise<NfdImageResult> {\n    if (this.isNfdObject(input)) {\n      // Fast path: parse from existing NFD data\n      return this.parseImageFromNfd(input, 'banner')\n    } else {\n      // Slow path: resolve NFD first, then parse\n      const nfd = await this.client.resolve(input, { view: 'full' })\n      return this.parseImageFromNfd(nfd, 'banner')\n    }\n  }\n\n  /**\n   * Type guard to check if input is an NFD object\n   * @param input - The input to check\n   * @returns True if input is an Nfd object\n   */\n  public isNfdObject(input: string | number | bigint | Nfd): input is Nfd {\n    return typeof input === 'object' && input !== null && 'properties' in input\n  }\n\n  /**\n   * Parse image information from an NFD for a specific image type\n   * @private\n   * @param nfd - The NFD data object\n   * @param imageType - The type of image ('avatar' or 'banner')\n   * @returns The image result with raw value, HTTPS URL, verification status, and ASA ID\n   */\n  private async parseImageFromNfd(\n    nfd: Nfd,\n    imageType: 'avatar' | 'banner',\n  ): Promise<NfdImageResult> {\n    const properties = nfd.properties\n\n    if (!properties) {\n      // No properties - provide fallback for avatar only\n      if (imageType === 'avatar') {\n        return {\n          raw: null,\n          url: DEFAULT_AVATAR_DATA_URI,\n          verified: false,\n          asaId: null,\n          isFallback: true,\n        }\n      }\n\n      return {\n        raw: null,\n        url: null,\n        verified: false,\n        asaId: null,\n      }\n    }\n\n    // Check verified properties first (these are NFT-based images)\n    if (properties.verified) {\n      const verifiedImage = properties.verified[imageType]\n      if (verifiedImage) {\n        const asaIdKey = `${imageType}asaid` as keyof typeof properties.verified\n        const asaId = properties.verified[asaIdKey]\n\n        return {\n          raw: verifiedImage,\n          url: await checkIpfsAvailability(verifiedImage),\n          verified: true,\n          asaId: asaId ? parseInt(asaId, 10) : null,\n        }\n      }\n    }\n\n    // Check user-defined properties (these are regular images)\n    if (properties.userDefined) {\n      const userDefinedImage = properties.userDefined[imageType]\n      if (userDefinedImage) {\n        return {\n          raw: userDefinedImage,\n          url: await checkIpfsAvailability(userDefinedImage),\n          verified: false,\n          asaId: null,\n        }\n      }\n    }\n\n    // No image found - provide fallback for avatar only\n    if (imageType === 'avatar') {\n      return {\n        raw: null,\n        url: DEFAULT_AVATAR_DATA_URI,\n        verified: false,\n        asaId: null,\n        isFallback: true,\n      }\n    }\n\n    // No banner found - return null URL\n    return {\n      raw: null,\n      url: null,\n      verified: false,\n      asaId: null,\n    }\n  }\n}\n","import { AlgoAmount } from '@algorandfoundation/algokit-utils/types/amount'\nimport { isValidAddress } from 'algosdk'\n\nimport {\n  canMintSegment,\n  extractParentName,\n  isSegmentName,\n  isValidName,\n} from '../utils/nfd'\n\nimport { BaseModule } from './base'\n\nimport type { PriceInfo } from '../contracts/NFDRegistryClient'\nimport type { Nfd } from '../types'\n\n/**\n * Configuration options for minting a new NFD\n */\nexport interface NfdMintParams {\n  /**\n   * The address of the buyer\n   */\n  buyer: string\n\n  /**\n   * Number of years until expiration (1-20)\n   */\n  years: number\n\n  /**\n   * Optional address to reserve the NFD for. If not provided, the buyer's address will be used.\n   */\n  reservedFor?: string\n}\n\n/**\n * Configuration options for getting an NFD price quote\n */\nexport interface NfdMintQuoteParams {\n  /**\n   * The address of the potential buyer\n   */\n  buyer: string\n\n  /**\n   * Number of years to get a quote for (default: 1)\n   */\n  years?: number\n}\n\n/**\n * Detailed price quote for minting an NFD\n */\nexport interface NfdMintQuote {\n  /** Base price for the specified years in microAlgos */\n  basePrice: bigint\n  /** Fixed carry cost in microAlgos */\n  carryCost: bigint\n  /** Extra fee for minting in microAlgos */\n  extraFee: bigint\n  /** Total price including all fees in microAlgos */\n  totalPrice: bigint\n  /** Number of years the quote is for */\n  years: number\n  /** The NFD name being quoted */\n  nfdName: string\n  /** The address of the buyer */\n  buyer: string\n  /** Whether the NFD is a segment */\n  isSegment: boolean\n}\n\n/**\n * Module for NFD minting and renewal operations\n */\nexport class MintingModule extends BaseModule {\n  /**\n   * Validate segment minting permissions\n   * @internal\n   * @param segmentName - The segment NFD name to validate\n   * @param caller - The address of the caller/potential buyer\n   * @throws If the segment name is invalid, the parent NFD does not exist, or the caller is not authorized to mint a segment\n   */\n  private async validateSegmentMinting(\n    segmentName: string,\n    caller: string,\n  ): Promise<void> {\n    // Extract the parent NFD name from the segment name (throws if invalid)\n    const parentName = extractParentName(segmentName)\n\n    try {\n      // Resolve the parent NFD to check its properties\n      const parentNfd = await this.client.resolve(parentName)\n\n      // Check if the caller is authorized to mint a segment\n      if (!canMintSegment(parentNfd, caller)) {\n        throw new Error(\n          `Cannot mint segment '${segmentName}' due to permission restrictions on the parent NFD '${parentName}'. ` +\n            `Only the owner can mint segments when segment minting is locked.`,\n        )\n      }\n    } catch (error) {\n      // If the error is that the parent NFD doesn't exist\n      if (error instanceof Error && error.message.includes('NFD not found')) {\n        throw new Error(\n          `Cannot mint segment '${segmentName}' because its parent NFD '${parentName}' does not exist. ` +\n            `A segment NFD (xxx.yyy.algo) can only be minted if its parent NFD (yyy.algo) already exists. ` +\n            `Please mint the parent NFD first.`,\n        )\n      }\n      // Re-throw other errors\n      throw error\n    }\n  }\n\n  /**\n   * Get price information for an NFD from the registry contract\n   * @param nfdName - The name of the NFD to get a price for\n   * @param caller - The address of the caller/potential buyer\n   * @returns The NFD price information\n   * @throws If the price information cannot be retrieved\n   */\n  private async getPriceInfo(\n    nfdName: string,\n    caller: string,\n  ): Promise<PriceInfo> {\n    // Validate NFD name format\n    if (!isValidName(nfdName)) {\n      throw new Error(\n        `Invalid NFD name: ${nfdName}. Name must be in the format \"xxx.algo\" or \"xxx.yyy.algo\"`,\n      )\n    }\n\n    // If the NFD is a segment, validate minting permissions\n    if (isSegmentName(nfdName)) {\n      await this.validateSegmentMinting(nfdName, caller)\n    }\n\n    // Get the registry client for executing the price query\n    const registryClient = this.getRegistryClient(caller)\n\n    // Get price quote for the NFD\n    const result = await registryClient\n      .newGroup()\n      .gas({ args: {} })\n      .getPrice({ args: { nfdName, caller } })\n      .simulate({\n        skipSignatures: true,\n        allowUnnamedResources: true,\n        extraOpcodeBudget: 2100,\n      })\n\n    // Check for simulation failure\n    const failureMessage = result.simulateResponse.txnGroups[0].failureMessage\n    if (failureMessage) {\n      throw new Error(`Failed to get price: ${failureMessage}`)\n    }\n\n    const priceInfo = result.returns[1]\n    if (!priceInfo) {\n      throw new Error('Failed to get price: Price info not returned')\n    }\n\n    return priceInfo\n  }\n\n  /**\n   * Get a price quote for minting an NFD\n   * @param nfdName - The name of the NFD to get a quote for\n   * @param params - Parameters for the quote\n   * @returns A detailed price quote including base price, fees, and total\n   * @throws If the quote cannot be generated\n   */\n  public async getMintQuote(\n    nfdName: string,\n    params: NfdMintQuoteParams,\n  ): Promise<NfdMintQuote> {\n    const { buyer, years = 1 } = params\n\n    // Validate NFD name format\n    if (!isValidName(nfdName)) {\n      throw new Error(\n        `Invalid NFD name: ${nfdName}. Name must be in the format \"xxx.algo\" or \"xxx.yyy.algo\"`,\n      )\n    }\n\n    // Check if NFD already exists\n    const existingAppId = await this.getAppIdFromName(nfdName)\n    if (existingAppId !== null) {\n      throw new Error(\n        `NFD already exists: ${nfdName} (appID: ${existingAppId})`,\n      )\n    }\n\n    // Get constraints to determine max years allowed\n    let maxYearsAllowed = 20 // Default fallback\n    try {\n      const constraints = await this.getConstraints()\n      maxYearsAllowed = Number(constraints.maxYearsAllowed)\n    } catch (error) {\n      console.warn('Failed to get constraints, using default max years:', error)\n    }\n\n    // Validate years parameter\n    if (years <= 0 || !Number.isInteger(years)) {\n      throw new Error('Years must be a positive integer')\n    }\n\n    if (years > maxYearsAllowed) {\n      throw new Error(\n        `Years cannot exceed the maximum allowed (${maxYearsAllowed})`,\n      )\n    }\n\n    // Determine if the NFD is a segment\n    const isSegment = isSegmentName(nfdName)\n\n    // If the NFD is a segment, validate minting permissions\n    if (isSegment) {\n      await this.validateSegmentMinting(nfdName, buyer)\n    }\n\n    // Get the price info from the registry\n    const priceInfo = await this.getPriceInfo(nfdName, buyer)\n\n    // Calculate extra fee based on NFD type\n    const extraFee = isSegment ? BigInt(12000) : BigInt(10000)\n\n    // Calculate base price for the specified number of years\n    const basePrice = priceInfo.oneYearPrice * BigInt(years)\n\n    // Calculate total price including all components\n    const totalPrice = basePrice + priceInfo.carryCost + extraFee\n\n    return {\n      basePrice,\n      carryCost: priceInfo.carryCost,\n      extraFee,\n      totalPrice,\n      years,\n      nfdName,\n      buyer,\n      isSegment,\n    }\n  }\n\n  /**\n   * Mint a new NFD\n   * @param nfdName - The name of the NFD to mint\n   * @param params - Configuration options for minting\n   * @returns The minted NFD record\n   * @throws If the mint operation fails\n   */\n  public async mint(nfdName: string, params: NfdMintParams): Promise<Nfd> {\n    // Ensure a signer is set\n    this.requireSigner()\n\n    // Validate NFD name format\n    if (!isValidName(nfdName)) {\n      throw new Error(\n        `Invalid NFD name: ${nfdName}. Name must be in the format 'name.algo' or 'segment.name.algo'`,\n      )\n    }\n\n    // Check if NFD already exists\n    const existingAppId = await this.getAppIdFromName(nfdName)\n    if (existingAppId !== null) {\n      throw new Error(\n        `NFD already exists: ${nfdName} (appID: ${existingAppId})`,\n      )\n    }\n\n    const { buyer: buyerAddr, years: numYears, reservedFor } = params\n\n    // Validate years parameter\n    if (numYears <= 0) {\n      throw new Error('Years must be greater than 0')\n    }\n\n    if (!Number.isInteger(numYears)) {\n      throw new Error('Years must be an integer')\n    }\n\n    // Validate reservedFor address\n    if (reservedFor && !isValidAddress(reservedFor)) {\n      throw new Error('Invalid reservedFor address')\n    }\n\n    // Get constraints to determine max years allowed\n    let maxYearsAllowed = 20 // Default fallback\n    try {\n      const constraints = await this.getConstraints()\n      maxYearsAllowed = Number(constraints.maxYearsAllowed)\n    } catch (error) {\n      console.warn('Failed to get constraints, using default max years:', error)\n    }\n\n    if (numYears > maxYearsAllowed) {\n      throw new Error(\n        `Years cannot exceed the maximum allowed (${maxYearsAllowed})`,\n      )\n    }\n\n    // Determine if the NFD is a segment\n    const isSegment = isSegmentName(nfdName)\n\n    // If the NFD is a segment, validate minting permissions\n    if (isSegment) {\n      await this.validateSegmentMinting(nfdName, buyerAddr)\n    }\n\n    // Get price info from the registry\n    const priceInfo = await this.getPriceInfo(nfdName, buyerAddr)\n\n    // Calculate extra fee based on NFD type\n    const extraFee = isSegment ? 12000 : 10000\n\n    // Get the registry client for executing the mint transaction\n    const registryClient = this.getRegistryClient(buyerAddr)\n\n    // Create payment transaction for the NFD price\n    const paymentTxn = await this.algorand.createTransaction.payment({\n      sender: buyerAddr,\n      receiver: registryClient.appAddress,\n      // Calculate total cost: (years * yearly price) + carry cost\n      amount: AlgoAmount.MicroAlgos(\n        BigInt(numYears) * priceInfo.oneYearPrice + priceInfo.carryCost,\n      ),\n    })\n\n    // Execute the mint transaction\n    const mintResult = await registryClient\n      .newGroup()\n      .gas({ args: {}, note: '1' })\n      .gas({ args: {}, note: '2' })\n      .gas({ args: {}, note: '3' })\n      .gas({ args: {}, note: '4' })\n      .mintNfd({\n        args: {\n          purchaseTxn: paymentTxn,\n          nfdName,\n          reservedFor: reservedFor || buyerAddr,\n          linkOnMint: false,\n        },\n        extraFee: AlgoAmount.MicroAlgos(extraFee),\n      })\n      .send({ populateAppCallResources: true })\n\n    const nfdAppId = mintResult.returns[4]\n\n    if (!nfdAppId) {\n      throw new Error(\n        'NFD was minted successfully but the app ID was not returned',\n      )\n    }\n\n    // Return the minted NFD record\n    return this.client.resolve(nfdAppId, { view: 'full' })\n  }\n}\n","import { AlgoAmount } from '@algorandfoundation/algokit-utils/types/amount'\nimport { Address } from 'algosdk'\n\nimport { APP_CALL_STATIC_FEE } from '../constants'\nimport { Nfd } from '../types'\nimport { parseTransactionError } from '../utils/error-parser'\nimport { toAmount } from '../utils/internal/numbers'\n\nimport { BaseModule } from './base'\n\n/**\n * Response structure for purchase quote requests\n */\nexport interface NfdPurchaseQuote {\n  /** The NFD name being quoted */\n  nfdName: string\n  /** The address of the buyer */\n  buyer: string\n  /** Whether this NFD can be claimed (is reserved for the buyer) */\n  canClaim: boolean\n  /** Whether this NFD can be bought (is for sale) */\n  canBuy: boolean\n  /** The price to purchase in microAlgos (calculated amount for claims, sellAmount for purchases) */\n  price: bigint\n  /** The address the NFD is reserved for (if any) */\n  reservedFor?: string\n  /** The current sell amount in microAlgos (if for sale) */\n  sellAmount?: bigint\n  /** The current state of the NFD */\n  state: string\n  /** Whether the buyer is authorized to make this purchase */\n  authorized: boolean\n  /** Reason why purchase is not authorized (if applicable) */\n  authorizationError?: string\n}\n\n/**\n * Module for handling NFD purchasing operations (claiming and buying)\n */\nexport class PurchasingModule extends BaseModule {\n  /**\n   * Validate an Algorand address\n   * @private\n   */\n  private validateAddress(address: string, paramName: string): void {\n    try {\n      Address.fromString(address)\n    } catch {\n      throw new Error(`Invalid ${paramName}: ${address}`)\n    }\n  }\n\n  /**\n   * Get a purchase quote for an NFD\n   * @param nameOrAppId - The NFD name or application ID\n   * @param buyer - The buyer address\n   * @returns Detailed purchase quote including eligibility and pricing\n   * @throws If the NFD cannot be resolved or quote cannot be generated\n   */\n  public async getPurchaseQuote(\n    nameOrAppId: string | number | bigint,\n    buyer: string,\n  ): Promise<NfdPurchaseQuote> {\n    // Validate buyer address\n    this.validateAddress(buyer, 'buyer')\n\n    // Resolve NFD to get current information\n    const nfd = await this.client.resolve(nameOrAppId, { view: 'full' })\n\n    // Check if buyer can claim this NFD (is reserved for them)\n    // Check all possible locations for reservation info\n    const reservedForAddress =\n      nfd.reservedFor ||\n      nfd.properties?.internal?.reservedOwner ||\n      nfd.properties?.verified?.reservedFor\n    const isReservedForBuyer = reservedForAddress === buyer\n\n    // NFD can be claimed if it's in 'reserved' state OR if it's 'forSale' but reserved for the buyer\n    const canClaim =\n      (nfd.state === 'reserved' || nfd.state === 'forSale') &&\n      isReservedForBuyer\n\n    // Check if buyer can buy this NFD (is for sale and not specifically reserved)\n    const canBuy = nfd.state === 'forSale' && !reservedForAddress\n\n    let authorized = false\n    let authorizationError: string | undefined\n\n    // Determine authorization\n    if (nfd.state === 'reserved' || nfd.state === 'forSale') {\n      if (reservedForAddress && !isReservedForBuyer) {\n        authorized = false\n        authorizationError = `NFD is reserved for ${reservedForAddress}, but buyer is ${buyer}`\n      } else if (canClaim || canBuy) {\n        authorized = true\n      } else {\n        authorized = false\n        authorizationError = `NFD is not available for purchase (state: ${nfd.state})`\n      }\n    } else {\n      authorized = false\n      authorizationError = `NFD is not available for purchase (state: ${nfd.state})`\n    }\n\n    // Determine price\n    let price = BigInt(0)\n    if (canClaim && nfd.sellAmount) {\n      // For claims, calculate the amount based on sellAmount minus mintingKickoffAmount\n      const sellAmount = Number(nfd.sellAmount)\n      const mintingKickoffAmount =\n        Number(nfd.properties?.internal?.mintingKickoffAmount) || 0\n      const claimAmount = Math.max(sellAmount - mintingKickoffAmount, 0)\n      price = BigInt(claimAmount)\n    } else if (canBuy && nfd.sellAmount) {\n      price = BigInt(nfd.sellAmount)\n    }\n\n    return {\n      nfdName: nfd.name,\n      buyer,\n      canClaim,\n      canBuy,\n      price,\n      reservedFor: reservedForAddress,\n      sellAmount: nfd.sellAmount ? BigInt(nfd.sellAmount) : undefined,\n      state: nfd.state || 'unknown',\n      authorized,\n      authorizationError,\n    }\n  }\n\n  /**\n   * Claim an NFD that is reserved for the caller\n   * @param nameOrAppId - The NFD name or application ID to claim\n   * @returns The claimed NFD record\n   * @throws If the claim operation fails\n   */\n  public async claim(nameOrAppId: string | number | bigint): Promise<Nfd> {\n    // Ensure a signer is set\n    const signer = this.requireSigner()\n\n    const claimer = signer.addr.toString()\n\n    // Validate claimer address\n    this.validateAddress(claimer, 'claimer')\n\n    // Get purchase quote to validate eligibility\n    const quote = await this.getPurchaseQuote(nameOrAppId, claimer)\n\n    if (!quote.canClaim) {\n      throw new Error(\n        quote.authorizationError ||\n          `Cannot claim NFD: ${quote.nfdName} (state: ${quote.state})`,\n      )\n    }\n\n    if (!quote.authorized) {\n      throw new Error(\n        quote.authorizationError ||\n          `Not authorized to claim NFD: ${quote.nfdName}`,\n      )\n    }\n\n    // Resolve NFD to get app ID\n    const nfd = await this.client.resolve(nameOrAppId, { view: 'full' })\n    if (!nfd.appID) {\n      throw new Error(`Cannot determine app ID for NFD: ${nfd.name}`)\n    }\n\n    // Get the NFD instance client\n    const nfdInstanceClient = this.getInstanceClient(BigInt(nfd.appID), claimer)\n\n    try {\n      // Create payment transaction with calculated claim amount\n      const paymentTxn = await this.algorand.createTransaction.payment({\n        sender: claimer,\n        receiver: nfdInstanceClient.appAddress,\n        amount: AlgoAmount.MicroAlgos(quote.price),\n      })\n\n      // Execute the purchase (claim) transaction using transaction group pattern\n      await nfdInstanceClient\n        .newGroup()\n        .purchase({\n          args: { payment: paymentTxn },\n          staticFee: AlgoAmount.MicroAlgos(9000), // 0.009 ALGO\n        })\n        .send({ populateAppCallResources: true })\n\n      // Return the updated NFD record\n      return this.client.resolve(nfd.appID, { view: 'full' })\n    } catch (error) {\n      throw new Error(`Failed to claim NFD: ${parseTransactionError(error)}`)\n    }\n  }\n\n  /**\n   * Buy an NFD from the secondary market\n   * @param nameOrAppId - The NFD name or application ID to buy\n   * @returns The purchased NFD record\n   * @throws If the buy operation fails\n   */\n  public async buy(nameOrAppId: string | number | bigint): Promise<Nfd> {\n    // Ensure a signer is set\n    const signer = this.requireSigner()\n\n    const buyer = signer.addr.toString()\n\n    // Validate buyer address\n    this.validateAddress(buyer, 'buyer')\n\n    // Get purchase quote to validate eligibility and get pricing\n    const quote = await this.getPurchaseQuote(nameOrAppId, buyer)\n\n    if (!quote.canBuy) {\n      throw new Error(\n        quote.authorizationError ||\n          `Cannot buy NFD: ${quote.nfdName} (state: ${quote.state})`,\n      )\n    }\n\n    if (!quote.authorized) {\n      throw new Error(\n        quote.authorizationError ||\n          `Not authorized to buy NFD: ${quote.nfdName}`,\n      )\n    }\n\n    // Resolve NFD to get app ID\n    const nfd = await this.client.resolve(nameOrAppId, { view: 'full' })\n    if (!nfd.appID) {\n      throw new Error(`Cannot determine app ID for NFD: ${nfd.name}`)\n    }\n\n    // Get the NFD instance client\n    const nfdInstanceClient = this.getInstanceClient(BigInt(nfd.appID), buyer)\n\n    try {\n      // Create payment transaction for the purchase amount\n      const paymentTxn = await this.algorand.createTransaction.payment({\n        sender: buyer,\n        receiver: nfdInstanceClient.appAddress,\n        amount: AlgoAmount.MicroAlgos(quote.price),\n      })\n\n      // Execute the purchase transaction using transaction group pattern\n      await nfdInstanceClient\n        .newGroup()\n        .purchase({\n          args: { payment: paymentTxn },\n          staticFee: AlgoAmount.MicroAlgos(9000), // 0.009 ALGO\n        })\n        .send({ populateAppCallResources: true })\n\n      // Return the updated NFD record\n      return this.client.resolve(nfd.appID, { view: 'full' })\n    } catch (error) {\n      throw new Error(`Failed to buy NFD: ${parseTransactionError(error)}`)\n    }\n  }\n\n  /**\n   * Check if an NFD can be claimed by a specific address\n   * @param nameOrAppId - The NFD name or application ID\n   * @param claimer - The address to check claim eligibility for\n   * @returns True if the NFD can be claimed, false otherwise\n   */\n  public async canClaim(\n    nameOrAppId: string | number | bigint,\n    claimer: string,\n  ): Promise<boolean> {\n    try {\n      const quote = await this.getPurchaseQuote(nameOrAppId, claimer)\n      return quote.canClaim && quote.authorized\n    } catch {\n      return false\n    }\n  }\n\n  /**\n   * Check if an NFD can be bought by a specific address\n   * @param nameOrAppId - The NFD name or application ID\n   * @param buyer - The address to check buy eligibility for\n   * @returns True if the NFD can be bought, false otherwise\n   */\n  public async canBuy(\n    nameOrAppId: string | number | bigint,\n    buyer: string,\n  ): Promise<boolean> {\n    try {\n      const quote = await this.getPurchaseQuote(nameOrAppId, buyer)\n      return quote.canBuy && quote.authorized\n    } catch {\n      return false\n    }\n  }\n\n  /**\n   * Make an offer to purchase an NFD from its owner\n   * @param nameOrAppId - The NFD name or application ID to make an offer on\n   * @param amount - The offer amount in microAlgos\n   * @param note - Optional note to the owner\n   * @returns The NFD record\n   * @throws If the offer fails\n   */\n  public async makeOffer(\n    nameOrAppId: string | number | bigint,\n    amount: bigint | number,\n    note: string = '',\n  ): Promise<Nfd> {\n    const signer = this.requireSigner()\n    const offer = toAmount(amount, 'Offer amount')\n\n    // Only the app ID is needed to post the offer, so this takes a single\n    // registry box read rather than a full resolve\n    const nfdAppId = await this.parseAppId(nameOrAppId)\n    const nfdInstanceClient = this.getInstanceClient(nfdAppId, signer.addr)\n\n    try {\n      await nfdInstanceClient\n        .newGroup()\n        .postOffer({\n          args: {\n            offer,\n            note,\n          },\n          staticFee: AlgoAmount.MicroAlgos(APP_CALL_STATIC_FEE),\n        })\n        .send({ populateAppCallResources: true })\n    } catch (error) {\n      throw new Error(`Failed to make offer: ${parseTransactionError(error)}`)\n    }\n\n    return this.client.resolve(nfdAppId, { view: 'full' })\n  }\n}\n","import { AlgorandClient } from '@algorandfoundation/algokit-utils'\nimport { TransactionSignerAccount } from '@algorandfoundation/algokit-utils/types/account'\nimport { Address, TransactionSigner } from 'algosdk'\n\nimport { NfdApiClient } from './api-client'\nimport { NfdRegistryId } from './constants'\nimport { LookupModule } from './modules/lookup'\nimport { NfdManager } from './modules/manager'\nimport { MetadataModule } from './modules/metadata'\nimport {\n  MintingModule,\n  NfdMintParams,\n  NfdMintQuote,\n  NfdMintQuoteParams,\n} from './modules/minting'\nimport { NfdPurchaseQuote, PurchasingModule } from './modules/purchasing'\n\nimport type {\n  Nfd,\n  NfdImageResult,\n  ResolveOptions,\n  ReverseLookupOptions,\n  SearchOptions,\n  SearchResponse,\n  SuggestOptions,\n  VerifyConfirmResult,\n  VerifyField,\n  VerifyRequestResult,\n} from './types'\n\n/**\n * Configuration options for the NFD client\n */\nexport interface NfdClientConfig {\n  /**\n   * An existing AlgorandClient instance\n   */\n  algorand?: AlgorandClient\n  /**\n   * The application ID of the NFD registry\n   */\n  registryId?: number | bigint\n}\n\n/**\n * Client for interacting with NFDs (Non-Fungible Domains) through the smart contracts and the API\n */\nexport class NfdClient {\n  private readonly _algorand: AlgorandClient\n  private readonly _registryId: bigint\n  private readonly _api: NfdApiClient\n\n  // Core modules\n  private readonly _lookup: LookupModule\n  private readonly _metadata: MetadataModule\n  private readonly _minting: MintingModule\n  private readonly _purchasing: PurchasingModule\n\n  private _signer: TransactionSignerAccount | null = null\n\n  constructor(config: NfdClientConfig = {}) {\n    this._algorand = config.algorand ?? AlgorandClient.mainNet()\n    this._registryId = BigInt(config.registryId ?? NfdRegistryId.MAINNET)\n    this._api = new NfdApiClient(this._registryId)\n\n    // Initialize modules\n    this._lookup = new LookupModule(this)\n    this._metadata = new MetadataModule(this)\n    this._minting = new MintingModule(this)\n    this._purchasing = new PurchasingModule(this)\n  }\n\n  /**\n   * Create a new NfdClient instance configured for MainNet\n   * @returns A new NfdClient instance\n   */\n  public static mainNet(): NfdClient {\n    return new NfdClient({\n      algorand: AlgorandClient.mainNet(),\n      registryId: NfdRegistryId.MAINNET,\n    })\n  }\n\n  /**\n   * Create a new NfdClient instance configured for TestNet\n   * @returns A new NfdClient instance\n   */\n  public static testNet(): NfdClient {\n    return new NfdClient({\n      algorand: AlgorandClient.testNet(),\n      registryId: NfdRegistryId.TESTNET,\n    })\n  }\n\n  /**\n   * Get the AlgorandClient instance\n   * @returns The AlgorandClient instance\n   */\n  public get algorand(): AlgorandClient {\n    return this._algorand\n  }\n\n  /**\n   * Get the registry ID\n   * @returns The registry ID\n   */\n  public get registryId(): bigint {\n    return this._registryId\n  }\n\n  /**\n   * Get the API client for interacting with the NFD API\n   */\n  public get api(): NfdApiClient {\n    return this._api\n  }\n\n  /**\n   * Get the current signer\n   * @returns The current signer or null if not set\n   */\n  public get signer(): TransactionSignerAccount | null {\n    return this._signer\n  }\n\n  /**\n   * Tracks the given signer against the given sender for later signing.\n   * @param sender - The sender address to use this signer for\n   * @param signer - The signer to sign transactions with for the given sender\n   * @returns The `NfdClient` instance so method calls can be chained\n   */\n  public setSigner(\n    sender: string | Address,\n    signer: TransactionSigner,\n  ): NfdClient {\n    this._algorand.setSigner(sender, signer)\n    const addr =\n      typeof sender === 'string' ? Address.fromString(sender) : sender\n    this._signer = { addr, signer }\n    return this\n  }\n\n  /**\n   * Create a manager for a specific NFD\n   * @param nameOrAppId - The NFD name or application ID to manage\n   * @returns An NFD manager instance\n   */\n  public manage(nameOrAppId: string | number | bigint): NfdManager {\n    return new NfdManager(this, nameOrAppId)\n  }\n\n  /**\n   * Get access to purchasing and claiming functionality\n   * @returns A purchasing module instance\n   */\n  public purchasing(): PurchasingModule {\n    return new PurchasingModule(this)\n  }\n\n  /**\n   * Resolve an NFD by name or application ID by reading directly from the blockchain\n   * @param nameOrAppId - The NFD name or application ID to resolve\n   * @param options - Optional parameters\n   * @returns The NFD record\n   * @throws If the NFD name is invalid or not found\n   */\n  public async resolve(\n    nameOrAppId: string | number | bigint,\n    options: ResolveOptions = {},\n  ): Promise<Nfd> {\n    return this._lookup.resolve(nameOrAppId, options)\n  }\n\n  /**\n   * Get a price quote for minting an NFD\n   * @param nfdName - The name of the NFD to get a quote for\n   * @param params - Parameters for the quote\n   * @returns A detailed price quote including base price, fees, and total\n   * @throws If the quote cannot be generated\n   */\n  public async getMintQuote(\n    nfdName: string,\n    params: NfdMintQuoteParams,\n  ): Promise<NfdMintQuote> {\n    return this._minting.getMintQuote(nfdName, params)\n  }\n\n  /**\n   * Mint a new NFD\n   * @param nfdName - The name of the NFD to mint\n   * @param params - Configuration options for minting\n   * @returns The minted NFD record\n   * @throws If the mint operation fails\n   */\n  public async mint(nfdName: string, params: NfdMintParams): Promise<Nfd> {\n    try {\n      return await this._minting.mint(nfdName, params)\n    } finally {\n      // Reset signer after operation\n      this._signer = null\n    }\n  }\n\n  /**\n   * Get a quote for purchasing an NFD\n   * @param nameOrAppId - The NFD name or application ID to get a quote for\n   * @returns A detailed purchase quote including price and eligibility\n   * @throws If the quote cannot be generated or signer is not set\n   */\n  public async getPurchaseQuote(\n    nameOrAppId: string | number | bigint,\n  ): Promise<NfdPurchaseQuote> {\n    if (!this._signer) {\n      throw new Error('Signer must be set before getting purchase quote')\n    }\n\n    return this._purchasing.getPurchaseQuote(\n      nameOrAppId,\n      this._signer.addr.toString(),\n    )\n  }\n\n  /**\n   * Claim an NFD that is reserved for the claimer\n   * @param nameOrAppId - The NFD name or application ID to claim\n   * @returns The claimed NFD record\n   * @throws If the claim operation fails or signer is not set\n   */\n  public async claim(nameOrAppId: string | number | bigint): Promise<Nfd> {\n    if (!this._signer) {\n      throw new Error('Signer must be set before claiming NFD')\n    }\n\n    try {\n      return await this._purchasing.claim(nameOrAppId)\n    } finally {\n      // Reset signer after operation\n      this._signer = null\n    }\n  }\n\n  /**\n   * Buy an NFD from the secondary market\n   * @param nameOrAppId - The NFD name or application ID to buy\n   * @returns The purchased NFD record\n   * @throws If the buy operation fails or signer is not set\n   */\n  public async buy(nameOrAppId: string | number | bigint): Promise<Nfd> {\n    if (!this._signer) {\n      throw new Error('Signer must be set before buying NFD')\n    }\n\n    try {\n      return await this._purchasing.buy(nameOrAppId)\n    } finally {\n      // Reset signer after operation\n      this._signer = null\n    }\n  }\n\n  /**\n   * Resolve an address to find its associated NFD\n   * @param address - The address to resolve\n   * @param options - Options for the lookup\n   * @returns The NFD associated with the address, or null if not found\n   */\n  public async resolveAddress(\n    address: string | Address,\n    options: ReverseLookupOptions = {},\n  ): Promise<Nfd | null> {\n    const addressStr =\n      typeof address === 'string' ? address : address.toString()\n\n    const result = await this.api.reverseLookup([addressStr], options)\n    const nfd = result[addressStr]\n\n    if (!nfd) {\n      return null\n    }\n\n    return nfd\n  }\n\n  /**\n   * Resolve multiple addresses to find their associated NFDs\n   * @param addresses - Array of addresses to resolve\n   * @param options - Options for the lookup\n   * @returns Record mapping addresses to their associated NFD (one per address)\n   */\n  public async resolveAddresses(\n    addresses: Array<string | Address>,\n    options: ReverseLookupOptions = {},\n  ): Promise<Record<string, Nfd>> {\n    const addressStrings = addresses.map((addr) =>\n      typeof addr === 'string' ? addr : addr.toString(),\n    )\n\n    return this.api.reverseLookup(addressStrings, options)\n  }\n\n  /**\n   * Search for all NFDs owned by a specific wallet address\n   * @param address - The wallet address to search for\n   * @param options - Additional search options to apply\n   * @returns Search response containing owned NFDs\n   * @remarks\n   * By default, this method returns up to 20 results. You can override this by\n   * specifying a different limit in the options parameter.\n   */\n  public async searchByOwner(\n    address: string | Address,\n    options: Omit<SearchOptions, 'owner' | 'state'> = {},\n  ): Promise<SearchResponse> {\n    const addressStr =\n      typeof address === 'string' ? address : address.toString()\n    return this.api.search({\n      limit: 20,\n      ...options,\n      owner: addressStr,\n      state: ['owned'],\n    })\n  }\n\n  /**\n   * Search for all NFDs that are currently for sale\n   * @param options - Additional search options to apply\n   * @returns Search response containing NFDs for sale\n   * @remarks\n   * By default, this method returns up to 20 results. You can override this by\n   * specifying a different limit in the options parameter.\n   */\n  public async searchForSale(\n    options: Omit<SearchOptions, 'state'> = {},\n  ): Promise<SearchResponse> {\n    return this.api.search({\n      limit: 20,\n      ...options,\n      state: ['forSale'],\n    })\n  }\n\n  /**\n   * Get the avatar image information for an NFD\n   * @param nameOrAppId - The NFD name or application ID\n   * @returns The avatar image result with raw value, HTTPS URL, verification status, and ASA ID\n   * @remarks The URL will always be provided - either the actual avatar or a default fallback image\n   */\n  public async getAvatarImage(\n    nameOrAppId: string | number | bigint,\n  ): Promise<NfdImageResult>\n\n  /**\n   * Get the avatar image information for an NFD\n   * @param nfd - The NFD data object (for optimized parsing without additional resolve)\n   * @returns The avatar image result with raw value, HTTPS URL, verification status, and ASA ID\n   * @remarks The URL will always be provided - either the actual avatar or a default fallback image\n   */\n  public async getAvatarImage(nfd: Nfd): Promise<NfdImageResult>\n\n  /**\n   * Get the avatar image information for an NFD\n   * @param input - Either NFD name/application ID or NFD data object\n   * @returns The avatar image result with raw value, HTTPS URL, verification status, and ASA ID\n   */\n  public async getAvatarImage(\n    input: string | number | bigint | Nfd,\n  ): Promise<NfdImageResult> {\n    if (this._metadata.isNfdObject(input)) {\n      return this._metadata.getAvatarImage(input)\n    } else {\n      return this._metadata.getAvatarImage(input)\n    }\n  }\n\n  /**\n   * Get the banner image information for an NFD\n   * @param nameOrAppId - The NFD name or application ID\n   * @returns The banner image result with raw value, HTTPS URL, verification status, and ASA ID\n   */\n  public async getBannerImage(\n    nameOrAppId: string | number | bigint,\n  ): Promise<NfdImageResult>\n\n  /**\n   * Get the banner image information for an NFD\n   * @param nfd - The NFD data object (for optimized parsing without additional resolve)\n   * @returns The banner image result with raw value, HTTPS URL, verification status, and ASA ID\n   */\n  public async getBannerImage(nfd: Nfd): Promise<NfdImageResult>\n\n  /**\n   * Get the banner image information for an NFD\n   * @param input - Either NFD name/application ID or NFD data object\n   * @returns The banner image result with raw value, HTTPS URL, verification status, and ASA ID\n   */\n  public async getBannerImage(\n    input: string | number | bigint | Nfd,\n  ): Promise<NfdImageResult> {\n    if (this._metadata.isNfdObject(input)) {\n      return this._metadata.getBannerImage(input)\n    } else {\n      return this._metadata.getBannerImage(input)\n    }\n  }\n\n  /**\n   * Get name suggestions for NFD registration\n   * @param name - The name (even partial) to search for\n   * @param options - Suggestion options including the buyer address\n   * @returns Array of suggested NFD records\n   */\n  public async suggest(name: string, options: SuggestOptions): Promise<Nfd[]> {\n    return this.api.suggest(name, options)\n  }\n\n  /**\n   * Make an offer to purchase an NFD from its owner\n   * @param nameOrAppId - The NFD name or application ID to make an offer on\n   * @param amount - The offer amount in microAlgos\n   * @param note - Optional note to the owner\n   * @returns The NFD record\n   * @throws If the offer fails or signer is not set\n   */\n  public async makeOffer(\n    nameOrAppId: string | number | bigint,\n    amount: bigint | number,\n    note: string = '',\n  ): Promise<Nfd> {\n    if (!this._signer) {\n      throw new Error('Signer must be set before making an offer')\n    }\n\n    try {\n      return await this._purchasing.makeOffer(nameOrAppId, amount, note)\n    } finally {\n      this._signer = null\n    }\n  }\n\n  /**\n   * Start a verification request for an NFD property\n   * @param name - The NFD name to verify a property for\n   * @param field - The field to verify\n   * @returns Verification request result with challenge and ID\n   * @throws If the verification request fails or signer is not set\n   */\n  public async verifyRequest(\n    name: string,\n    field: VerifyField,\n  ): Promise<VerifyRequestResult> {\n    if (!this._signer) {\n      throw new Error('Signer must be set before requesting verification')\n    }\n\n    try {\n      return await this.api.verifyRequest(\n        name,\n        this._signer.addr.toString(),\n        field,\n      )\n    } finally {\n      this._signer = null\n    }\n  }\n\n  /**\n   * Confirm a verification request\n   * @param id - The verification request ID\n   * @param challenge - The challenge value (optional depending on verification type)\n   * @returns Verification confirmation result\n   */\n  public async verifyConfirm(\n    id: string,\n    challenge?: string,\n  ): Promise<VerifyConfirmResult> {\n    return this.api.verifyConfirm(id, challenge)\n  }\n}\n"],"names":["jsonBodySerializer","body","_key","value","createSseClient","onRequest","onSseError","onSseEvent","responseTransformer","responseValidator","sseDefaultRetryDelay","sseMaxRetryAttempts","sseMaxRetryDelay","sseSleepFn","url","options","lastEventId","sleep","ms","resolve","retryDelay","attempt","signal","headers","requestInit","request","response","reader","buffer","abortHandler","done","chunks","chunk","lines","dataLines","eventName","line","parsed","data","parsedJson","rawData","error","backoff","separatorArrayExplode","style","separatorArrayNoExplode","separatorObjectExplode","serializeArrayParam","allowReserved","explode","name","joinedValues","v","separator","serializePrimitiveParam","serializeObjectParam","valueOnly","values","key","PATH_PARAM_RE","defaultPathSerializer","path","_url","matches","match","replaceValue","getUrl","baseUrl","query","querySerializer","pathUrl","search","getValidRequestBody","hasBody","getAuthToken","auth","callback","token","createQuerySerializer","parameters","args","queryParams","serializedArray","serializedObject","serializedPrimitive","getParseAs","contentType","cleanContent","_a","type","checkForExistence","_b","setAuthParams","buildUrl","mergeConfigs","a","b","config","mergeHeaders","headersEntries","entries","mergedHeaders","header","iterator","Interceptors","__publicField","id","index","fn","createInterceptors","defaultQuerySerializer","defaultHeaders","createConfig","override","createClient","_config","getConfig","setConfig","interceptors","beforeRequest","opts","resolvedOpts","throwOnError","responseStyle","_fetch","result","parseAs","emptyData","text","textError","jsonError","finalError","makeMethodFn","method","makeSseFn","init","client","nfd_getNfd","nfd_getLookup","nfd_suggest","nfd_searchV2","nfd_verifyConfirm","nfd_verifyRequest","chunkArray","array","chunkSize","i","NfdApiClient","registryId","NfdRegistryId","NfdApiBaseUrl","apiClient","nameOrId","params","addresses","validAddresses","addr","addressChunks","responses","mergedResults","address","nfd","errorMessage","sender","field","challenge","flag","now","minutes","seconds","Arc56Method","algosdk","arg","getABITupleTypeFromABIStructDefinition","struct","structs","getABIStructFromABITuple","decodedABITuple","structFields","abiValue","getABITupleFromABIStruct","getABIDecodedValue","tupleValue","getABIEncodedValue","tupleType","getArc56Method","methodNameOrSignature","appSpec","m","methods","getArc56ReturnValue","returnValue","base64Js","byteLength","toByteArray","fromByteArray","lookup","revLookup","Arr","code","len","getLens","b64","validLen","placeHoldersLen","lens","_byteLength","tmp","arr","curByte","tripletToBase64","num","encodeChunk","uint8","start","end","output","extraBytes","parts","maxChunkLength","len2","ieee754","offset","isLE","mLen","nBytes","e","eLen","eMax","eBias","nBits","d","s","c","rt","base64","require$$0","require$$1","customInspectSymbol","exports","Buffer","SlowBuffer","K_MAX_LENGTH","typedArraySupport","proto","createBuffer","length","buf","encodingOrOffset","allocUnsafe","from","fromString","fromArrayView","isInstance","fromArrayBuffer","valueOf","fromObject","assertSize","size","alloc","fill","encoding","checked","string","actual","fromArrayLike","arrayView","copy","byteOffset","obj","numberIsNaN","x","y","list","pos","mustMatch","loweredCase","utf8ToBytes","base64ToBytes","slowToString","hexSlice","utf8Slice","asciiSlice","latin1Slice","base64Slice","utf16leSlice","swap","n","str","max","target","thisStart","thisEnd","thisCopy","targetCopy","bidirectionalIndexOf","val","dir","arrayIndexOf","indexSize","arrLength","valLength","read","foundIndex","found","j","hexWrite","remaining","strLen","utf8Write","blitBuffer","asciiWrite","asciiToBytes","base64Write","ucs2Write","utf16leToBytes","res","firstByte","codePoint","bytesPerSequence","secondByte","thirdByte","fourthByte","tempCodePoint","decodeCodePointsArray","MAX_ARGUMENTS_LENGTH","codePoints","ret","out","hexSliceLookupTable","bytes","newBuf","checkOffset","ext","noAssert","mul","defineBigIntMethod","validateNumber","first","last","boundsError","lo","hi","checkInt","min","maxBytes","wrtBigUInt64LE","checkIntBI","wrtBigUInt64BE","limit","sub","checkIEEE754","writeFloat","littleEndian","writeDouble","targetStart","errors","E","sym","getMessage","Base","range","input","msg","received","addNumericalSeparator","checkBounds","INVALID_BASE64_RE","base64clean","units","leadSurrogate","byteArray","src","dst","alphabet","table","i16","BufferBigIntNotDefined","AsyncEventEmitter","event","listener","wrappedListener","consoleLogger","nullLogger","message","optionalParams","UpdatableConfig","returnNullLogger","lambda","original","newConfig","Config","toNumber","UnsafeConversionError","binaryStartsWith","base","startsWith","defaultJsonValueReplacer","asJson","replacer","space","EventType","ABIMethod","arc32ToArc56","arc32Structs","hint","_","fields","actions","callConfigToActions","bareActions","getDefaultArgValue","defaultArg","_c","_e","_d","LOGIC_ERROR","LogicError","errorDetails","program","getLineForPc","stop","stack_lines","OnApplicationComplete","SourceMap","BYTE_CBLOCK","INT_CBLOCK","getConstantBlockOffset","programSize","bytecblockOffset","intcblockOffset","byte","isBytecblock","valuesRemaining","AppClient","Address","appMetadata","network","networkNames","networkIndex","appId","spec","parsedSpec","filter","names","isClearStateProgram","pcOffsetMethod","appInfo","sourceMaps","resultValue","compilation","details","approvalSourceMap","clearSourceMap","sourceMap","arc56Pc","programSourceInfo","cblocksOffset","sourceInfo","inputPc","teal","txId","appManager","deployTimeParams","updatable","deletable","approvalTemplate","compiledApproval","clearTemplate","compiledClear","defaultValue","state","compiled","readonlyParams","signer","onComplete","call","logicError","currentLine","stackWithLines","that","stateMethods","metadata","mapName","prefix","encodedKey","base64Key","boxNames","stateGetter","keyGetter","mapGetter","appState","APP_SPEC","NfdInstanceParamsFactory","NfdInstanceClient","appClientOrParams","_AppClient","composer","promiseChain","resultMappers","txn","NfdRegistryParamsFactory","NfdRegistryClient","encodedAddress","encodeAddress","BaseModule","DefaultSender","defaultSender","nfdAppId","nfdName","getNameBoxName","getAllBoxes","registryClient","boxName","appIdBytes","decodeAppIdFromNameBox","nameOrAppId","isValidName","constraints","LookupModule","instanceClient","globalState","boxes","buildNfdRecord","AlgoAmount","amount","ERROR_PATTERNS","parseTransactionError","insufficientBalancePattern","account","balance","assets","overspendPattern","triedToSpend","outsideRangePattern","round","rangeStart","rangeEnd","smartContractErrorPattern","txnId","rejectedByContractPattern","pattern","friendlyMessage","cleanedError","withErrorParsing","toAmount","label","NfdManager","box","action","fieldsAndValues","chunkField","addressToLink","nfdInstanceClient","fieldsToUpdate","strToUint8Array","curCaAlgo","eventualFields","concatUint8Arrays","updateCost","nfdNewGroup","updatePaymentTxn","regMbrCost","regPaymentTxn","linkRegAddress","addressToUnlink","newGroup","simResult","updateGroup","addressToSet","fieldName","targetAddress","price","years","maxYearsAllowed","totalPrice","paymentTxn","RENEW_STATIC_FEE","sellAmount","boxCount","reservedFor","ALGORAND_ZERO_ADDRESS","APP_CALL_STATIC_FEE","lock","usdPrice","segmentPrice","segmentPlatformCostInUsd","sendsAsset","assetsToOptIn","assetId","vaultAddress","mbrTxn","VAULT_OPT_IN_MBR","transferTxn","totalFee","VAULT_FEE_PER_ASSET","group","receiver","receiverType","receiverNfd","depositAccount","receiverAddress","primaryAsset","otherAssets","DEFAULT_AVATAR_DATA_URI","IPFS_GATEWAY_URL","checkIpfsAvailability","cid","nfdUrl","gatewayUrl","isImageContentType","imageUrl","imageCid","imageGatewayUrl","imageResponse","imageContentType","isIpfsUrl","MetadataModule","imageType","properties","verifiedImage","asaIdKey","asaId","userDefinedImage","MintingModule","segmentName","caller","parentName","extractParentName","parentNfd","canMintSegment","isSegmentName","failureMessage","priceInfo","buyer","existingAppId","isSegment","extraFee","basePrice","buyerAddr","numYears","isValidAddress","PurchasingModule","paramName","reservedForAddress","isReservedForBuyer","canClaim","canBuy","authorized","authorizationError","mintingKickoffAmount","_f","claimAmount","claimer","quote","note","offer","NfdClient","AlgorandClient","addressStr","addressStrings"],"mappings":"4WAuEaA,GAAqB,CAChC,eAAiBC,GACf,KAAK,UAAUA,EAAM,CAACC,EAAMC,IAC1B,OAAOA,GAAU,SAAWA,EAAM,WAAaA,CAAA,CAErD,ECYO,SAASC,GAAiC,CAC/C,UAAAC,EACA,WAAAC,EACA,WAAAC,EACA,oBAAAC,EACA,kBAAAC,EACA,qBAAAC,EACA,oBAAAC,EACA,iBAAAC,EACA,WAAAC,EACA,IAAAC,EACA,G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