Skip to content

Latest commit

 

History

History
2810 lines (1149 loc) · 27.9 KB

client.md

File metadata and controls

2810 lines (1149 loc) · 27.9 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

CapAccessType

CellProvisioningStrategy

CellType

DhtOpType

GrantedFunctionsType

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.

getDhtOpAction(op)

getDhtOpEntry(op)

getDhtOpSignature(op)

getDhtOpType(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.

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

CallZomeRequestUnsigned

CapClaim

CellProvisioning

ClonedCell

CloseChain

CoordinatorBundle

CoordinatorManifest

CountersigningAgentState

CounterSigningSessionData

CounterSigningSessionTimes

Create

CreateBase

CreateCloneCellRequest

CreateLink

Delete

DeleteCloneCellRequest

DeleteLink

DisableCloneCellRequest

Dna

DnaStorageBlob

DnaStorageInfo

Duration

EntryContent

FetchPoolInfo

FullIntegrationStateDump

FullStateDump

GrantZomeCallCapabilityRequest

HoloHashed

InitZomesComplete

IssueAppAuthenticationTokenRequest

IssueAppAuthenticationTokenResponse

Link

NetworkInfo

NetworkInfoRequest

OpenChain

P2pAgentsDump

PreflightRequest

ProvisionedCell

RateWeight

RegisterAgentActivity

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

SignalType

Type Aliases

Type Alias

Description

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

AppCallZomeRequest

AppCreateCloneCellRequest

AppDisableCloneCellRequest

AppEnableCloneCellRequest

AppEntryDef

AppInfo

AppInfoResponse

AppManifest

AppNetworkInfoRequest

AppRoleDnaManifest

AppRoleManifest

AppSignal

AppSignalCb

AttachAppInterfaceRequest

AttachAppInterfaceResponse

CallZomeRequest

CallZomeRequestGeneric

CallZomeResponse

CallZomeResponseGeneric

CallZomeTransform

CapAccess

CapGrant

CapSecret

CellId

CellInfo

ChainIntegrityWarrant

ChainOp

CoordinatorSource

CoordinatorZome

CounterSigningAgents

CreateCloneCellResponse

DeactivationReason

DeleteCloneCellResponse

DhtOp

DisableAppRequest

DisableAppResponse

DisableCloneCellResponse

DisabledAppReason

DnaBundle

DnaDefinition

DnaHash

DnaHashB64

DnaManifest

DnaModifiers

DnaProperties

DnaSource

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

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

NonProvenanceCallZomeRequest

PausedAppReason

PreflightBytes

ProvideMemproofsRequest

ProvideMemproofsResponse

RateBucketId

RateUnits

Record_2

RecordEntry

RegisterDnaRequest

RegisterDnaResponse

Requester

ResourceBytes

ResourceMap

Role

RoleName

RoleNameCallZomeRequest

RoleNameCallZomeRequestSigned

Signal

Signature

StartAppRequest

StartAppResponse

StorageInfoRequest

StorageInfoResponse

Timestamp

Transformer_2

UninstallAppRequest

UninstallAppResponse

UpdateCoordinatorsRequest

UpdateCoordinatorsResponse

ValidationType

WasmCode

WasmHash

WasmHashB64

WsClientOptions

ZomeDefinition

ZomeIndex

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

ZomeLocation

ZomeManifest

ZomeName

Zomes