Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
@kevinejohn/atfinder
Advanced tools
Paymail Client
The code is hosted on GitHub and the package is available through NPM.
npm i atfinder
const atfinder = require('atfinder')
const paymail = 'ty@tyweb.us'
// Get the bsvalias config file for the domain host
await atfinder.getServerConfig(paymail)
// Get the name and photo URL
await atfinder.getNameAndPhotoURL(paymail)
// Request transaction outputs
const satoshis = 1337
await atfinder.requestOutputsForP2PTransaction(paymail, satoshis)
// Submit an SPV transaction
// Note that the envelope contains the reference number
await atfinder.submitSPVTransaction(paymail, envelope)
Use this function to get the well-known bsvalias configuration object for the server that hosts a handle.
This is a low-level utility.
paymail
String the handle of the target
config
Object? optional configuration options (optional, default {}
)
config.dohServer
String DNS-over-HTTPS resolver (optional, default https://dns.google.com/resolve
)Returns Promise<Object> response from the Paymail server
Use this function to get the name nad avatar photo URL of a handle.
paymail
String the handle of the target
config
Object? optional configuration options
config.dohServer
String DNS-over-HTTPS resolver (optional, default https://dns.google.com/resolve
)Returns Promise<Object> response from the Paymail server
Use this function to get a payment invoice for a P2P or SPV transaction
paymail
String the handle of the target
satoshis
Number the amount of satoshis to send
config
Object? optional configuration options
config.dohServer
String DNS-over-HTTPS resolver (optional, default https://dns.google.com/resolve
)Returns Promise<Object> response from the Paymail server
Use this function to submit an SPV transaction to a Paymail server.
Note that hashwrap can be used to create SPV envelopes.
paymail
String the handle of the recipient
envelope
Object the SPV envelope containing the transaction, which must include all specified envelope fields in addition to those listed
config
Object? optional configuration options
config.dohServer
String DNS-over-HTTPS resolver (optional, default https://dns.google.com/resolve
)Returns Promise<Object> response from the Paymail server
Use this function to submit a P2P transaction to a Paymail server.
As of July 2021, this is how MoneyButton and HandCash handle P2P transactions. However, it is deprecated in favor of using submitSPVTransaction instead where possible.
Note that hashwrap can be used to create SPV envelopes.
paymail
String the handle of the recipient
reference
String the reference number provided by requestOutputsForP2PTransaction
hex
String the signed Bitcoin transaction
metadata
Object? optional information about the payment
config
Object? optional configuration options
config.dohServer
String DNS-over-HTTPS resolver (optional, default https://dns.google.com/resolve
)Returns Promise<Object> response from the Paymail server
Use this function to verify that a given identity key belongs to a handle.
paymail
String the handle of the target
publicKey
String the DER-encoded public key to verify
config
Object? optional configuration options
config.dohServer
String DNS-over-HTTPS resolver (optional, default https://dns.google.com/resolve
)Returns Promise<Object> response from the Paymail server
Use this function to get the identity key of a handle.
paymail
String the handle of the target
config
Object? optional configuration options
config.dohServer
String DNS-over-HTTPS resolver (optional, default https://dns.google.com/resolve
)Returns Promise<Object> response from the Paymail server
Use this function to get the Authrite type-42 certified key for a Paymail handle. Requires an initialized Authrite client as a parameter.
paymail
String the handle of the target
authriteClient
Object the initialized Authrite client to use
config
Object? optional configuration options
config.dohServer
String DNS-over-HTTPS resolver (optional, default https://dns.google.com/resolve
)Returns Promise<Object> response from the Paymail server
Use this function to submit a type-42 payment to a Paymail server.
Note that hashwrap can be used to create SPV envelopes.
paymail
String the handle of the recipient
body
Object the body of the request, including protocol
and transactions
fields
authriteClient
Object an initialized Authrite client to use
config
Object? optional configuration options
config.dohServer
String DNS-over-HTTPS resolver (optional, default https://dns.google.com/resolve
)Returns Promise<Object> response from the Paymail server
The license for the code in this repository is the Open BSV License.
FAQs
Paymail Client
The npm package @kevinejohn/atfinder receives a total of 3 weekly downloads. As such, @kevinejohn/atfinder popularity was classified as not popular.
We found that @kevinejohn/atfinder demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.