You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+20-10Lines changed: 20 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,15 @@
1
1
# Changelog
2
2
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
+
3
13
## v1.19.2
4
14
* Update Parisnet hash
5
15
* Update protocol history of ghostnet
@@ -52,8 +62,8 @@
52
62
* codec: add staking operation codecs
53
63
* codec: fix block encoding
54
64
* 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
57
67
58
68
## v1.17.4
59
69
@@ -62,7 +72,7 @@
62
72
63
73
## v1.17.3
64
74
65
-
* cmd: add tzcompose alpha release
75
+
* cmd: add mvcompose alpha release
66
76
* rpc: dedicated logger instance per client
67
77
* rpc observer: return full BlockHeaderLogEntry in callback
68
78
* rpc observer: multiple subscriptions for the same op hash
@@ -100,7 +110,7 @@
100
110
* add storage limit safety margin (100 byte)
101
111
* fix some Micheline translation bugs for nested list/comb-pair ambiguities
102
112
* fix decoding for some single-value entrypoints
103
-
* support MVGO_API_KEY env variable
113
+
* support TZGO_API_KEY env variable
104
114
105
115
## v1.16.6
106
116
@@ -134,14 +144,14 @@
134
144
135
145
Refactoring and Mumbai support
136
146
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.
138
148
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
140
150
- hashes and addresses directly comparable now and can thus be used as Golang Map keys
141
151
- renamed `Address.Bytes()` to `Encode()`
142
152
- renamed `Address.Bytes22()` to `EncodePadded()`
143
153
- 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
145
155
* Added smart rollup support to rpc and codec packages
146
156
* Added binary encoders for new operations since Lima
147
157
-`drain_delegate`
@@ -252,7 +262,7 @@ Other changes
252
262
* Add noview token type
253
263
* Add fa2 balance helper
254
264
* Make call args chainable
255
-
* Add mumav prim helper
265
+
* Add mutez prim helper
256
266
* Support address add/list for remote signer
257
267
* Fix merging params
258
268
* Fix min fee, add min-fee helper
@@ -347,7 +357,7 @@ Other changes
347
357
348
358
## v1.11-rc0
349
359
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.
351
361
352
362
**Package `tezos`**
353
363
@@ -366,7 +376,7 @@ This is the first release of MvGo that allows sending transactions. All types an
366
376
- New: calls accept interface type `BlockID` which can be
367
377
-`BlockAlias` (genesis or head)
368
378
-`BlockLevel` an int64
369
-
-`mavryk.BlockHash` for named blocks
379
+
-`tezos.BlockHash` for named blocks
370
380
-`BlockOffset` for offsets from a BlockID
371
381
- New: `MempoolMonitor` to monitor new mempool transactions
372
382
- Refactored `Mempool` type to return the same Operation type like block calls
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+2-4Lines changed: 2 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
-
# Contributing to mvGO
1
+
# Contributing to GoMavryk
2
2
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.
4
4
5
5
Before you start, please **read** and **sign** our Contributor License Agreement and send it to [email protected]:
6
6
@@ -9,8 +9,6 @@ Before you start, please **read** and **sign** our Contributor License Agreement
9
9
10
10
The CLA is meant to protect you and us from legal trouble.
11
11
12
-
If you need any help or mentoring getting started or making a PR, please ask on [Discord](https://discord.gg/D5e98Hw).
Copy file name to clipboardExpand all lines: README.md
+49-46Lines changed: 49 additions & 46 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,59 +1,62 @@
1
-
## Blockwatch MvGo - Mavryk Go SDK
1
+
## Blockwatch GoMavryk - Mavryk Go SDK
2
2
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.
4
5
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.
6
7
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
8
11
9
12
- Boreas v002
10
13
- Atlas v001
11
14
12
15
### SDK features
13
16
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:
15
18
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
22
25
- 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
25
28
26
-
### MvGo Compatibility
29
+
### GoMavryk Compatibility
27
30
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.
29
32
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.
31
34
32
35
### Usage
33
36
34
37
```sh
35
-
go get -u github.com/mavryk-network/mvgo
38
+
go get -u github.com/mavryk-network/gomavryk
36
39
```
37
40
38
41
Then import, using
39
42
40
43
```go
41
44
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"
47
50
)
48
51
```
49
52
50
53
### Micheline Support
51
54
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.
53
56
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.
55
58
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:
57
60
58
61
```go
59
62
typePrimstruct {
@@ -68,25 +71,25 @@ type Prim struct {
68
71
}
69
72
```
70
73
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()`:
72
75
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
76
79
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.
78
81
79
82
80
83
### Examples
81
84
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.
83
86
84
87
#### Parsing an address
85
88
86
89
To parse/decode an address and output its components you can do the following:
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.
107
110
108
111
#### Monitoring for new blocks
109
112
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:
// we use the Baker Registry on mainnet as example
@@ -169,9 +172,9 @@ fmt.Println(string(buf))
169
172
170
173
```go
171
174
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"
175
178
)
176
179
177
180
// init RPC client
@@ -193,7 +196,7 @@ val := micheline.NewValue(ep.Type(), param)
193
196
from, ok:= val.GetAddress("transfer.from")
194
197
```
195
198
196
-
#### Use MvGo's Value API
199
+
#### Use GoMavryk's Value API
197
200
198
201
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.
// we use the hic et nunc NFT market on mainnet as example
@@ -310,7 +313,7 @@ for _, key := range bigkeys {
310
313
311
314
#### Custom RPC client configuration
312
315
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).
0 commit comments