Skip to content

Commit

Permalink
update package to /v5
Browse files Browse the repository at this point in the history
  • Loading branch information
shruggr committed Nov 6, 2024
1 parent 1656c5c commit e6a7b4c
Show file tree
Hide file tree
Showing 40 changed files with 94 additions and 93 deletions.
4 changes: 2 additions & 2 deletions bitcom/b.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"crypto/sha256"

"github.com/bitcoin-sv/go-sdk/script"
"github.com/shruggr/1sat-indexer/idx"
"github.com/shruggr/1sat-indexer/lib"
"github.com/shruggr/1sat-indexer/v5/idx"
"github.com/shruggr/1sat-indexer/v5/lib"
)

var B_PROTO = "19HxigV4QyBv3tHpQVcUEQyq1pzZVdoAut"
Expand Down
2 changes: 1 addition & 1 deletion bitcom/bitcom.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package bitcom

import (
"github.com/bitcoin-sv/go-sdk/script"
"github.com/shruggr/1sat-indexer/idx"
"github.com/shruggr/1sat-indexer/v5/idx"
)

const BITCOM_TAG = "bitcom"
Expand Down
2 changes: 1 addition & 1 deletion bitcom/map.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"unicode/utf8"

"github.com/bitcoin-sv/go-sdk/script"
"github.com/shruggr/1sat-indexer/idx"
"github.com/shruggr/1sat-indexer/v5/idx"
)

var MAP_PROTO = "1PuQa7K62MiKCtssSLKy1kh56WWU7MtUR5"
Expand Down
2 changes: 1 addition & 1 deletion bitcom/sigma.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"github.com/bitcoin-sv/go-sdk/script"
"github.com/bitcoin-sv/go-sdk/transaction"
"github.com/bitcoin-sv/go-sdk/util"
"github.com/shruggr/1sat-indexer/idx"
"github.com/shruggr/1sat-indexer/v5/idx"
)

var SIGMA_PROTO = "SIGMA"
Expand Down
2 changes: 1 addition & 1 deletion blk/sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

"github.com/bitcoin-sv/go-sdk/chainhash"
"github.com/redis/go-redis/v9"
"github.com/shruggr/1sat-indexer/evt"
"github.com/shruggr/1sat-indexer/v5/evt"
)

const PAGE_SIZE = 10000
Expand Down
6 changes: 3 additions & 3 deletions broadcast/broadcast.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import (

"github.com/bitcoin-sv/go-sdk/spv"
"github.com/bitcoin-sv/go-sdk/transaction"
"github.com/shruggr/1sat-indexer/idx"
"github.com/shruggr/1sat-indexer/jb"
"github.com/shruggr/1sat-indexer/lib"
"github.com/shruggr/1sat-indexer/v5/idx"
"github.com/shruggr/1sat-indexer/v5/jb"
"github.com/shruggr/1sat-indexer/v5/lib"
)

type BroadcaseResponse struct {
Expand Down
2 changes: 1 addition & 1 deletion cmd/block-sync/block-sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"os"

"github.com/joho/godotenv"
"github.com/shruggr/1sat-indexer/blk"
"github.com/shruggr/1sat-indexer/v5/blk"
)

const PAGE_SIZE = 10000
Expand Down
10 changes: 5 additions & 5 deletions cmd/bsv21/bsv21.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import (
"time"

"github.com/redis/go-redis/v9"
"github.com/shruggr/1sat-indexer/config"
"github.com/shruggr/1sat-indexer/evt"
"github.com/shruggr/1sat-indexer/idx"
"github.com/shruggr/1sat-indexer/onesat"
"github.com/shruggr/1sat-indexer/sub"
"github.com/shruggr/1sat-indexer/v5/config"
"github.com/shruggr/1sat-indexer/v5/evt"
"github.com/shruggr/1sat-indexer/v5/idx"
"github.com/shruggr/1sat-indexer/v5/onesat"
"github.com/shruggr/1sat-indexer/v5/sub"
)

var TAG = "bsv21"
Expand Down
4 changes: 2 additions & 2 deletions cmd/ingest/ingest.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"context"
"flag"

"github.com/shruggr/1sat-indexer/config"
"github.com/shruggr/1sat-indexer/idx"
"github.com/shruggr/1sat-indexer/v5/config"
"github.com/shruggr/1sat-indexer/v5/idx"
)

