Uri

class Uri(ffiUri: <Error class: unknown class>)

Uri class for working with wrap URIs.

  • wrap://ipfs/QmHASH

  • wrap://fs/directory/file.txt

  • wrap://http/https://example.com

  • wrap://ens/sub.domain.eth

Breaking down the various parts of the URI, as it applies to the URI standard:

  • wrap:// - URI Scheme: differentiates Polywrap URIs.

  • ipfs/ - URI Authority: allows the Polywrap URI resolution algorithm to determine an authoritative URI resolver.

  • sub.domain.eth - URI Path: tells the Authority where the Wrapper resides.

The primary constructor consumes an FfiUri and deallocates its memory.

Parameters

uri

a string representation of a wrap URI

Throws

FfiException

if the URI string is invalid

Constructors

Link copied to clipboard
constructor(uri: String)

Constructs a Uri instance from a wrap URI string.

constructor(ffiUri: <Error class: unknown class>)

Constructs a Uri instance from a wrap URI string.

Properties

Link copied to clipboard
val authority: <Error class: unknown class>

The authority component of the Uri

Link copied to clipboard
val path: <Error class: unknown class>

The path component of the Uri

Link copied to clipboard
val uri: <Error class: unknown class>

The string representation of the Uri

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun toString(): String