BitCANN - Bitcoin Cash for Assigned Names and Numbers – is a decentralized domain name and identity system built on the Bitcoin Cash Blockchain.
For more details, visit the BitCANN Contracts and Documentation repository.
npm install @bitcann/coreimport { BitCANNManager } from '@bitcann/core';
const manager = new BitCANNManager({
  // Category ID for the BitCANN system
  category: '0x0000000000000000000000000000000000000000',
  // Minimum starting bid in satoshis
  minStartingBid: 100000000,
  // Minimum bid increase percentage
  minBidIncreasePercentage: 5,
  // Inactivity expiry time in blocks/MTP
  inactivityExpiryTime: 1000000,
  // Minimum wait time in blocks/MTP
  minWaitTime: 1,
  // The TLD of the names
  tld: '.bch',
  // Creator Incentive Address
  creatorIncentiveAddress: '',
  // Network provider (optional)
  networkProvider: new ElectrumNetworkProvider('mainnet'),
});// Get name records
const records = await manager.getRecords('satoshi');
// Get name information
const name = await manager.getName('satoshi');
// Create record
const recordTx = await manager.createRecordTransaction({
  name: 'satoshi',
  record: 'Hello, World!',
  address: 'bitcoincash:...'
});// Get active auctions
const auctions = await manager.getAuctions();
// Create auction
const auctionTx = await manager.createAuctionTransaction({
  name: 'satoshi',
  amount: 100000000,
  address: 'bitcoincash:...'
});
// Place bid
const bidTx = await manager.createBidTransaction({
  name: 'satoshi',
  amount: 200000000,
  address: 'bitcoincash:...'
});
// Claim name
const claimTx = await manager.createClaimNameTransaction({
  name: 'satoshi'
});For support, please open an issue on our GitHub repository or create a PR, or join our community chat at Telegram.
| Option | Description | Default | 
|---|---|---|
| category | Category ID for the BitCANN system | Required | 
| minStartingBid | Minimum starting bid in satoshis | Required | 
| minBidIncreasePercentage | Minimum bid increase percentage | Required | 
| inactivityExpiryTime | Inactivity expiry time in blocks/MTP | Required | 
| minWaitTime | Minimum wait time in blocks/MTP | Required | 
| creatorIncentive | Creator Incentive | Optional | 
| networkProvider | Network provider | Optional | 
MIT