wrap-cli icon indicating copy to clipboard operation
wrap-cli copied to clipboard

add flag for resolving registered interfaces when calling getImplementations

Open Niraj-Kamdar opened this issue 2 years ago • 0 comments

Describe the bug Currently, we only have a flag to resolve URI for both calling and resgistered interfaces simultaneously but we should have them separately to give more fin-grained control to users.

Instead of:

/** Options for CoreClient's getImplementations method */
export interface GetImplementationsOptions {
  /** If true, follow redirects to resolve URIs */
  applyResolution?: boolean;

  /** Use and update an existing resolution context */
  resolutionContext?: IUriResolutionContext;
}

Do:

/** Options for CoreClient's getImplementations method */
export interface GetImplementationsOptions {
  applyResolutionToInterfaceArgument?: boolean;
  applyResolutionToRegisteredInterfaces?: boolean;

  /** Use and update an existing resolution context */
  resolutionContext?: IUriResolutionContext;
}

Example Usage: We cover the first case but not the second one:

/**
 * old -> ens
 * new -> ipfs
 */
 /**
 * old -> methodA
 * new -> methodA, methodB
 */

Here old and new are URI redirects

Niraj-Kamdar avatar Apr 12 '23 13:04 Niraj-Kamdar