var CONCURRENCY uint
Expand Down
8 changes: 4 additions & 4 deletions cmd/origin/origin.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ import (
"sync"
"time"

"github.com/shruggr/1sat-indexer/config"
"github.com/shruggr/1sat-indexer/evt"
"github.com/shruggr/1sat-indexer/idx"
"github.com/shruggr/1sat-indexer/onesat"
"github.com/shruggr/1sat-indexer/v5/config"
"github.com/shruggr/1sat-indexer/v5/evt"
"github.com/shruggr/1sat-indexer/v5/idx"
"github.com/shruggr/1sat-indexer/v5/onesat"
)

var CONCURRENCY uint
Expand Down
4 changes: 2 additions & 2 deletions cmd/owner-sync/owner-sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"time"

"github.com/redis/go-redis/v9"
"github.com/shruggr/1sat-indexer/idx"
"github.com/shruggr/1sat-indexer/jb"
"github.com/shruggr/1sat-indexer/v5/idx"
"github.com/shruggr/1sat-indexer/v5/jb"
)

var ctx = context.Background()
Expand Down
6 changes: 3 additions & 3 deletions cmd/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import (
"fmt"
"log"

"github.com/shruggr/1sat-indexer/config"
"github.com/shruggr/1sat-indexer/idx"
"github.com/shruggr/1sat-indexer/server"
"github.com/shruggr/1sat-indexer/v5/config"
"github.com/shruggr/1sat-indexer/v5/idx"
"github.com/shruggr/1sat-indexer/v5/server"
)

var PORT int
Expand Down
4 changes: 2 additions & 2 deletions cmd/subscribe/subscribe.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"flag"
"log"

"github.com/shruggr/1sat-indexer/onesat"
"github.com/shruggr/1sat-indexer/sub"
"github.com/shruggr/1sat-indexer/v5/onesat"
"github.com/shruggr/1sat-indexer/v5/sub"
)

var POSTGRES string
Expand Down
4 changes: 2 additions & 2 deletions cmd/test/testing_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"log"
"testing"

"github.com/shruggr/1sat-indexer/config"
"github.com/shruggr/1sat-indexer/idx"
"github.com/shruggr/1sat-indexer/v5/config"
"github.com/shruggr/1sat-indexer/v5/idx"
"github.com/stretchr/testify/assert"
)

Expand Down
4 changes: 2 additions & 2 deletions config/base.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package config

import (
"github.com/bitcoin-sv/go-sdk/transaction"
"github.com/shruggr/1sat-indexer/idx"
"github.com/shruggr/1sat-indexer/lib"
"github.com/shruggr/1sat-indexer/v5/idx"
"github.com/shruggr/1sat-indexer/v5/lib"
)

var Indexers = []idx.Indexer{}
Expand Down
3 changes: 1 addition & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/shruggr/1sat-indexer
module github.com/shruggr/1sat-indexer/v5

go 1.22.0

Expand Down Expand Up @@ -27,7 +27,6 @@ require (
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
github.com/go-zeromq/goczmq/v4 v4.2.2 // indirect
github.com/go-zeromq/zmq4 v0.17.0 // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/gorilla/websocket v1.5.3 // indirect
github.com/josharian/intern v1.0.0 // indirect
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ github.com/segmentio/asm v1.2.0 h1:9BQrFxC+YOHJlTlHGkTrFWf59nbL3XnCoFLTwDCI7ys=
github.com/segmentio/asm v1.2.0/go.mod h1:BqMnlJP91P8d+4ibuonYZw9mfnzI9HfxselHZr5aAcs=
github.com/segmentio/encoding v0.4.0 h1:MEBYvRqiUB2nfR2criEXWqwdY6HJOUrCn5hboVOVmy8=
github.com/segmentio/encoding v0.4.0/go.mod h1:/d03Cd8PoaDeceuhUUUQWjU0KhWjrmYrWPgtJHYZSnI=
github.com/shruggr/1sat-indexer v0.0.0-20241105211808-89b9cec8925a h1:O+s7i3tGqNTig2iGhgAqrXyqbUDlGKCvadBns7XeMvM=
github.com/shruggr/1sat-indexer v0.0.0-20241105211808-89b9cec8925a/go.mod h1:qTpkdPpIi2BeI2ey0Ih0IWHswNcgm9unhs0IG+Qrrec=
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw=
Expand Down
2 changes: 1 addition & 1 deletion idx/account.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"sync"

"github.com/redis/go-redis/v9"
"github.com/shruggr/1sat-indexer/jb"
"github.com/shruggr/1sat-indexer/v5/jb"
)

const OwnerSyncKey = "own:sync"
Expand Down
6 changes: 3 additions & 3 deletions idx/index-context.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import (
"github.com/bitcoin-sv/go-sdk/chainhash"
"github.com/bitcoin-sv/go-sdk/script"
"github.com/bitcoin-sv/go-sdk/transaction"
"github.com/shruggr/1sat-indexer/jb"
"github.com/shruggr/1sat-indexer/lib"
// "github.com/shruggr/1sat-indexer/data"
"github.com/shruggr/1sat-indexer/v5/jb"
"github.com/shruggr/1sat-indexer/v5/lib"
// "github.com/shruggr/1sat-indexer/v5/data"
)

type AncestorConfig struct {
Expand Down
4 changes: 2 additions & 2 deletions idx/index-data.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package idx
import (
"encoding/json"

"github.com/shruggr/1sat-indexer/evt"
"github.com/shruggr/1sat-indexer/lib"
"github.com/shruggr/1sat-indexer/v5/evt"
"github.com/shruggr/1sat-indexer/v5/lib"
)

type IndexData struct {
Expand Down
4 changes: 2 additions & 2 deletions idx/ingest.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (

"github.com/bitcoin-sv/go-sdk/transaction"
"github.com/redis/go-redis/v9"
"github.com/shruggr/1sat-indexer/jb"
"github.com/shruggr/1sat-indexer/lib"
"github.com/shruggr/1sat-indexer/v5/jb"
"github.com/shruggr/1sat-indexer/v5/lib"
)

type IngestCtx struct {
Expand Down
2 changes: 1 addition & 1 deletion idx/search.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"time"

"github.com/redis/go-redis/v9"
"github.com/shruggr/1sat-indexer/lib"
"github.com/shruggr/1sat-indexer/v5/lib"
"github.com/vmihailenco/msgpack/v5"
)

Expand Down
6 changes: 3 additions & 3 deletions idx/txo.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import (
"log"

"github.com/redis/go-redis/v9"
"github.com/shruggr/1sat-indexer/evt"
"github.com/shruggr/1sat-indexer/jb"
"github.com/shruggr/1sat-indexer/lib"
"github.com/shruggr/1sat-indexer/v5/evt"
"github.com/shruggr/1sat-indexer/v5/jb"
"github.com/shruggr/1sat-indexer/v5/lib"
"github.com/vmihailenco/msgpack/v5"
)

Expand Down
2 changes: 1 addition & 1 deletion jb/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
"github.com/joho/godotenv"
"github.com/ordishs/go-bitcoin"
"github.com/redis/go-redis/v9"
"github.com/shruggr/1sat-indexer/blk"
"github.com/shruggr/1sat-indexer/v5/blk"
)

var JUNGLEBUS string
Expand Down
6 changes: 3 additions & 3 deletions lock/lock.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import (
"encoding/json"
"log"

"github.com/shruggr/1sat-indexer/evt"
"github.com/shruggr/1sat-indexer/idx"
"github.com/shruggr/1sat-indexer/lib"
"github.com/shruggr/1sat-indexer/v5/evt"
"github.com/shruggr/1sat-indexer/v5/idx"
"github.com/shruggr/1sat-indexer/v5/lib"
)

const LOCK_TAG = "lock"
Expand Down
4 changes: 2 additions & 2 deletions onesat/bsv20.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"strings"

bip32 "github.com/bitcoin-sv/go-sdk/compat/bip32"
"github.com/shruggr/1sat-indexer/evt"
"github.com/shruggr/1sat-indexer/idx"
"github.com/shruggr/1sat-indexer/v5/evt"
"github.com/shruggr/1sat-indexer/v5/idx"
)

