Publish Nerbus source snapshot and build documentation

This commit is contained in:
Nerbus Contributors committed 2026-10-17 18:56:29 +00:00
commit 76cccceca7
198 files changed
+338574

No files matched your search

+13
View File
@@ -0,0 +1,13 @@
const mongoose = require('mongoose');
const Schema = mongoose.Schema;
const D0 = () => mongoose.Types.Decimal128.fromString('0');
const AddressSchema = new Schema({
a_id: { type: String, unique: true, index: true},
name: { type: String }, // no longer used but cannot be removed or else older versions that have data here will not be able to auto move claim name data to the new claimaddress collection
received: { type: Schema.Types.Decimal128, default: D0, index: true },
sent: { type: Schema.Types.Decimal128, default: D0, index: true },
balance: {type: Schema.Types.Decimal128, default: D0, index: true}
}, {id: false});
module.exports = mongoose.model('Address', AddressSchema);
+14
View File
@@ -0,0 +1,14 @@
const mongoose = require('mongoose');
const Schema = mongoose.Schema;
const D0 = () => mongoose.Types.Decimal128.fromString('0');
const AddressTXSchema = new Schema({
a_id: { type: String, index: true},
blockindex: {type: Number, default: 0, index: true},
txid: { type: String, lowercase: true, index: true},
amount: { type: Schema.Types.Decimal128, default: D0, index: true}
}, {id: false});
AddressTXSchema.index({a_id: 1, blockindex: -1});
module.exports = mongoose.model('AddressTx', AddressTXSchema);
+9
View File
@@ -0,0 +1,9 @@
var mongoose = require('mongoose'),
Schema = mongoose.Schema;
var ClaimAddressSchema = new Schema({
a_id: {type: String, unique: true, index: true},
claim_name: {type: String, default: '', index: true}
}, {id: false});
module.exports = mongoose.model('ClaimAddress', ClaimAddressSchema);
+17
View File
@@ -0,0 +1,17 @@
var mongoose = require('mongoose'),
Schema = mongoose.Schema;
var HeavySchema = new Schema({
coin: { type: String },
lvote: { type: Number, default: 0 },
reward: { type: Number, default: 0 },
supply: { type: Number, default: 0 },
cap: { type: Number, default: 0 },
estnext: { type: Number, default: 0 },
phase: { type: String, default: 'N/A'},
maxvote: { type: Number, default: 0 },
nextin: { type: String, default: 'N/A'},
votes: { type: Array, default: [] }
});
module.exports = mongoose.model('Heavy', HeavySchema);
+15
View File
@@ -0,0 +1,15 @@
var mongoose = require('mongoose'),
Schema = mongoose.Schema;
var MarketsSchema = new Schema({
market: { type: String, index: true },
coin_symbol: { type: String },
pair_symbol: { type: String },
summary: { type: Object, default: {} },
chartdata: { type: Array, default: [] },
buys: { type: Array, default: [] },
sells: { type: Array, default: [] },
history: { type: Array, default: [] },
});
module.exports = mongoose.model('Markets', MarketsSchema);
+20
View File
@@ -0,0 +1,20 @@
var mongoose = require('mongoose'),
Schema = mongoose.Schema;
var MasternodeSchema = new Schema({
rank: { type: Number, default: 0 },
network: { type: String, default: "" },
txhash: { type: String, default: "" },
outidx : { type: Number, default: 0},
status : { type: String, default: "" },
addr: { type: String, index: true },
version : { type: Number, default: 0},
lastseen: { type: Number, default: 0 },
activetime: { type: Number, default: 0 },
lastpaid: { type: Number, default: 0 },
claim_name: { type: String, default: '', index: true },
ip_address: { type: String, default: '', index: true },
last_paid_block: {type: Number, default: 0}
}, {id: false});
module.exports = mongoose.model('Masternode', MasternodeSchema);
+12
View File
@@ -0,0 +1,12 @@
var mongoose = require('mongoose'),
Schema = mongoose.Schema;
var NetworkHistorySchema = new Schema({
blockindex: {type: Number, default: 0, index: true},
nethash: { type: Number, default: 0 },
difficulty_pow: { type: Number, default: 0 },
difficulty_pos: { type: Number, default: 0 },
timestamp: { type: Number, default: 0 }
}, {id: false});
module.exports = mongoose.model('NetworkHistory', NetworkHistorySchema);
+12
View File
@@ -0,0 +1,12 @@
var mongoose = require('mongoose'),
Schema = mongoose.Schema;
var OrphanSchema = new Schema({
blockindex: {type: Number, default: 0, index: true},
orphan_blockhash: {type: String, unique: true, index: true},
good_blockhash: {type: String, index: true},
prev_blockhash: {type: String, index: true},
next_blockhash: {type: String, index: true}
}, {id: false});
module.exports = mongoose.model('Orphan', OrphanSchema);
+32
View File
@@ -0,0 +1,32 @@
var mongoose = require('mongoose'),
Schema = mongoose.Schema;
var PeersSchema = new Schema({
createdAt: { type: Date, expires: 86400, default: Date.now() },
address: { type: String, default: "", index: true },
port: { type: String, default: "" },
protocol: { type: String, default: "" },
version: { type: String, default: "" },
country: { type: String, default: "" },
country_code: { type: String, default: "" },
ipv6: { type: Boolean, default: false },
table_type: {
type: String,
enum: ["C", "A", "O"], // "C"=Connections, "A"=AddNodes, "O"=OneTry
default: "C",
index: true
}
});
PeersSchema.index({
table_type: 1,
ipv6: 1,
address: 1,
protocol: -1,
port: 1
}, {
name: 'peer_compound_idx',
background: true
});
module.exports = mongoose.model('Peers', PeersSchema);
+11
View File
@@ -0,0 +1,11 @@
var mongoose = require('mongoose'),
Schema = mongoose.Schema;
var RichlistSchema = new Schema({
coin: { type: String },
received: { type: Array, default: [] },
balance: { type: Array, default: [] },
burned: { type: Array, default: [] }
});
module.exports = mongoose.model('Richlist', RichlistSchema);
+26
View File
@@ -0,0 +1,26 @@
const mongoose = require('mongoose');
const Schema = mongoose.Schema;
const D0 = () => mongoose.Types.Decimal128.fromString('0');
const StatsSchema = new Schema({
coin: { type: String },
count: { type: Number, default: 1 },
last: { type: Number, default: 1 },
supply: { type: Schema.Types.Decimal128, default: D0 },
txes: { type: Number, default: 0 },
connections: { type: Number, default: 0 },
last_price: { type: Schema.Types.Decimal128, default: D0 },
last_usd_price: { type: Schema.Types.Decimal128, default: D0 },
blockchain_last_updated: { type: Number, default: 0 },
reward_last_updated: { type: Number, default: 0 },
masternodes_last_updated: { type: Number, default: 0 },
network_last_updated: { type: Number, default: 0 },
richlist_last_updated: { type: Number, default: 0 },
markets_last_updated: { type: Number, default: 0 },
orphan_index: { type: Number, default: 0 },
orphan_current: { type: Number, default: 0 },
newer_claim_address: { type: Boolean, default: false },
address_count: { type: Number, default: 0 }
});
module.exports = mongoose.model('coinstats', StatsSchema);
+20
View File
@@ -0,0 +1,20 @@
const mongoose = require('mongoose');
const Schema = mongoose.Schema;
const D0 = () => mongoose.Types.Decimal128.fromString('0');
const TxSchema = new Schema({
txid: { type: String, lowercase: true, unique: true, index: true},
vin: { type: Array, default: [] },
vout: { type: Array, default: [] },
total: { type: Schema.Types.Decimal128, default: D0, index: true },
timestamp: { type: Number, default: 0, index: true },
blockhash: { type: String, index: true },
blockindex: {type: Number, default: 0, index: true},
tx_type: { type: String, default: null },
op_return: { type: String, default: null },
algo: { type: String, default: null }
}, {id: false});
TxSchema.index({total: 1, total: -1, blockindex: 1, blockindex: -1});
module.exports = mongoose.model('Tx', TxSchema);