@smartledger/bsv 6.0.2 → 6.1.1

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.
package/bsv.d.ts CHANGED
@@ -327,7 +327,6 @@ declare module '@smartledger/bsv' {
327
327
  DATA_OUT: string;
328
328
  };
329
329
  function buildMultisigOut(publicKeys: PublicKey[], threshold: number, opts: object): Script;
330
- function buildWitnessMultisigOutFromScript(script: Script): Script;
331
330
  function buildMultisigIn(pubkeys: PublicKey[], threshold: number, signatures: Buffer[], opts: object): Script;
332
331
  function buildP2SHMultisigIn(pubkeys: PublicKey[], threshold: number, signatures: Buffer[], opts: object): Script;
333
332
  function buildPublicKeyHashOut(address: Address): Script;
@@ -454,20 +453,6 @@ declare module '@smartledger/bsv' {
454
453
  constructor(data: Buffer | Uint8Array | string | object, network?: Networks.Network | string, type?: string);
455
454
  }
456
455
 
457
- export class Unit {
458
- static fromBTC(amount: number): Unit;
459
- static fromMilis(amount: number): Unit;
460
- static fromBits(amount: number): Unit;
461
- static fromSatoshis(amount: number): Unit;
462
-
463
- constructor(amount: number, unitPreference: string);
464
-
465
- toBTC(): number;
466
- toMilis(): number;
467
- toBits(): number;
468
- toSatoshis(): number;
469
- }
470
-
471
456
  // ---------------------------------------------------------------------
472
457
  // SmartLedger v3.3-3.4.x additions
473
458
  //
@@ -495,10 +480,11 @@ declare module '@smartledger/bsv' {
495
480
  const constants: { n: any; nh: any };
496
481
  }
497
482
  namespace EllipticFixed {
498
- const ec: {
499
- verify(msg: Buffer | string, sig: any, key: any, enc?: string, opts?: object): boolean;
500
- sign(msg: Buffer | string, key: any, enc?: string, options?: object): any;
501
- };
483
+ const curve: any;
484
+ function keyFromPrivate(priv: Buffer | string, enc?: string): any;
485
+ function sign(msg: Buffer | string, key: any, enc?: string, options?: object): any;
486
+ function verify(msg: Buffer | string, sig: any, key: any, enc?: string, opts?: object): boolean;
487
+ function recoverPubKey(msg: Buffer | string, sig: any, j: number, enc?: string): any;
502
488
  }
503
489
  class Shamir {
504
490
  static split(secret: Buffer | string, threshold: number, shares: number, options?: object): ShamirShare[];
@@ -1299,7 +1285,6 @@ declare module '@smartledger/bsv' {
1299
1285
  export function addCustomClaimSchema(name: string, schema: object): void;
1300
1286
 
1301
1287
  // Shamir convenience wrappers (also available on bsv.Shamir directly)
1302
- export function splitSecret(secret: Buffer | string, totalShares: number, threshold: number, options?: object): ShamirShare[];
1303
- export function reconstructSecret(shares: ShamirShare[]): Buffer;
1304
- export function validateShare(share: ShamirShare): boolean;
1288
+ // Shamir secret sharing is exposed as `bsv.Shamir.split` / `.combine` / `.verifyShare`
1289
+ // (see `crypto.Shamir` above) — there are no top-level splitSecret/reconstructSecret helpers.
1305
1290
  }