Skip to content

Latest commit

 

History

History
648 lines (406 loc) · 15.1 KB

globals.md

File metadata and controls

648 lines (406 loc) · 15.1 KB

iam-client-lib

iam-client-lib

Index

Enumerations

Classes

Interfaces

Type aliases

Variables

Functions

Object literals

Type aliases

ConnectionOptions

Ƭ ConnectionOptions: { bridgeUrl?: undefined | string ; ewKeyManagerUrl?: undefined | string ; infuraId?: undefined | string ; ipfsUrl?: undefined | string ; privateKey?: undefined | string ; rpcUrl?: undefined | string }

Type declaration:

Name Type Description
bridgeUrl? undefined | string -
ewKeyManagerUrl? undefined | string -
infuraId? undefined | string -
ipfsUrl? undefined | string -
privateKey? undefined | string -
rpcUrl? undefined | string only required in node env

EncodedCall

Ƭ EncodedCall: { data: string ; to: string ; value?: undefined | string }

Type declaration:

Name Type
data string
to string
value? undefined | string

InitializeData

Ƭ InitializeData: { connected: boolean ; did: string | undefined ; didDocument: IDIDDocument | null ; identityToken?: undefined | string ; realtimeExchangeConnected: boolean ; userClosedModal: boolean }

Type declaration:

Name Type
connected boolean
did string | undefined
didDocument IDIDDocument | null
identityToken? undefined | string
realtimeExchangeConnected boolean
userClosedModal boolean

Service

Ƭ Service: { org: string ; pool: string ; provider: string }

Type declaration:

Name Type Description
org string organization ENS name
pool string pool address
provider string provider address

Stake

Ƭ Stake: { amount: BigNumber ; depositEnd: BigNumber ; depositStart: BigNumber ; status: StakeStatus }

Type declaration:

Name Type
amount BigNumber
depositEnd BigNumber
depositStart BigNumber
status StakeStatus

Transaction

Ƭ Transaction: { calls: EncodedCall[] ; from: string }

Type declaration:

Name Type
calls EncodedCall[]
from string

Variables

BASE_TRANSACTION_SPEED

Const BASE_TRANSACTION_SPEED: 10 = 10


BigNumber

BigNumber: BigNumber


JsonRpcProvider

JsonRpcProvider: JsonRpcProvider


NATS_EXCHANGE_TOPIC

Const NATS_EXCHANGE_TOPIC: "claim.exchange" = "claim.exchange"


NODE_FIELDS_KEY

Const NODE_FIELDS_KEY: "metadata" = "metadata"


PUBLIC_KEY

Const PUBLIC_KEY: "PublicKey" = "PublicKey"


VOLTA_CHAIN_ID

Const VOLTA_CHAIN_ID: 73799 = 73799


WALLET_PROVIDER

Const WALLET_PROVIDER: "WalletProvider" = "WalletProvider"


abi1056

abi1056: ({ anonymous?: undefined ; constant: boolean ; inputs: { name: string ; type: string }[] ; name: string ; outputs: { name: string ; type: string }[] ; payable: boolean ; stateMutability: string ; type: string } | { anonymous: boolean ; constant?: undefined ; inputs: { indexed: boolean ; name: string ; type: string }[] ; name: string ; outputs?: undefined ; payable?: undefined ; stateMutability?: undefined ; type: string })[]


agreement_type_hash

Const agreement_type_hash: string = utils.id("Agreement(address subject,bytes32 role,uint256 version)")


arrayify

arrayify: arrayify


bigNumberify

bigNumberify: bigNumberify


computeAddress

computeAddress: computeAddress


computePublicKey

computePublicKey: computePublicKey


defaultAbiCoder

defaultAbiCoder: AbiCoder


defaultClaimExpiry

Const defaultClaimExpiry: number = Number.MAX_SAFE_INTEGER


emptyAddress

Const emptyAddress: "0x0000000000000000000000000000000000000000" = "0x0000000000000000000000000000000000000000"


erc712_type_hash

Const erc712_type_hash: string = utils.id("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)")


getAddress

getAddress: getAddress


hashMessage

hashMessage: hashMessage


hexlify

hexlify: hexlify


id

id: id


keccak256

keccak256: keccak256


owners

Const owners: Record<string, string>


proof_type_hash

Const proof_type_hash: string = utils.id("Proof(address subject,bytes32 role,uint256 version,uint256 expiry,address issuer)")


recoverPublicKey

recoverPublicKey: recoverPublicKey


sha3

Const sha3: any = require("js-sha3").keccak_256


solidityKeccak256

solidityKeccak256: keccak256


