Skip to content

pulling upstream #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 305 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
305 commits
Select commit Hold shift + click to select a range
2bda4e0
MLG-1161 return success: false if artifact not found in oipd getArtif…
Mar 4, 2019
a004c3d
Merge branch 'mlg-1161-js-oip-missing-artifact' into 'master'
Mar 4, 2019
0e8d5e9
Add edit documentation
OstlerDev Mar 5, 2019
433d8e7
Update edit function paramater requirements
OstlerDev Mar 5, 2019
ca4b187
Add Edit Record base
OstlerDev Mar 5, 2019
be9bfc3
Add version to meta in preperation of OIPd update
OstlerDev Mar 5, 2019
5dd62c0
Add standardjs
OstlerDev Mar 5, 2019
183f35d
change tabs to 2 spaces (standardjs)
OstlerDev Mar 5, 2019
b26d8e9
Fix all standardjs issues/warnings
OstlerDev Mar 5, 2019
d02ee94
Add EditRecord tests (expected functionality)
OstlerDev Mar 7, 2019
a164c57
standard --fix edit.test.js
OstlerDev Mar 7, 2019
4ad12ee
Add the Squash Patch algorithm
OstlerDev Mar 7, 2019
8945ad1
Add unsquashPatch algorithm
OstlerDev Mar 7, 2019
4e14f53
Add more unsquash tests
OstlerDev Mar 7, 2019
0659899
Implement createRFC6902Patch function
OstlerDev Mar 7, 2019
0f904d5
Add rfc6902 package
OstlerDev Mar 7, 2019
635666c
Add toJSON and fromJSON (and tests)
OstlerDev Mar 7, 2019
8277244
Create and Apply Patches :)
OstlerDev Mar 7, 2019
42267c1
Split tests into Unit and Integration
OstlerDev Mar 11, 2019
37f3f7f
Add signature tests
OstlerDev Mar 11, 2019
abd3d4f
Add preimage function
OstlerDev Mar 11, 2019
7664959
Add logging for Private Key Import
OstlerDev Mar 11, 2019
33705cf
Add GitLab CI Pipelines
OstlerDev Mar 11, 2019
0a6bf82
Use `registry.npmjs.org` for package.json
OstlerDev Mar 11, 2019
e440369
Add `isValid` function to EditRecord
OstlerDev Mar 12, 2019
281e7d3
Add toJSON and fromJSON to OIP Record
OstlerDev Mar 12, 2019
f00f485
Update snowflake URL and fix integration test
OstlerDev Mar 12, 2019
fc3d1f2
Merge branch 'master' into 'mlg-1137_publish-edit-records'
OstlerDev Mar 12, 2019
589e9ee
MLG-1161: Fix Artifact Error
OstlerDev Mar 12, 2019
e7d3ab8
Merge branch 'mlg-1137_publish-edit-records' of gitlab.com:mediciland…
OstlerDev Mar 12, 2019
1d8d3d4
Add Record
OstlerDev Mar 12, 2019
ddf80aa
Set Edit TXID & validate patch is not empty
OstlerDev Mar 12, 2019
3178ee6
Add Edit Version to Artifact Class
OstlerDev Mar 13, 2019
35454fb
Split out broadcastRecord function
OstlerDev Mar 13, 2019
f2cb36b
Only update Timestamp if it is not set
OstlerDev Mar 13, 2019
eb1da7e
Fix "emptyPatch" validation checks
OstlerDev Mar 13, 2019
0603643
Implement oip.edit(record)
OstlerDev Mar 13, 2019
4b6b25b
Update Version to 1.1.0-mlg-0
OstlerDev Mar 13, 2019
35310ed
Add documentation
OstlerDev Mar 15, 2019
55b3d37
Move signing of Patched Record to Edit Class
OstlerDev Mar 18, 2019
78c551f
Merge branch 'mlg-1137_publish-edit-records' into 'master'
OstlerDev Mar 19, 2019
17b9fc6
Create base class for FloTransaction and FloTransactionBuilder
OstlerDev Mar 28, 2019
0fa69b9
Add FloTX Clone function
OstlerDev Mar 28, 2019
2eb4ab3
Calculate byteLength
OstlerDev Mar 28, 2019
74e8f94
Move to Modules
OstlerDev Mar 28, 2019
a994df5
Add floTX byteLength tests
OstlerDev Mar 28, 2019
71fd213
Add floTX serialization
OstlerDev Mar 28, 2019
0515927
Create buffer if not passed
OstlerDev Apr 4, 2019
c07833a
update ipfs dependency
Apr 4, 2019
4a3ed55
Merge branch 'fix-multipart-two-digit' into 'master'
Apr 4, 2019
ca92c11
Update property records to MLG spec
Feb 4, 2019
e8686c5
Create editable records (EditRecord)
OstlerDev Apr 5, 2019
9cce022
Merge pull request #5 from canadaduane/edit-record
orpheus Apr 8, 2019
d75935d
Merge branch 'canadaduane-update-property-records-spec'
orpheus Apr 8, 2019
a867d6f
publish 2.0.0 with PR merges
orpheus Apr 9, 2019
10bac42
Format to standardjs to fix tests
OstlerDev Apr 10, 2019
7087e9e
compile docs and format
orpheus Apr 10, 2019
4d83ef8
add explorerUrl option param to OIP and ExplorerWallet classes
orpheus Apr 10, 2019
e19375b
Merge branch 'master' into pull/6
orpheus Apr 10, 2019
985f97d
Merge branch 'master' into dev
orpheus Apr 10, 2019
b1527df
code-format
orpheus Apr 10, 2019
552f3df
Merge pull request #7 from oipwg/dev
orpheus Apr 10, 2019
558153b
publish 2.1.0
orpheus Apr 10, 2019
cf2f11a
Hardcode Port for Rebroadcasting
Apr 16, 2019
7d87a93
Merge branch 'connect-testnet-peers' into 'master'
Apr 16, 2019
c030d99
update default daemonUrl to api.oip.io/oip
orpheus Apr 23, 2019
6860e3f
push last changes
orpheus Apr 26, 2019
2464ad9
Use latest bitcoinjs-lib instead of fork
OstlerDev May 6, 2019
6da139a
Fix SignatureHash for non SegWit transactions
OstlerDev May 6, 2019
c5a0cd4
update packes in an npm audit
orpheus May 6, 2019
2fa6063
update jest and babel jest to fix npm security vulnerabilities
orpheus May 6, 2019
7ee7b1b
add oip5 api handlers and tests
orpheus May 7, 2019
8fb2e3b
add two additional api methods to fetch multiple records/transactions…
orpheus May 7, 2019
27b1fe9
change npm 'prepare' script to 'prepublishOnly' so jest tests don't g…
orpheus May 7, 2019
432e2e0
push lib directory to github
orpheus May 7, 2019
8c08b5f
Support SegWit transaction signatures
OstlerDev May 7, 2019
af92603
Update FLOTransactionBuilder to latest bitcoinjs-lib
OstlerDev May 7, 2019
f7bb28f
set a default localhost url + param. fix jsdoc param
orpheus May 7, 2019
c7a4325
Integrate new FLOTransactionBuilder into wallet modules
OstlerDev May 7, 2019
8a8e324
Update ExplorerWallet test address
OstlerDev May 7, 2019
5e8424b
Rename files to have proper prefix
OstlerDev May 7, 2019
473f381
add search apis for records and templates
orpheus May 9, 2019
7fbd880
add commonParams to api methods and update jsdoc
orpheus May 9, 2019
ed76db0
update tests to reflect common param
orpheus May 9, 2019
bf3c731
update version and add npm script
orpheus May 9, 2019
0a983bf
compile and generate-docs
orpheus May 9, 2019
b7147b4
Merge master into mlg-1127
OstlerDev May 9, 2019
0bd0ee3
Fix bug where a longer buffer passed (for SignatureHash) was getting …
OstlerDev May 10, 2019
a98880e
Add fromBuffer for FLOTransaction
OstlerDev May 10, 2019
50d9a6d
Add transaction signature validation test script
OstlerDev May 10, 2019
5b5c6cd
Increase version
OstlerDev May 10, 2019
71d88d6
throw errors on oip5 apis instead of returning them
orpheus May 13, 2019
1f0d707
compile code with changes
orpheus May 13, 2019
5376b53
remove undefined variable
orpheus May 13, 2019
2849b52
compile
orpheus May 13, 2019
1a0b854
increase flo mainnet floFeePerKb
orpheus May 17, 2019
d31fa04
compile and generate docs
orpheus May 20, 2019
50a92e1
Add sighash and tx_valid tests from FLOcore
OstlerDev May 20, 2019
bc428c9
Merge branch 'mlg-1127_fix-signature-hash' into 'master'
OstlerDev May 20, 2019
09e8cfc
Update verifyTransactionSignature.js
OstlerDev May 20, 2019
c76be40
Merge branch 'fix-verify-transaction-signature-script' into 'master'
OstlerDev May 20, 2019
568d2d7
Update version number to be in-line with GitHub
OstlerDev May 21, 2019
bff9b23
Merge branch '2.2.0-mlg-0' into 'master'
OstlerDev May 21, 2019
78efeef
Import Private Key Config Flag
OstlerDev May 23, 2019
1536d0e
Add getRecord function to DaemonAPI
OstlerDev May 23, 2019
b63d447
Peer use passed network setting
OstlerDev May 23, 2019
800216e
Import ECPair from bitcoinjs-lib
OstlerDev May 23, 2019
645f41a
Allow configurable txFeePerByte RPCWallet
OstlerDev May 23, 2019
4ba6a07
Allow network name to be mainnet or livenet
OstlerDev May 23, 2019
49dec84
Update version number
OstlerDev May 23, 2019
6de226c
Merge branch 'go-live-changes' into 'master'
OstlerDev May 23, 2019
5390a70
Use getRecord for Edits
OstlerDev May 23, 2019
e9ab161
Merge branch 'get-record-edit' into 'master'
May 23, 2019
8f194ea
Pass the network down to Peer
OstlerDev May 28, 2019
186b9ba
Merge branch 'fix-peer-network-setting' into 'master'
OstlerDev May 28, 2019
b1b1da3
Parse and handle fcoin network name
OstlerDev May 30, 2019
e1acec8
Merge branch 'peer-network-setting-rename' into 'master'
OstlerDev May 30, 2019
4d4d3a4
update vulnerable dependencies
orpheus May 30, 2019
abcfad0
Merge pull request #8 from oipwg/oip5-apis
orpheus May 30, 2019
a3e1717
add verifiedPub function
orpheus Jun 5, 2019
e18dea0
fix bug update package publish
orpheus Jun 5, 2019
2c7d700
bug fix isVerified method
orpheus Jun 5, 2019
defd6c5
update && publish
orpheus Jun 5, 2019
4e6530a
update vulnerable dependencies
orpheus Jun 6, 2019
705cf9a
add optional param to specify template to search on for verify pub
orpheus Jun 6, 2019
2a6c542
update/publish
orpheus Jun 6, 2019
c5893e3
add param to set verifier url
orpheus Jun 6, 2019
3ded788
update/publish
orpheus Jun 6, 2019
56f1102
return twitterId and gabId
orpheus Jun 6, 2019
863f4cb
update/publish
orpheus Jun 6, 2019
b4180f1
fetch and return name on verify
orpheus Jun 7, 2019
0055fff
update/publish/compile
orpheus Jun 7, 2019
030334f
allow for multiple outputs to be specified
orpheus Jun 10, 2019
c219fc5
Merge branch 'oipwg/js-oip/master' into 'mediciland/js-oip/mlg-2.2.1'
OstlerDev Jun 26, 2019
413656c
Update package-lock.json
OstlerDev Jun 26, 2019
0ca8433
Edit Bugs & fcoin split RPC wallet
OstlerDev Jul 29, 2019
e74ec00
Merge branch 'edit-original-txid' into 'master'
OstlerDev Jul 29, 2019
5d449ea
Merge branch 'mlg-2.2.1' of https://github.com/mediciland/js-oip into…
OstlerDev Aug 13, 2019
1adbf84
Define that outputs support an array
OstlerDev Aug 13, 2019
640f9e4
Fix documentation to show api.oip.io
OstlerDev Aug 13, 2019
6f0944c
Update docs
OstlerDev Aug 13, 2019
a8b4ca6
Fix documentation for OIPd api url
OstlerDev Aug 13, 2019
1a90099
Merge pull request #11 from mediciland/mlg-2.2.1
OstlerDev Aug 13, 2019
7baaa3e
MLG-1859: Handle edits that have multiple Add Appends to an array
OstlerDev Aug 13, 2019
cdd3f83
Merge branch 'mlg-1859' into 'master'
OstlerDev Aug 13, 2019
f883884
Revert "Merge branch 'mlg-1859' into 'master'"
OstlerDev Aug 14, 2019
c8e4780
Merge branch 'revert-cdd3f836' into 'master'
OstlerDev Aug 14, 2019
7b3ce41
Make sure that rpcPort is parsed as an integer
OstlerDev Aug 14, 2019
8e2b151
Merge branch 'cast-rpcport-to-int' into 'master'
OstlerDev Aug 14, 2019
010d750
Bump mixin-deep from 1.3.1 to 1.3.2
dependabot[bot] Aug 28, 2019
d762dee
Remove support for squashed patches
OstlerDev Sep 3, 2019
14f1219
update some links
DevonJames Sep 4, 2019
b88ffdf
Merge pull request #12 from oipwg/dependabot/npm_and_yarn/mixin-deep-…
orpheus Sep 5, 2019
86df301
Update version to `2.3.0-mlg-0`
OstlerDev Sep 5, 2019
b7e8b17
Merge branch 'mlg-1864_only-support-rfc6902' into 'master'
OstlerDev Sep 11, 2019
78e600f
update verifyApiEndpoint
DevonJames Sep 24, 2019
72ba69c
npm audit
orpheus Oct 10, 2019
d247363
Merge branch 'master' of https://github.com/oipwg/js-oip
orpheus Oct 10, 2019
b9f4728
Merge pull request #15 from oipwg/npm-audit
orpheus Oct 10, 2019
76454c3
Add regtest params
metacoin Jan 23, 2020
732836c
removed jsipfs
Jan 22, 2020
532b9f3
Export floRegtest from config
OstlerDev Feb 4, 2020
0eab636
Sort by confirmations descending
OstlerDev Feb 4, 2020
0cebdbe
Handle the regtest port
OstlerDev Feb 4, 2020
d8be8ca
Merge branch 'master' into mlg-2.3.0
OstlerDev Feb 5, 2020
11f2520
Add script to test regtest records
OstlerDev Feb 5, 2020
d2dd0c7
Bump version to 2.4.4
OstlerDev Feb 5, 2020
c46e430
standard --fix
OstlerDev Feb 5, 2020
b67f98e
Update docs
OstlerDev Feb 5, 2020
4f6dc36
Remove docs that no longer exist
OstlerDev Feb 6, 2020
8564924
Merge pull request #18 from mediciland/mlg-2.3.0
OstlerDev Feb 6, 2020
204a2ba
Merge pull request #1 from oipwg/master
OstlerDev Feb 21, 2020
807b5d4
Add onConfirmation subscriber
OstlerDev Jun 16, 2020
6a7b802
Bump to v2.4.5
OstlerDev Jun 16, 2020
9472dd7
standard --fix
OstlerDev Jun 16, 2020
32cdc32
rm dev code
OstlerDev Jun 16, 2020
b2e3de2
Merge pull request #2 from mediciland/ACTUM-87_return-confirmation-pr…
OstlerDev Jun 23, 2020
f751ec3
standard --fix
OstlerDev Jun 23, 2020
6c75802
Pass options on edit as well
OstlerDev Jul 2, 2020
a2a88a6
Add a checking Interval to run onConfirmation subscriptions regardles…
OstlerDev Jul 16, 2020
3ad173f
Merge pull request #3 from mediciland/onConfirmation_setInterval
OstlerDev Jul 16, 2020
605e04e
Bump lodash from 4.17.15 to 4.17.19
dependabot[bot] Jul 16, 2020
9dae79e
Reuse CONFIRMATION_CHECK_LENGTH
OstlerDev Jul 17, 2020
9cc49e8
Rename getConfirmationCount and add sanity check for interval clearing
OstlerDev Jul 17, 2020
d2c2dae
Merge pull request #4 from mediciland/onConfirmation_setInterval
OstlerDev Jul 17, 2020
1bb84ba
Fix spelling error
OstlerDev Jul 17, 2020
ceb2b4a
Merge pull request #5 from mediciland/onConfirmation_setInterval
OstlerDev Jul 17, 2020
8995118
Merge pull request #24 from mediciland/master
OstlerDev Jul 17, 2020
e47f753
Add Publisher registration script
OstlerDev Aug 4, 2020
a3e3cca
Merge pull request #27 from mediciland/actum-58_publisher-reg-script
OstlerDev Aug 5, 2020
8349d5d
Update ancestor status more frequently
OstlerDev Nov 10, 2020
a38ef43
Temporarily allow install from GitHub
OstlerDev Nov 10, 2020
681a7b7
Add new checkAllUnconfirmed function
OstlerDev Nov 10, 2020
cb11fa2
Import fcoin logger from blgr package
OstlerDev Nov 19, 2020
509aa7a
Add blgr package
OstlerDev Nov 19, 2020
b2a7558
Properly initialize the Logger
OstlerDev Nov 19, 2020
99b8330
Upgrade fcoin
OstlerDev Nov 19, 2020
68b3373
Create TX with `new`
OstlerDev Nov 19, 2020
f903aad
Only allow a single rebroadcast to happen at a time
OstlerDev Nov 19, 2020
229b44e
Add lock for checking ancestor count & increase timer lengths
OstlerDev Nov 19, 2020
573eee2
Spawn logger differently
OstlerDev Nov 20, 2020
3702427
revert logger
OstlerDev Nov 20, 2020
8df7a4d
Allow hasWitness
OstlerDev Nov 20, 2020
18e27a8
Use peer.parser for events
OstlerDev Nov 20, 2020
27c57c9
Announce transactions in a batch instead of individually
OstlerDev Nov 20, 2020
d2efa45
Open up the logger
OstlerDev Nov 25, 2020
9cb822d
Handle multiparts of greater than 100 in length
OstlerDev Dec 1, 2020
ddd96b9
Convert item.hash as hex from Buffer
OstlerDev Dec 1, 2020
149bce0
Buffer.toString('hex')
OstlerDev Dec 1, 2020
197c746
Construct TXPacket before use
OstlerDev Dec 1, 2020
35d31b1
Handle peer Error
OstlerDev Dec 1, 2020
0b91349
rm debug logging
OstlerDev Dec 1, 2020
7eb0834
Rework ancestor count system
OstlerDev Dec 1, 2020
dd82283
Handle case where there are no unconfirmedTxids left
OstlerDev Dec 1, 2020
2d1ec0e
Does not equal zero...
OstlerDev Dec 1, 2020
3cba537
bump v
OstlerDev Dec 1, 2020
121865b
Adjust down the length for a rebroadcast to occur
OstlerDev Dec 1, 2020
2d850bb
Modify timings and allow peers to stay connected between loops
OstlerDev Dec 1, 2020
1ec022b
Add PEER_DESTROY_LENGTH and modify ancestor check lock
OstlerDev Dec 1, 2020
4dd34f5
Increase MIN_UTXO_AMOUNT and use console.error instead of console.war…
OstlerDev Dec 2, 2020
5e147f6
Increase REPAIR_ANCESTORS_AFTER and remove low confirmation count reb…
OstlerDev Dec 2, 2020
38fda99
Check all unconfirmed transactions every 100 transactions that are sent
OstlerDev Dec 2, 2020
be5a5b1
bump v
OstlerDev Dec 2, 2020
8728d42
Use fcoin 1.1.5
OstlerDev Dec 9, 2020
86fef29
v2.4.7
OstlerDev Dec 9, 2020
c67face
Merge branch 'master' into actum-343_ancestor-count-bug
OstlerDev Dec 9, 2020
af4f206
Only allow up to 1000 part multipart
OstlerDev Jan 15, 2021
3b2ce72
Adjust the maximum length to remove enough for each digit
OstlerDev Jan 15, 2021
349a413
Reduce the maxLength for multiparts a little further
OstlerDev Jan 19, 2021
11dc467
Bump version
OstlerDev Jan 19, 2021
38c9c20
Merge pull request #29 from mediciland/actum-343_ancestor-count-bug
OstlerDev Jan 19, 2021
7ce0375
fixes needed for new publishing api to work
DevonJames Apr 2, 2022
b075e3d
3.0.0
DevonJames Apr 2, 2022
54054ae
update package.json
DevonJames Apr 3, 2022
c7f3eab
remove "insight-explorer"
DevonJames Apr 3, 2022
837cd65
update dependencies
DevonJames Apr 3, 2022
f1b2628
Merge branch 'master' of https://github.com/oipwg/js-oip
DevonJames Apr 3, 2022
2f86626
delete package-lock
DevonJames Apr 3, 2022
21d3365
update package.json
DevonJames Apr 3, 2022
98422e2
committing with lib folder built
DevonJames Apr 3, 2022
f5b83c9
Merge branch 'master' of https://github.com/oipwg/js-oip
DevonJames Apr 3, 2022
49a29d0
point fcoin to oipwg version
DevonJames Apr 3, 2022
f9c2b68
downgrade core-js
DevonJames Apr 3, 2022
9e3ae62
significant change in sendTX function
DevonJames Apr 6, 2022
6317b72
significant change to sendTX
DevonJames Apr 6, 2022
80bd706
added functions to find outputs and make a raw TX
DevonJames Aug 3, 2022
50684ee
added transactionOutput to prepSignedTXforChain
DevonJames Aug 5, 2022
8f963c5
added transactionOutput to prepSignedTXforChain
DevonJames Aug 5, 2022
8b73dfd
minor refactoring
DevonJames Aug 18, 2022
6073ddc
Merge branch 'master' of https://github.com/oipwg/js-oip
DevonJames Aug 18, 2022
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
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,7 @@ typings/

