INSPIP wallet (DEV docs)

Welcome to Inspip Developer Documentation. This documentation is for learning to develop applications for Inspip Wallet.

Getting Started

To develop for Inpip Wallet, install Inpip Wallet on your development machine. Download here. Once Inspip Wallet is installed and running, you should find that new browser tabs have a window.inspip object available in the developer console. This is how your website will interact with Inspip Wallet.

Browser Detection

To verify if the browser is running Inspip Wallet, copy and paste the code snippet below in the developer console of your web browser: if (typeof window.inspip !== 'undefined') { console.log('Inspip Wallet is installed!'); }You can review the full API for the window.inspip object here.

Connecting to Inspip Wallet

"Connecting" or "logging in" to Inspip Wallet effectively means "to access the user's Bitcoin account(s)". You should only initiate a connection request in response to direct user action, such as clicking a button. You should always disable the "connect" button while the connection request is pending. You should never initiate a connection request on page load. We recommend that you provide a button to allow the user to connect Inspip Wallet to your dapp. Clicking this button should call the following method: window.inspip.connect()โ€‹

Methods

connect()

inspip.connect() => Promise<{ address: string, pubkey: string }>

sendBitcoin()

inspip.sendBitcoin(to: string, sats: string, feerate: string) => Promise<string>

sendTokens()

inspip.sendTokens(ticker: string; id: string; to: string, amount: string, feerate: string) => Promise<string>

signMessage()

inspip.signMessage(msg: string) => Promise<string>

verifySign()

inspip.verifySign(msg: string, sign: string) => Promise<boolean>

signPsbt()

inpip.signPsbt(psbt: string, toSignInputs: SignInput[], autoFinalized: boolean) => Promise<string> SignInput:

  • index - number: which input to sign

  • address - string: (at least specify either an address or a publicKey) Which corresponding private key to use for signing

  • publicKey - string: (at least specify either an address or a publicKey) Which corresponding private key to use for signing

  • sighashTypes - number[]: (optionals) sighashTypes

  • disableTweakSigner - boolean :(optionals) the tweakSigner is used by default for signature generation. Enabling this allows for signing with the original private key.

Last updated