Skip to content

Latest commit

 

History

History
2984 lines (1225 loc) · 30.8 KB

client.md

File metadata and controls

2984 lines (1225 loc) · 30.8 KB

Home > @holochain/client

client package

Classes

Class

Description

AdminWebsocket

A class for interacting with a conductor's Admin API.

AppWebsocket

A class to establish a websocket connection to an App interface, for a specific agent and app.

CloneId

Identifier of a clone cell, composed of the DNA's role id and the index of the clone, starting at 0.

Example: profiles.0

HolochainError

Error thrown when response from Holochain is an error.

WsClient

A WebSocket client which can make requests and receive responses, as well as send and receive signals.

Uses Holochain's WireMessage for communication.

Enumerations

Enumeration

Description

ActionType

AppStatusFilter

CellProvisioningStrategy

CellType

ChainOpType

CountersigningSessionStateType

GrantedFunctionsType

ResolutionRequiredReason

The reason why a countersigning session can not be resolved automatically and requires manual resolution.

SessionCompletionDecisionType

Decision about an incomplete countersigning session.

Functions

Function

Description

decodeHashFromBase64(hash)

Decodes a Base64 encoded string to a byte array hash.

dhtLocationFrom32(hashCore)

Generate DHT location (last 4 bytes) from a core hash (middle 32 bytes).

From https://github.com/holochain/holochain/blob/develop/crates/holo\_hash/src/hash\_type/primitive.rs

encodeHashToBase64(hash)

Encode a byte array hash to a Base64 string.

fakeActionHash(coreByte)

Generate a valid hash of a non-existing action.

fakeAgentPubKey(coreByte)

Generate a valid agent key of a non-existing agent.

fakeDnaHash(coreByte)

Generate a valid hash of a non-existing DNA.

fakeEntryHash(coreByte)

Generate a valid hash of a non-existing entry.

From https://github.com/holochain/holochain/blob/develop/crates/holo\_hash/src/hash\_type/primitive.rs

generateSigningKeyPair(agentPubKey)

Generates a key pair for signing zome calls.

getBaseRoleNameFromCloneId(roleName)

Parse a clone id and get the role name part of it.

getChainOpAction(op)

getChainOpEntry(op)

getChainOpSignature(op)

getChainOpType(op)

getNonceExpiration()

getSigningCredentials(cellId)

Get credentials for signing zome calls.

hashFrom32AndType(hashCore, hashType)

Generate full hash from a core hash (middle 32 bytes) and hash type label.

From https://github.com/holochain/holochain/blob/develop/crates/holo\_hash/src/hash\_type/primitive.rs

isCloneId(roleName)

Check if a cell's role name is a valid clone id.

isSameCell(cellId1, cellId2)

Check if two cell ids are identical.

randomByteArray(length)

randomCapSecret()

randomNonce()

setSigningCredentials(cellId, credentials)

Set credentials for signing zome calls.

signZomeCall(request)

sliceCore32(hash)

Get core hash from a Holochain hash (32 bytes).

From https://github.com/holochain/holochain/blob/develop/crates/holo\_hash/src/hash\_type/primitive.rs

sliceDhtLocation(hash)

Get DHT location (last 4 bytes) from a hash.

From https://github.com/holochain/holochain/blob/develop/crates/holo\_hash/src/hash\_type/primitive.rs

sliceHashType(hash)

Get hash type (initial 3 bytes) from a hash.

From https://github.com/holochain/holochain/blob/develop/crates/holo\_hash/src/hash\_type/primitive.rs

Interfaces

Interface

Description

AdminApi

AgentInfoDump

AgentValidationPkg

AppAuthenticationRequest

AppClient

AppEvents

AppInterfaceInfo

AppWebsocketConnectionOptions

CallZomeRequestSigned

CapClaim

CellProvisioning

ClonedCell

CloseChain

CoordinatorBundle

CoordinatorManifest

CountersigningAgentState

CounterSigningSessionData

CounterSigningSessionTimes

Create

CreateBase

CreateCloneCellRequest

CreateLink

Delete

DeleteCloneCellRequest

DeleteLink

DisableCloneCellRequest

Dna

DnaStorageInfo

Duration

EntryContent

FetchPoolInfo

FullIntegrationStateDump

FullStateDump

GrantZomeCallCapabilityRequest

HoloHashed

InitZomesComplete

IssueAppAuthenticationTokenRequest

IssueAppAuthenticationTokenResponse

Link

NetworkInfo

NetworkInfoRequest

OpenChain

P2pAgentsDump

PreflightRequest

PreflightResponse

ProvisionedCell

RateWeight

RegisterAgentActivity

SessionResolutionOutcome

The outcome for a single agent who participated in a countersigning session.

[NUM_AUTHORITIES_TO_QUERY] authorities are made to agent activity authorities for each agent, and the decisions are collected into [SessionResolutionOutcome::decisions].

SessionResolutionSummary

Summary of the workflow's attempts to resolve the outcome a failed countersigning session. This tracks the numbers of attempts and the outcome of the most recent attempt.

SignedAction

SignedActionHashed

SigningCredentials

SourceChainJsonDump

SourceChainJsonRecord

StemCell

