@smartledger/bsv 7.3.0 → 7.4.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.
- package/CHANGELOG.md +44 -0
- package/README.md +38 -38
- package/bsv-gdaf.min.js +43 -43
- package/bsv-ltp.min.js +43 -43
- package/bsv-smartcontract.min.js +1 -1
- package/bsv.bundle.js +43 -43
- package/bsv.d.ts +19 -4
- package/bsv.min.js +43 -43
- 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/README.md +15 -5
- package/lib/ordinals/bsv20.js +96 -3
- package/package.json +1 -1
- package/test/ordinals/bsv20.js +115 -0
- package/version.js +1 -1
package/bsv.d.ts
CHANGED
|
@@ -1169,7 +1169,7 @@ declare module '@smartledger/bsv' {
|
|
|
1169
1169
|
/** A parsed BSV-20 payload. Amounts are integer strings (may exceed 2^53). */
|
|
1170
1170
|
interface Payload {
|
|
1171
1171
|
p: 'bsv-20';
|
|
1172
|
-
op: 'deploy' | 'mint' | 'transfer' | 'deploy+mint' | string;
|
|
1172
|
+
op: 'deploy' | 'mint' | 'transfer' | 'deploy+mint' | 'deploy+auth' | 'auth' | 'burn' | string;
|
|
1173
1173
|
tick?: string;
|
|
1174
1174
|
id?: string;
|
|
1175
1175
|
amt?: string;
|
|
@@ -1182,16 +1182,31 @@ declare module '@smartledger/bsv' {
|
|
|
1182
1182
|
const CONTENT_TYPE: string;
|
|
1183
1183
|
/** Deploy a v1 (ticker) token. */
|
|
1184
1184
|
function buildDeploy(params: Owner & { tick: string; max: IntLike; lim?: IntLike; dec?: IntLike }): Script;
|
|
1185
|
-
/**
|
|
1186
|
-
|
|
1185
|
+
/**
|
|
1186
|
+
* Mint an amount of a token — `tick` (v1) or `id` (BSV-21, which additionally
|
|
1187
|
+
* requires an auth input to be spent). Exactly one of the two.
|
|
1188
|
+
*/
|
|
1189
|
+
function buildMint(params: Owner & { amt: IntLike; tick?: string; id?: string }): Script;
|
|
1187
1190
|
/** Transfer an amount of a token — provide `tick` (v1) or `id` (v2 / BSV-21). */
|
|
1188
1191
|
function buildTransfer(params: Owner & { amt: IntLike; tick?: string; id?: string }): Script;
|
|
1189
1192
|
/** Deploy + mint a BSV-21 (id-based) supply in one operation. */
|
|
1190
1193
|
function buildDeployMint(params: Owner & { amt: IntLike; dec?: IntLike; sym?: string; icon?: string }): Script;
|
|
1194
|
+
/** Burn an amount of a BSV-21 token. Id-based only — the spec defines no ticker form. */
|
|
1195
|
+
function buildBurn(params: Owner & { id: string; amt: IntLike }): Script;
|
|
1196
|
+
/**
|
|
1197
|
+
* Deploy a BSV-21 token under a mint AUTHORITY rather than a fixed supply.
|
|
1198
|
+
* No supply is created here and `amt` must not be present.
|
|
1199
|
+
*/
|
|
1200
|
+
function buildDeployAuth(params: Owner & { sym?: string; dec?: IntLike; icon?: string }): Script;
|
|
1201
|
+
/** Mint authority for a BSV-21 token; carries no amount. */
|
|
1202
|
+
function buildAuth(params: Owner & { id: string }): Script;
|
|
1191
1203
|
function createDeployOutput(params: Owner & { tick: string; max: IntLike; lim?: IntLike; dec?: IntLike }): Transaction.Output;
|
|
1192
|
-
function createMintOutput(params: Owner & {
|
|
1204
|
+
function createMintOutput(params: Owner & { amt: IntLike; tick?: string; id?: string }): Transaction.Output;
|
|
1193
1205
|
function createTransferOutput(params: Owner & { amt: IntLike; tick?: string; id?: string }): Transaction.Output;
|
|
1194
1206
|
function createDeployMintOutput(params: Owner & { amt: IntLike; dec?: IntLike; sym?: string; icon?: string }): Transaction.Output;
|
|
1207
|
+
function createBurnOutput(params: Owner & { id: string; amt: IntLike }): Transaction.Output;
|
|
1208
|
+
function createDeployAuthOutput(params: Owner & { sym?: string; dec?: IntLike; icon?: string }): Transaction.Output;
|
|
1209
|
+
function createAuthOutput(params: Owner & { id: string }): Transaction.Output;
|
|
1195
1210
|
/** Parse a BSV-20 payload from a script, JSON string, or object; null if none. */
|
|
1196
1211
|
function parseBsv20(input: Script | Buffer | string | object): Payload | null;
|
|
1197
1212
|
/** True if the input carries a valid BSV-20 inscription. */
|