Options
All
  • Public
  • Public/Protected
  • All
Menu

PhotoChromic

Index

Type Aliases

Address: string

Represents an ETH address

Contents: [string, string, string, string, string]

Represents KYC data. [first name, last name, email, birth date, nationality].

ContractConfig: { avatarSupportAddress: string; major: number; minor: number; versionTrackerAddress: string }

Type declaration

  • avatarSupportAddress: string
  • major: number
  • minor: number
  • versionTrackerAddress: string
KYCData: { birthDate: string; email: string; firstName: string; lastName: string; nationality: string }

A collection of the KYC data of a user.

Type declaration

  • birthDate: string
  • email: string
  • firstName: string
  • lastName: string
  • nationality: string
Label: string

An individual component of a name, such as john.

Name: string

An ENS identifier such as john.photochromic.eth. Names may consist of multiple parts, called labels, separated by dots.

Node: string

A cryptographic hash uniquely identifying a name.

PhotoChromicRecord: { contents: Contents; ipfsHash: string; livenessTime: number; sig: Signature; userId: string }

Describes signed KYC data used to mint an identity.

Type declaration

  • contents: Contents
  • ipfsHash: string
  • livenessTime: number
  • sig: Signature
  • userId: string
Profile: { info: BigNumber; name: string; price: BigNumber }

Represents the (price) profile selected during the creation of a PhotoChromic identity.

Type declaration

  • info: BigNumber
  • name: string
  • price: BigNumber
SignedAddrRecord: { coinType: number; sig: Signature; timestamp: number; value: string }

Describes a signed address record.

Type declaration

  • coinType: number
  • sig: Signature
  • timestamp: number
  • value: string
SignedTextRecord: { key: string; sig: Signature; timestamp: number; value: string }

Describes a signed text record.

Type declaration

  • key: string
  • sig: Signature
  • timestamp: number
  • value: string
ValidatedAddrRecord: ValidatedRecord<number, string>

A verified address record.

ValidatedRecord<K, T>: { key: K; status: VerificationStatus; timestamp: Date; value: T }

An abstract representation of any ENS record field. It includes an (optional) timestamp if the record is verified.

Type Parameters

  • K

  • T

Type declaration

ValidatedTextRecord: ValidatedRecord<string, string>

A verified text record.

ValidityDates: { expiry: Date; liveness: Date }

A set of validity dates.

Type declaration

  • expiry: Date
  • liveness: Date

Functions

  • Initialized the Contracts class with the given signer or provider.

    Parameters

    • provider: Provider

      The provider used to communicate with the contracts.

    • Optional contractConfig: ContractConfig

    Returns Promise<Contracts>

    All PhotoChromic contracts that have been initialized with the given provider.

  • Returns a new Identity instance that can be used to QUERY data on behalf of the given address.

    Parameters

    • address: string

      The address of the identity.

    • provider: Provider

      The provider used to communicate with the contracts, does not need to match the address.

    • Optional contractConfig: ContractConfig

    Returns Promise<Identity>

    An initialed Identity class that uses the given address under the hood.

  • Returns a new IdentitySigner instance that can be used to UPDATE data on behalf of the given signer.

    Parameters

    • signer: Signer

      The signer used to communicate with the contracts.

    • Optional contractConfig: ContractConfig

    Returns Promise<IdentitySigner>

    An initialed IdentitySigner class that uses the given signer under the hood.

Generated using TypeDoc