Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6,274 changes: 3,590 additions & 2,684 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/chat/src/types/common.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export type Chain = 'LTC' | 'BTC' | 'DOGE' | 'PEPE'
export type Chain = 'LTC' | 'BTC' | 'DOGE' | 'PEPE' | 'WOJAK'
export type Network = 'testnet' | 'mainnet' | 'regtest'
4 changes: 2 additions & 2 deletions packages/chess-contracts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"ecpair": "^2.1.0",
"events": "^3.3.0",
"expect": "^29.7.0",
"parcel": "2.15.4",
"parcel": "2.13.3",
"path": "^0.12.7",
"process": "^0.11.10",
"punycode": "^2.1.1",
Expand All @@ -56,7 +56,7 @@
"chai-match-pattern": "^1.3.0",
"dotenv": "^16.4.5",
"mocha": "^11.7.5",
"parcel": "2.15.4",
"parcel": "2.13.3",
"prettier": "~3.2.5",
"source-map-support": "^0.5.21"
},
Expand Down
5 changes: 3 additions & 2 deletions packages/components/built/Auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ function getCoinType(chain = 'LTC', network = 'regtest') {
return 3434;
if (chain === 'BCH')
return 145;
if (chain === 'WOJAK')
return 20760;
throw new Error(`Unsupported chain ${chain} or network ${network}`);
}
function getBip44Path({ purpose = 44, coinType = 1, account = 0 } = {}) {
Expand All @@ -55,8 +57,7 @@ function loggedInConfiguration() {
url: localStorage.getItem('URL') || getEnv('URL'),
path: localStorage.getItem('PATH') || getEnv('PATH'),
moduleStorageType: localStorage.getItem('MODULE_STORAGE_TYPE') ||
getEnv('MODULE_STORAGE_TYPE') ||
'taproot',
getEnv('MODULE_STORAGE_TYPE'),
};
}
function getComputer(options = {}) {
Expand Down
4 changes: 2 additions & 2 deletions packages/components/src/Auth.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ function getCoinType(chain: string = 'LTC', network: string = 'regtest'): number
if (chain === 'DOGE') return 3
if (chain === 'PEPE') return 3434
if (chain === 'BCH') return 145
if (chain === 'WOJAK') return 20760

throw new Error(`Unsupported chain ${chain} or network ${network}`)
}
Expand Down Expand Up @@ -77,8 +78,7 @@ function loggedInConfiguration() {
path: localStorage.getItem('PATH') || getEnv('PATH'),
moduleStorageType:
(localStorage.getItem('MODULE_STORAGE_TYPE') as ModuleStorageType) ||
getEnv('MODULE_STORAGE_TYPE') ||
'taproot',
getEnv('MODULE_STORAGE_TYPE'),
}
}

Expand Down
20 changes: 10 additions & 10 deletions packages/lib/dist/bc-lib.browser.min.mjs

Large diffs are not rendered by default.

