Skip to content

Commit 45f52d4

Browse files
Rebranding to GoMavryk + Notice added
1 parent 1d5e2ec commit 45f52d4

File tree

223 files changed

+950
-2329
lines changed

Some content is hidden

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

223 files changed

+950
-2329
lines changed

.drone.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
kind: pipeline
2-
name: MvGo Pipeline
2+
name: GoMavryk Pipeline
33
platform:
44
os: linux
55
arch: amd64

CHANGELOG.md

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# Changelog
22

3+
Fork notice: This repository is a maintained fork of Blockwatch's TzGo SDK. The
4+
historical changelog below is preserved from upstream for context. New changes in this
5+
fork will be tracked starting with the section below.
6+
7+
## v1.19.2-gomavryk
8+
- Rebrand and housekeeping for fork (module/docs naming)
9+
- License compliance: add NOTICE with upstream attribution
10+
11+
---
12+
313
## v1.19.2
414
* Update Parisnet hash
515
* Update protocol history of ghostnet
@@ -52,8 +62,8 @@
5262
* codec: add staking operation codecs
5363
* codec: fix block encoding
5464
* codec: support block signing and block hash calculation
55-
* tzcompose: add oxford staking tasks
56-
* tzcompose: add double bake task
65+
* mvcompose: add oxford staking tasks
66+
* mvcompose: add double bake task
5767

5868
## v1.17.4
5969

@@ -62,7 +72,7 @@
6272

6373
## v1.17.3
6474

65-
* cmd: add tzcompose alpha release
75+
* cmd: add mvcompose alpha release
6676
* rpc: dedicated logger instance per client
6777
* rpc observer: return full BlockHeaderLogEntry in callback
6878
* rpc observer: multiple subscriptions for the same op hash
@@ -100,7 +110,7 @@
100110
* add storage limit safety margin (100 byte)
101111
* fix some Micheline translation bugs for nested list/comb-pair ambiguities
102112
* fix decoding for some single-value entrypoints
103-
* support MVGO_API_KEY env variable
113+
* support TZGO_API_KEY env variable
104114

105115
## v1.16.6
106116

@@ -134,14 +144,14 @@
134144

135145
Refactoring and Mumbai support
136146

137-
BREAKING: Note that due to a new internal address encoding data written by binary marshalers from earlier versions of MvGo is incompatible.
147+
BREAKING: Note that due to a new internal address encoding data written by binary marshalers from earlier versions of TzGo is incompatible.
138148

139-
* Changed memory layout and interface for all hash types and `mavryk.Address` to save 24 bytes per address/hash that was previously required for a byte slice header
149+
* Changed memory layout and interface for all hash types and `tezos.Address` to save 24 bytes per address/hash that was previously required for a byte slice header
140150
- hashes and addresses directly comparable now and can thus be used as Golang Map keys
141151
- renamed `Address.Bytes()` to `Encode()`
142152
- renamed `Address.Bytes22()` to `EncodePadded()`
143153
- use `Address.Decode(buf []byte)` instead of `UnmarshalBinary()` for reading binary encoded addresses
144-
* Simplified `mavryk.Params` removing unused fields and protocol deployment handling
154+
* Simplified `tezos.Params` removing unused fields and protocol deployment handling
145155
* Added smart rollup support to rpc and codec packages
146156
* Added binary encoders for new operations since Lima
147157
- `drain_delegate`
@@ -252,7 +262,7 @@ Other changes
252262
* Add noview token type
253263
* Add fa2 balance helper
254264
* Make call args chainable
255-
* Add mumav prim helper
265+
* Add mutez prim helper
256266
* Support address add/list for remote signer
257267
* Fix merging params
258268
* Fix min fee, add min-fee helper
@@ -347,7 +357,7 @@ Other changes
347357

348358
## v1.11-rc0
349359

350-
This is the first release of MvGo that allows sending transactions. All types and interfaces are engineered to be easily composable. We start with essential low level types/functions for public and private key handling, operation encoding/signing/broadcast and mempool/block monitoring. This feature set is already fully sufficient to build end-user applications including the possibility to send smart contract calls, but may at times be less convenient. To simplify complex use cases we will introduce higher order functionality in the next release candidate.
360+
This is the first release of TzGo that allows sending transactions. All types and interfaces are engineered to be easily composable. We start with essential low level types/functions for public and private key handling, operation encoding/signing/broadcast and mempool/block monitoring. This feature set is already fully sufficient to build end-user applications including the possibility to send smart contract calls, but may at times be less convenient. To simplify complex use cases we will introduce higher order functionality in the next release candidate.
351361

