Class: UpdateBuilder ​
Defined in: packages/api/src/method.ts:248
Fluent builder for DID update operations. Reduces the cognitive load of the 7-parameter update() call by letting callers chain named steps.
Created via DidMethodApi.buildUpdate.
Constructors ​
Constructor ​
new UpdateBuilder(
methodApi,sourceDocument):UpdateBuilder
Defined in: packages/api/src/method.ts:259
Internal
Parameters ​
methodApi ​
sourceDocument ​
Returns ​
UpdateBuilder
Methods ​
beacon() ​
beacon(
beaconId):this
Defined in: packages/api/src/method.ts:289
Set the beacon ID for the update announcement.
Parameters ​
beaconId ​
string
Returns ​
this
execute() ​
execute():
Promise<SignedBTCR2Update>
Defined in: packages/api/src/method.ts:310
Execute the update.
Returns ​
Promise<SignedBTCR2Update>
Throws ​
If required fields (version, signer, beacon) are missing.
patch() ​
patch(
op):this
Defined in: packages/api/src/method.ts:265
Add a single JSON Patch operation. Can be called multiple times.
Parameters ​
op ​
Returns ​
this
patches() ​
patches(
ops):this
Defined in: packages/api/src/method.ts:271
Set all patches at once (replaces any previously added).
Parameters ​
ops ​
Returns ​
this
signer() ​
signer(
methodId):this
Defined in: packages/api/src/method.ts:283
Set the verification method ID used for signing.
Parameters ​
methodId ​
string
Returns ​
this
signingMaterial() ​
signingMaterial(
material):this
Defined in: packages/api/src/method.ts:295
Set the signing material (secret key bytes or hex).
Parameters ​
material ​
string | Bytes
Returns ​
this
version() ​
version(
id):this
Defined in: packages/api/src/method.ts:277
Set the source version ID.
Parameters ​
id ​
number
Returns ​
this
withBitcoin() ​
withBitcoin(
connection):this
Defined in: packages/api/src/method.ts:301
Override the Bitcoin connection for this update.
Parameters ​
connection ​
Returns ​
this