### Hierarchy

- Instance
  - CalypsoWriteInstance

## Index

### Constructors

- constructor

### Properties

- contractID
- darcID
- data
- id
- rpc
- write
- argumentDarcID
- argumentData
- argumentExtraData
- argumentPreID
- argumentWrite
- commandUpdate
- contractID

### Methods

- spawnRead
- toBytes
- update
- calcInstID
- fromBytes
- fromByzcoin
- fromProof
- preToInstID
- spawn

## Constructors

### constructor

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

- Overrides Instance.constructor

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

  #### Parameters

  - ##### rpc: ByzCoinRPC

  - ##### inst: Instance

  #### Returns CalypsoWriteInstance

## 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

### Private rpc

rpc: ByzCoinRPC

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

### write

write: Write

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

### Static argumentDarcID

argumentDarcID: "darcID" = "darcID"

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

### Static argumentData

argumentData: "data" = "data"

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

### Static argumentExtraData

argumentExtraData: "extraData" = "extraData"

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

### Static argumentPreID

argumentPreID: "preID" = "preID"

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

### Static argumentWrite

argumentWrite: "write" = "write"

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

### Static commandUpdate

commandUpdate: "update" = "update"

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

### Static contractID

contractID: "calypsoWrite" = "calypsoWrite"

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

## Methods

### spawnRead

- spawnRead(pub: Point, signers: Signer[], coin?: CoinInstance, coinSigners?: Signer[], preID?: Buffer): Promise<CalypsoReadInstance>

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

  #### Parameters

  - ##### pub: Point

  - ##### signers: Signer[]

  - ##### Optional coin: CoinInstance

  - ##### Optional coinSigners: Signer[]

  - ##### Optional preID: Buffer

  #### Returns Promise<CalypsoReadInstance>

### toBytes

- toBytes(): Buffer

- Inherited from Instance.toBytes

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

  Returns a byte representation of the Instance.

  #### Returns Buffer

### update

- update(u: object): Promise<AddTxResponse>

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

  Update sends an update command to an existing CalypsoWriteInstance and changes the data and/or the extraData field of the Write structure. If neither data, nor extraData is given, it returns without sending a transaction to byzcoin.

  #### Parameters

  - ##### u: object

    a structure holding the data and/or extraData to be updated.

    - ##### Optional data?: Buffer

    - ##### Optional extraData?: Buffer

  #### Returns Promise<AddTxResponse>

### 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<CalypsoWriteInstance>

- Overrides Instance.fromByzcoin

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

  Initializes using an existing coinInstance 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<CalypsoWriteInstance>

  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:129

  Returns the instanceID given a preID.

  #### Parameters

  - ##### preID: Buffer

  #### Returns InstanceID

### Static spawn

- spawn(bc: ByzCoinRPC, darcID: InstanceID, write: Write, signers: Signer[], preID?: Buffer): Promise<CalypsoWriteInstance>

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

  Spawn a calypsoWrite instance

  #### Parameters

  - ##### bc: ByzCoinRPC

    The RPC to use

  - ##### darcID: InstanceID

    The darc instance ID

  - ##### write: Write

    The write structure containing the encrypted secret

  - ##### signers: Signer[]

    The list of signers for the transaction

  - ##### Optional preID: Buffer

    used to calculate the ID of the write instance

  #### Returns Promise<CalypsoWriteInstance>

  a promise that resolves with the new instance

Generated using TypeDoc