cins

command module
v0.0.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 20, 2024 License: MIT Imports: 6 Imported by: 0

README

cins

cins is an index, block explorer, and command-line wallet. It is experimental software with no warranty. See LICENSE for more details.

While the Ordinals Inscription is an excellent evolution, it is not flawless and does have some issues.

  • It led to UTXO storage expansion on Bitcoin; the Block size has obviously increased since last year.
  • It incurs high transaction fees and may cause congestion across the entire blockchain.
  • It has a longer transaction confirmation time, which is not user-friendly for small retail investors.
  • It lacks composability due to the absence of "Turing completeness" smart contract.

See the docs for documentation and guides.

Installation

go version >= 1.21 is required.

go install github.com/inscription-c/cins@latest

Btcd

btcd is a full node implementation of the bitcoin protocol written in Go. It is a fork of the original btcd code with some modifications to support the cins protocol.

Start btcd:

cins btcd -u root -P root

Wallet

cins wallet is modifications made based on btcd, So you can manage your wallet through btcctl.

Install btcctl with:

go install  github.com/btcsuite/btcd/cmd/btcctl@v0.24.0

Start wallet service with:

cins wallet --wallet_pass root --chain_url <bitcoin_rpc_connect>

It is recommended to use btcd as the wallet's bitcoin node service. Currently, QuickNode's node service is also supported, but the synchronization speed will be slower.

example

Get the default wallet balance:

btcctl getbalance default --wallet --notls --rpcuser root --rpcpass root

Inscribe inscriptions:

cins inscribe -f <inscription_file_path> --c_ins_description <c_ins_description_file_path> --dest <dest_owner_address> --indexer_url <cins_indexer_url>

inscribe flags:

Usage:
  cins inscribe [flags]

Flags:
      --c_brc_20                   is c-brc-20 protocol, add this flag will auto check protocol content effectiveness
      --c_ins_description string   cins protocol description.
      --cbor_metadata string       Include CBOR in file at <METADATA> as inscription metadata
      --compress                   Compress inscription content with brotli.
      --dest string                Send inscription to <DESTINATION> address.
      --dry_run                    Don't sign or broadcast transactions.
  -f, --filepath string            inscription file path
  -h, --help                       help for inscribe
      --indexer_url string         the URL of indexer server (default http://localhost:8335, testnet: http://localhost:18335) (default "http://localhost:8335")
      --json_metadata string       Include JSON in file at <METADATA> converted to CBOR as inscription metadata  
      --no_backup                  Do not back up recovery key.
  -p, --postage uint               Amount of postage to include in the inscription. (default 10000)
  -t, --testnet                    bitcoin testnet3
      --wallet_pass string         wallet password for master private key (default "root")
      --wallet_rpc_pass string     wallet rpc server password (default "root")
      --wallet_rpc_user string     wallet rpc server user (default "root")
      --wallet_url string          the URL of wallet RPC server to connect to (default http://localhost:8332, testnet: localhost:18332) (default "localhost:8332")

Indexer

cins indexer -u root -P root --mysql_addr <mysql_addr> --mysql_user <mysql_user> --mysql_pass <mysql_pass> --mysql_db <mysql_db> --chain_url <bitcoin_rpc_connect>

or run with config file

cins indexer -c <path_to_config_file> 

config example

server:
  testnet: true
  rpc_listen: ":18335"
  no_api: false
  index_sats: true
  index_spend_sats: false
chain:
  url: "http://127.0.0.1:18334"
  username: "root"
  password: "root"
db:
  mysql:
    addr: "127.0.0.1:3306"
    user: "root"
    password: "root"
    db: "cins"
sentry:
  dsn: ""
  traces_sample_rate: 1.0
origins:
  - ".*"

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
rpcclient
Package rpcclient implements a websocket-enabled Bitcoin JSON-RPC client.
Package rpcclient implements a websocket-enabled Bitcoin JSON-RPC client.
index
Package index provides the implementation of Charm type and its associated methods.
Package index provides the implementation of Charm type and its associated methods.
log
internal
zero
Package zero contains functions to clear data from byte slices and multi-precision integers.
Package zero contains functions to clear data from byte slices and multi-precision integers.
pkg
util/txscript
Package txscript implements the bitcoin transaction script language.
Package txscript implements the bitcoin transaction script language.
wallet/wallet
Package wallet provides ...
Package wallet provides ...
log

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL