UNPKG

ecash-lib

Version:

Library for eCash transaction building

58 lines 2.96 kB
import { Script } from '../script.js'; import { GenesisInfo } from './common.js'; /** LOKAD ID for SLP */ export declare const SLP_LOKAD_ID_STR = "SLP\0"; /** LOKAD ID for SLP */ export declare const SLP_LOKAD_ID: Uint8Array; /** SLP fungible token type number */ export declare const SLP_FUNGIBLE = 1; /** SLP MINT Vault token type number */ export declare const SLP_MINT_VAULT = 2; /** SLP NFT1 Child token type number */ export declare const SLP_NFT1_CHILD = 65; /** SLP NFT1 Group token type number */ export declare const SLP_NFT1_GROUP = 129; /** How many bytes the GENESIS `hash` field must have (or 0) */ export declare const SLP_GENESIS_HASH_NUM_BYTES = 32; /** How many bytes the GENESIS `mintVaultScripthash` field must have */ export declare const SLP_MINT_VAULT_SCRIPTHASH_NUM_BYTES = 20; /** How many outputs a SEND can specify at most */ export declare const SLP_MAX_SEND_OUTPUTS = 19; /** How many bytes every atoms amount has */ export declare const SLP_ATOMS_NUM_BYTES = 8; /** Supported SLP token types */ export interface SlpTokenType { protocol: 'SLP'; type: SlpTokenType_Type; number: SlpTokenType_Number; } /** Possible SLP token types returned by chronik */ export type SlpTokenType_Type = 'SLP_TOKEN_TYPE_FUNGIBLE' | 'SLP_TOKEN_TYPE_MINT_VAULT' | 'SLP_TOKEN_TYPE_NFT1_GROUP' | 'SLP_TOKEN_TYPE_NFT1_CHILD' | 'SLP_TOKEN_TYPE_UNKNOWN'; export type SlpTokenType_Number = typeof SLP_FUNGIBLE | typeof SLP_MINT_VAULT | typeof SLP_NFT1_CHILD | typeof SLP_NFT1_GROUP; export declare const SLP_TOKEN_TYPE_FUNGIBLE: SlpTokenType; export declare const SLP_TOKEN_TYPE_MINT_VAULT: SlpTokenType; export declare const SLP_TOKEN_TYPE_NFT1_GROUP: SlpTokenType; export declare const SLP_TOKEN_TYPE_NFT1_CHILD: SlpTokenType; /** Build an SLP GENESIS OP_RETURN, creating a new SLP token */ export declare function slpGenesis(tokenType: number, genesisInfo: GenesisInfo, initialQuantity: bigint, mintBatonOutIdx?: number): Script; /** * Build an SLP MINT pushdata section, creating new SLP tokens and mint batons * of the given token ID. **/ export declare function slpMint(tokenId: string, tokenType: number, additionalAtoms: bigint, mintBatonOutIdx?: number): Script; /** * Build an SLP MINT VAULT pushdata section, creating new SLP tokens and mint batons * of the given token ID. **/ export declare function slpMintVault(tokenId: string, additionalAtomsArray: bigint[]): Script; /** * Build an SLP SEND pushdata section, moving SLP tokens to different outputs **/ export declare function slpSend(tokenId: string, tokenType: number, sendAtomsArray: bigint[]): Script; /** * Build an SLP BURN pushdata section, intentionally burning SLP tokens. * See https://github.com/badger-cash/slp-self-mint-protocol/blob/master/token-type1-burn.md **/ export declare function slpBurn(tokenId: string, tokenType: number, burnAtoms: bigint): Script; export declare function slpAtoms(atoms: bigint): Uint8Array; //# sourceMappingURL=slp.d.ts.map