OnChainSecretRPC is used to contact the OnChainSecret service of the cothority. With it you can set up a new long-term onchain-secret, give it a policy to accept new requests, and ask for re-encryption requests.

### Hierarchy

- OnChainSecretRPC
  - LongTermSecret

## Index

### Constructors

- constructor

### Properties

- bc
- list
- socket
- serviceID

### Methods

- authorize
- authorizeRoster
- createLTS
- reencryptKey

## Constructors

### constructor

- new OnChainSecretRPC(bc: ByzCoinRPC, roster?: Roster): OnChainSecretRPC

- - Defined in src/calypso/calypso-rpc.ts:18

  #### Parameters

  - ##### bc: ByzCoinRPC

  - ##### Optional roster: Roster

  #### Returns OnChainSecretRPC

## Properties

### bc

bc: ByzCoinRPC

- Defined in src/calypso/calypso-rpc.ts:20

### Private list

list: ServerIdentity[]

- Defined in src/calypso/calypso-rpc.ts:18

### Private socket

socket: IConnection

- Defined in src/calypso/calypso-rpc.ts:17

### Static serviceID

serviceID: string = "Calypso"

- Defined in src/calypso/calypso-rpc.ts:16

## Methods

### authorize

- authorize(who: ServerIdentity, bcid: InstanceID): Promise<AuthorizeReply>

- - Defined in src/calypso/calypso-rpc.ts:56

  #### Parameters

  - ##### who: ServerIdentity

  - ##### bcid: InstanceID

  #### Returns Promise<AuthorizeReply>

### authorizeRoster

- authorizeRoster(roster?: Roster): Promise<void>

- - Defined in src/calypso/calypso-rpc.ts:68

  authorizeRoster is a convenience method that authorizes all nodes in the bc-roster to create new LTS. For this to work, the nodes must have been started with COTHORITY_ALLOW_INSECURE_ADMIN=true

  #### Parameters

  - ##### Optional roster: Roster

    if given, this roster is used instead of the bc-roster

  #### Returns Promise<void>

### createLTS

- createLTS(r: Roster, darcID: InstanceID, signers: Signer[]): Promise<CreateLTSReply>

- - Defined in src/calypso/calypso-rpc.ts:32

  #### Parameters

  - ##### r: Roster

  - ##### darcID: InstanceID

  - ##### signers: Signer[]

  #### Returns Promise<CreateLTSReply>

### reencryptKey

- reencryptKey(write: Proof, read: Proof): Promise<DecryptKeyReply>

- - Defined in src/calypso/calypso-rpc.ts:80

  #### Parameters

  - ##### write: Proof

  - ##### read: Proof

  #### Returns Promise<DecryptKeyReply>

Generated using TypeDoc