### Hierarchy

- Instance
  - PopPartyInstance

## Index

### Constructors

- constructor

### Properties

- contractID
- darcID
- data
- id
- popPartyStruct
- rpc
- tmpAttendees
- FINALIZED
- PRE_BARRIER
- SCANNING
- contractID

### Accessors

- finalStatement

### Methods

- activateBarrier
- addAttendee
- finalize
- getTmpAttendees
- mine
- removeAttendee
- toBytes
- update
- calcInstID
- fromBytes
- fromByzcoin
- fromProof
- preparePartyDarc

## Constructors

### constructor

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

- Overrides Instance.constructor

  - Defined in src/personhood/pop-party-instance.ts:72

  #### Parameters

  - ##### rpc: ByzCoinRPC

  - ##### inst: Instance

  #### Returns PopPartyInstance

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

### popPartyStruct

popPartyStruct: PopPartyStruct

- Defined in src/personhood/pop-party-instance.ts:71

### Private rpc

rpc: ByzCoinRPC

- Defined in src/personhood/pop-party-instance.ts:74

### Private tmpAttendees

tmpAttendees: Point[] = []

- Defined in src/personhood/pop-party-instance.ts:72

### Static FINALIZED

FINALIZED: 3 = 3

- Defined in src/personhood/pop-party-instance.ts:36

### Static PRE_BARRIER

PRE_BARRIER: 1 = 1

- Defined in src/personhood/pop-party-instance.ts:34

### Static SCANNING

SCANNING: 2 = 2

- Defined in src/personhood/pop-party-instance.ts:35

### Static contractID

contractID: "popParty" = "popParty"

- Defined in src/personhood/pop-party-instance.ts:33

## Accessors

### finalStatement

- get finalStatement(): FinalStatement

- - Defined in src/personhood/pop-party-instance.ts:23

  Getter for the final statement. It throws if the party is not finalized.

  #### Returns FinalStatement

  the final statement

## Methods

### activateBarrier

- activateBarrier(signers: Signer[]): Promise<number>

- - Defined in src/personhood/pop-party-instance.ts:129

  Start the party

  #### Parameters

  - ##### signers: Signer[]

    The list of signers for the transaction

  #### Returns Promise<number>

  a promise that resolves with the state of the party

### addAttendee

- addAttendee(attendee: Point): void

- - Defined in src/personhood/pop-party-instance.ts:88

  Add an attendee to the party

  #### Parameters

  - ##### attendee: Point

    The public key of the attendee

  #### Returns void

### finalize

- finalize(signers: Signer[]): Promise<number>

- - Defined in src/personhood/pop-party-instance.ts:156

  Finalize the party

  #### Parameters

  - ##### signers: Signer[]

    The list of signers for the transaction

  #### Returns Promise<number>

  a promise that resolves with the state of the party

### getTmpAttendees

- getTmpAttendees(): Point[]

- - Defined in src/personhood/pop-party-instance.ts:119

  Returns a copy of the list of all attendees.

  #### Returns Point[]

### mine

- mine(secret: Scalar, coinID?: Buffer, newD?: Darc): Promise<void>

- - Defined in src/personhood/pop-party-instance.ts:199

  Mine coins for a person using either an existing coinIID, or a new darc + a coin that yet has to be instantiated.

  #### Parameters

  - ##### secret: Scalar

    The secret key of the miner

  - ##### Optional coinID: Buffer

    The coin instance ID of the miner

  - ##### Optional newD: Darc

    A new darc that has not been instantiated yet

  #### Returns Promise<void>

### removeAttendee

- removeAttendee(attendee: Point): number

- - Defined in src/personhood/pop-party-instance.ts:103

  Remove an attendee from the party

  #### Parameters

  - ##### attendee: Point

    The public key of the attendee

  #### Returns number

### 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(): Promise<PopPartyInstance>

- - Defined in src/personhood/pop-party-instance.ts:183

  Update the party data

  #### Returns Promise<PopPartyInstance>

  a promise that resolves with an updated instance

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

- Overrides Instance.fromByzcoin

  - Defined in src/personhood/pop-party-instance.ts:66

  Get a pop party from byzcoin

  #### Parameters

  - ##### bc: ByzCoinRPC

    The RPC to use

  - ##### iid: InstanceID

    The instance ID of the party

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

    how many times to wait for a match - useful if its called just after an addTransactionAndWait.

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

    how long to wait between two attempts in waitMatch.

  #### Returns Promise<PopPartyInstance>

  a promise that resolves with the party 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 preparePartyDarc

- preparePartyDarc(darcIDs: InstanceID[], desc: string): Darc

- - Defined in src/personhood/pop-party-instance.ts:45

  Helper to create a PoP party darc

  #### Parameters

  - ##### darcIDs: InstanceID[]

    Organizers darc instance IDs

  - ##### desc: string

    Description of the party

  #### Returns Darc

  the new darc

Generated using TypeDoc