352362
**Package `tezos`**
353363

@@ -366,7 +376,7 @@ This is the first release of MvGo that allows sending transactions. All types an
366376
- New: calls accept interface type `BlockID` which can be
367377
- `BlockAlias` (genesis or head)
368378
- `BlockLevel` an int64
369-
- `mavryk.BlockHash` for named blocks
379+
- `tezos.BlockHash` for named blocks
370380
- `BlockOffset` for offsets from a BlockID
371381
- New: `MempoolMonitor` to monitor new mempool transactions
372382
- Refactored `Mempool` type to return the same Operation type like block calls

CONTRIBUTING.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Contributing to mvGO
1+
# Contributing to GoMavryk
22

3-
We welcome all contributions to mvGO, be it extensions, bug fixes, documentation, or examples. This document outlines some of the conventions we put in place to keep the work on mvGO tidy and fun.
3+
We welcome all contributions to GoMavryk, be it extensions, bug fixes, documentation, or examples. This document outlines some of the conventions we put in place to keep the work on GoMavryk tidy and fun.
44

55
Before you start, please **read** and **sign** our Contributor License Agreement and send it to [email protected]:
66

@@ -9,8 +9,6 @@ Before you start, please **read** and **sign** our Contributor License Agreement
99

1010
The CLA is meant to protect you and us from legal trouble.
1111

