Giter VIP home page Giter VIP logo

pipe-wallet's Introduction

PIPE | DMT Wallet

The PIPE | DMT Wallet is a NodeJS wallet and indexer for PIPE protocol tokens. It supports wallet creation, wallet imports as well as sending and receiving tokens.

The wallet is based on the PIPE | DMT specs found here: https://github.com/BennyTheDev/pipe-specs

Currently the wallet does not cover the creation of tokens and PIPE | Art. For those please consult available 3rd party services:

NOTE: this is a pre-alpha release of the PIPE wallet and there are no guarantees everything will work perfectly!

Requirements

  • Windows, Linux (macOS should work, too)
  • Fully indexed Bitcoin Core 24.0.1+ node (config: rpc=1, server=1, txindex=1)
  • Bitcoin Core and bitcoin-cli binaries must run on the same host like the wallet
  • PIPE | DMT Wallet
  • Node >= 18.13.0 & NPM

Installation

  • Run Bitcoin Core in mainnet, testnet or signet mode
  • Install node dependencies: npm install
  • Adjust config/default.json and adjust "bitcoin_cli_path":
    • Point to your bitcoin-cli (bitcoin-cli.exe)
    • Full path required
    • Quote backslashes if you are using them on Windows
  • For faster indexing, you may optionally download the pipe db (https://trac.network/pipe-db.zip).
    • Just download, unzip and put the "pipe" folder into your pipe document root (same location as pipe.mjs)

Updates

If you update straight from the sources, makes sure to run npm install to get the latest package state:

cd /path/to/pipe/
npm install

Usage

Enter the document root of the PIPE wallet and proceed with the following commands. You might need to wait for the wallet to fully index before it returns results.

If running on testnet or signet, you need to add the "testnet" argument at the end of each command. This is very important, especially upon initial and continuous indexing.

Create a new wallet with name

node pipe.mjs walletcreate <walletname>

Import a wallet using a seed phrase for a new local wallet

node pipe.mjs walletrestore <walletname> "<seedphrase>" <optional: custom derivation path>

Note: after restore, you might not see your balances using the "getbalances". In order to load your balances, please use bitcoin-cli's "rescanblockchain" command separately:

/path/to/bitcoin-cli -rpcwallet=<walletname> rescanblockchain 809607

or Windows

d:/path/to/bitcoin-cli.exe -rpcwallet=<walletname> rescanblockchain 809607

809607 is the earliest block relevant for tokens. If you own satoshis from before, you'll need to set an earlier block.

Create a new wallet address for wallet

node pipe.mjs newaddress <walletname> <optional: custom derivation path>

Get all sats and token balances for a wallet:

node pipe.mjs getbalances <walletname>

Get token balance for a specific

associated with it utxo:

node pipe.mjs getbalance <address> <ticker> <ID>

Send tokens to a receiver from :

node pipe.mjs sendtokens <walletname> <address> <ticker> <ID> <amount> <feerate> <optional: custom change address>

Send sats to a receiver from :

node pipe.mjs sendsats <walletname> <address> <amount> <feerate> <optional: custom change address>

Get deployment details for a specific token:

node pipe.mjs getdeployment <ticker> <ID>

Get collectible details for a specific collection and item number:

node pipe.mjs getcollectible <collectionaddress> <number>

Get the max. number for a collection:

node pipe.mjs getcollectiblemax <collectionaddress>

TODO

  • Transaction history stream (websockets)
  • Built-in token & art explorer
  • Token and art creation
  • Auto re-indexing upon reorgs
  • Modularization of code & tests
  • Testing, testing, testing

pipe-wallet's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

pipe-wallet's Issues

Set .cookie file path.

I installed Bitcoin Core on E: drive instead of the default C: drive. So the conf and .cookie files are located in the Bitcoin directory on E: drive. When I deployed Pipe-Wallet following the instructions, it could not find the cookie and conf files. I had to manually copy the two files from E: drive to the corresponding directory on C: drive. However, there is a problem: the two files are on E: drive and will be automatically updated with the Bitcoin Core. However, the two files that I manually copied to C: drive will not be automatically updated. I may need to regularly copy the two files to C: drive. I hope that a custom option for the cookie and conf paths can be added to the default.config file, so that we can set the right path of these two files.

Decentralisation

Can the transactions and wallet generation be created and signed locally and broadcasted to the node at a later stage?

The issue with importing a wallet.

node pipe.mjs walletrestore ""
Why does using this command to import a wallet with a seed phrase result in addresses that are different from the P2TR addresses in the UNISAT wallet?

Feature Request: Add Support for BIP39 Passphrase as an Optional Input

Some users create their BIP39 mnemonic phrases with a passphrase for added security. However, the existing code in pipe-wallet does not provide an option to include a passphrase during the wallet creation process. This results in a limitation for users who want to import wallets created with a passphrase.

const passphrase = "";
const seedWithPassphrase = bip39.mnemonicToSeedSync(mnemonic, passphrase);
let root = bip32.fromSeed(seedWithPassphrase, networks[network]);

Why not support more interfaces?

Hello, I found the following interfaces. Why are the mint and deploy functions in the original pipe.zip file not released? Thanks

sendtokens
sendsats
walletrestore
walletcreate
newaddress
getcollectible
getcollectiblemax
getdeployment
getbalance
getbalances

Imported address balance incorrect

I have imported an address by seed phrase which hold PIPE balance for sure.
But the pipe-wallet shown 0 balance.
I sure that the seed phrase is correct.
It's weird that if i import the address into another wallet such as sparrow or unisat. at least I can see the balance of sats.
But in pipe-wallet nodeJS, it is 0 balance.
I don't know what is wrong with this issue?

image
image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.