@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/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
- /** Mint an amount of a v1 (ticker) token. */
1186
- function buildMint(params: Owner & { tick: string; amt: IntLike }): Script;
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 & { tick: string; amt: IntLike }): Transaction.Output;
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. */