typedMsgPrefix

Const typedMsgPrefix: "1901" = "1901"


validators

Const validators: Map<Methods, (did: string) => boolean> = new Map<Methods, (did: string) => boolean>()

Functions

addSupportedDID

addSupportedDID(method: Methods, validator: (did: string) => boolean): void

Parameters:

Name Type
method Methods
validator (did: string) => boolean

Returns: void


canonizeSig

canonizeSig(sig: string): string

Parameters:

Name Type
sig string

Returns: string


changeResolver

changeResolver(__namedParameters: { domainHierarchy: DomainHierarchy ; newResolverAddr: string ; privateKey: string ; registryAddr: string ; resolverAddr: string ; rootNode: string ; rpcUrl: string }): Promise<void>

description - Updates resolver on all subnodes of parentNode

Parameters:

Name Type
__namedParameters { domainHierarchy: DomainHierarchy ; newResolverAddr: string ; privateKey: string ; registryAddr: string ; resolverAddr: string ; rootNode: string ; rpcUrl: string }

Returns: Promise<void>


decodeLabelhash

decodeLabelhash(hash: string): string

Parameters:

Name Type
hash string

Returns: string


getPublicKeyAndIdentityToken

getPublicKeyAndIdentityToken(signer: Signer): Promise<IPubKeyAndIdentityToken>

Parameters:

Name Type
signer Signer

Returns: Promise<IPubKeyAndIdentityToken>


isBrowser

ConstisBrowser(): boolean

Returns: boolean


isEncodedLabelhash

isEncodedLabelhash(hash: string): boolean

Parameters:

Name Type
hash string

Returns: boolean


isValidDID

isValidDID(did: string): boolean

Parameters:

Name Type
did string

Returns: boolean


labelhash

labelhash(unnormalizedLabelOrLabelhash: string): string

Parameters:

Name Type
unnormalizedLabelOrLabelhash string

Returns: string


namehash

namehash(inputName: string): string

Parameters:

Name Type
inputName string

Returns: string


parseDID

parseDID(did: string): string

Parameters:

Name Type
did string

Returns: string


setCacheClientOptions

ConstsetCacheClientOptions(chainId: number, options: Partial<CacheServerClientOptions>): void

Used to override existing cache server configuration or add a missing one Configuration must be set before constructing IAM

Parameters:

Name Type
chainId number
options Partial<CacheServerClientOptions>

Returns: void


setChainConfig

ConstsetChainConfig(chainId: number, config: Partial<ChainConfig>): void

Used to override existing chain configuration or add a missing one Configuration must be set before constructing IAM

Parameters:

Name Type
chainId number
config Partial<ChainConfig>

Returns: void


setMessagingOptions

ConstsetMessagingOptions(chainId: number, options: Partial<MessagingOptions>): void

Used to override existing messaging configuration or add a missing one Configuration must be set before constructing IAM

Parameters:

Name Type
chainId number
options Partial<MessagingOptions>

Returns: void


supportedDIDMethods

supportedDIDMethods(): Methods[]

Returns: Methods[]

Object literals

cacheServerClientOptions

Const cacheServerClientOptions: object

Properties:

Name Type Value
[VOLTA_CHAIN_ID] object { cacheServerSupportsAuth: true = true; url: string = "https://volta-identitycache.energyweb.org/" }

chainConfigs

Const chainConfigs: object

Set of parameters to configure connection to chain with id received from wallet. If configuration for some chain is missing or should be reconfigured use setChainConfig before class instantiation

Properties:

Name Type Value
[VOLTA_CHAIN_ID] object { assetManagerAddress: string = VOLTA_IDENTITY_MANAGER_ADDRESS; claimManagerAddress: string = VOLTA_CLAIM_MANAGER_ADDRESS; didContractAddress: string = VoltaAddress1056; domainNotifierAddress: string = VOLTA_DOMAIN_NOTIFER_ADDRESS; ensPublicResolverAddress: string = VOLTA_PUBLIC_RESOLVER_ADDRESS; ensRegistryAddress: string = VOLTA_ENS_REGISTRY_ADDRESS; ensResolverAddress: string = VOLTA_RESOLVER_V1_ADDRESS; rpcUrl: string = "https://volta-rpc.energyweb.org"; stakingPoolFactoryAddress: string = VOLTA_STAKING_POOL_FACTORY_ADDRESS }

messagingOptions

Const messagingOptions: object

Properties:

Name Type Value
[VOLTA_CHAIN_ID] object { messagingMethod: Nats = MessagingMethod.Nats; natsServerUrl: string = "https://volta-identityevents.energyweb.org/" }