@smartledger/bsv 8.3.1 → 9.0.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.
Files changed (40) hide show
  1. package/CHANGELOG.md +91 -0
  2. package/README.md +74 -64
  3. package/bsv-gdaf.min.js +49 -49
  4. package/bsv-script-helper.min.js +1 -1
  5. package/bsv-smartcontract.min.js +21 -21
  6. package/bsv.bundle.js +49 -49
  7. package/bsv.d.ts +0 -4
  8. package/bsv.min.js +49 -49
  9. package/docs/BRC220_BATCH_LEAF_AMENDMENT.md +82 -7
  10. package/docs/MODULE_REFERENCE_COMPLETE.md +27 -27
  11. package/docs/README.md +2 -1
  12. package/docs/THREAT_MODEL.md +10 -2
  13. package/docs/advanced/UTXO_MANAGER_GUIDE.md +1 -1
  14. package/docs/getting-started/INSTALLATION.md +23 -23
  15. package/docs/getting-started/QUICK_START.md +7 -7
  16. package/docs/migration/FROM_BSV_1_5_6.md +5 -5
  17. package/index.js +10 -26
  18. package/lib/covenant/helpers.js +34 -35
  19. package/lib/covenant/pushtx.js +2 -2
  20. package/lib/custom-script-helper.js +0 -16
  21. package/lib/ordinals/ordlock.js +1 -1
  22. package/lib/smart_contract/debugger.js +2 -2
  23. package/lib/smart_contract/dsl.js +2 -2
  24. package/lib/smart_contract/index.js +0 -3
  25. package/lib/smart_contract/locks.js +1 -41
  26. package/lib/smart_contract/pels.js +1 -1
  27. package/lib/smart_contract/token.js +1 -1
  28. package/package.json +1 -1
  29. package/test/build/esm_wrapper.js +32 -8
  30. package/test/data/brc220-batch-vector.json +129 -0
  31. package/test/notaryhash/batch_vector.js +282 -0
  32. package/test/ordinals/inscription.js +24 -14
  33. package/test/ordinals/ordlock.js +0 -46
  34. package/test/smart_contract/covenants.js +0 -38
  35. package/test/smart_contract/dsl_debugger.js +0 -9
  36. package/test/smart_contract/ordinal_transfer.js +0 -10
  37. package/test/smart_contract/sighash_marketplace.js +0 -10
  38. package/test/smart_contract/token_generalized.js +0 -10
  39. package/tools/gen-brc220-batch-vector.js +205 -0
  40. package/version.js +1 -1
package/bsv.d.ts CHANGED
@@ -996,7 +996,6 @@ declare module '@smartledger/bsv' {
996
996
  interface VerifyOpts { tx?: Transaction; satoshis?: number; inputIndex?: number; flags?: number; }
997
997
 
998
998
  /** Opt into post-Genesis script limits (required to verify OP_PUSH_TX covenants). */
999
- function enableGenesis(max?: number): void;
1000
999
  /** Verify an unlocking/locking pair through the consensus interpreter. */
1001
1000
  function verifyScript(unlocking: Script, locking: Script, opts?: VerifyOpts): VerifyResult;
1002
1001
  /** Perpetually Enforcing Locking Script: every spend recreates the same script (value - fee). */
@@ -1014,7 +1013,6 @@ declare module '@smartledger/bsv' {
1014
1013
  namespace CovenantHelpers {
1015
1014
  const SIGHASH: number;
1016
1015
  function flags(): number;
1017
- function enableGenesis(max?: number): void;
1018
1016
  function verify(unlocking: Script, locking: Script, opts?: VerifyOpts): VerifyResult;
1019
1017
  function rawPreimage(tx: Transaction, inputIndex: number, lockingScript: Script, satoshis: number, sighashType?: number): Buffer;
1020
1018
  function sighashDigest(tx: Transaction, inputIndex: number, lockingScript: Script, satoshis: number, sighashType?: number): Buffer;
@@ -1101,9 +1099,7 @@ declare module '@smartledger/bsv' {
1101
1099
  namespace Locks {
1102
1100
  function hashLock(secret: Buffer): LockSpec;
1103
1101
  function p2pkh(privateKey: PrivateKey): LockSpec;
1104
- function timeLockCLTV(privateKey: PrivateKey, locktime: number): LockSpec;
1105
1102
  function multisig(m: number, privateKeys: PrivateKey[]): LockSpec;
1106
- function htlc(opts: { secret: Buffer; receiver: PrivateKey; sender: PrivateKey; timeout: number }): LockSpec;
1107
1103
  }
1108
1104
 
1109
1105
  // -------- Declarative covenant DSL (v4.5.0) --------------------------