@smartledger/bsv 6.0.0 → 6.0.2
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/CHANGELOG.md +46 -0
- package/README.md +38 -38
- package/bsv-covenant.min.js +2 -2
- package/bsv-gdaf.min.js +2 -2
- package/bsv-ltp.min.js +2 -2
- package/bsv-smartcontract.min.js +2 -2
- package/bsv.bundle.js +2 -2
- package/bsv.d.ts +9 -3
- package/bsv.min.js +2 -2
- package/docs/MODULE_REFERENCE_COMPLETE.md +27 -27
- package/docs/advanced/UTXO_MANAGER_GUIDE.md +1 -1
- package/docs/getting-started/INSTALLATION.md +23 -23
- package/docs/getting-started/QUICK_START.md +7 -7
- package/docs/migration/FROM_BSV_1_5_6.md +5 -5
- package/lib/ordinals/bsv20.js +4 -2
- package/lib/ordinals/ordlock.js +39 -14
- package/package.json +4 -1
- package/test/ordinals/bsv20.js +10 -0
- package/test/ordinals/ordlock.js +70 -0
- package/test/security/fail_closed_contracts.js +100 -0
package/bsv.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Type definitions for @smartledger/bsv
|
|
1
|
+
// Type definitions for @smartledger/bsv 6.x
|
|
2
2
|
// Project: https://github.com/codenlighten/smartledger-bsv
|
|
3
3
|
// Forked from: https://github.com/moneybutton/bsv (which forked from https://github.com/bitpay/bitcore-lib)
|
|
4
4
|
// Original definitions by: Lautaro Dragan <https://github.com/lautarodragan>
|
|
@@ -1103,9 +1103,15 @@ declare module '@smartledger/bsv' {
|
|
|
1103
1103
|
payoutCount?: number;
|
|
1104
1104
|
/** Assert the pinned block matches the listing before signing (default true). */
|
|
1105
1105
|
validate?: boolean;
|
|
1106
|
+
/** A pre-computed parseOrdLock(lockingScript) result, to avoid re-parsing. */
|
|
1107
|
+
parsed?: ParsedOrdLock;
|
|
1106
1108
|
payOutput?: Transaction.Output | Buffer;
|
|
1107
1109
|
grind?: SmartContract.GrindOpts;
|
|
1108
1110
|
}
|
|
1111
|
+
interface ParseOpts {
|
|
1112
|
+
/** Network for returned address strings ('livenet' | 'testnet'); default livenet. */
|
|
1113
|
+
network?: string;
|
|
1114
|
+
}
|
|
1109
1115
|
interface CancelParams {
|
|
1110
1116
|
privateKey: PrivateKey;
|
|
1111
1117
|
spend: Transaction;
|
|
@@ -1136,9 +1142,9 @@ declare module '@smartledger/bsv' {
|
|
|
1136
1142
|
/** Build an OrdLock listing (locking) script pinning the required payment output(s). */
|
|
1137
1143
|
function buildOrdLock(params: OrdLockParams): Script;
|
|
1138
1144
|
/** Parse an OrdLock listing into its economic terms; null if not an OrdLock. */
|
|
1139
|
-
function parseOrdLock(script: Script | Buffer | string): ParsedOrdLock | null;
|
|
1145
|
+
function parseOrdLock(script: Script | Buffer | string, opts?: ParseOpts): ParsedOrdLock | null;
|
|
1140
1146
|
/** True if the script is a recognizable OrdLock listing. */
|
|
1141
|
-
function isOrdLock(script: Script | Buffer | string): boolean;
|
|
1147
|
+
function isOrdLock(script: Script | Buffer | string, opts?: ParseOpts): boolean;
|
|
1142
1148
|
/** Build the 1-sat Transaction.Output that lists an ordinal for sale. */
|
|
1143
1149
|
function listInscriptionOutput(params: OrdLockParams): Transaction.Output;
|
|
1144
1150
|
/** Build a P2PKH payment Output from an address/pubkey/key (or pass an Output through). */
|