solana-go

(★ 1,575)

Go SDK library and RPC client for the Solana Blockchain

File Explorer

  • .envrc
  • .gitignore
  • .golangci.yml
  • .goreleaser.yml
  • account.go
  • account_test.go
  • base58_bench_test.go
  • CHANGELOG.md
  • constants.go
  • CONTRIBUTING.md
  • fee_calculator.go
  • generic_instruction.go
  • generic_instruction_test.go
  • go.mod
  • go.sum
  • init_test.go
  • interface.go
  • json.go
  • keys.go
  • keys_test.go
  • LICENSE
  • logging.go
  • message.go
  • message_bench_test.go
  • message_test.go
  • message_v0_test.go
  • mnemonic.go
  • mnemonic_test.go
  • nativetype_test.go
  • nativetypes.go
  • nonce.go
  • nonce_test.go
  • program_ids.go
  • README.md
  • registry.go
  • registry_test.go
  • sanitize.go
  • sanitize_test.go
  • sysvar.go
  • transaction.go
  • transaction_bench_test.go
  • transaction_test.go
  • transaction_v0_test.go
  • types.go
  • types_test.go
  • util.go

# Use via CDN

jsDelivr

jsDelivr serves any public GitHub repository as a CDN with zero setup. Pick a version and a file to get a ready-to-paste link and snippet.

Command Glossary

Commands referenced in this DOCs, explained below.

🔍

fmt

View Details ▼

Reformat a text file by joining its paragraphs and limiting the line width to a number of characters (75 by default).

fmt {{path/to/file}}

Reformat a file:

fmt {{[-w|--width]}} {{n}} {{path/to/file}}

Reformat a file producing output lines of (at most) `n` characters:

fmt {{[-s|--split-only]}} {{path/to/file}}

Reformat a file without joining lines shorter than the given width together:

🔍

go get

View Details ▼

Add a dependency package, or download packages in legacy GOPATH mode.
Note: `./...` is a Go package pattern understood by Go tooling. It matches the current package and all packages recursively under the current directory.

go get {{example.com/pkg}}

Add a specified package to `go.mod` in module-mode or install the package in GOPATH-mode:

go get {{example.com/pkg}}@{{v1.2.3}}

Modify the package with a given version in module-aware mode:

go get {{example.com/pkg}}@{{none}}

Remove a specified package:

🔍

go test

View Details ▼

Test Go packages (files have to end with `_test.go`).
Note: `./...` is a Go package pattern understood by Go tooling. It matches the current package and all packages recursively under the current directory.

go test

Test the package found in the current directory:

go test -v

[v]erbosely test the package in the current directory:

go test -v ./...

Test the packages in the current directory and all subdirectories:

🔍

golangci-lint

View Details ▼

Parallelized, smart, and fast Go linters runner that integrates with all major IDEs and supports YAML configuration.

golangci-lint run

Run linters in the current folder:

golangci-lint linters

List enabled and disabled linters (Note: Disabled linters are shown last, do not mistake them for enabled ones):

golangci-lint run {{[-E|--enable]}} {{linter}}

Enable a specific linter for this run:

🔍

time

View Details ▼

Measure how long a command took to run.
Note: `time` can either exist as a shell builtin, a standalone program, or both.
See also: `times`.

time {{command}}

Run the `command` and print the time measurements to `stdout`:

time

Display the current system time and prompt to enter a new time (leave empty to keep unchanged):

time read

Create a very simple stopwatch (only works in Bash):

🔍

timeout

View Details ▼

Run a command with a time limit.

timeout 3s sleep 10

Run `sleep 10` and terminate it after 3 seconds:

timeout {{[-s|--signal]}} {{INT|HUP|KILL|...}} {{5s}} {{sleep 10}}

Send a signal to the command after the time limit expires (`TERM` by default, `kill -l` to list all signals):

timeout {{[-v|--verbose]}} {{0.5s|1m|1h|1d|...}} {{command}}

Send verbose output to `stderr` showing signal sent upon timeout:

🔍

rpcClient

View Details ▼

MS-RPC client tool (part of the samba suite).

rpcclient {{[-U|--user]}} {{domain}}\{{username}}%{{password}} {{ip_address}}

Connect to a remote host:

rpcclient {{[-U|--user]}} {{username}} {{[-W|--workgroup]}} {{domain}} {{[-N|--no-pass]}} {{ip_address}}

Connect to a remote host on a domain without a password:

rpcclient {{[-U|--user]}} {{domain}}\{{username}} --pw-nt-hash {{ip_address}}

Connect to a remote host, passing the password hash:

🔍

net

View Details ▼

System utility to view and modify network-related settings.

net {{start|stop}} {{service}}

Start or stop a Windows service synchronously:

net use {{\\smb_shared_folder}} /USER:{{username}}

Make sure an SMB share is available in the current console:

net share

Show the folders currently shared over SMB:

# Project Badges

// repository documentation