Blockchain Commons Uniform Resources TypeScript Library - v1.0.0-alpha.13
    Preparing search index...

    Interface UREncodable

    A type that can be encoded to a UR (Uniform Resource).

    Types implementing this interface should be able to convert themselves to CBOR data and associate that with a UR type identifier.

    class MyType implements UREncodable {
    toCBOR(): CBOR {
    // Convert to CBOR
    }

    ur(): UR {
    const cbor = this.toCBOR();
    return UR.new('mytype', cbor);
    }
    }
    interface UREncodable {
        ur(): UR;
        urString(): string;
    }

    Hierarchy (View Summary)

    Index

    Methods

    Methods

    • Returns the UR string representation of the object.

      Returns string