From fdd941083df67b69a0594a785fee09b1f22b2c1e Mon Sep 17 00:00:00 2001 From: Lee Miller Date: Mon, 9 Jan 2023 03:46:20 +0200 Subject: [PATCH] Update links to the Spec --- lib/address.js | 2 +- lib/messages.js | 15 ++++++++------- lib/objects.js | 10 +++++----- lib/pow.js | 2 +- lib/structs.js | 22 +++++++++++----------- lib/user-agent.js | 2 +- 6 files changed, 27 insertions(+), 26 deletions(-) diff --git a/lib/address.js b/lib/address.js index 95ae330..9051249 100644 --- a/lib/address.js +++ b/lib/address.js @@ -11,7 +11,7 @@ * // Or create it from passphrase. * var addr2 = Address.fromPassphrase("test"); * console.log("Deterministic Bitmessage address:", addr2.encode()); - * @see {@link https://bitmessage.org/wiki/Address} + * @see {@link https://pybitmessage.rtfd.io/en/v0.6/address.html} * @module bitmessage/address */ // TODO(Kagami): Document getters/setters. diff --git a/lib/messages.js b/lib/messages.js index b82ec7b..c173f7c 100644 --- a/lib/messages.js +++ b/lib/messages.js @@ -1,8 +1,7 @@ /** * Working with messages. - * @see {@link https://bitmessage.org/wiki/Protocol_specification#Message_types} - * @see {@link https://bitmessage.org/wiki/Protocol_specification_v3#Message_types} - * @see {@link https://bitmessage.org/Bitmessage%20Technical%20Paper.pdf} + * @see {@link https://pybitmessage.rtfd.io/en/v0.6/protocol.html#message-types} + * @see {@link https://wiki.bitmessage.org/w/index.php?title=Protocol_specification&oldid=23#Message_types} * @module bitmessage/messages * @example * var structs = require("bitmessage").structs; @@ -30,6 +29,8 @@ * console.log(structs.message.decode(verackmsg).command); // verack */ +// broken link: https://bitmessage.org/Bitmessage%20Technical%20Paper.pdf + "use strict"; var objectAssign = Object.assign || require("object-assign"); @@ -71,7 +72,7 @@ exports.getCommand = function(buf) { /** * `version` message. - * @see {@link https://bitmessage.org/wiki/Protocol_specification#version} + * @see {@link https://pybitmessage.rtfd.io/en/v0.6/protocol.html#version} * @namespace * @static */ @@ -277,7 +278,7 @@ function checkAddrOpts(opts) { /** * `addr` message. Provide information on known nodes of the network. - * @see {@link https://bitmessage.org/wiki/Protocol_specification#addr} + * @see {@link https://pybitmessage.rtfd.io/en/v0.6/protocol.html#addr} * @namespace * @static */ @@ -357,7 +358,7 @@ var addr = exports.addr = { /** * `inv` message. Allows a node to advertise its knowledge of one or * more objects. - * @see {@link https://bitmessage.org/wiki/Protocol_specification#inv} + * @see {@link https://pybitmessage.rtfd.io/en/v0.6/protocol.html#inv} * @namespace * @static */ @@ -431,7 +432,7 @@ var inv = exports.inv = { * `getdata` message. `getdata` is used in response to an * [inv]{@link module:bitmessage/messages.inv} message to retrieve the * content of a specific object after filtering known elements. - * @see {@link https://bitmessage.org/wiki/Protocol_specification#getdata} + * @see {@link https://pybitmessage.rtfd.io/en/v0.6/protocol.html#getdata} * @namespace */ exports.getdata = objectAssign({}, inv, { diff --git a/lib/objects.js b/lib/objects.js index 46aef8a..8fafedf 100644 --- a/lib/objects.js +++ b/lib/objects.js @@ -2,7 +2,7 @@ * Working with objects. * NOTE: Most operations with objects are asynchronous and return * promises. - * @see {@link https://bitmessage.org/wiki/Protocol_specification#Object_types} + * @see {@link https://pybitmessage.rtfd.io/en/v0.6/protocol.html#object-types} * @module bitmessage/objects */ @@ -85,7 +85,7 @@ function prependNonce(obj, opts) { * `getpubkey` object. When a node has the hash of a public key (from an * address) but not the public key itself, it must send out a request * for the public key. - * @see {@link https://bitmessage.org/wiki/Protocol_specification#getpubkey} + * @see {@link https://pybitmessage.rtfd.io/en/v0.6/protocol.html#getpubkey} * @namespace * @static */ @@ -246,7 +246,7 @@ function findAddrByTag(addrs, tag) { /** * `pubkey` object. - * @see {@link https://bitmessage.org/wiki/Protocol_specification#pubkey} + * @see {@link https://pybitmessage.rtfd.io/en/v0.6/protocol.html#pubkey} * @namespace * @static */ @@ -562,7 +562,7 @@ function decodeMessage(message, encoding) { /** * `msg` object. - * @see {@link https://bitmessage.org/wiki/Protocol_specification#msg} + * @see {@link https://pybitmessage.rtfd.io/en/v0.6/protocol.html#msg} * @namespace * @static */ @@ -871,7 +871,7 @@ function tryDecryptBroadcastV4(subscriptions, buf) { /** * `broadcast` object. - * @see {@link https://bitmessage.org/wiki/Protocol_specification#broadcast} + * @see {@link https://pybitmessage.rtfd.io/en/v0.6/protocol.html#broadcast} * @namespace * @static */ diff --git a/lib/pow.js b/lib/pow.js index 2b2fc4b..f84914b 100644 --- a/lib/pow.js +++ b/lib/pow.js @@ -1,6 +1,6 @@ /** * Implements proof of work. - * @see {@link https://bitmessage.org/wiki/Proof_of_work} + * @see {@link https://pybitmessage.rtfd.io/en/v0.6/pow.html} * @module bitmessage/pow */ diff --git a/lib/structs.js b/lib/structs.js index 12cf19c..c20a568 100644 --- a/lib/structs.js +++ b/lib/structs.js @@ -1,7 +1,7 @@ /** * Implements common structures. * @see {@link - * https://bitmessage.org/wiki/Protocol_specification#Common_structures} + * https://pybitmessage.rtfd.io/en/v0.6/protocol.html#common-structures} * @module bitmessage/structs * @example * var structs = require("bitmessage").structs; @@ -93,7 +93,7 @@ function findMagic(buf) { /** * Message structure. - * @see {@link https://bitmessage.org/wiki/Protocol_specification#Message_structure} + * @see {@link https://pybitmessage.rtfd.io/en/v0.6/protocol.html#id1} * @namespace * @static */ @@ -274,7 +274,7 @@ var message = exports.message = { * An `object` is a message which is shared throughout a stream. It is * the only message which propagates; all others are only between two * nodes. - * @see {@link https://bitmessage.org/wiki/Protocol_specification#object} + * @see {@link https://pybitmessage.rtfd.io/en/v0.6/protocol.html#object} * @namespace * @static */ @@ -499,7 +499,7 @@ var object = exports.object = { /** * Variable length integer. - * @see {@link https://bitmessage.org/wiki/Protocol_specification#Variable_length_integer} + * @see {@link https://pybitmessage.rtfd.io/en/v0.6/protocol.html#variable-length-integer} * @namespace * @static */ @@ -602,7 +602,7 @@ var var_int = exports.var_int = { /** * Variable length string. - * @see {@link https://bitmessage.org/wiki/Protocol_specification#Variable_length_string} + * @see {@link https://pybitmessage.rtfd.io/en/v0.6/protocol.html#variable-length-string} * @namespace */ exports.var_str = { @@ -646,7 +646,7 @@ exports.var_str = { /** * Variable length list of integers. - * @see {@link https://bitmessage.org/wiki/Protocol_specification#Variable_length_list_of_integers} + * @see {@link https://pybitmessage.rtfd.io/en/v0.6/protocol.html#variable-length-list-of-integers} * @namespace */ exports.var_int_list = { @@ -712,7 +712,7 @@ function inet_ntop(buf) { /** * Network address. - * @see {@link https://bitmessage.org/wiki/Protocol_specification#Network_address} + * @see {@link https://pybitmessage.rtfd.io/en/v0.6/protocol.html#network-address} * @namespace */ exports.net_addr = { @@ -814,7 +814,7 @@ exports.net_addr = { /** * Inventory vector. - * @see {@link https://bitmessage.org/wiki/Protocol_specification#Inventory_Vectors} + * @see {@link https://pybitmessage.rtfd.io/en/v0.6/protocol.html#inventory-vectors} * @namespace */ exports.inv_vect = { @@ -833,7 +833,7 @@ exports.inv_vect = { /** * Encrypted payload. - * @see {@link https://bitmessage.org/wiki/Protocol_specification#Encrypted_payload} + * @see {@link https://pybitmessage.rtfd.io/en/v0.6/protocol.html#encrypted-payload} * @namespace encrypted * @static */ @@ -940,7 +940,7 @@ var Bitfield = function(size) { /** * Service features bitfield (MSB 0). - * @see {@link https://bitmessage.org/wiki/Protocol_specification#version} + * @see {@link https://pybitmessage.rtfd.io/en/v0.6/protocol.html#version} * @param {Buffer=} buf - A 8-byte bitfield buffer (will be created if * not provided or will be copied if `opts.copy` is `true`) * @param {Object=} opts - Options @@ -1006,7 +1006,7 @@ var ServicesBitfield = exports.ServicesBitfield = objectAssign(Bitfield(64), { /** * Pubkey features bitfield (MSB 0). - * @see {@link https://bitmessage.org/wiki/Protocol_specification#Pubkey_bitfield_features} + * @see {@link https://pybitmessage.rtfd.io/en/v0.6/protocol.html#pubkey-bitfield-features} * @param {Buffer=} buf - A 4-byte bitfield buffer (will be created if * not provided or will be copied if `opts.copy` is `true`) * @param {Object=} opts - Options diff --git a/lib/user-agent.js b/lib/user-agent.js index f1f05c5..cd1e57d 100644 --- a/lib/user-agent.js +++ b/lib/user-agent.js @@ -1,6 +1,6 @@ /** * Working with Bitmessage user agents. - * @see {@link https://bitmessage.org/wiki/User_Agent} + * @see {@link https://pybitmessage.rtfd.io/en/v0.6/useragent.html} * @module bitmessage/user-agent */