### Hierarchy

- Instance
  - CalypsoReadInstance

## Index

### Constructors

- constructor

### Properties

- contractID
- darcID
- data
- id
- read
- rpc
- argumentPreID
- argumentRead
- contractID

### Methods

- decrypt
- toBytes
- calcInstID
- fromBytes
- fromByzcoin
- fromProof
- preToInstID
- spawn

## Constructors

### constructor

- new CalypsoReadInstance(rpc: ByzCoinRPC, inst: Instance): CalypsoReadInstance

- Overrides Instance.constructor

  - Defined in src/calypso/calypso-instance.ts:231

  #### Parameters

  - ##### rpc: ByzCoinRPC

  - ##### inst: Instance

  #### Returns CalypsoReadInstance

## Properties

### contractID

contractID: string

Inherited from Instance.contractID

- Defined in src/byzcoin/instance.ts:67

### darcID

darcID: InstanceID

Inherited from Instance.darcID

- Defined in src/byzcoin/instance.ts:68

### data

data: Buffer

Inherited from Instance.data

- Defined in src/byzcoin/instance.ts:69

### id

id: InstanceID

Inherited from Instance.id

- Defined in src/byzcoin/instance.ts:66

### read

read: Read

- Defined in src/calypso/calypso-instance.ts:231

### Private rpc

rpc: ByzCoinRPC

- Defined in src/calypso/calypso-instance.ts:233

### Static argumentPreID

argumentPreID: "preID" = "preID"

- Defined in src/calypso/calypso-instance.ts:183

### Static argumentRead

argumentRead: "read" = "read"

- Defined in src/calypso/calypso-instance.ts:182

### Static contractID

contractID: "calypsoRead" = "calypsoRead"

- Defined in src/calypso/calypso-instance.ts:181

## Methods

### decrypt

- decrypt(ocs: OnChainSecretRPC, priv: Scalar): Promise<Buffer>

- - Defined in src/calypso/calypso-instance.ts:242

  #### Parameters

  - ##### ocs: OnChainSecretRPC

  - ##### priv: Scalar

  #### Returns Promise<Buffer>

### toBytes

- toBytes(): Buffer

- Inherited from Instance.toBytes

  - Defined in src/byzcoin/instance.ts:81

  Returns a byte representation of the Instance.

  #### Returns Buffer

### Static calcInstID

- calcInstID(contractID: string, preID: Buffer): InstanceID

- Inherited from Instance.calcInstID

  - Defined in src/byzcoin/instance.ts:60

  Returns the instanceID given a contract and a preID

  #### Parameters

  - ##### contractID: string

  - ##### preID: Buffer

  #### Returns InstanceID

### Static fromBytes

- fromBytes(buf: Buffer): Instance

- Inherited from Instance.fromBytes

  - Defined in src/byzcoin/instance.ts:45

  Returns an instance from a previously toBytes() call.

  #### Parameters

  - ##### buf: Buffer

  #### Returns Instance

### Static fromByzcoin

- fromByzcoin(bc: ByzCoinRPC, iid: InstanceID, waitMatch?: number, interval?: number): Promise<CalypsoReadInstance>

- Overrides Instance.fromByzcoin

  - Defined in src/calypso/calypso-instance.ts:219

  Initializes using an existing CalypsoReadInstance from ByzCoin

  #### Parameters

  - ##### bc: ByzCoinRPC

    The RPC to use

  - ##### iid: InstanceID

    The instance ID

  - ##### Default value waitMatch: number = 0

  - ##### Default value interval: number = 1000

  #### Returns Promise<CalypsoReadInstance>

  a promise that resolves with the coin instance

### Static fromProof

- fromProof(id: InstanceID, p: Proof): Instance

- Inherited from Instance.fromProof

  - Defined in src/byzcoin/instance.ts:18

  Create an instance from a proof

  #### Parameters

  - ##### id: InstanceID

    the instance-id to extract

  - ##### p: Proof

    The proof

  #### Returns Instance

  the instance

### Static preToInstID

- preToInstID(preID: Buffer): InstanceID

- - Defined in src/calypso/calypso-instance.ts:228

  Returns the instanceID given a preID.

  #### Parameters

  - ##### preID: Buffer

  #### Returns InstanceID

### Static spawn

- spawn(bc: ByzCoinRPC, writeId: InstanceID, pub: Point, signers: Signer[], pay?: Instruction, preID?: Buffer): Promise<CalypsoReadInstance>

- - Defined in src/calypso/calypso-instance.ts:185

  #### Parameters

  - ##### bc: ByzCoinRPC

  - ##### writeId: InstanceID

  - ##### pub: Point

  - ##### signers: Signer[]

  - ##### Optional pay: Instruction

  - ##### Optional preID: Buffer

  #### Returns Promise<CalypsoReadInstance>

Generated using TypeDoc