1.6.5 • Published 2 years ago

webproperty v1.6.5

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

WebProperty

WebProperty is a BEP 46 package https://www.bittorrent.org/beps/bep_0046.html

Using this package you can update your torrents by using a public key

There are 3 modules in this package, they are the following: lookup, managed, and regular

lookup

const {WebProperty, verify} = require('webproperty/lookup.js') lookup is used for the bare minimum, you can publish an infohash under a public key and you can resolve a public key to a infohash

publish

take an infohash and publish it in the network with a public key

webproperty.publish(keypairObject, infoHashString, sequenceNumber, metaObject, (errorCallback, responseCallback))

keypair

is optional, can either be an object with the address(public key) and secret(private key) {address: publickey, secret: privatekey}, or it can be a falsy value like null and it will create a keypair for you

infoHashString

is required, it needs to be a 40 character infohash string of a torrent

sequenceNumber

is optional, it can either be the sequence number you want to publish the data at, or it can be null and the package will take care of the sequence for you

metaObject

is optional, it is an object that holds strings of extra details that you might want to add for the torrent, or leave it null, remember to be careful here because there is a size limit when it comes to saving data in the network

(errorCallback, responseCallback)

is required, errorCallback is returned if it would not publish the data for some reason, responseCallback is returned the data was successfully published


resolve

take a public key and get all of the associated data for it including the infohash tied to it

webproperty.resolve(publicKeyAddressString, (errorCallback, responseCallback))

publicKeyAddressString

is required, it needs to be a 64 character public key string

(errorCallback, responseCallback)

is required, errorCallback is returned if it could not resolve the address to an infohash for some reason, responseCallback is returned if the address was successfully resolved to a infohash


shred

remove an address, if you are helping putting the data back into the network

webproperty.shred(publicKeyAddressString, (errorCallback, responseCallback))

publicKeyAddressString

is required, it needs to be a 64 character public key string

(errorCallback, responseCallback)

is required, errorCallback is returned if it could not remove the data for some reason, responseCallback is returned the data was successfully removed


current

takes an address and gets the data from the network and then puts that data back into the network to keep it active

webproperty.current(publicKeyAddressString, (errorCallback, responseCallback))

publicKeyAddressStrinng

is required, must be a 64 character public key

(errorCallback, responseCallback)

is required, errorCallback is returned if it could not both get the data and put the data back, responseCallback is returned if it both got the data and put it back into the network


createKeypair

creates a keypair for you

webproperty.createKeypair()

return a {address: publicKeyString, secret: privateKeyString} object, both address and secret in the object will be a string


addressFromLink

takes a magnet link or a uri like bt:// or bittorrent:// or just the address by itself

webproperty.addressFromLink(linkString)

returns the public key address after parsing the string


events

error

emits this event if there is an error, the check option must be enabled

webproperty.on('error', error)

the error event is fired when there is an error, the check option must be enabled


managed - docs coming soon

regular - docs coming soon

1.6.4

2 years ago

1.4.6

2 years ago

1.6.3

2 years ago

1.4.5

2 years ago

1.6.2

2 years ago

1.4.4

2 years ago

1.6.1

2 years ago

1.4.3

2 years ago

1.6.0

2 years ago

1.4.2

2 years ago

1.4.1

2 years ago

1.4.0

2 years ago

1.5.9

2 years ago

1.5.8

2 years ago

1.5.7

2 years ago

1.3.9

2 years ago

1.5.6

2 years ago

1.3.8

2 years ago

1.5.5

2 years ago

1.3.7

2 years ago

1.5.4

2 years ago

1.3.6

2 years ago

1.5.3

2 years ago

1.3.5

2 years ago

1.5.2

2 years ago

1.3.4

2 years ago

1.5.1

2 years ago

1.5.0

2 years ago

1.3.2

2 years ago

1.3.1

2 years ago

1.3.0

2 years ago

1.4.9

2 years ago

1.4.8

2 years ago

1.6.5

2 years ago

1.4.7

2 years ago

1.2.9

2 years ago

1.2.8

2 years ago

1.2.7

2 years ago

1.2.6

2 years ago

1.2.5

2 years ago

1.2.4

2 years ago

1.2.3

2 years ago

1.2.2

2 years ago

1.2.1

2 years ago

1.2.0

2 years ago

1.1.9

2 years ago

1.1.8

2 years ago

1.1.7

2 years ago

1.1.6

2 years ago

1.1.5

2 years ago

1.1.4

2 years ago

1.1.3

2 years ago

1.1.2

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.9

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago