Skip to content

Commit 04e6c0f

Browse files
refactor: use v2 sufix
1 parent 2a7fbf6 commit 04e6c0f

322 files changed

Lines changed: 581 additions & 581 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# Solana SDK library for Go
22

3-
[![GoDoc](https://pkg.go.dev/badge/github.com/solana-foundation/solana-go?status.svg)](https://pkg.go.dev/github.com/solana-foundation/solana-go@v1.16.0?tab=doc)
4-
[![GitHub tag (latest SemVer pre-release)](https://img.shields.io/github/v/tag/solana-foundation/solana-go?include_prereleases&label=release-tag)](https://github.com/solana-foundation/solana-go/releases)
5-
[![Build Status](https://github.com/solana-foundation/solana-go/workflows/tests/badge.svg?branch=main)](https://github.com/solana-foundation/solana-go/actions?query=branch%3Amain)
6-
[![Lint Status](https://github.com/solana-foundation/solana-go/workflows/lint/badge.svg?branch=main)](https://github.com/solana-foundation/solana-go/actions?query=branch%3Amain+workflow%3Alint)
7-
[![TODOs](https://badgen.net/https/api.tickgit.com/badgen/github.com/solana-foundation/solana-go/main)](https://www.tickgit.com/browse?repo=github.com/solana-foundation/solana-go&branch=main)
8-
[![Go Report Card](https://goreportcard.com/badge/github.com/solana-foundation/solana-go)](https://goreportcard.com/report/github.com/solana-foundation/solana-go)
3+
[![GoDoc](https://pkg.go.dev/badge/github.com/solana-foundation/solana-go/v2?status.svg)](https://pkg.go.dev/github.com/solana-foundation/solana-go/v2@v1.16.0?tab=doc)
4+
[![GitHub tag (latest SemVer pre-release)](https://img.shields.io/github/v/tag/solana-foundation/solana-go?include_prereleases&label=release-tag)](https://github.com/solana-foundation/solana-go/v2/releases)
5+
[![Build Status](https://github.com/solana-foundation/solana-go/v2/workflows/tests/badge.svg?branch=main)](https://github.com/solana-foundation/solana-go/v2/actions?query=branch%3Amain)
6+
[![Lint Status](https://github.com/solana-foundation/solana-go/v2/workflows/lint/badge.svg?branch=main)](https://github.com/solana-foundation/solana-go/v2/actions?query=branch%3Amain+workflow%3Alint)
7+
[![TODOs](https://badgen.net/https/api.tickgit.com/badgen/github.com/solana-foundation/solana-go/v2/main)](https://www.tickgit.com/browse?repo=github.com/solana-foundation/solana-go/v2&branch=main)
8+
[![Go Report Card](https://goreportcard.com/badge/github.com/solana-foundation/solana-go/v2)](https://goreportcard.com/report/github.com/solana-foundation/solana-go/v2)
99

1010
Go library to interface with Solana JSON RPC and WebSocket interfaces.
1111

@@ -90,7 +90,7 @@ The RPC and WS client implementation is based on the [Solana RPC API documentati
9090

9191
```bash
9292
$ cd my-project
93-
$ go get github.com/solana-foundation/solana-go@v1.16.0
93+
$ go get github.com/solana-foundation/solana-go/v2@v1.16.0
9494
```
9595

9696
## Pretty-Print transactions/instructions
@@ -122,7 +122,7 @@ fmt.Println(tx.String())
122122

123123
## SendAndConfirmTransaction
124124

125-
You can wait for a transaction confirmation using the `github.com/solana-foundation/solana-go/rpc/sendAndConfirmTransaction` package tools (for a complete example: [see here](#transfer-sol-from-one-wallet-to-another-wallet))
125+
You can wait for a transaction confirmation using the `github.com/solana-foundation/solana-go/v2/rpc/sendAndConfirmTransaction` package tools (for a complete example: [see here](#transfer-sol-from-one-wallet-to-another-wallet))
126126

127127
```go
128128
// Send transaction, and wait for confirmation:
@@ -153,9 +153,9 @@ import (
153153
"time"
154154

155155
"github.com/davecgh/go-spew/spew"
156-
"github.com/solana-foundation/solana-go"
157-
lookup "github.com/solana-foundation/solana-go/programs/address-lookup-table"
158-
"github.com/solana-foundation/solana-go/rpc"
156+
"github.com/solana-foundation/solana-go/v2"
157+
lookup "github.com/solana-foundation/solana-go/v2/programs/address-lookup-table"
158+
"github.com/solana-foundation/solana-go/v2/rpc"
159159
"golang.org/x/time/rate"
160160
)
161161

@@ -255,10 +255,10 @@ import (
255255

256256
"github.com/davecgh/go-spew/spew"
257257
bin "github.com/gagliardetto/binary"
258-
"github.com/solana-foundation/solana-go"
259-
"github.com/solana-foundation/solana-go/programs/system"
260-
"github.com/solana-foundation/solana-go/rpc"
261-
"github.com/solana-foundation/solana-go/text"
258+
"github.com/solana-foundation/solana-go/v2"
259+
"github.com/solana-foundation/solana-go/v2/programs/system"
260+
"github.com/solana-foundation/solana-go/v2/rpc"
261+
"github.com/solana-foundation/solana-go/v2/text"
262262
)
263263

264264
func main() {
@@ -354,8 +354,8 @@ func decodeSystemTransfer(tx *solana.Transaction) {
354354
// database/sql drivers:
355355
//
356356
// import (
357-
// _ "github.com/solana-foundation/solana-go/programs/system"
358-
// _ "github.com/solana-foundation/solana-go/programs/token"
357+
// _ "github.com/solana-foundation/solana-go/v2/programs/system"
358+
// _ "github.com/solana-foundation/solana-go/v2/programs/token"
359359
// // ...add more as needed
360360
// )
361361
//
@@ -462,7 +462,7 @@ import (
462462

463463
"golang.org/x/time/rate"
464464
"github.com/davecgh/go-spew/spew"
465-
"github.com/solana-foundation/solana-go/rpc"
465+
"github.com/solana-foundation/solana-go/v2/rpc"
466466
)
467467

468468
func main() {
@@ -493,7 +493,7 @@ import (
493493

494494
"golang.org/x/time/rate"
495495
"github.com/davecgh/go-spew/spew"
496-
"github.com/solana-foundation/solana-go/rpc"
496+
"github.com/solana-foundation/solana-go/v2/rpc"
497497
)
498498

499499
func main() {
@@ -541,8 +541,8 @@ import (
541541
"net/http"
542542
"time"
543543

544-
"github.com/solana-foundation/solana-go/rpc"
545-
"github.com/solana-foundation/solana-go/rpc/jsonrpc"
544+
"github.com/solana-foundation/solana-go/v2/rpc"
545+
"github.com/solana-foundation/solana-go/v2/rpc/jsonrpc"
546546
)
547547

548548
func NewHTTPTransport(
@@ -609,8 +609,8 @@ import (
609609
"context"
610610
"fmt"
611611

612-
"github.com/solana-foundation/solana-go"
613-
"github.com/solana-foundation/solana-go/rpc"
612+
"github.com/solana-foundation/solana-go/v2"
613+
"github.com/solana-foundation/solana-go/v2/rpc"
614614
)
615615

616616
func main() {
@@ -716,13 +716,13 @@ import (
716716
"time"
717717

718718
"github.com/davecgh/go-spew/spew"
719-
"github.com/solana-foundation/solana-go"
720-
"github.com/solana-foundation/solana-go/programs/system"
721-
"github.com/solana-foundation/solana-go/rpc"
722-
confirm "github.com/solana-foundation/solana-go/rpc/sendAndConfirmTransaction"
723-
"github.com/solana-foundation/solana-go/rpc/jsonrpc"
724-
"github.com/solana-foundation/solana-go/rpc/ws"
725-
"github.com/solana-foundation/solana-go/text"
719+
"github.com/solana-foundation/solana-go/v2"
720+
"github.com/solana-foundation/solana-go/v2/programs/system"
721+
"github.com/solana-foundation/solana-go/v2/rpc"
722+
confirm "github.com/solana-foundation/solana-go/v2/rpc/sendAndConfirmTransaction"
723+
"github.com/solana-foundation/solana-go/v2/rpc/jsonrpc"
724+
"github.com/solana-foundation/solana-go/v2/rpc/ws"
725+
"github.com/solana-foundation/solana-go/v2/text"
726726
)
727727

728728
func main() {
@@ -831,14 +831,14 @@ func main() {
831831

832832
All RPC methods from the [Solana JSON RPC API](https://solana.com/docs/rpc) are supported.
833833
Each method has a testable example in [`rpc/example_test.go`](rpc/example_test.go) that is rendered on
834-
[pkg.go.dev](https://pkg.go.dev/github.com/solana-foundation/solana-go@v1.16.0/rpc#pkg-examples).
834+
[pkg.go.dev](https://pkg.go.dev/github.com/solana-foundation/solana-go/v2@v1.16.0/rpc#pkg-examples).
835835

836836

837837
## WebSocket Subscriptions
838838

839839
All WebSocket subscriptions from the [Solana WebSocket API](https://solana.com/docs/rpc/websocket) are supported.
840840
Each subscription has a testable example in [`rpc/ws/example_test.go`](rpc/ws/example_test.go) that is rendered on
841-
[pkg.go.dev](https://pkg.go.dev/github.com/solana-foundation/solana-go@v1.16.0/rpc/ws#pkg-examples).
841+
[pkg.go.dev](https://pkg.go.dev/github.com/solana-foundation/solana-go/v2@v1.16.0/rpc/ws#pkg-examples).
842842

843843

844844
## Contributing

cmd/slnc/cmd/common.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ import (
1919
"os"
2020
"strings"
2121

22-
"github.com/solana-foundation/solana-go/rpc"
22+
"github.com/solana-foundation/solana-go/v2/rpc"
2323

24-
"github.com/solana-foundation/solana-go/vault"
24+
"github.com/solana-foundation/solana-go/v2/vault"
2525
"github.com/spf13/viper"
2626
)
2727

cmd/slnc/cmd/decoding.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ import (
1919
"log"
2020

2121
bin "github.com/gagliardetto/binary"
22-
"github.com/solana-foundation/solana-go"
23-
"github.com/solana-foundation/solana-go/programs/token"
22+
"github.com/solana-foundation/solana-go/v2"
23+
"github.com/solana-foundation/solana-go/v2/programs/token"
2424
)
2525

2626
func decode(owner solana.PublicKey, data []byte) (any, error) {

cmd/slnc/cmd/get_account.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import (
2222
"fmt"
2323

2424
json "github.com/goccy/go-json"
25-
"github.com/solana-foundation/solana-go"
25+
"github.com/solana-foundation/solana-go/v2"
2626
"github.com/spf13/cobra"
2727
)
2828

cmd/slnc/cmd/get_balance.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ package cmd
2020
import (
2121
"fmt"
2222

23-
"github.com/solana-foundation/solana-go"
23+
"github.com/solana-foundation/solana-go/v2"
2424
"github.com/spf13/cobra"
2525
)
2626

cmd/slnc/cmd/get_program_accounts.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ import (
2222
"os"
2323

2424
json "github.com/goccy/go-json"
25-
"github.com/solana-foundation/solana-go"
26-
"github.com/solana-foundation/solana-go/text"
25+
"github.com/solana-foundation/solana-go/v2"
26+
"github.com/solana-foundation/solana-go/v2/text"
2727
"github.com/spf13/cobra"
2828
)
2929

cmd/slnc/cmd/get_spl_token.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ import (
2323
"os"
2424

2525
bin "github.com/gagliardetto/binary"
26-
"github.com/solana-foundation/solana-go"
27-
"github.com/solana-foundation/solana-go/programs/token"
28-
"github.com/solana-foundation/solana-go/rpc"
29-
"github.com/solana-foundation/solana-go/text"
26+
"github.com/solana-foundation/solana-go/v2"
27+
"github.com/solana-foundation/solana-go/v2/programs/token"
28+
"github.com/solana-foundation/solana-go/v2/rpc"
29+
"github.com/solana-foundation/solana-go/v2/text"
3030
"github.com/spf13/cobra"
3131
)
3232

cmd/slnc/cmd/get_transactions.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ import (
2222
"fmt"
2323
"os"
2424

25-
"github.com/solana-foundation/solana-go"
26-
_ "github.com/solana-foundation/solana-go/programs/system"
27-
_ "github.com/solana-foundation/solana-go/programs/token"
28-
_ "github.com/solana-foundation/solana-go/programs/tokenregistry"
29-
"github.com/solana-foundation/solana-go/rpc"
30-
"github.com/solana-foundation/solana-go/text"
25+
"github.com/solana-foundation/solana-go/v2"
26+
_ "github.com/solana-foundation/solana-go/v2/programs/system"
27+
_ "github.com/solana-foundation/solana-go/v2/programs/token"
28+
_ "github.com/solana-foundation/solana-go/v2/programs/tokenregistry"
29+
"github.com/solana-foundation/solana-go/v2/rpc"
30+
"github.com/solana-foundation/solana-go/v2/text"
3131
"github.com/spf13/cobra"
3232
)
3333

cmd/slnc/cmd/is_blockhash_valid.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ package cmd
1717
import (
1818
"fmt"
1919

20-
"github.com/solana-foundation/solana-go"
20+
"github.com/solana-foundation/solana-go/v2"
2121
"github.com/spf13/cobra"
2222
)
2323

cmd/slnc/cmd/logging.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import (
2121
"os"
2222
"strings"
2323

24-
zapbox "github.com/solana-foundation/solana-go/zap-box"
24+
zapbox "github.com/solana-foundation/solana-go/v2/zap-box"
2525
"go.uber.org/zap"
2626
"go.uber.org/zap/zapcore"
2727

@@ -31,7 +31,7 @@ import (
3131
var zlog *zap.Logger
3232

3333
func init() {
34-
logging.Register("github.com/solana-foundation/solana-go/cmd/slnc/cmd", &zlog)
34+
logging.Register("github.com/solana-foundation/solana-go/v2/cmd/slnc/cmd", &zlog)
3535
}
3636

3737
func SetupLogger() {

0 commit comments

Comments
 (0)