type Bsv20Status int
Expand Down
6 changes: 3 additions & 3 deletions onesat/bsv21.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import (
"strings"

"github.com/bitcoin-sv/go-sdk/script"
"github.com/shruggr/1sat-indexer/evt"
"github.com/shruggr/1sat-indexer/idx"
"github.com/shruggr/1sat-indexer/lib"
"github.com/shruggr/1sat-indexer/v5/evt"
"github.com/shruggr/1sat-indexer/v5/idx"
"github.com/shruggr/1sat-indexer/v5/lib"
)

const BSV21_INDEX_FEE = 1000
Expand Down
8 changes: 4 additions & 4 deletions onesat/inscription.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ import (
"unicode/utf8"

"github.com/bitcoin-sv/go-sdk/script"
"github.com/shruggr/1sat-indexer/bitcom"
"github.com/shruggr/1sat-indexer/evt"
"github.com/shruggr/1sat-indexer/idx"
"github.com/shruggr/1sat-indexer/lib"
"github.com/shruggr/1sat-indexer/v5/bitcom"
"github.com/shruggr/1sat-indexer/v5/evt"
"github.com/shruggr/1sat-indexer/v5/idx"
"github.com/shruggr/1sat-indexer/v5/lib"
)

var INSC_TAG = "insc"
Expand Down
6 changes: 3 additions & 3 deletions onesat/ordlock.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import (

"github.com/bitcoin-sv/go-sdk/script"
"github.com/bitcoin-sv/go-sdk/transaction"
"github.com/shruggr/1sat-indexer/evt"
"github.com/shruggr/1sat-indexer/idx"
"github.com/shruggr/1sat-indexer/lib"
"github.com/shruggr/1sat-indexer/v5/evt"
"github.com/shruggr/1sat-indexer/v5/idx"
"github.com/shruggr/1sat-indexer/v5/lib"
)

const ORDLOCK_TAG = "ordlock"
Expand Down
8 changes: 4 additions & 4 deletions onesat/origin.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ package onesat
import (
"encoding/json"

"github.com/shruggr/1sat-indexer/bitcom"
"github.com/shruggr/1sat-indexer/evt"
"github.com/shruggr/1sat-indexer/idx"
"github.com/shruggr/1sat-indexer/lib"
"github.com/shruggr/1sat-indexer/v5/bitcom"
"github.com/shruggr/1sat-indexer/v5/evt"
"github.com/shruggr/1sat-indexer/v5/idx"
"github.com/shruggr/1sat-indexer/v5/lib"
)

const ORIGIN_TAG = "origin"
Expand Down
2 changes: 1 addition & 1 deletion server/routes/acct/ctrl.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"strings"

"github.com/gofiber/fiber/v2"
"github.com/shruggr/1sat-indexer/idx"
"github.com/shruggr/1sat-indexer/v5/idx"
)

var TAG string
Expand Down
2 changes: 1 addition & 1 deletion server/routes/blocks/ctrl.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"strconv"

"github.com/gofiber/fiber/v2"
"github.com/shruggr/1sat-indexer/blk"
"github.com/shruggr/1sat-indexer/v5/blk"
)

var Chaintip *blk.BlockHeader
Expand Down
4 changes: 2 additions & 2 deletions server/routes/evt/ctrl.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"strings"

"github.com/gofiber/fiber/v2"
"github.com/shruggr/1sat-indexer/evt"
"github.com/shruggr/1sat-indexer/idx"
"github.com/shruggr/1sat-indexer/v5/evt"
"github.com/shruggr/1sat-indexer/v5/idx"
)

var ingest *idx.IngestCtx
Expand Down
6 changes: 3 additions & 3 deletions server/routes/origins/ctrl.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import (
"strings"

"github.com/gofiber/fiber/v2"
"github.com/shruggr/1sat-indexer/evt"
"github.com/shruggr/1sat-indexer/idx"
"github.com/shruggr/1sat-indexer/onesat"
"github.com/shruggr/1sat-indexer/v5/evt"
"github.com/shruggr/1sat-indexer/v5/idx"
"github.com/shruggr/1sat-indexer/v5/onesat"
)

var ingest *idx.IngestCtx
Expand Down
2 changes: 1 addition & 1 deletion server/routes/own/ctrl.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"strings"

"github.com/gofiber/fiber/v2"
"github.com/shruggr/1sat-indexer/idx"
"github.com/shruggr/1sat-indexer/v5/idx"
)

var ingest *idx.IngestCtx
Expand Down
Loading

0 comments on commit e6a7b4c

Please sign in to comment.