@chainvue/verus-sdk 0.8.0 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -25,7 +25,10 @@ export declare class VerusSDK {
25
25
  registerIdentity(params: RegisterIdentityParams): RegisterIdentityResult;
26
26
  /** Update an existing identity (change primary addresses, authorities, content) */
27
27
  updateIdentity(params: UpdateIdentityParams): UpdateIdentityResult;
28
- /** Lock an identity until a specified block height */
28
+ /**
29
+ * Lock an identity for a RELATIVE delay of `unlockDelayBlocks` blocks (NOT an
30
+ * absolute block height — passing a height locks the identity for years).
31
+ */
29
32
  lockIdentity(params: LockIdentityParams): UpdateIdentityResult;
30
33
  /** Initiate identity unlock */
31
34
  unlockIdentity(params: UnlockIdentityParams): UpdateIdentityResult;
@@ -1 +1 @@
1
- {"version":3,"file":"VerusSDK.d.ts","sourceRoot":"","sources":["../src/VerusSDK.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,KAAK,EACV,cAAc,EACd,cAAc,EACd,mBAAmB,EACnB,aAAa,EACb,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,cAAc,EACd,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,EACtB,oBAAoB,EACpB,oBAAoB,EACpB,kBAAkB,EAClB,oBAAoB,EACpB,oBAAoB,EACpB,qBAAqB,EACrB,oBAAoB,EACpB,oBAAoB,EACpB,iBAAiB,EACjB,iBAAiB,EACjB,mBAAmB,EACnB,mBAAmB,EACpB,MAAM,kBAAkB,CAAC;AAQ1B,qBAAa,QAAQ;IACnB,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;gBAEd,MAAM,EAAE,cAAc;IAMlC,kDAAkD;IAClD,QAAQ,CAAC,MAAM,EAAE,cAAc,GAAG,kBAAkB;IAIpD,8BAA8B;IAC9B,aAAa,CA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 +83,10 @@ class VerusSDK {
83
83
  updateIdentity(params) {
84
84
  return identityModule.buildAndSignIdentityUpdate(params, this.network, 'update');
85
85
  }
86
- /** Lock an identity until a specified block height */
86
+ /**
87
+ * Lock an identity for a RELATIVE delay of `unlockDelayBlocks` blocks (NOT an
88
+ * absolute block height — passing a height locks the identity for years).
89
+ */
87
90
  lockIdentity(params) {
88
91
  return identityModule.buildAndSignIdentityUpdate({
89
92
  wif: params.wif,
@@ -92,7 +95,7 @@ class VerusSDK {
92
95
  utxos: params.utxos,
93
96
  changeAddress: params.changeAddress,
94
97
  expiryHeight: params.expiryHeight,
95
- }, this.network, 'lock', { unlockAfter: params.unlockAfter });
98
+ }, this.network, 'lock', { unlockDelayBlocks: params.unlockDelayBlocks, sanityOverride: params.sanityOverride ?? false });
96
99
  }
97
100
  /** Initiate identity unlock */
98
101
  unlockIdentity(params) {
@@ -125,6 +128,7 @@ class VerusSDK {
125
128
  utxos: params.utxos,
126
129
  changeAddress: params.changeAddress,
127
130
  ...(params.primaryAddresses !== undefined ? { primaryAddresses: params.primaryAddresses } : {}),
131
+ ...(params.minSigs !== undefined ? { minSigs: params.minSigs } : {}),
128
132
  ...(params.revocationAuthority !== undefined ? { revocationAuthority: params.revocationAuthority } : {}),
129
133
  ...(params.recoveryAuthority !== undefined ? { recoveryAuthority: params.recoveryAuthority } : {}),
130
134
  expiryHeight: params.expiryHeight,
@@ -1 +1 @@
1
- {"version":3,"file":"VerusSDK.js","sourceRoot":"","sources":["../src/VerusSDK.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BH,oEAAsD;AACtD,oEAAsD;AACtD,kEAAoD;AACpD,oEAAsD;AACtD,4DAA8C;AAE9C,MAAa,QAAQ;IAGnB,YAAY,MAAsB;QAChC,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC;IAChC,CAAC;IAED,sDAAsD;IAEtD,kDAAkD;IAClD,QAAQ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}
package/dist/bundle.js CHANGED
@@ -19831,7 +19831,7 @@ var require_TransferDestination = __commonJS({
19831
19831
  exports2.FLAG_DEST_AUX = new bn_js_1.BN(64, 10);
19832
19832
  exports2.FLAG_DEST_GATEWAY = new bn_js_1.BN(128, 10);
19833
19833
  exports2.FLAG_MASK = exports2.FLAG_DEST_AUX.add(exports2.FLAG_DEST_GATEWAY);
19834
- var TransferDestination2 = class _TransferDestination {
19834
+ var TransferDestination3 = class _TransferDestination {
19835
19835
  constructor(data) {
19836
19836
  this.type = exports2.DEST_INVALID;
19837
19837
  this.destination_bytes = Buffer.alloc(0);
@@ -20033,7 +20033,7 @@ var require_TransferDestination = __commonJS({
20033
20033
  return retVal;
20034
20034
  }
20035
20035
  };
20036
- exports2.TransferDestination = TransferDestination2;
20036
+ exports2.TransferDestination = TransferDestination3;
20037
20037
  }
20038
20038
  });
20039
20039
 
@@ -23341,7 +23341,7 @@ var require_ReserveTransfer = __commonJS({
23341
23341
  type: TransferDestination_1.DEST_PKH,
23342
23342
  destination_bytes: (0, address_1.fromBase58Check)("RTqQe58LSj2yr5CrwYFwcsAQ1edQwmrkUU").hash
23343
23343
  });
23344
- var ReserveTransfer = class extends TokenOutput_1.TokenOutput {
23344
+ var ReserveTransfer2 = class extends TokenOutput_1.TokenOutput {
23345
23345
  constructor(data) {
23346
23346
  super(data);
23347
23347
  this.flags = exports2.RESERVE_TRANSFER_INVALID;
@@ -23463,7 +23463,7 @@ var require_ReserveTransfer = __commonJS({
23463
23463
  return reader.offset;
23464
23464
  }
23465
23465
  };
23466
- exports2.ReserveTransfer = ReserveTransfer;
23466
+ exports2.ReserveTransfer = ReserveTransfer2;
23467
23467
  }
23468
23468
  });
23469
23469
 
@@ -32296,6 +32296,7 @@ var DUST_THRESHOLD = 546n;
32296
32296
  var DEFAULT_REGISTRATION_FEE = 10000000000n;
32297
32297
  var DEFAULT_REFERRAL_LEVELS = 3;
32298
32298
  var RESERVE_TRANSFER_FEE = 20000n;
32299
+ var RESERVE_TRANSFER_EVAL_PKH = "RTqQe58LSj2yr5CrwYFwcsAQ1edQwmrkUU";
32299
32300
  var DEFAULT_EXPIRY_DELTA = 20;
32300
32301
  var I_ADDR_VERSION = 102;
32301
32302
  var PUBKEY_HASH_PREFIX = 60;
@@ -32604,10 +32605,10 @@ function signTransactionMultiKey(txHex, keys, utxos, network = import_utxo_lib.n
32604
32605
  txid: signedTx.getId()
32605
32606
  };
32606
32607
  }
32607
- function createTransactionBuilder(network = import_utxo_lib.networks.verus, expiryHeight = 0, version = 4, versionGroupId = VERSION_GROUP_ID) {
32608
+ function createTransactionBuilder(network, expiryHeight, version = 4, versionGroupId = VERSION_GROUP_ID) {
32608
32609
  const txb = new import_utxo_lib.TransactionBuilder(network);
32609
32610
  txb.setVersion(version);
32610
- txb.setExpiryHeight(expiryHeight);
32611
+ txb.setExpiryHeight(resolveExpiryHeight(expiryHeight));
32611
32612
  txb.setVersionGroupId(versionGroupId);
32612
32613
  return txb;
32613
32614
  }
@@ -32717,6 +32718,11 @@ function selectUtxos(utxos, requiredNative, requiredCurrencies = /* @__PURE__ */
32717
32718
  }
32718
32719
  seenOutpoints.add(outpoint);
32719
32720
  }
32721
+ if (requiredCurrencies.has(systemId)) {
32722
+ throw new TransactionBuildError(
32723
+ `requiredCurrencies must not contain the native currency (systemId ${systemId}); pass the native amount as requiredNative instead.`
32724
+ );
32725
+ }
32720
32726
  const decoded = utxos.map((u) => decodeUtxo(u, systemId));
32721
32727
  const remaining = new Map(requiredCurrencies);
32722
32728
  let remainingNative = requiredNative;
@@ -32946,6 +32952,8 @@ function validateWif(wif) {
32946
32952
  }
32947
32953
  }
32948
32954
  function wifToPrivateKey(wif) {
32955
+ const check = validateWif(wif);
32956
+ if (!check.valid) throw new InvalidWifError(check.error);
32949
32957
  const decoded = import_bs58check3.default.decode(wif);
32950
32958
  if (decoded.length === 34) {
32951
32959
  return Buffer.from(decoded.slice(1, 33));
@@ -32954,6 +32962,8 @@ function wifToPrivateKey(wif) {
32954
32962
  }
32955
32963
  }
32956
32964
  function isCompressedWif(wif) {
32965
+ const check = validateWif(wif);
32966
+ if (!check.valid) throw new InvalidWifError(check.error);
32957
32967
  const decoded = import_bs58check3.default.decode(wif);
32958
32968
  return decoded.length === 34 && decoded[33] === 1;
32959
32969
  }
@@ -33014,6 +33024,8 @@ var HASH160_BYTE_LENGTH = 20;
33014
33024
  var HASH256_BYTE_LENGTH = 32;
33015
33025
  var NULL_ID_HASH = Buffer.alloc(HASH160_BYTE_LENGTH, 0);
33016
33026
  var EVAL_IDENTITY_ADVANCEDRESERVATION = 10;
33027
+ var MAX_UNLOCK_DELAY = 11563200;
33028
+ var LOCK_DELAY_SANITY_BLOCKS = 525600;
33017
33029
  function assertAddressVersion(address, expectedVersion, label) {
33018
33030
  let version;
33019
33031
  try {
@@ -33143,6 +33155,11 @@ function prepareNameCommitment(name, controlAddress, referralIAddress, parentIAd
33143
33155
  const systemId = NETWORK_CONFIG[network].chainId;
33144
33156
  if (referralIAddress) {
33145
33157
  assertAddressVersion(referralIAddress, I_ADDR_VERSION, "referral");
33158
+ if (!isVRSCParent(parentIAddress, network)) {
33159
+ throw new TransactionBuildError(
33160
+ "referrals are not supported for sub-ID (non-VRSC-parent) registrations in this SDK; omit the referral for a sub-ID name commitment."
33161
+ );
33162
+ }
33146
33163
  }
33147
33164
  const referralHash = referralIAddress ? iAddressToHash(referralIAddress) : NULL_ID_HASH;
33148
33165
  const effectiveParent = parentIAddress && parentIAddress !== systemId ? parentIAddress : void 0;
@@ -33226,9 +33243,48 @@ function createIdentityObject(params) {
33226
33243
  });
33227
33244
  return identity;
33228
33245
  }
33229
- function buildRegistrationFeeOutput(parentCurrencyId, feeAmount, systemId, _controlAddress) {
33230
- void systemId;
33231
- return buildTokenChangeOutput(parseIAddress(parentCurrencyId, "parentCurrencyId"), /* @__PURE__ */ new Map([[parentCurrencyId, feeAmount]]));
33246
+ function buildRegistrationFeeOutput(parentCurrencyId, feeAmount, systemId, _controlAddress, parentProofProtocol = 2) {
33247
+ if (parentProofProtocol === 2) {
33248
+ return buildTokenChangeOutput(parseIAddress(parentCurrencyId, "parentCurrencyId"), /* @__PURE__ */ new Map([[parentCurrencyId, feeAmount]]));
33249
+ }
33250
+ return buildRegistrationFeeReserveTransfer(parentCurrencyId, feeAmount, systemId);
33251
+ }
33252
+ function buildRegistrationFeeReserveTransfer(parentCurrencyId, feeAmount, systemId) {
33253
+ const destination = new import_verus_typescript_primitives2.TxDestination(import_verus_typescript_primitives2.KeyID.fromAddress(RESERVE_TRANSFER_EVAL_PKH));
33254
+ const values = new import_verus_typescript_primitives2.CurrencyValueMap({
33255
+ value_map: /* @__PURE__ */ new Map([[parentCurrencyId, new import_bn.default(feeAmount.toString(10))]]),
33256
+ multivalue: false
33257
+ });
33258
+ const parentHash = (0, import_verus_typescript_primitives4.fromBase58Check)(parentCurrencyId).hash;
33259
+ const transferDest = new import_verus_typescript_primitives2.TransferDestination({ type: import_verus_typescript_primitives2.DEST_ID, destination_bytes: Buffer.from(parentHash) });
33260
+ const flags = import_verus_typescript_primitives2.RESERVE_TRANSFER_VALID.or(import_verus_typescript_primitives2.RESERVE_TRANSFER_BURN_CHANGE_PRICE);
33261
+ const resTransfer = new import_verus_typescript_primitives2.ReserveTransfer({
33262
+ values,
33263
+ version: new import_bn.default(1),
33264
+ flags,
33265
+ fee_currency_id: systemId,
33266
+ fee_amount: new import_bn.default(RESERVE_TRANSFER_FEE.toString(10)),
33267
+ transfer_destination: transferDest,
33268
+ dest_currency_id: parentCurrencyId
33269
+ });
33270
+ const master = new import_verus_typescript_primitives2.OptCCParams({
33271
+ version: new import_bn.default(3),
33272
+ eval_code: new import_bn.default(import_verus_typescript_primitives3.EVALS.EVAL_NONE),
33273
+ m: new import_bn.default(1),
33274
+ n: new import_bn.default(1),
33275
+ destinations: [destination],
33276
+ vdata: []
33277
+ });
33278
+ const params = new import_verus_typescript_primitives2.OptCCParams({
33279
+ version: new import_bn.default(3),
33280
+ eval_code: new import_bn.default(import_verus_typescript_primitives3.EVALS.EVAL_RESERVE_TRANSFER),
33281
+ m: new import_bn.default(1),
33282
+ n: new import_bn.default(1),
33283
+ destinations: [destination],
33284
+ vdata: [resTransfer.toBuffer()]
33285
+ });
33286
+ const script = new import_verus_typescript_primitives2.SmartTransactionScript(master, params);
33287
+ return { script: script.toBuffer(), nativeValue: RESERVE_TRANSFER_FEE };
33232
33288
  }
33233
33289
  function buildTokenChangeOutput(changeAddress, currencyChanges) {
33234
33290
  let destination;
@@ -33348,6 +33404,7 @@ function buildAndSignCommitment(params, network) {
33348
33404
  "name commitment"
33349
33405
  );
33350
33406
  const unsignedTx = txb.buildIncomplete();
33407
+ assertNativeConservation(selection.selected, unsignedTx.outs, selection.fee, "name commitment");
33351
33408
  const { signedTx, txid } = signTransactionSmart(
33352
33409
  unsignedTx.toHex(),
33353
33410
  params.wif,
@@ -33380,6 +33437,13 @@ function buildAndSignRegistration(params, network) {
33380
33437
  const verusNetwork = getNetwork(network === "testnet");
33381
33438
  const networkConfig = NETWORK_CONFIG[network];
33382
33439
  const systemId = networkConfig.chainId;
33440
+ const signerAddr = import_utxo_lib3.ECPair.fromWIF(params.wif, verusNetwork).getAddress();
33441
+ const signerHash = addressToScriptPubKey(signerAddr).subarray(3, 23).toString("hex");
33442
+ if (!params.commitmentUtxo.script.toLowerCase().includes(signerHash)) {
33443
+ throw new TransactionBuildError(
33444
+ `the provided WIF (${signerAddr}) does not control the name-commitment output; step 2 must be signed by the same key that created the commitment in step 1.`
33445
+ );
33446
+ }
33383
33447
  const commitData = params.commitmentData;
33384
33448
  const parentIAddress = commitData.parent || systemId;
33385
33449
  const isSubId = !isVRSCParent(commitData.parent || void 0, network);
@@ -33523,16 +33587,27 @@ function _buildSubIdRegistration(params, identity, identityScript, reservationSc
33523
33587
  "registrationFeeAmount is required for sub-ID registration. Specify the fee in parent currency satoshis."
33524
33588
  );
33525
33589
  }
33590
+ if (params.parentProofProtocol === void 0) {
33591
+ throw new TransactionBuildError(
33592
+ "parentProofProtocol is required for sub-ID registration: pass the parent currency's proofprotocol (from `getcurrency <parent>`) \u2014 2 for a centralized/token currency, 1 for a PBaaS/fractional one."
33593
+ );
33594
+ }
33526
33595
  const feeOutput = buildRegistrationFeeOutput(
33527
33596
  parentIAddress,
33528
33597
  registrationFeeAmount,
33529
33598
  systemId,
33530
- params.changeAddress
33599
+ params.changeAddress,
33600
+ params.parentProofProtocol
33531
33601
  );
33532
33602
  const requiredCurrencies = /* @__PURE__ */ new Map([
33533
33603
  [parentIAddress, registrationFeeAmount]
33534
33604
  ]);
33535
- const nativeImportFee = params.nativeImportFee || 0n;
33605
+ if (params.nativeImportFee === void 0) {
33606
+ throw new TransactionBuildError(
33607
+ "nativeImportFee is required for sub-ID registration: pass the parent currency's idimportfees (from `getcurrency <parent>`), or 0n if it charges none."
33608
+ );
33609
+ }
33610
+ const nativeImportFee = params.nativeImportFee;
33536
33611
  const nativeTarget = feeOutput.nativeValue + nativeImportFee;
33537
33612
  const numOutputs = 4;
33538
33613
  const selection = selectUtxos(
@@ -33648,6 +33723,12 @@ function buildAndSignIdentityUpdate(params, network, operation = "update", lockU
33648
33723
  `the provided WIF (${signerAddress}) is not among the identity's primary addresses [${currentPrimaries.join(", ")}]; it cannot authorize a ${operation}.`
33649
33724
  );
33650
33725
  }
33726
+ const currentMinSigs = identity.min_sigs?.toNumber?.() ?? 1;
33727
+ if (currentMinSigs > 1) {
33728
+ throw new TransactionBuildError(
33729
+ `this identity requires ${currentMinSigs} signatures (min_sigs > 1); the SDK signs with a single WIF and the bundled fork cannot multi-sign a CryptoCondition input, so a valid ${operation} transaction cannot be produced. Use the daemon for multisig identities.`
33730
+ );
33731
+ }
33651
33732
  }
33652
33733
  switch (operation) {
33653
33734
  case "update": {
@@ -33666,10 +33747,12 @@ function buildAndSignIdentityUpdate(params, network, operation = "update", lockU
33666
33747
  identity.setRecovery(params.recoveryAuthority);
33667
33748
  }
33668
33749
  if (params.contentMap) {
33750
+ identity.content_map.clear();
33669
33751
  for (const [key, value] of Object.entries(params.contentMap)) {
33670
- if (!/^[0-9a-fA-F]*$/.test(value) || value.length % 2 !== 0) {
33752
+ assertAddressVersion(key, I_ADDR_VERSION, `contentMap key "${key}"`);
33753
+ if (!/^[0-9a-fA-F]{64}$/.test(value)) {
33671
33754
  throw new TransactionBuildError(
33672
- `contentMap["${key}"] must be an even-length hex string (got ${JSON.stringify(value)})`
33755
+ `contentMap["${key}"] must be a 32-byte (64-hex-char) value (got ${JSON.stringify(value)})`
33673
33756
  );
33674
33757
  }
33675
33758
  identity.content_map.set(key, Buffer.from(value, "hex"));
@@ -33705,6 +33788,10 @@ function buildAndSignIdentityUpdate(params, network, operation = "update", lockU
33705
33788
  if (params.primaryAddresses) {
33706
33789
  identity.setPrimaryAddresses(params.primaryAddresses);
33707
33790
  }
33791
+ if (params.minSigs !== void 0) {
33792
+ validateMinSigs(params.minSigs, identity.primary_addresses?.length ?? 0);
33793
+ identity.min_sigs = new import_bn.default(params.minSigs);
33794
+ }
33708
33795
  if (params.revocationAuthority) {
33709
33796
  identity.setRevocation(params.revocationAuthority);
33710
33797
  }
@@ -33714,11 +33801,23 @@ function buildAndSignIdentityUpdate(params, network, operation = "update", lockU
33714
33801
  break;
33715
33802
  }
33716
33803
  case "lock": {
33717
- const unlockAfter = lockUnlockParams?.unlockAfter;
33718
- if (!unlockAfter) {
33719
- throw new TransactionBuildError("unlockAfter (block height) is required for lock operation");
33804
+ const delay = lockUnlockParams?.unlockDelayBlocks;
33805
+ if (delay === void 0 || !Number.isInteger(delay) || delay <= 0) {
33806
+ throw new TransactionBuildError(
33807
+ "unlockDelayBlocks (a positive integer RELATIVE delay in blocks, not a block height) is required for lock"
33808
+ );
33809
+ }
33810
+ if (delay > MAX_UNLOCK_DELAY) {
33811
+ throw new TransactionBuildError(
33812
+ `unlockDelayBlocks ${delay} exceeds the consensus maximum ${MAX_UNLOCK_DELAY} (~22 years)`
33813
+ );
33814
+ }
33815
+ if (delay > LOCK_DELAY_SANITY_BLOCKS && !lockUnlockParams?.sanityOverride) {
33816
+ throw new TransactionBuildError(
33817
+ `unlockDelayBlocks ${delay} is over ~1 year (${LOCK_DELAY_SANITY_BLOCKS} blocks) \u2014 this is a RELATIVE delay, not a block height; pass sanityOverride: true if that long a lock is intended.`
33818
+ );
33720
33819
  }
33721
- identity.lock(new import_bn.default(unlockAfter));
33820
+ identity.lock(new import_bn.default(delay));
33722
33821
  break;
33723
33822
  }
33724
33823
  case "unlock": {
@@ -33732,6 +33831,13 @@ function buildAndSignIdentityUpdate(params, network, operation = "update", lockU
33732
33831
  break;
33733
33832
  }
33734
33833
  }
33834
+ const finalPrimaries = identity.primary_addresses?.length ?? 0;
33835
+ const finalMinSigs = identity.min_sigs?.toNumber?.() ?? 1;
33836
+ if (finalMinSigs > finalPrimaries) {
33837
+ throw new TransactionBuildError(
33838
+ `resulting identity has min_sigs ${finalMinSigs} but only ${finalPrimaries} primary address(es); pass minSigs to lower it when reducing the primary set.`
33839
+ );
33840
+ }
33735
33841
  const identityBuf = identity.toBuffer();
33736
33842
  const unfundedHex = createUnfundedIdentityUpdate(
33737
33843
  identityBuf.toString("hex"),
@@ -33995,6 +34101,7 @@ function sendCurrency(params, network) {
33995
34101
  }
33996
34102
  }
33997
34103
  const unsignedTx = txb.buildIncomplete();
34104
+ assertNativeConservation(selection.selected, unsignedTx.outs, selection.fee, "sendCurrency");
33998
34105
  const { signedTx, txid } = signTransactionSmart(
33999
34106
  unsignedTx.toHex(),
34000
34107
  params.wif,
@@ -34410,7 +34517,10 @@ var VerusSDK = class {
34410
34517
  updateIdentity(params) {
34411
34518
  return buildAndSignIdentityUpdate(params, this.network, "update");
34412
34519
  }
34413
- /** Lock an identity until a specified block height */
34520
+ /**
34521
+ * Lock an identity for a RELATIVE delay of `unlockDelayBlocks` blocks (NOT an
34522
+ * absolute block height — passing a height locks the identity for years).
34523
+ */
34414
34524
  lockIdentity(params) {
34415
34525
  return buildAndSignIdentityUpdate(
34416
34526
  {
@@ -34423,7 +34533,7 @@ var VerusSDK = class {
34423
34533
  },
34424
34534
  this.network,
34425
34535
  "lock",
34426
- { unlockAfter: params.unlockAfter }
34536
+ { unlockDelayBlocks: params.unlockDelayBlocks, sanityOverride: params.sanityOverride ?? false }
34427
34537
  );
34428
34538
  }
34429
34539
  /** Initiate identity unlock */
@@ -34466,6 +34576,7 @@ var VerusSDK = class {
34466
34576
  utxos: params.utxos,
34467
34577
  changeAddress: params.changeAddress,
34468
34578
  ...params.primaryAddresses !== void 0 ? { primaryAddresses: params.primaryAddresses } : {},
34579
+ ...params.minSigs !== void 0 ? { minSigs: params.minSigs } : {},
34469
34580
  ...params.revocationAuthority !== void 0 ? { revocationAuthority: params.revocationAuthority } : {},
34470
34581
  ...params.recoveryAuthority !== void 0 ? { recoveryAuthority: params.recoveryAuthority } : {},
34471
34582
  expiryHeight: params.expiryHeight
@@ -138,23 +138,23 @@ export declare function createIdentityObject(params: {
138
138
  /**
139
139
  * Build the parent-currency registration-fee output for a sub-ID.
140
140
  *
141
- * The daemon pays this fee as a plain reserve output (EVAL_RESERVE_OUTPUT)
142
- * holding `feeAmount` of the parent currency AT the parent currency's own
143
- * i-address, carrying zero native value. Verified against `registeridentity`
144
- * on VRSCTEST and an accepted on-chain sub-ID registration: for a currency
145
- * with idregistrationfees=1.0 the fee output is exactly `{parent: 1.0}` at the
146
- * parent, 0 native, and the native cost that leaves the transaction is the
147
- * currency's idimportfees (the caller passes it as `nativeImportFee`).
141
+ * The fee-output STRUCTURE depends on the parent currency's proofprotocol,
142
+ * verified against accepted on-chain registrations on VRSCTEST:
143
+ * - proofprotocol 2 (centralized / token, e.g. `ownora-nft`): a plain reserve
144
+ * output (EVAL_RESERVE_OUTPUT) holding `feeAmount` of the parent AT the
145
+ * parent's i-address, ZERO native.
146
+ * - otherwise (e.g. proofprotocol 1 PBaaS/fractional, `fum`): a CReserveTransfer
147
+ * (EVAL_RESERVE_TRANSFER) of `feeAmount` to the parent, carrying
148
+ * RESERVE_TRANSFER_FEE (0.0002) native.
148
149
  *
149
- * A previous implementation built this as a CReserveTransfer to the
150
- * reserve-transfer eval address carrying 0.0002 native a cross-currency
151
- * transfer, not a same-chain fee payment. That structure never matched the
152
- * daemon and was never accepted at broadcast.
150
+ * An offline SDK cannot read the parent's proofprotocol, so the caller passes it
151
+ * (`parentProofProtocol`). In both cases the native the transaction actually
152
+ * burns is the parent's idimportfees (`nativeImportFee`); the fee output's own
153
+ * native value is funded and cancels out in the conservation accounting.
153
154
  *
154
- * `systemId`/`_controlAddress` are retained for signature compatibility and
155
- * are unused: the fee is denominated in and paid to the parent currency.
155
+ * `_controlAddress` is retained for signature compatibility and is unused.
156
156
  */
157
- export declare function buildRegistrationFeeOutput(parentCurrencyId: string, feeAmount: bigint, systemId: string, _controlAddress: string): {
157
+ export declare function buildRegistrationFeeOutput(parentCurrencyId: string, feeAmount: bigint, systemId: string, _controlAddress: string, parentProofProtocol?: number): {
158
158
  script: Buffer;
159
159
  nativeValue: bigint;
160
160
  };
@@ -177,6 +177,7 @@ export declare function buildAndSignRegistration(params: RegisterIdentityParams,
177
177
  * Build and sign an identity update transaction
178
178
  */
179
179
  export declare function buildAndSignIdentityUpdate(params: UpdateIdentityParams, network: Network, operation?: 'update' | 'revoke' | 'recover' | 'lock' | 'unlock', lockUnlockParams?: {
180
- unlockAfter?: number;
180
+ unlockDelayBlocks?: number;
181
+ sanityOverride?: boolean;
181
182
  }): UpdateIdentityResult;
182
183
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/identity/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,EAQL,QAAQ,EAGT,MAAM,6BAA6B,CAAC;AAErC,OAAO,EACL,wBAAwB,EAEzB,MAAM,6BAA6B,CAAC;AAUrC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAErD,OAAO,EAAmF,KAAK,YAAY,EAAE,M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