StorageInfo

Update

UpdateBase

Warrant

WarrantOp

WebsocketConnectionOptions

Options for a Websocket connection.

ZomeCallCapGrant

ZomeDependency

Variables

Variable

Description

HASH_TYPE_PREFIX

Hash type labels and their 3 byte values (forming the first 3 bytes of hash).

From https://github.com/holochain/holochain/blob/develop/crates/holo\_hash/src/hash\_type/primitive.rs

Type Aliases

Type Alias

Description

AbandonCountersigningSessionStateRequest

Cell id for which the countersigning session should be abandoned.

AbandonCountersigningSessionStateResponse

Action

ActionBase

ActionHash

ActionHashAndSig

Action hash with the signature of the action at that hash

ActionHashB64

ActionHashed

AddAgentInfoRequest

AddAgentInfoResponse

AgentInfoRequest

AgentInfoResponse

AgentInfoSigned

This type is meant to be opaque

AgentPubKey

AgentPubKeyB64

AnyDhtHash

AnyDhtHashB64

AnyLinkableHash

AppAuthenticationToken

AppBundle

AppBundleSource

AppEntryDef

AppInfo

AppInfoResponse

AppManifest

AppNetworkInfoRequest

AppRoleDnaManifest

AppRoleManifest

AppSignal

AttachAppInterfaceRequest

AttachAppInterfaceResponse

CallZomeRequest

CallZomeRequestGeneric

CallZomeResponse

CallZomeResponseGeneric

CallZomeTransform

CapAccess

CapGrant

CapSecret

CellId

CellInfo

ChainIntegrityWarrant

ChainOp

CloneCellId

CoordinatorSource

CoordinatorZome

CounterSigningAgents

CountersigningSessionState

CreateCloneCellResponse

DeactivationReason

DeleteCloneCellResponse

DhtOp

DisableAppRequest

DisableAppResponse

DisableCloneCellResponse

DisabledAppReason

DnaBundle

DnaDefinition

DnaHash

DnaHashB64

DnaManifest

DnaModifiers

DnaModifiersOpt

DnaProperties

DnaSource

DnaStorageBlob

DnaVersionFlexible

DnaVersionSpec

DumpFullStateRequest

DumpFullStateResponse

DumpNetworkStatsRequest

DumpNetworkStatsResponse

DumpStateRequest

DumpStateResponse

EnableAppRequest

EnableAppResponse

EnableCloneCellRequest

EnableCloneCellResponse

EnableRequest

EnableResponse

EncodedAppSignal

Entry

EntryHash

EntryHashB64

EntryType

EntryVisibility

ExternalHash

FunctionName

GenerateAgentPubKeyRequest

GenerateAgentPubKeyResponse

GetCompatibleCellsRequest

GetCompatibleCellsResponse

GetCountersigningSessionStateRequest

Cell id for which the countersigning session state is requested.

GetCountersigningSessionStateResponse

GetDnaDefinitionRequest

GetDnaDefinitionResponse

GrantedFunctions

GrantZomeCallCapabilityResponse

HoloHash

HoloHashB64

InstallAppDnaPayload

InstallAppRequest

InstallAppResponse

InstalledAppId

InstalledAppInfoStatus

InstalledCell

IntegrityZome

KitsuneAgent

KitsuneSpace

LinkTag

LinkType

An internal link type index within the DNA, from 0 to 255.

ListActiveAppsRequest

ListActiveAppsResponse

ListAppInterfacesRequest

ListAppInterfacesResponse

ListAppsRequest

ListAppsResponse

ListCellIdsRequest

ListCellIdsResponse

ListDnasRequest

ListDnasResponse

Location_2

MembraneProof

MemproofMap

NetworkInfoResponse

NetworkSeed

NewEntryAction

Nonce256Bit

PausedAppReason

PreflightBytes

ProvideMemproofsRequest

ProvideMemproofsResponse

PublishCountersigningSessionStateRequest

Cell id for which the countersigning session should be published.

PublishCountersigningSessionStateResponse

RateBucketId

RateUnits

RawSignal

Record_2

RecordEntry

RegisterDnaRequest

RegisterDnaResponse

Requester

ResourceBytes

ResourceMap

RevokeAgentKeyRequest

RevokeAgentKeyResponse

Contains a list of errors of the cells where deletion was unsuccessful.

If the key could not be deleted from all cells, the call RevokeAgentKeyRequest can be re-attempted to delete the key from the remaining cells.

Role

RoleName

RoleNameCallZomeRequest

RoleSettings

RoleSettingsMap

SessionCompletionDecision

Signal

SignalCb

Signature

StartAppRequest

StartAppResponse

StorageInfoRequest

StorageInfoResponse

SystemSignal

Timestamp

Transformer_2

UninstallAppRequest

UninstallAppResponse

UpdateCoordinatorsRequest

UpdateCoordinatorsResponse

ValidationType

WasmCode

WasmHash

WasmHashB64

WsClientOptions

YamlProperties

Any value that is serializable to a Yaml value

ZomeDefinition

ZomeIndex

An internal zome index within the DNA, from 0 to 255.

ZomeLocation

ZomeManifest

ZomeName

Zomes