22 changes: 11 additions & 11 deletions packages/lib/dist/bc-lib.commonjs.min.cjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/lib/dist/bc-lib.main.es.mjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/lib/types/config/constants.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ export declare const FEE_ERROR_THRESHOLD = 1
export declare const IO_DESCRIPTOR_SCRIPT_LENGTH = 71
export declare const BYTES_PER_SIG_OP = 20
export declare const ALLOWED_STREAM_KEYS: string[]
export declare const SUPPORTED_CHAINS: readonly ['LTC', 'BTC', 'DOGE', 'PEPE']
export declare const SUPPORTED_CHAINS: readonly ['LTC', 'BTC', 'DOGE', 'PEPE', 'WOJAK']
2 changes: 2 additions & 0 deletions packages/nakamotojs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
"litecoin",
"dogecoinjs",
"dogecoin",
"wojakcoinjs",
"wojakcoin",
"javascript"
],
"repository": {
Expand Down
3 changes: 3 additions & 0 deletions packages/nakamotojs/src/networks.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ export declare const pepecointestnet: Network;
export declare const dogecoin: Network;
export declare const dogecoinregtest: Network;
export declare const dogecointestnet: Network;
export declare const wojakcoin: Network;
export declare const wojakcoinregtest: Network;
export declare const wojakcointestnet: Network;
export declare function getNetwork(chain: string, network: string): Network;
export declare const NETWORKS: Record<string, any>;
export {};
48 changes: 48 additions & 0 deletions packages/nakamotojs/src/networks.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,39 @@ export const dogecointestnet = {
scriptHash: 0xc4,
wif: 0xf1,
};
export const wojakcoin = {
messagePrefix: '\x18WojakCoin Signed Message:\n',
bech32: 'wojak',
bip32: {
public: 0x0488b21e,
private: 0x0488ade4,
},
pubKeyHash: 0x49,
scriptHash: 0x05,
wif: 0xc9,
};
export const wojakcoinregtest = {
messagePrefix: '\x18WojakCoin Signed Message:\n',
bech32: 'rwojak',
bip32: {
public: 0x043587cf,
private: 0x04358394,
},
pubKeyHash: 0x6f,
scriptHash: 0xc4,
wif: 0xef,
};
export const wojakcointestnet = {
messagePrefix: '\x18WojakCoin Signed Message:\n',
bech32: 'twojak',
bip32: {
public: 0x043587cf,
private: 0x04358394,
},
pubKeyHash: 0x6f,
scriptHash: 0xc4,
wif: 0xef,
};
export function getNetwork(chain, network) {
switch (chain) {
case 'BTC':
Expand Down Expand Up @@ -176,6 +209,17 @@ export function getNetwork(chain, network) {
default:
throw new Error(`Invalid network ${network}`);
}
case 'WOJAK':
switch (network) {
case 'mainnet':
return wojakcoin;
case 'testnet':
return wojakcointestnet;
case 'regtest':
return wojakcoinregtest;
default:
throw new Error(`Invalid network ${network}`);
}
default:
throw new Error(`Invalid chain ${network}`);
}
Expand All @@ -197,4 +241,8 @@ export const NETWORKS = {
dogecoin,
dogecoinregtest,
dogecointestnet,
// WojakCoin
wojakcoin,
wojakcoinregtest,
wojakcointestnet,
};
51 changes: 51 additions & 0 deletions packages/nakamotojs/ts_src/networks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,42 @@ export const dogecointestnet: Network = {
scriptHash: 0xc4,
wif: 0xf1,
};

export const wojakcoin: Network = {
messagePrefix: '\x18WojakCoin Signed Message:\n',
bech32: 'wojak', // TODO: WojakCoin doesn't use bech32, make type optional
bip32: {
public: 0x0488b21e,
private: 0x0488ade4,
},
pubKeyHash: 0x49,
scriptHash: 0x05,
wif: 0xc9,
};

export const wojakcoinregtest: Network = {
messagePrefix: '\x18WojakCoin Signed Message:\n',
bech32: 'rwojak',
bip32: {
public: 0x043587cf,
private: 0x04358394,
},
pubKeyHash: 0x6f,
scriptHash: 0xc4,
wif: 0xef,
};

export const wojakcointestnet: Network = {
messagePrefix: '\x18WojakCoin Signed Message:\n',
bech32: 'twojak',
bip32: {
public: 0x043587cf,
private: 0x04358394,
},
pubKeyHash: 0x6f,
scriptHash: 0xc4,
wif: 0xef,
};
export function getNetwork(chain: string, network: string): Network {
switch (chain) {
case 'BTC':
Expand Down Expand Up @@ -203,6 +239,17 @@ export function getNetwork(chain: string, network: string): Network {
default:
throw new Error(`Invalid network ${network}`);
}
case 'WOJAK':
switch (network) {
case 'mainnet':
return wojakcoin;
case 'testnet':
return wojakcointestnet;
case 'regtest':
return wojakcoinregtest;
default:
throw new Error(`Invalid network ${network}`);
}
default:
throw new Error(`Invalid chain ${network}`);
}
Expand All @@ -225,4 +272,8 @@ export const NETWORKS: Record<string, any> = {
dogecoin,
dogecoinregtest,
dogecointestnet,
// WojakCoin
wojakcoin,
wojakcoinregtest,
wojakcointestnet,
};
85 changes: 85 additions & 0 deletions packages/node/chain-setup/WOJAK/mainnet/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
# Chain: BTC, LTC, DOGE, PEPE or WOJAK
BCN_CHAIN='WOJAK'
# Network: mainnet, testnet, or regtest
BCN_NETWORK='mainnet'

# Postgres Connection Credentials
POSTGRES_USER='bcn'
POSTGRES_PASSWORD='bcn'
POSTGRES_DB='bcn'
POSTGRES_HOST='db'
POSTGRES_PORT='5432'
POSTGRES_MAX_CONNECTIONS='20'
POSTGRES_IDLE_TIMEOUT_MILLIS='3000'

# Bitcoin Node Settings
BITCOIN_IMAGE='reallyshadydev/wojakcoin-core:1.21.3.0'
BITCOIN_DATA_DIR='/root/.wojakcoin'
BITCOIN_CONF_FILE='wojakcoin.conf'

# Node Settings
# RPC Client Credentials
BITCOIN_RPC_USER='bcn-admin'
BITCOIN_RPC_PASSWORD='kH4nU5Okm6-uyC0_mA5ztVNacJqZbYd_KGLl6mx722A='
BITCOIN_RPC_HOST='node'
BITCOIN_RPC_PORT='20760'
BITCOIN_P2P_PORT='20759'
BITCOIN_RPC_PROTOCOL='http'
# Default wallet name
BITCOIN_DEFAULT_WALLET='defaultwallet'

# Port for Bitcoin Computer Node
BCN_PORT='1031'

# Enable to launch with fixed number of parallel workers
# BCN_NUM_WORKERS='6'

BCN_ZMQ_URL='tcp://node:28332'
BCN_ZMQ_PORT='28332'
# Height of the block at which the zmq connection should start
BCN_ZMQ_ACTIVATION_HEIGHT=300000


# Url of the Bitcoin Computer Node, defaults to localhost
BCN_URL='http://127.0.0.1:1031'

# Allowed RPC Methods
BCN_ALLOWED_RPC_METHODS='^get|^gen|^send|^lis'

# Setup the environment to 'prod' (no console logs) or 'dev'
BCN_ENV='dev'

# Winston Logger Settings
# Log levels
# 0: Error logs only
# 1: Error and warning logs
# 2: Error, warning and info logs
# 3: Error, warning, info and http logs
# 4: Error, warning, info, http and debug logs
BCN_LOG_LEVEL='4'
# Maximum number of logs to keep. If not set, no logs will be removed. This can be
# a number of files or number of days. If using days, add 'd' as the suffix.
BCN_LOG_MAX_FILES='14d'
# Maximum log file size. You can use 'k' for KB, 'm' for MB, and 'g' for GB. Once
# the size of the log file exceeds the specified size, the log is rotated. If no
# size is specified the log is not rotated.
BCN_LOG_MAX_SIZE='20m'
# A boolean to define whether or not to gzip archived log files.
BCN_LOG_ZIP='false'

# Show logs at db service
BCN_SHOW_DB_LOGS='false'

# Rate Limiting Settings
BCN_RATE_LIMIT_ENABLED='false'
BCN_RATE_LIMIT_WINDOW='900000'
BCN_RATE_LIMIT_MAX='300'
BCN_RATE_LIMIT_STANDARD_HEADERS='true'
BCN_RATE_LIMIT_LEGACY_HEADERS='false'

# Comma separated list of banned countries, encoded as ISO-3166 alpha2 country.
# codes (see https://www.geonames.org/countries/)
BCN_BANNED_COUNTRIES=

# Default value for protocol in the _url parameter. Set to https if behind a load balancer.
BCN_OFFCHAIN_PROTOCOL=
16 changes: 16 additions & 0 deletions packages/node/chain-setup/WOJAK/mainnet/wojakcoin.conf.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
printtoconsole=1

server=1
txindex=1

bytespersigop=0

rpcbind=0.0.0.0
rpcallowip=0.0.0.0/0
rpcauth=bcn-admin:c71460f0f08e4eeec90e033c04f7bb82$c36e8561d46abbf3bf13da6b88612c19d758d46d02c45cd2716f06a13ec407af
rpcport=20760

port=20759

zmqpubhashtx=tcp://0.0.0.0:28332
zmqpubrawtx=tcp://0.0.0.0:28332
Loading