Skip to content

Commit 03b7d8d

Browse files
author
Zach Alam
committed
Merge branch 'master' of https://github.com/zachalam/BitFact
2 parents 60ed823 + 5c391cb commit 03b7d8d

1 file changed

Lines changed: 24 additions & 4 deletions

File tree

README.md

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,35 @@ const bitfact = new BitFact({
4040
const textOrData = "Hello World!";
4141
const memo = "this is my memo text";
4242
const receipt = await bitfact.text(textOrData, memo);
43-
// receipt.tx => 0x76b88571f0aae7c369122beff25461f724cdca9b6404224
44-
// receipt.hash => 7f83b1657ff1fd4b1fa3d677284addd200126d9069
4543
```
4644

4745
#### ❇️ Snippet #2: Fingerprint file contents.
4846
```javascript
4947
const pathToFile = "./path/to/any.file";
5048
const memo = "description of file";
5149
const receipt = await bitfact.file(pathToFile, memo);
52-
// receipt.tx => 0xaccb1eefa63fe9365fe277ceaefabf06eb05ce5b83a7f28
53-
// receipt.hash => 07123e1f482356ccbbc0b8fcd6282c49d37c9c1abc
50+
```
51+
52+
#### 🧾 Sample Response (Receipt).
53+
The `receipt` (or response) typically takes ~15 seconds (Ethereum block time) to produce, stamp, and verify. It may take longer depending on how congested the blockchain is. Once you receive a response it'll contain the following information.
54+
```javascript
55+
{
56+
info: { chain: 'ropsten' },
57+
fact: 'BitFact:file|sha256:d15ec3fd4c6|memo:this is memo',
58+
hash: 'd2fb204b925188a9ac4240571be35e1d5b5ec3fd4c6',
59+
stamp: {
60+
blockHash: '0x400938bdc4c4eddf90ff70de20e37a25f77d66282',
61+
blockNumber: 9137050,
62+
contractAddress: null,
63+
cumulativeGasUsed: 322932,
64+
from: '0x9bdf7a7f7fdf391b6efd32d16c2594ade09ff041',
65+
gasUsed: 22696,
66+
logs: [],
67+
logsBloom: '0x000000000000000000000000000000000',
68+
status: true,
69+
to: '0xface74f0d85cf2fc5a7cd4f55258493c0535f89b',
70+
transactionHash: '0x64f87ea0a936ca0c65dc093c8dd143191ba',
71+
transactionIndex: 10
72+
}
73+
}
5474
```

0 commit comments

Comments
 (0)