diff --git a/client/bitcoin_test.go b/client/bitcoin_test.go index ce8af27..c021f43 100644 --- a/client/bitcoin_test.go +++ b/client/bitcoin_test.go @@ -7,8 +7,8 @@ import ( "testing" "time" - "github.com/fiatjaf/opentimestamps" "github.com/btcsuite/btcd/rpcclient" + "github.com/fiatjaf/opentimestamps" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) @@ -56,7 +56,7 @@ func TestVerifyHelloWorld(t *testing.T) { expectedTime := "2015-05-28T15:41:18Z" helloWorld, err := opentimestamps.NewDetachedTimestampFromPath( - "../../examples/hello-world.txt.ots", + "../examples/hello-world.txt.ots", ) require.NoError(t, err) ts := helloWorld.Timestamp diff --git a/detached_timestamp_test.go b/detached_timestamp_test.go index 38e6f8a..364eaa8 100644 --- a/detached_timestamp_test.go +++ b/detached_timestamp_test.go @@ -11,7 +11,7 @@ import ( ) func examplePaths() []string { - matches, err := filepath.Glob("../examples/*ots") + matches, err := filepath.Glob("./examples/*ots") if err != nil { panic(err) } @@ -31,7 +31,7 @@ func containsUnknownAttestation(ts *Timestamp) (res bool) { func TestDecodeHelloWorld(t *testing.T) { dts, err := NewDetachedTimestampFromPath( - "../examples/hello-world.txt.ots", + "./examples/hello-world.txt.ots", ) assert.NoError(t, err) diff --git a/examples/bad-stamp.txt b/examples/bad-stamp.txt new file mode 100644 index 0000000..82d7cfe --- /dev/null +++ b/examples/bad-stamp.txt @@ -0,0 +1,2 @@ +The timestamp on this file is well-formatted, but will fail Bitcoin block +header validation. diff --git a/examples/bad-stamp.txt.ots b/examples/bad-stamp.txt.ots new file mode 100644 index 0000000..897b46d Binary files /dev/null and b/examples/bad-stamp.txt.ots differ diff --git a/examples/empty b/examples/empty new file mode 100644 index 0000000..e69de29 diff --git a/examples/empty.ots b/examples/empty.ots new file mode 100644 index 0000000..c4c3ea3 Binary files /dev/null and b/examples/empty.ots differ diff --git a/examples/hello-world.txt b/examples/hello-world.txt new file mode 100644 index 0000000..980a0d5 --- /dev/null +++ b/examples/hello-world.txt @@ -0,0 +1 @@ +Hello World! diff --git a/examples/hello-world.txt.ots b/examples/hello-world.txt.ots new file mode 100644 index 0000000..d8357eb Binary files /dev/null and b/examples/hello-world.txt.ots differ diff --git a/examples/incomplete.txt b/examples/incomplete.txt new file mode 100644 index 0000000..e641709 --- /dev/null +++ b/examples/incomplete.txt @@ -0,0 +1 @@ +The timestamp on this file is incomplete, and can be upgraded. diff --git a/examples/incomplete.txt.ots b/examples/incomplete.txt.ots new file mode 100644 index 0000000..f49cd35 Binary files /dev/null and b/examples/incomplete.txt.ots differ diff --git a/examples/known-and-unknown-notary.txt b/examples/known-and-unknown-notary.txt new file mode 100644 index 0000000..9de80cd --- /dev/null +++ b/examples/known-and-unknown-notary.txt @@ -0,0 +1,2 @@ +This file's timestamp has two attestations, one from a known notary, and one +from an unknown notary. diff --git a/examples/known-and-unknown-notary.txt.ots b/examples/known-and-unknown-notary.txt.ots new file mode 100644 index 0000000..992093d Binary files /dev/null and b/examples/known-and-unknown-notary.txt.ots differ diff --git a/examples/merkle1.txt b/examples/merkle1.txt new file mode 100644 index 0000000..5b74465 --- /dev/null +++ b/examples/merkle1.txt @@ -0,0 +1,2 @@ +This file is one of three different files that have been timestamped together +with a single merkle tree. (1/3) diff --git a/examples/merkle1.txt.ots b/examples/merkle1.txt.ots new file mode 100644 index 0000000..9c9ff83 Binary files /dev/null and b/examples/merkle1.txt.ots differ diff --git a/examples/merkle2.txt b/examples/merkle2.txt new file mode 100644 index 0000000..a66a551 --- /dev/null +++ b/examples/merkle2.txt @@ -0,0 +1,2 @@ +This file is one of three different files that have been timestamped together +with a single merkle tree. (2/3) diff --git a/examples/merkle2.txt.ots b/examples/merkle2.txt.ots new file mode 100644 index 0000000..9cadc72 Binary files /dev/null and b/examples/merkle2.txt.ots differ diff --git a/examples/merkle3.txt b/examples/merkle3.txt new file mode 100644 index 0000000..2fd9fa0 --- /dev/null +++ b/examples/merkle3.txt @@ -0,0 +1,2 @@ +This file is one of three different files that have been timestamped together +with a single merkle tree. (3/3) diff --git a/examples/merkle3.txt.ots b/examples/merkle3.txt.ots new file mode 100644 index 0000000..6bb674e Binary files /dev/null and b/examples/merkle3.txt.ots differ diff --git a/examples/two-calendars.txt b/examples/two-calendars.txt new file mode 100644 index 0000000..47d79f5 --- /dev/null +++ b/examples/two-calendars.txt @@ -0,0 +1 @@ +This file has an (incomplete) timestamp with two different calendars. diff --git a/examples/two-calendars.txt.ots b/examples/two-calendars.txt.ots new file mode 100644 index 0000000..1f3522c Binary files /dev/null and b/examples/two-calendars.txt.ots differ diff --git a/examples/unknown-notary.txt b/examples/unknown-notary.txt new file mode 100644 index 0000000..42a7a43 --- /dev/null +++ b/examples/unknown-notary.txt @@ -0,0 +1 @@ +This file's timestamp has a single attestation from an unknown notary. diff --git a/examples/unknown-notary.txt.ots b/examples/unknown-notary.txt.ots new file mode 100644 index 0000000..af149ef Binary files /dev/null and b/examples/unknown-notary.txt.ots differ diff --git a/remote_calendar_test.go b/remote_calendar_test.go index b6825ba..ce50af1 100644 --- a/remote_calendar_test.go +++ b/remote_calendar_test.go @@ -34,7 +34,7 @@ func newTestDigest(in string) []byte { func TestRemoteCalendarExample(t *testing.T) { dts, err := NewDetachedTimestampFromPath( - "../examples/two-calendars.txt.ots", + "./examples/two-calendars.txt.ots", ) require.NoError(t, err)