Skip to content

A BIP21 compatible URL encoding utility library

License

Notifications You must be signed in to change notification settings

Groestlcoin/bip21grs

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

80 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bip21

build status Version

A BIP21 compatible URL encoding library for Groestlcoin.

Example

var bip21 = require('bip21grs')

var decoded = bip21.decode('groestlcoin:Ffqz14cyvZYJavD76t6oHNDJnGiWcZMVxR?amount=20.3&label=Foobar')

console.log(decoded)
// { address: 'Ffqz14cyvZYJavD76t6oHNDJnGiWcZMVxR',
//   options: {
//     amount: 20.3,
//     label: 'Foobar' }
// }
//
// WARNING: Remember to error check the `.address`!

console.log(bip21.encode('Ffqz14cyvZYJavD76t6oHNDJnGiWcZMVxR'))
// => groestlcoin:Ffqz14cyvZYJavD76t6oHNDJnGiWcZMVxR

console.log(bip21.encode('Ffqz14cyvZYJavD76t6oHNDJnGiWcZMVxR', {
	amount: 20.3,
	label: 'Foobar'
}))
// => groestlcoin:Ffqz14cyvZYJavD76t6oHNDJnGiWcZMVxR?amount=20.3&label=Foobar

License MIT

About

A BIP21 compatible URL encoding utility library

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%