# next.js build output
.next
.DS_Store
lib/*

.DS_Store
.idea
localStorage/
23 changes: 23 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
image: node:lts

stages:
- test

Unit Tests:
stage: test
script:
- npm ci
- npm run test:unit

Integration Tests:
stage: test
script:
- npm ci
- npm run test:integration
allow_failure: true

Code Format:
stage: test
script:
- npm ci
- npm run test:format
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ import {DaemonApi} from 'js-oip'
let api = new DaemonApi()
```
### Spawn a DaemonApi with a custom OIPd server
OIPd refers to an Open Index Protocol Daemon. Our current implementation is in golang and can be found [here](https://github.com/bitspill/oip).
OIPd refers to an Open Index Protocol Daemon. Our current implementation is in golang and can be found [here](https://github.com/oipwg/oip).
If for instance, we are running a daemon locally, we hit the endpoints it exposes by pointing our DaemonApi to the URL its running at.
```javascript
import {DaemonApi} from 'js-oip'
Expand Down Expand Up @@ -156,7 +156,7 @@ let txid = 'f550b9739e7453224075630d44cba24c31959af913aeb7cb364a563f96f54548'
let {success, multipart, error} = await api.getMultipart(txid)
```
### Search floData
[The OIP Daemon](https://github.com/bitspill/oip) indexes *not only* data serialized using the OIP, but all floData found on the FLO Chain.
[The OIP Daemon](https://github.com/oipwg/oip) indexes *not only* data serialized using the OIP, but all floData found on the FLO Chain.
Using this method we can search for text found within any TX's floData field. Again, Ryan seems like a cool guy so we'll search for his name.
Note here how we're going to receive back transactions (`txs`) that contain the floData and not just the floData itself.
```javascript
Expand Down Expand Up @@ -327,7 +327,7 @@ For further documentation on use cases and methods, please see the [official doc
## License
MIT License

Copyright (c) 2018 Open Index Protocol Working Group
Copyright (c) 2019 Open Index Protocol Working Group

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
807 changes: 666 additions & 141 deletions docs/Artifact.html

Large diffs are not rendered by default.

3,109 changes: 2,915 additions & 194 deletions docs/DaemonApi.html

Large diffs are not rendered by default.

3,426 changes: 3,426 additions & 0 deletions docs/ExplorerWallet.html

Large diffs are not rendered by default.

32 changes: 16 additions & 16 deletions docs/IpfsHttpApi.html

Large diffs are not rendered by default.

44 changes: 22 additions & 22 deletions docs/IpfsXml.html

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions docs/MPSingle.html

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions docs/MultipartX.html

Large diffs are not rendered by default.

2,927 changes: 408 additions & 2,519 deletions docs/OIP.html

Large diffs are not rendered by default.

1,015 changes: 1,015 additions & 0 deletions docs/Peer.html

Large diffs are not rendered by default.

2,234 changes: 2,234 additions & 0 deletions docs/RPCWallet.html

Large diffs are not rendered by default.

133 changes: 65 additions & 68 deletions docs/config_networks_flo_mainnet.js.html

Large diffs are not rendered by default.

235 changes: 117 additions & 118 deletions docs/core_ipfs_ipfsHttpApi.js.html

Large diffs are not rendered by default.

279 changes: 137 additions & 142 deletions docs/core_ipfs_ipfsXml.js.html

Large diffs are not rendered by default.

226 changes: 0 additions & 226 deletions docs/core_ipfs_jsIpfs.js.html

This file was deleted.

1,063 changes: 288 additions & 775 deletions docs/core_oip_oip.js.html

Large diffs are not rendered by default.

1,752 changes: 1,052 additions & 700 deletions docs/core_oipd-api_daemonApi.js.html

Large diffs are not rendered by default.

70 changes: 34 additions & 36 deletions docs/decoders_artifactDecoder.js.html

Large diffs are not rendered by default.

Empty file modified docs/fonts/OpenSans-Semibold-webfont.eot
100644 → 100755
Empty file.
Empty file modified docs/fonts/OpenSans-Semibold-webfont.svg
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified docs/fonts/OpenSans-Semibold-webfont.ttf
100644 → 100755
Empty file.
Empty file modified docs/fonts/OpenSans-Semibold-webfont.woff
100644 → 100755
Empty file.
Empty file modified docs/fonts/OpenSans-SemiboldItalic-webfont.eot
100644 → 100755
Empty file.
Empty file modified docs/fonts/OpenSans-SemiboldItalic-webfont.svg
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified docs/fonts/OpenSans-SemiboldItalic-webfont.ttf
100644 → 100755
Empty file.
Empty file modified docs/fonts/OpenSans-SemiboldItalic-webfont.woff
100644 → 100755
Empty file.
1,222 changes: 1,150 additions & 72 deletions docs/global.html

Large diffs are not rendered by default.

25 changes: 20 additions & 5 deletions docs/index.html

Large diffs are not rendered by default.

468 changes: 468 additions & 0 deletions docs/modules_flo_FLOTransaction.js.html

Large diffs are not rendered by default.

274 changes: 274 additions & 0 deletions docs/modules_flo_Peer.js.html

Large diffs are not rendered by default.

155 changes: 75 additions & 80 deletions docs/modules_flo_flotx.js.html

Large diffs are not rendered by default.

967 changes: 480 additions & 487 deletions docs/modules_multipart_mpsingle.js.html

Large diffs are not rendered by default.

179 changes: 89 additions & 90 deletions docs/modules_multipart_multipartx.js.html

Large diffs are not rendered by default.

2,704 changes: 1,360 additions & 1,344 deletions docs/modules_records_artifact_artifact.js.html

Large diffs are not rendered by default.

216 changes: 112 additions & 104 deletions docs/modules_records_artifact_propertyParty.js.html

Large diffs are not rendered by default.

324 changes: 190 additions & 134 deletions docs/modules_records_artifact_propertySpatialUnit.js.html

Large diffs are not rendered by default.

300 changes: 181 additions & 119 deletions docs/modules_records_artifact_propertyTenure.js.html

Large diffs are not rendered by default.

556 changes: 278 additions & 278 deletions docs/modules_records_artifact_researchTomogram.js.html

Large diffs are not rendered by default.

381 changes: 381 additions & 0 deletions docs/modules_records_edit_edit.js.html

Large diffs are not rendered by default.

265 changes: 135 additions & 130 deletions docs/modules_records_oip-record.js.html

Large diffs are not rendered by default.

799 changes: 799 additions & 0 deletions docs/modules_wallets_ExplorerWallet.js.html

Large diffs are not rendered by default.

204 changes: 0 additions & 204 deletions docs/modules_wallets_HDMWAddressWallet.js.html

This file was deleted.

808 changes: 808 additions & 0 deletions docs/modules_wallets_RPCWallet.js.html

Large diffs are not rendered by default.

33 changes: 17 additions & 16 deletions docs/util_btc.js.html

Large diffs are not rendered by default.

34 changes: 15 additions & 19 deletions examples/exampleArtifact.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 25 additions & 0 deletions examples/registerPublisher.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
const { OIP } = require('../lib')
const { Publisher } = require('../lib/modules/records')

// Constants used to register the publisher
const authorPublicAddress = 'FV7atpb74f6ZNhn7Lsex4RR3xgiYXrYKCH'
const authorPrivateKey = 'RDTF8BmEiA5Wmyy7aooQQsKsdRB9PBxZ32qiB9K5soPbcGKSKsSo'
const authorAlias = 'My Example Publisher'

const main = async () => {
// Create the author (used to write to the Blockchain)
const author = new OIP(authorPrivateKey)

// Create the Publisher object to "register" our publisher
let myPublisher = new Publisher()
myPublisher.setAlias(authorAlias)
myPublisher.setMainAddress(authorPublicAddress)
myPublisher.setTimestamp(Date.now())

// Write the author to the chain
let response = await author.broadcastRecord(myPublisher, 'register')

console.log(response)
}

main().then(() => {}).catch((e) => { console.error(e) })
40 changes: 40 additions & 0 deletions examples/verifyTransactionSignature.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
const { script, payments, ECPair } = require('bitcoinjs-lib')

const FLOTransaction = require('../lib/modules/flo/FLOTransaction').default
const { floTestnet } = require('../lib/config')

let txHex = '020000000175336521eafc16db3756792832d89745d779159295a976aede9bd0294f265bd9010000006b483045022100e14ea6214946de1b0098b919db955ed5b72a4b6ebee2633a7b274b33a178ece102201997f9ef66b2f941047f7d71913ecb0d95c399dcf9a896dcbbdfe17ec1344f6a01210235dbc5de310bde64bf53276d93f5347d55bd5b1f64c4885039b5bfd8afe2dfa7ffffffff01c09ee605000000001976a914b7d946f6088b9d05b5249e8503f9d202bfffc01588ac00000000fd1c02616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161'
if (process.argv && process.argv[2]) { txHex = process.argv[2] }

let tx = FLOTransaction.fromHex(txHex)

let inputNumber = 0
for (let input of tx.ins) {
console.log('Input #' + inputNumber)

// Grab pubkey from input script
let pubkey = Buffer.alloc(33)
let scriptBuffer = Buffer.from(input.script)
scriptBuffer.copy(pubkey, 0, scriptBuffer.length - 33, scriptBuffer.length)

let keyPair = ECPair.fromPublicKey(pubkey, floTestnet.network)

let p2pkh = payments.p2pkh({
pubkey: keyPair.publicKey,
input: input.script
})

let ss = script.signature.decode(p2pkh.signature)

let hash = tx.hashForSignature(inputNumber, p2pkh.output, ss.hashType)
let hashNoFloData = tx.hashForSignature(inputNumber, p2pkh.output, ss.hashType, { excludeFloData: true })
let witnessHash = tx.hashForWitnessV0(inputNumber, p2pkh.output, input.value, ss.hashType)
let witnessHashNoFloData = tx.hashForWitnessV0(inputNumber, p2pkh.output, input.value, ss.hashType, { excludeFloData: true })

console.log('Signature Hash with floData: ' + hash.toString('hex') + ' (match=' + keyPair.verify(hash, ss.signature) + ')')
console.log('Signature Hash without floData: ' + hashNoFloData.toString('hex') + ' (match=' + keyPair.verify(hashNoFloData, ss.signature) + ')')
console.log('Witness Signature Hash with floData: ' + witnessHash.toString('hex') + ' (match=' + keyPair.verify(witnessHash, ss.signature) + ')')
console.log('Witness Signature Hash without floData: ' + witnessHashNoFloData.toString('hex') + ' (match=' + keyPair.verify(witnessHashNoFloData, ss.signature) + ')')

inputNumber++
}
9 changes: 9 additions & 0 deletions lib/config/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
"use strict";

var _networks = require("./networks");

module.exports = {
floMainnet: _networks.floMainnet,
floTestnet: _networks.floTestnet,
floRegtest: _networks.floRegtest
};
15 changes: 15 additions & 0 deletions lib/config/networks/flo/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
"use strict";

var _mainnet = _interopRequireDefault(require("./mainnet"));

var _testnet = _interopRequireDefault(require("./testnet"));

var _regtest = _interopRequireDefault(require("./regtest"));

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

module.exports = {
mainnet: _mainnet.default,
testnet: _testnet.default,
regtest: _regtest.default
};
108 changes: 108 additions & 0 deletions lib/config/networks/flo/mainnet.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
"use strict";

require("core-js/modules/es6.regexp.to-string.js");

var _insightExplorer = require("insight-explorer");

var _btc = require("../../../util/btc");

const floFeePerKb = 100000;
/**
* An object that contains information about a coins Name, Network, and access to an explorer
* @typedef {Object} CoinInfo
* @property {string} name - All lowercase "name" of the CoinInfo, this is what is passed in to the `supported_coins` check. This cannot include spaces.
* @property {string} displayName - The Display Name for the Coin, this would be the full official name and can include spaces.
* @property {string} ticker - The "Ticker" that is used to track the Coin on Exchanges
* @property {number} satPerCoin - The number of satoshis per single coin
* @property {number} feePerKb - The amount of fee in satoshis to pay per kilobyte of data being put into the blockchain
* @property {number} feePerByte - The amount of fee in satoshis to pay per byte of data being put into the blockchain
* @property {number} maxFeePerByte - The maximum fee to pay per byte of data being put into the blockchain
* @property {number} minFee - The minimum fee that should ever be paid
* @property {number} dust - Amount in Satoshis of the minimum value allowed to be sent around the network
* @property {number} txVersion - The current TX version number for the coin
* @property {InsightExplorer} explorer - An InsightExplorer for the current coin so that data can be retreived from the network
* @property {function} getExtraBytes - A function that is passed options from TransactionBuilder when a transaction is being built/sent. You can use this to add custom logic/tx hex building.
* @property {CoinNetwork} network - The specific coin network variables, same as used in bitcoinjs-lib
*
* @example
* {
name: 'oip',
displayName: 'Flo',
ticker: 'FLO',
satPerCoin: 1e8,
feePerKb: floFeePerKb,
feePerByte: floFeePerKb / 1024,
maxFeePerByte: 100,
minFee: floFeePerKb,
dust: 100000,

txVersion: 2,

explorer: new Insight('https://livenet.flocha.in/api'),

getExtraBytes: function(options){
var fData = options.floData || ""
return varIntBuffer(fData.length).toString("hex") + Buffer.from(fData).toString("hex")
},

network: CoinNetwork
}
*/

