|
| 1 | +# Lumera Go SDK |
| 2 | + |
| 3 | +Official Go SDK for the Lumera Protocol - a next-generation blockchain platform for AI and decentralized storage. |
| 4 | + |
| 5 | +## Features |
| 6 | + |
| 7 | +- 🔗 **Unified Client** - Single interface for blockchain and storage operations |
| 8 | +- 📦 **Type-Safe** - Full Go type definitions for all Lumera modules |
| 9 | +- 🚀 **High-Level API** - Simple methods for complex operations |
| 10 | +- 🔐 **Secure** - Built on Cosmos SDK's proven cryptography |
| 11 | +- 📝 **Well-Documented** - Comprehensive examples and documentation |
| 12 | + |
| 13 | +## Installation |
| 14 | + |
| 15 | +```bash |
| 16 | +go get github.com/LumeraProtocol/sdk-go |
| 17 | +``` |
| 18 | + |
| 19 | +## Quick Start |
| 20 | + |
| 21 | +```go |
| 22 | +package main |
| 23 | + |
| 24 | +import ( |
| 25 | + "context" |
| 26 | + "log" |
| 27 | + |
| 28 | + "github.com/cosmos/cosmos-sdk/crypto/keyring" |
| 29 | + lumerasdk "github.com/LumeraProtocol/sdk-go/client" |
| 30 | +) |
| 31 | + |
| 32 | +func main() { |
| 33 | + ctx := context.Background() |
| 34 | + |
| 35 | + // Initialize keyring |
| 36 | + kr, err := keyring.New("lumera", "test", "/tmp", nil) |
| 37 | + if err != nil { |
| 38 | + log.Fatal(err) |
| 39 | + } |
| 40 | + |
| 41 | + // Create client |
| 42 | + client, err := lumerasdk.New(ctx, lumerasdk.Config{ |
| 43 | + ChainID: "lumera-testnet-2", |
| 44 | + GRPCAddr: "localhost:9090", |
| 45 | + Address: "lumera1abc...", |
| 46 | + KeyName: "my-key", |
| 47 | + }, kr) |
| 48 | + if err != nil { |
| 49 | + log.Fatal(err) |
| 50 | + } |
| 51 | + defer client.Close() |
| 52 | + |
| 53 | + // Query an action |
| 54 | + action, err := client.Blockchain.Action.GetAction(ctx, "action-123") |
| 55 | + if err != nil { |
| 56 | + log.Fatal(err) |
| 57 | + } |
| 58 | + |
| 59 | + log.Printf("Action: %+v", action) |
| 60 | +} |
| 61 | +``` |
| 62 | + |
| 63 | +## Examples |
| 64 | + |
| 65 | +See the [examples](./examples) directory for complete working examples: |
| 66 | + |
| 67 | +- [Cascade Upload](./examples/cascade-upload) - Upload files to decentralized storage |
| 68 | +- [Cascade Download](./examples/cascade-download) - Download files from storage |
| 69 | +- [Query Actions](./examples/query-actions) - Query blockchain actions |
| 70 | +- [Claim Tokens](./examples/claim-tokens) - Claim tokens from old chain |
| 71 | + |
| 72 | +## Documentation |
| 73 | + |
| 74 | +- [API Documentation](https://pkg.go.dev/github.com/LumeraProtocol/sdk-go) |
| 75 | +- [Lumera Documentation](https://docs.lumera.io) |
| 76 | + |
| 77 | +## Development |
| 78 | + |
| 79 | +```bash |
| 80 | +# Clone the repository |
| 81 | +git clone https://github.com/LumeraProtocol/sdk-go.git |
| 82 | +cd sdk-go |
| 83 | + |
| 84 | +# Install dependencies |
| 85 | +go mod download |
| 86 | + |
| 87 | +# Run tests |
| 88 | +make test |
| 89 | + |
| 90 | +# Run linters |
| 91 | +make lint |
| 92 | + |
| 93 | +# Build examples |
| 94 | +make examples |
| 95 | +``` |
| 96 | + |
| 97 | +## Contributing |
| 98 | + |
| 99 | +Contributions are welcome! Please read our [Contributing Guide](CONTRIBUTING.md) for details. |
| 100 | + |
| 101 | +## License |
| 102 | + |
| 103 | +Apache 2.0 - see [LICENSE](LICENSE) file for details. |
| 104 | + |
| 105 | +## Links |
| 106 | + |
| 107 | +- [Lumera Protocol](https://lumera.io) |
| 108 | +- [Documentation](https://docs.lumera.io) |
| 109 | +- [Discord](https://discord.gg/lumera) |
| 110 | +- [Twitter](https://twitter.com/LumeraProtocol) |
| 111 | + |
0 commit comments