Changeset View
Changeset View
Standalone View
Standalone View
modules/chronik-client/test/integration/token_slp_mint_vault.ts
Show First 20 Lines • Show All 234 Lines • ▼ Show 20 Lines | it('Gets an SLP vault genesis tx from the mempool', async () => { | ||||
}, | }, | ||||
]); | ]); | ||||
// The token did not fail parsings | // The token did not fail parsings | ||||
expect(slpVaultGenesis.tokenFailedParsings).to.deep.equal([]); | expect(slpVaultGenesis.tokenFailedParsings).to.deep.equal([]); | ||||
// Normal status | // Normal status | ||||
expect(slpVaultGenesis.tokenStatus).to.eql('TOKEN_STATUS_NORMAL'); | expect(slpVaultGenesis.tokenStatus).to.eql('TOKEN_STATUS_NORMAL'); | ||||
// We can get token info of an slp vault token from the mempool | |||||
const slpGenesisMempoolInfo = await chronik.token(slpVaultGenesisTxid); | |||||
expect(slpGenesisMempoolInfo).to.deep.equal({ | |||||
tokenId: slpVaultGenesisTxid, | |||||
timeFirstSeen: '1300000000', | |||||
tokenType: { | |||||
protocol: 'SLP', | |||||
type: 'SLP_TOKEN_TYPE_MINT_VAULT', | |||||
number: 2, | |||||
}, | |||||
// We get mintVaultScripthash in GenesisInfo for SLP MINT VAULT | |||||
// We get hash in GenesisInfo for SLP | |||||
// We do not get data or authPubkey keys in GenesisInfo for non-ALP | |||||
genesisInfo: { | |||||
tokenTicker: 'SLPVAULT', | |||||
tokenName: '0', | |||||
url: '0', | |||||
hash: '7878787878787878787878787878787878787878787878787878787878787878', | |||||
mintVaultScripthash: '28e2146de5a061bf57845a04968d89cbdab733e3', | |||||
decimals: 0, | |||||
}, | |||||
}); | |||||
}); | }); | ||||
it('Gets a badly constructed SLP v2 Vault Mint tx from the mempool', async () => { | it('Gets a badly constructed SLP v2 Vault Mint tx from the mempool', async () => { | ||||
const chronikUrl = await chronik_url; | const chronikUrl = await chronik_url; | ||||
const chronik = new ChronikClientNode(chronikUrl); | const chronik = new ChronikClientNode(chronikUrl); | ||||
slpVaultMintTxid = await get_slp_vault_mint_txid; | slpVaultMintTxid = await get_slp_vault_mint_txid; | ||||
slpVaultMint = await chronik.tx(slpVaultMintTxid); | slpVaultMint = await chronik.tx(slpVaultMintTxid); | ||||
▲ Show 20 Lines • Show All 52 Lines • Show Last 20 Lines |