/**
* An object that contains version variables specific to the Coin
* @typedef {Object} CoinNetwork
* @property {Object} bip32 - BIP32 Variables
* @property {number} bip32.public - The Extended Public Key version bytes
* @property {number} bip32.private - The Extended Private Key version bytes
* @property {number} slip44 - The `coin_type` number for the coin, must match [SLIP-0044](https://github.com/satoshilabs/slips/blob/master/slip-0044.md)
* @property {string} messagePrefix - The Prefix to add on when checking/signing a message
* @property {number} pubKeyHash - The coin specific "version" used when creating a Public Key Hash (Public Address)
* @property {number} scriptHash - The coin specific "version" used when creating a Script Hash
* @property {number} wif - Wallet Import Format "version" for this specific coin
*
* @example
* {
bip32: {
public: 0x0134406b,
private: 0x01343c31
},
slip44: 216,
messagePrefix: '\x1bFlorincoin Signed Message:\n',
pubKeyHash: 35,
scriptHash: 94,
wif: 163
}
*/

module.exports = {
name: 'flo',
displayName: 'Flo',
ticker: 'FLO',
satPerCoin: 1e8,
feePerKb: floFeePerKb,
feePerByte: floFeePerKb / 1024,
maxFeePerByte: 100,
minFee: floFeePerKb,
dust: 100000,
txVersion: 2,
explorer: new _insightExplorer.Insight('https://livenet.flocha.in/api'),
getExtraBytes: function getExtraBytes(options) {
let fData = options.floData || '';
let stringBuffer = Buffer.from(fData, 'utf8');
let lengthBuffer = (0, _btc.varIntBuffer)(stringBuffer.length);
let builtString = lengthBuffer.toString('hex') + stringBuffer.toString('hex');
return builtString;
},
network: {
bip32: {
public: 0x0134406b,
private: 0x01343c31
},
slip44: 216,
messagePrefix: '\u001bFlorincoin Signed Message:\n',
pubKeyHash: 35,
scriptHash: 94,
wif: 163
}
};
40 changes: 40 additions & 0 deletions lib/config/networks/flo/regtest.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
"use strict";

require("core-js/modules/es6.regexp.to-string.js");

var _insightExplorer = require("insight-explorer");

var _btc = require("../../../util/btc");

const floFeePerKb = 10000;
module.exports = {
name: 'floRegtest',
displayName: 'Flo Regtest',
ticker: 'rFLO',
satPerCoin: 1e8,
feePerKb: floFeePerKb,
feePerByte: floFeePerKb / 1024,
maxFeePerByte: 100,
minFee: floFeePerKb,
dust: 100000,
txVersion: 2,
explorer: new _insightExplorer.Insight('https://testnet.flocha.in/api'),
getExtraBytes: function getExtraBytes(options) {
let fData = options.floData || '';
let stringBuffer = Buffer.from(fData, 'utf8');
let lengthBuffer = (0, _btc.varIntBuffer)(stringBuffer.length);
let builtString = lengthBuffer.toString('hex') + stringBuffer.toString('hex');
return builtString;
},
network: {
bip32: {
public: 0x013440e2,
private: 0x01343c23
},
slip44: 1,
messagePrefix: '\u001bFlorincoin Signed Message:\n',
pubKeyHash: 115,
scriptHash: 58,
wif: 239
}
};
Loading