Skip to content

Instrument methods: cancel, convert, exercise

The Instrument Verbs cancel, convert, exercise as typed SDK methods, with inputs, result, refusals and an example.

Reference for Instrument, one group of Instrument methods.

Instrument.cancel

Cancel ends an unvested, expired or forfeited Instrument and returns any option Shares to the pool. Verb page.

TypeScript
interface InstrumentVerbs {
  cancel(input: InstrumentCancelInput, options?: SB.CallOptions): SB.Call<Instrument>
}

Emits Instrument.canceled.

Inputs

InputTypeRequiredDescription
instrumentInstrumentrequiredThe Instrument to end.
reasonstringrequiredWhy it ends: unvested, expired or forfeited.

Returns

OutputTypeRequiredDescription
instrumentInstrumentrequiredThe canceled Instrument, kept with its history.

Refuses when

CheckErrorFixThen call
The key is valid, but its scopes do not allow this operation.forbiddenUse a key whose scopes cover the operation, or ask an owner of the namespace to grant them.None.

Example

TypeScript
import { $ } from 'startup-builder'

const instrument = await $.Instrument.cancel({ instrument: 'instrument_yZz4i2meOW', reason: 'unvested' })

Instrument.convert

Convert turns a SAFE or note into Shares at a priced round, at its cap or discount, whichever gives more Shares. Verb page.

TypeScript
interface InstrumentVerbs {
  convert(input: InstrumentConvertInput, options?: SB.CallOptions): SB.Call<InstrumentConvertOutput>
}

Emits Instrument.converted.

Inputs

InputTypeRequiredDescription
instrumentInstrumentrequiredThe SAFE or note.
roundPricemoneyrequiredThe price per Share of the priced round.

Returns

OutputTypeRequiredDescription
shareslist of SharerequiredThe Shares issued on conversion.
instrumentInstrumentrequiredThe Instrument, now converted.

Refuses when

CheckErrorFixThen call
The key is valid, but its scopes do not allow this operation.forbiddenUse a key whose scopes cover the operation, or ask an owner of the namespace to grant them.None.

Example

TypeScript
import { $ } from 'startup-builder'

const { shares, instrument } = await $.Instrument.convert({ instrument: 'instrument_yZz4i2meOW', roundPrice: { amount: 29, currency: 'USD' } })

Instrument.exercise

Exercise buys the Shares an option or warrant covers at its strike price, up to what has vested. Verb page.

TypeScript
interface InstrumentVerbs {
  exercise(input: InstrumentExerciseInput, options?: SB.CallOptions): SB.Call<InstrumentExerciseOutput>
}

Emits Instrument.exercised.

Inputs

InputTypeRequiredDescription
instrumentInstrumentrequiredThe option or warrant.
quantityintegerrequiredHow many Shares to buy.

Returns

OutputTypeRequiredDescription
shareSharerequiredThe Shares bought.
instrumentInstrumentrequiredThe Instrument, now exercised.

Refuses when

CheckErrorFixThen call
The key is valid, but its scopes do not allow this operation.forbiddenUse a key whose scopes cover the operation, or ask an owner of the namespace to grant them.None.

Example

TypeScript
import { $ } from 'startup-builder'

const { share, instrument } = await $.Instrument.exercise({ instrument: 'instrument_yZz4i2meOW', quantity: 1 })