12-
If you need any help or mentoring getting started or making a PR, please ask on [Discord](https://discord.gg/D5e98Hw).
13-
1412

1513
## Contribution flow
1614

NOTICE

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
GoMavryk Fork Attribution
2+
3+
This repository is a fork of Blockwatch's TzGo SDK.
4+
5+
Upstream project:
6+
- Name: GoMavryk (formerly tzgo)
7+
- Copyright: 2020-2024 Blockwatch Data Inc.
8+
- License: MIT
9+
10+
This fork preserves the original MIT license in LICENSE.md. All upstream
11+
copyright notices and permission notices are retained.
12+
13+
Modifications and additions in this fork are:
14+
- Copyright (c) 2025 Mavryk Dynamics
15+
16+
See LICENSE.md for terms. If you contribute to this fork, you agree that your
17+
contributions are licensed under the MIT License and that appropriate upstream
18+
attribution is retained.
19+

README.md

Lines changed: 49 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,62 @@
1-
## Blockwatch MvGo - Mavryk Go SDK
1+
## Blockwatch GoMavryk - Mavryk Go SDK
22

3-
MvGo is [Blockwatch](https://blockwatch.cc)'s low-level Tezos Go SDK for reliable, high-performance applications. This SDK is free to use in commercial and non-commercial projects with a permissive license. Blockwatch is committed to keeping interfaces stable, providing long-term support, and updating MvGo on a regular basis to stay compliant with the most recent Tezos network protocol.
3+
Note: This repository is a maintained fork of Blockwatch's TzGo SDK. See `NOTICE`
4+
and `LICENSE.md` for attribution and licensing details.
45

5-
MvGo's main focus is on **correctness**, **stability**, and **compliance** with Tezos mainnet. It supports binary and JSON encodings for all Tezos types including Micheline smart contract data and all transaction formats. It's an ideal fit for high-performance applications that read from and write to the Tezos blockchain.
6+
GoMavryk is [Blockwatch](https://blockwatch.cc)'s low-level Mavryk Go SDK for reliable, high-performance applications. This SDK is free to use in commercial and non-commercial projects with a permissive license. Blockwatch is committed to keeping interfaces stable, providing long-term support, and updating GoMavryk on a regular basis to stay compliant with the most recent Mavryk network protocol.
67

7-
Current Mavryk protocol support in MvGo
8+
GoMavryk's main focus is on **correctness**, **stability**, and **compliance** with Mavryk mainnet. It supports binary and JSON encodings for all Mavryk types including Micheline smart contract data and all transaction formats. It's an ideal fit for high-performance applications that read from and write to the Mavryk blockchain.
9+
10+
Current Mavryk protocol support in GoMavryk
811

912
- Boreas v002
1013
- Atlas v001
1114

1215
### SDK features
1316

14-
MvGo contains a full set of features to read, monitor, decode, translate, analyze and debug data from the Tezos blockchain, in particular from Tezos smart contracts:
17+
GoMavryk contains a full set of features to read, monitor, decode, translate, analyze and debug data from the Mavryk blockchain, in particular from Mavryk smart contracts:
1518

16-
- a low-level **Types library** `mvgo/mavryk` to handle hashes, addresses, keys, signatures other types found on-chain
17-
- a powerful **Micheline library** `mvgo/micheline` to decode and translate data found in smart contract calls, storage, and bigmaps
18-
- an **RPC library** `mvgo/rpc` for accessing the Tezos Node RPC
19-
- a **Codec library** `mvgo/codec` to construct and serialize operations
20-
- a **Contract library** `mvgo/contract` for smart contract calls and tokens
21-
- a **Signer library** `mvgo/signer` to sign transactions local or remote
19+
- a low-level **Types library** `gomavryk/mavryk` to handle hashes, addresses, keys, signatures other types found on-chain
20+
- a powerful **Micheline library** `gomavryk/micheline` to decode and translate data found in smart contract calls, storage, and bigmaps
21+
- an **RPC library** `gomavryk/rpc` for accessing the Mavryk Node RPC
22+
- a **Codec library** `gomavryk/codec` to construct and serialize operations
23+
- a **Contract library** `gomavryk/contract` for smart contract calls and tokens
24+
- a **Signer library** `gomavryk/signer` to sign transactions local or remote
2225
- helpers like an efficient base58 en/decoder, hash maps, etc
23-
- a **Code generator** [TzGen](https://github.com/blockwatch-cc/mvgo/tree/master/cmd/tzgen) to produce pure Go clients for smart contract interfaces
24-
- an **Automation Tool** [TzCompose](https://github.com/blockwatch-cc/mvgo/tree/master/cmd/tzcompose) to setup test cases and deploy complex contract ecosystems
26+
- a **Code generator** [TzGen](https://github.com/blockwatch-cc/gomavryk/tree/master/cmd/tzgen) to produce pure Go clients for smart contract interfaces
27+
- an **Automation Tool** [MvCompose](https://github.com/blockwatch-cc/gomavryk/tree/master/cmd/mvcompose) to setup test cases and deploy complex contract ecosystems
2528

26-
### MvGo Compatibility
29+
### GoMavryk Compatibility
2730

28-
MvGo's RPC package attempts to be compatible with all protocols so that reading historic block data is always supported. Binary transaction encoding and signing support is limited to the most recent protocol.
31+
GoMavryk's RPC package attempts to be compatible with all protocols so that reading historic block data is always supported. Binary transaction encoding and signing support is limited to the most recent protocol.
2932

30-
We attempt to upgrade MvGo whenever new protocols are proposed and will add new protocol features as soon as practically feasible and as demand for such features exists. For example, we don't fully Sapling and BLS signatures yet, but may add support in the future.
33+
We attempt to upgrade GoMavryk whenever new protocols are proposed and will add new protocol features as soon as practically feasible and as demand for such features exists. For example, we don't fully Sapling and BLS signatures yet, but may add support in the future.
3134

3235
### Usage
3336

3437
```sh
35-
go get -u github.com/mavryk-network/mvgo
38+
go get -u github.com/mavryk-network/gomavryk
3639
```
3740

3841
Then import, using
3942

4043
```go
4144
import (
42-
"github.com/mavryk-network/mvgo/codec"
43-
"github.com/mavryk-network/mvgo/mavryk"
44-
"github.com/mavryk-network/mvgo/micheline"
45-
"github.com/mavryk-network/mvgo/rpc"
46-
"github.com/mavryk-network/mvgo/wallet"
45+
"github.com/mavryk-network/gomavryk/codec"
46+
"github.com/mavryk-network/gomavryk/mavryk"
47+
"github.com/mavryk-network/gomavryk/micheline"
48+
"github.com/mavryk-network/gomavryk/rpc"
49+
"github.com/mavryk-network/gomavryk/wallet"
4750
)
4851
```
4952

5053
### Micheline Support
5154

52-
Tezos uses [Micheline](https://protocol.mavryk.org/shell/micheline.html) for encoding smart contract data and code. The positive is that Micheline is strongly typed, the downside is that it's complex and has a few ambiguities that make it hard to use. MvGo contains a library that lets you decode, analyze and construct compliant Micheline data structures from Go.
55+
Mavryk uses [Micheline](https://protocol.mavryk.org/shell/micheline.html) for encoding smart contract data and code. The positive is that Micheline is strongly typed, the downside is that it's complex and has a few ambiguities that make it hard to use. GoMavryk contains a library that lets you decode, analyze and construct compliant Micheline data structures from Go.
5356

54-
Micheline uses basic **primitives** for encoding types and values. These primitives can be expressed in JSON and binary format and MvGo can translate between them efficiently. Micheline also supports type **annotations** which are used by high-level languages to express complex data types like records and their field names.
57+
Micheline uses basic **primitives** for encoding types and values. These primitives can be expressed in JSON and binary format and GoMavryk can translate between them efficiently. Micheline also supports type **annotations** which are used by high-level languages to express complex data types like records and their field names.
5558

56-
MvGo defines a basic `Prim` data type to work with Micheline primitives directly:
59+
GoMavryk defines a basic `Prim` data type to work with Micheline primitives directly:
5760

5861
```go
5962
type Prim struct {
@@ -68,25 +71,25 @@ type Prim struct {
6871
}
6972
```
7073

71-
Since Micheline value encoding is quite verbose and can be ambiguous, MvGo supports **unfolding** of raw Micheline using the following MvGo wrapper types and their helper functions like `Map()`, `GetInt64()`, `GetAddress()`:
74+
Since Micheline value encoding is quite verbose and can be ambiguous, GoMavryk supports **unfolding** of raw Micheline using the following GoMavryk wrapper types and their helper functions like `Map()`, `GetInt64()`, `GetAddress()`:
7275

73-
- `Type` is a MvGo wrapper for simple or complex primitives which contain annotated type info
74-
- `Value` is a MvGo wrapper for simple or complex primitives representing Micheline values in combination with their Type
75-
- `Key` is a MvGo wrapper for special comparable values that are used as maps or bigmap keys
76+
- `Type` is a GoMavryk wrapper for simple or complex primitives which contain annotated type info
77+
- `Value` is a GoMavryk wrapper for simple or complex primitives representing Micheline values in combination with their Type
78+
- `Key` is a GoMavryk wrapper for special comparable values that are used as maps or bigmap keys
7679

77-
Sometimes Micheline values have been packed into byte sequences with the Michelson PACK instruction and it is desirable to unpack them before processing (e.g. to retrieve UFT8 strings or nested records). MvGo supports `Unpack()` and `UnpackAll()` functions on primitives and values and also detects the internal type of packed data which is necessary for unfolding.
80+
Sometimes Micheline values have been packed into byte sequences with the Michelson PACK instruction and it is desirable to unpack them before processing (e.g. to retrieve UFT8 strings or nested records). GoMavryk supports `Unpack()` and `UnpackAll()` functions on primitives and values and also detects the internal type of packed data which is necessary for unfolding.
7881

7982

8083
### Examples
8184

82-
Below are a few examples showing how to use MvGo to easily access Tezos data in your application.
85+
Below are a few examples showing how to use GoMavryk to easily access Mavryk data in your application.
8386

8487
#### Parsing an address
8588

8689
To parse/decode an address and output its components you can do the following:
8790

8891
```go
89-
import "github.com/mavryk-network/mvgo/mavryk"
92+
import "github.com/mavryk-network/gomavryk/mavryk"
9093

9194
// parse and panic if invalid
9295
addr := mavryk.MustParseAddress("tz3RDC3Jdn4j15J7bBHZd29EUee9gVB1CxD9")
@@ -103,14 +106,14 @@ fmt.Printf("Address bytes = %x\n", addr.Hash)
103106

104107
```
105108

106-
See [examples/addr.go](https://github.com/blockwatch-cc/mvgo/blob/master/examples/addr/main.go) for more.
109+
See [examples/addr.go](https://github.com/blockwatch-cc/gomavryk/blob/master/examples/addr/main.go) for more.
107110

108111
#### Monitoring for new blocks
109112

110-
A Tezos node can notify applications when new blocks are attached to the chain. The Tezos RPC calls this monitor and technically it's a long-poll implementation. Here's how to use this feature in MvGo:
113+
A Mavryk node can notify applications when new blocks are attached to the chain. The Mavryk RPC calls this monitor and technically it's a long-poll implementation. Here's how to use this feature in GoMavryk:
111114

112115
```go
113-
import "github.com/mavryk-network/mvgo/rpc"
116+
import "github.com/mavryk-network/gomavryk/rpc"
114117

115118
// init SDK client
116119
c, _ := rpc.NewClient("https://rpc.tzstats.com", nil)
@@ -144,9 +147,9 @@ for {
144147

145148
```go
146149
import (
147-
"github.com/mavryk-network/mvgo/micheline"
148-
"github.com/mavryk-network/mvgo/rpc"
149-
"github.com/mavryk-network/mvgo/mavryk"
150+
"github.com/mavryk-network/gomavryk/micheline"
151+
"github.com/mavryk-network/gomavryk/rpc"
152+
"github.com/mavryk-network/gomavryk/mavryk"
150153
)
151154

152155
// we use the Baker Registry on mainnet as example
@@ -169,9 +172,9 @@ fmt.Println(string(buf))
169172

170173
```go
171174
import (
172-
"github.com/mavryk-network/mvgo/micheline"
173-
"github.com/mavryk-network/mvgo/rpc"
174-
"github.com/mavryk-network/mvgo/mavryk"
175+
"github.com/mavryk-network/gomavryk/micheline"
176+
"github.com/mavryk-network/gomavryk/rpc"
177+
"github.com/mavryk-network/gomavryk/mavryk"
175178
)
176179

177180
// init RPC client
@@ -193,7 +196,7 @@ val := micheline.NewValue(ep.Type(), param)
193196
from, ok := val.GetAddress("transfer.from")
194197
```
195198

196-
#### Use MvGo's Value API
199+
#### Use GoMavryk's Value API
197200

198201
Micheline type and value trees are verbose and can be ambiguous due to comb-pair optimizations. If you don't know or don't care about what that even means, you may want to use the `Value` API which helps you translate Micheline into human readable form.
199202

@@ -258,8 +261,8 @@ err := val.Unmarshal(&transfer)
258261
import (
259262
"context"
260263

261-
"github.com/mavryk-network/mvgo/rpc"
262-
"github.com/mavryk-network/mvgo/mavryk"
264+
"github.com/mavryk-network/gomavryk/rpc"
265+
"github.com/mavryk-network/gomavryk/mavryk"
263266
)
264267

265268
// we use the hic et nunc NFT market on mainnet as example
@@ -310,7 +313,7 @@ for _, key := range bigkeys {
310313

311314
#### Custom RPC client configuration
312315

313-
MvGo's `rpc.NewClient()` function takes an optional Go `http.Client` as parameter which you can configure before or after passing it to the library. The example below shows how to set custom timeouts and disable TLS certificate checks (not recommended in production, but useful if you use self-signed certificates during testing).
316+
GoMavryk's `rpc.NewClient()` function takes an optional Go `http.Client` as parameter which you can configure before or after passing it to the library. The example below shows how to set custom timeouts and disable TLS certificate checks (not recommended in production, but useful if you use self-signed certificates during testing).
314317

315318

316319
```go
@@ -320,7 +323,7 @@ import (
320323
"net"
321324
"net/http"
322325

323-
"github.com/mavryk-network/mvgo/rpc"
326+
"github.com/mavryk-network/gomavryk/rpc"
324327
)
325328

326329

base58/base58_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
"encoding/hex"
1111
"testing"
1212

13-
"github.com/mavryk-network/mvgo/base58"
13+
"github.com/mavryk-network/gomavryk/base58"
1414
)
1515

1616
var stringTests = []struct {

base58/base58bench_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
"fmt"
1111
"testing"
1212

13-
"github.com/mavryk-network/mvgo/base58"
13+
"github.com/mavryk-network/gomavryk/base58"
1414
)
1515

1616
var (

base58/base58check_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ package base58_test
88
import (
99
"testing"
1010

11-
"github.com/mavryk-network/mvgo/base58"
11+
"github.com/mavryk-network/gomavryk/base58"
1212
)
1313

1414
var checkEncodingStringTests = []struct {

0 commit comments

Comments
 (0)