From d2d1624caabc8240c6751ea87b58f924d715332a Mon Sep 17 00:00:00 2001 From: biter777 <33280398+biter777@users.noreply.github.com> Date: Tue, 23 May 2023 13:48:06 +0300 Subject: [PATCH 01/41] Add files via upload From ca133445cd516f6f1557660fb5fa4f8c16bb5caf Mon Sep 17 00:00:00 2001 From: biter777 <33280398+biter777@users.noreply.github.com> Date: Tue, 23 May 2023 13:49:31 +0300 Subject: [PATCH 02/41] Add files via upload --- trx.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/trx.go b/trx.go index 8173ec4..c6878bf 100644 --- a/trx.go +++ b/trx.go @@ -1,6 +1,7 @@ package viz import ( + "errors" "time" "github.com/VIZ-Blockchain/viz-go-lib/api" @@ -9,8 +10,11 @@ import ( "github.com/VIZ-Blockchain/viz-go-lib/types" ) -//SendTrx generates and sends an array of transactions to VIZ. +// SendTrx generates and sends an array of transactions to VIZ. func (client *Client) SendTrx(username string, strx []operations.Operation) (*types.OperationResponse, error) { + if len(strx) < 1 { + return nil, errors.New("no operations") + } var bresp types.OperationResponse // Getting the necessary parameters From 75e02c429a7316adb4ba66b219959bf7834f25b3 Mon Sep 17 00:00:00 2001 From: biter777 <33280398+biter777@users.noreply.github.com> Date: Tue, 23 May 2023 13:50:18 +0300 Subject: [PATCH 03/41] Add files via upload --- keys.go | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/keys.go b/keys.go index e67cca2..d4d1cc4 100644 --- a/keys.go +++ b/keys.go @@ -12,8 +12,8 @@ var ( OpTypeKey = make(map[operations.OpType][]string) ) -//Keys is used as a keystroke for a specific user. -//Only a few keys can be set. +// Keys is used as a keystroke for a specific user. +// Only a few keys can be set. type Keys struct { PKey []string AKey []string @@ -63,7 +63,7 @@ func init() { OpTypeKey["buy_account"] = []string{"active"} } -//SigningKeys returns the key from the CurrentKeys +// SigningKeys returns the key from the CurrentKeys func (client *Client) SigningKeys(trx operations.Operation) ([][]byte, error) { var keys [][]byte @@ -75,6 +75,9 @@ func (client *Client) SigningKeys(trx operations.Operation) ([][]byte, error) { for _, val := range opKeys { switch val { case "regular": + if len(client.CurrentKeys.PKey) < 1 { + return nil, errors.New("Client Regular Key not initialized. Use SetKeys method") + } for _, keyStr := range client.CurrentKeys.PKey { privKey, err := wif.Decode(keyStr) if err != nil { @@ -83,6 +86,9 @@ func (client *Client) SigningKeys(trx operations.Operation) ([][]byte, error) { keys = append(keys, privKey) } case "active": + if len(client.CurrentKeys.AKey) < 1 { + return nil, errors.New("Client Active Key not initialized. Use SetKeys method") + } for _, keyStr := range client.CurrentKeys.AKey { privKey, err := wif.Decode(keyStr) if err != nil { @@ -91,6 +97,9 @@ func (client *Client) SigningKeys(trx operations.Operation) ([][]byte, error) { keys = append(keys, privKey) } case "master": + if len(client.CurrentKeys.OKey) < 1 { + return nil, errors.New("Client Master Key not initialized. Use SetKeys method") + } for _, keyStr := range client.CurrentKeys.OKey { privKey, err := wif.Decode(keyStr) if err != nil { @@ -99,6 +108,9 @@ func (client *Client) SigningKeys(trx operations.Operation) ([][]byte, error) { keys = append(keys, privKey) } case "memo": + if len(client.CurrentKeys.MKey) < 1 { + return nil, errors.New("Client Memo Key not initialized. Use SetKeys method") + } for _, keyStr := range client.CurrentKeys.MKey { privKey, err := wif.Decode(keyStr) if err != nil { From c48bb5bfeccbd33937e59fccfdec6f1d7d9880a5 Mon Sep 17 00:00:00 2001 From: biter777 <33280398+biter777@users.noreply.github.com> Date: Sun, 28 May 2023 11:07:33 +0300 Subject: [PATCH 04/41] Update go.mod --- go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 5de26db..ec2cad2 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/VIZ-Blockchain/viz-go-lib +module github.com/biter777/viz-go-lib go 1.15 From c641bd9dfbf92c49a0be23dc9d795de664fc678b Mon Sep 17 00:00:00 2001 From: biter777 <33280398+biter777@users.noreply.github.com> Date: Sun, 28 May 2023 11:57:34 +0300 Subject: [PATCH 05/41] Add files via upload --- client.go | 8 ++++---- go.mod | 15 +++++++++------ go.sum | 15 ++++----------- helper.go | 18 +++++++++--------- keys.go | 4 ++-- trx.go | 8 ++++---- 6 files changed, 32 insertions(+), 36 deletions(-) diff --git a/client.go b/client.go index a9d4c22..29382bc 100644 --- a/client.go +++ b/client.go @@ -4,10 +4,10 @@ import ( "errors" "net/url" - "github.com/VIZ-Blockchain/viz-go-lib/api" - "github.com/VIZ-Blockchain/viz-go-lib/transports" - "github.com/VIZ-Blockchain/viz-go-lib/transports/http" - "github.com/VIZ-Blockchain/viz-go-lib/transports/websocket" + "github.com/biter777/viz-go-lib/api" + "github.com/biter777/viz-go-lib/transports" + "github.com/biter777/viz-go-lib/transports/http" + "github.com/biter777/viz-go-lib/transports/websocket" ) var ( diff --git a/go.mod b/go.mod index ec2cad2..e517a7c 100644 --- a/go.mod +++ b/go.mod @@ -1,10 +1,13 @@ -module github.com/biter777/viz-go-lib +module viz -go 1.15 +go 1.19 + +require github.com/biter777/viz-go-lib v0.0.0-20230528080733-c48bb5bfeccb require ( - github.com/btcsuite/btcd v0.21.0-beta - github.com/btcsuite/btcutil v1.0.2 - github.com/gorilla/websocket v1.4.2 - golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad + github.com/VIZ-Blockchain/viz-go-lib v0.0.0-20210115080430-8e4544a2adfb // indirect + github.com/btcsuite/btcd v0.21.0-beta // indirect + github.com/btcsuite/btcutil v1.0.2 // indirect + github.com/gorilla/websocket v1.4.2 // indirect + golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad // indirect ) diff --git a/go.sum b/go.sum index bdcedb0..4038486 100644 --- a/go.sum +++ b/go.sum @@ -1,29 +1,25 @@ -github.com/aead/siphash v1.0.1 h1:FwHfE/T45KPKYuuSAKyyvE+oPWcaQ+CUmFW0bPlM+kg= +github.com/VIZ-Blockchain/viz-go-lib v0.0.0-20210115080430-8e4544a2adfb h1:jBqj1UhvFthN9H2OpBkAhmBNlBdaSuUEapE5jU7lW5I= +github.com/VIZ-Blockchain/viz-go-lib v0.0.0-20210115080430-8e4544a2adfb/go.mod h1:ix6x8rPxetkQ5T5GobYSd+JS0U95w3nE8xeMFF+kQg4= github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= +github.com/biter777/viz-go-lib v0.0.0-20230528080733-c48bb5bfeccb h1:VCi+TLFhOHtVKPglIy0jxwJua9lLuFD4BQHh66a6mro= +github.com/biter777/viz-go-lib v0.0.0-20230528080733-c48bb5bfeccb/go.mod h1:VqANrcdW/H1nu3Lk9hXfkXKHqgGcjmBcO1nvk825kds= github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ= github.com/btcsuite/btcd v0.21.0-beta h1:At9hIZdJW0s9E/fAz28nrz6AmcNlSVucCH796ZteX1M= github.com/btcsuite/btcd v0.21.0-beta/go.mod h1:ZSWyehm27aAuS9bvkATT+Xte3hjHZ+MRgMY/8NJ7K94= -github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f h1:bAs4lUbRJpnnkd9VhRV3jjAVU7DJVjMaK+IsvSeZvFo= github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f/go.mod h1:TdznJufoqS23FtqVCzL0ZqgP5MqXbb4fg/WgDys70nA= github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= github.com/btcsuite/btcutil v1.0.2 h1:9iZ1Terx9fMIOtq1VrwdqfsATL9MC2l8ZrUY6YZ2uts= github.com/btcsuite/btcutil v1.0.2/go.mod h1:j9HUFwoQRsZL3V4n+qG+CUnEGHOarIxfC3Le2Yhbcts= -github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd h1:R/opQEbFEy9JGkIguV40SvRY1uliPX8ifOvi6ICsFCw= github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd/go.mod h1:HHNXQzUsZCxOoE+CPiyCTO6x34Zs86zZUiwtpXoGdtg= github.com/btcsuite/goleveldb v0.0.0-20160330041536-7834afc9e8cd/go.mod h1:F+uVaaLLH7j4eDXPRvw78tMflu7Ie2bzYOH4Y8rRKBY= -github.com/btcsuite/goleveldb v1.0.0 h1:Tvd0BfvqX9o823q1j2UZ/epQo09eJh6dTcRp79ilIN4= github.com/btcsuite/goleveldb v1.0.0/go.mod h1:QiK9vBlgftBg6rWQIj6wFzbPfRjiykIEhBH4obrXJ/I= github.com/btcsuite/snappy-go v0.0.0-20151229074030-0bdef8d06723/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc= -github.com/btcsuite/snappy-go v1.0.0 h1:ZxaA6lo2EpxGddsA8JwWOcxlzRybb444sgmeJQMJGQE= github.com/btcsuite/snappy-go v1.0.0/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc= -github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792 h1:R8vQdOQdZ9Y3SkEwmHoWBmX1DNXhXZqlTpq6s4tyJGc= github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtEyQwv5/p4Mg4C0fgbePVuGr935/5ddU9Z3TmDRY= -github.com/btcsuite/winsvc v1.0.0 h1:J9B4L7e3oqhXOcm+2IuNApwzQec85lE+QaikUcCs+dk= github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs= github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/decred/dcrd/lru v1.0.0 h1:Kbsb1SFDsIlaupWPwsPp+dkxiBY1frcS07PCPgotKz8= github.com/decred/dcrd/lru v1.0.0/go.mod h1:mxKOwFd7lFjN2GZYsiz/ecgqR6kkYAl+0pz0tEMk218= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -31,11 +27,8 @@ github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0U github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= -github.com/jessevdk/go-flags v1.4.0 h1:4IU2WS7AumrZ/40jfhf4QVDMsQwqA7VEHozFRrGARJA= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= -github.com/jrick/logrotate v1.0.0 h1:lQ1bL/n9mBNeIXoTUoYRlK4dHuNJVofX9oWqBtPnSzI= github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ= -github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23 h1:FOOIBWrEkLgmlgGfMuZT83xIwfPDxEI2OHu6xUmJMFE= github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= diff --git a/helper.go b/helper.go index 888f235..c5a5d40 100644 --- a/helper.go +++ b/helper.go @@ -1,27 +1,27 @@ package viz import ( - "github.com/VIZ-Blockchain/viz-go-lib/operations" - "github.com/VIZ-Blockchain/viz-go-lib/transactions" - "github.com/VIZ-Blockchain/viz-go-lib/types" + "github.com/biter777/viz-go-lib/operations" + "github.com/biter777/viz-go-lib/transactions" + "github.com/biter777/viz-go-lib/types" ) -//SetAsyncProtocol enables or disables the asynchronous operation protocol +// SetAsyncProtocol enables or disables the asynchronous operation protocol func (client *Client) SetAsyncProtocol(value bool) { client.asyncProtocol = value } -//SetKeys you can specify keys for signing transactions. +// SetKeys you can specify keys for signing transactions. func (client *Client) SetKeys(keys *Keys) { client.CurrentKeys = keys } -//SetAsset returns data of type Asset +// SetAsset returns data of type Asset func SetAsset(amount float64, symbol string) *types.Asset { return &types.Asset{Amount: amount, Symbol: symbol} } -//JSONTrxString generate Trx to String +// JSONTrxString generate Trx to String func JSONTrxString(v *transactions.SignedTransaction) (string, error) { ans, err := types.JSONMarshal(v) if err != nil { @@ -30,7 +30,7 @@ func JSONTrxString(v *transactions.SignedTransaction) (string, error) { return string(ans), nil } -//JSONOpString generate Operations to String +// JSONOpString generate Operations to String func JSONOpString(v []operations.Operation) (string, error) { var tx operations.Operations @@ -43,7 +43,7 @@ func JSONOpString(v []operations.Operation) (string, error) { return string(ans), nil } -//GenerateProposalOperation generate []Operation to ProposalOperations +// GenerateProposalOperation generate []Operation to ProposalOperations func GenerateProposalOperation(ops []operations.Operation) operations.ProposalObjects { var ans operations.ProposalObjects diff --git a/keys.go b/keys.go index d4d1cc4..90aad99 100644 --- a/keys.go +++ b/keys.go @@ -3,8 +3,8 @@ package viz import ( "errors" - "github.com/VIZ-Blockchain/viz-go-lib/encoding/wif" - "github.com/VIZ-Blockchain/viz-go-lib/operations" + "github.com/biter777/viz-go-lib/encoding/wif" + "github.com/biter777/viz-go-lib/operations" ) var ( diff --git a/trx.go b/trx.go index c6878bf..c6d4ae8 100644 --- a/trx.go +++ b/trx.go @@ -4,10 +4,10 @@ import ( "errors" "time" - "github.com/VIZ-Blockchain/viz-go-lib/api" - "github.com/VIZ-Blockchain/viz-go-lib/operations" - "github.com/VIZ-Blockchain/viz-go-lib/transactions" - "github.com/VIZ-Blockchain/viz-go-lib/types" + "github.com/biter777/viz-go-lib/api" + "github.com/biter777/viz-go-lib/operations" + "github.com/biter777/viz-go-lib/transactions" + "github.com/biter777/viz-go-lib/types" ) // SendTrx generates and sends an array of transactions to VIZ. From 6e12becb1d2898591b169dfe896f592ad363114e Mon Sep 17 00:00:00 2001 From: biter777 <33280398+biter777@users.noreply.github.com> Date: Sun, 28 May 2023 11:58:02 +0300 Subject: [PATCH 06/41] Add files via upload --- api/account_history.go | 8 ++--- api/api.go | 6 ++-- api/data.go | 56 ++++++++++++++++----------------- api/database_api.go | 61 ++++++++++++++++++------------------ api/go.mod | 3 ++ api/network_broadcast_api.go | 6 ++-- api/operation_history.go | 6 ++-- 7 files changed, 75 insertions(+), 71 deletions(-) create mode 100644 api/go.mod diff --git a/api/account_history.go b/api/account_history.go index b6bdffa..24b2389 100644 --- a/api/account_history.go +++ b/api/account_history.go @@ -4,14 +4,14 @@ import ( "encoding/json" "errors" - "github.com/VIZ-Blockchain/viz-go-lib/operations" + "github.com/biter777/viz-go-lib/operations" ) //account_history -//GetAccountHistory the history of all user actions on the network in the form of transactions. -//If from = -1, the last {limit + 1} elements of the history will be shown. -//The limit parameter must not exceed from (exception from = -1), since the previous {from} elements of the history are displayed. +// GetAccountHistory the history of all user actions on the network in the form of transactions. +// If from = -1, the last {limit + 1} elements of the history will be shown. +// The limit parameter must not exceed from (exception from = -1), since the previous {from} elements of the history are displayed. func (api *API) GetAccountHistory(account string, from uint64, limit uint32) ([]*operations.OperationObject, error) { if limit > 1000 { return nil, errors.New("account_history: get_account_history -> limit must not exceed 1000") diff --git a/api/api.go b/api/api.go index 9cd6525..fa355bf 100644 --- a/api/api.go +++ b/api/api.go @@ -3,10 +3,10 @@ package api import ( "encoding/json" - "github.com/VIZ-Blockchain/viz-go-lib/transports" + "github.com/biter777/viz-go-lib/transports" ) -//API plug-in structure +// API plug-in structure type API struct { caller transports.Caller } @@ -15,7 +15,7 @@ var ( EmptyParams = []struct{}{} ) -//NewAPI plug-in initialization +// NewAPI plug-in initialization func NewAPI(caller transports.Caller) *API { return &API{caller} } diff --git a/api/data.go b/api/data.go index 464fcac..3527170 100644 --- a/api/data.go +++ b/api/data.go @@ -3,11 +3,11 @@ package api import ( "encoding/json" - "github.com/VIZ-Blockchain/viz-go-lib/operations" - "github.com/VIZ-Blockchain/viz-go-lib/types" + "github.com/biter777/viz-go-lib/operations" + "github.com/biter777/viz-go-lib/types" ) -//Account structure for the GetAccounts and LookupAccountNames function +// Account structure for the GetAccounts and LookupAccountNames function type Account struct { ID types.Int `json:"id"` Name string `json:"name"` @@ -62,14 +62,14 @@ type Account struct { SubaccountOnSale bool `json:"subaccount_on_sale"` } -//Block structure for the GetBlock function +// Block structure for the GetBlock function type Block struct { BlockHeader WitnessSignature string `json:"witness_signature"` Transactions []operations.Transaction `json:"transactions"` } -//BlockHeader structure for the GetBlockHeader function +// BlockHeader structure for the GetBlockHeader function type BlockHeader struct { Number uint32 `json:"-"` Timestamp types.Time `json:"timestamp"` @@ -79,7 +79,7 @@ type BlockHeader struct { Extensions []interface{} `json:"extensions"` } -//Config structure for the GetConfig function. +// Config structure for the GetConfig function. type Config struct { Percent100 uint16 `json:"CHAIN_100_PERCENT"` Percent1 uint16 `json:"CHAIN_1_PERCENT"` @@ -139,7 +139,7 @@ type Config struct { PendingTransactionExecutionLimit uint32 `json:"CHAIN_PENDING_TRANSACTION_EXECUTION_LIMIT"` } -//DatabaseInfo structure for the GetDatabaseInfo function. +// DatabaseInfo structure for the GetDatabaseInfo function. type DatabaseInfo struct { TotalSize string `json:"total_size"` FreeSize uint64 `json:"free_size"` @@ -148,13 +148,13 @@ type DatabaseInfo struct { IndexList []DatabaseInfoIndex `json:"index_list"` } -//DatabaseInfoIndex additional structure for the function GetDatabaseInfo. +// DatabaseInfoIndex additional structure for the function GetDatabaseInfo. type DatabaseInfoIndex struct { Name string `json:"name"` RecordCount uint64 `json:"record_count"` } -//DynamicGlobalProperties structure for the GetDynamicGlobalProperties function. +// DynamicGlobalProperties structure for the GetDynamicGlobalProperties function. type DynamicGlobalProperties struct { ID types.Int `json:"id"` HeadBlockNumber uint32 `json:"head_block_number"` @@ -184,7 +184,7 @@ type DynamicGlobalProperties struct { BandwidthReserveCandidates uint32 `json:"bandwidth_reserve_candidates"` } -//VestingDelegationExpiration structure for the GetExpiringVestingDelegations function. +// VestingDelegationExpiration structure for the GetExpiringVestingDelegations function. type VestingDelegationExpiration struct { ID types.Int `json:"id"` Delegator string `json:"delegator"` @@ -192,13 +192,13 @@ type VestingDelegationExpiration struct { Expiration types.Time `json:"expiration"` } -//NextScheduledHardfork structure for the GetNextScheduledHardfork function. +// NextScheduledHardfork structure for the GetNextScheduledHardfork function. type NextScheduledHardfork struct { HfVersion string `json:"hf_version"` LiveTime types.Time `json:"live_time"` } -//MasterHistory structure for the GetMasterHistory function. +// MasterHistory structure for the GetMasterHistory function. type MasterHistory struct { ID types.Int `json:"id"` Account string `json:"account"` @@ -206,7 +206,7 @@ type MasterHistory struct { LastValidTime string `json:"last_valid_time"` } -//ProposalObject structure for the GetProposedTransaction function. +// ProposalObject structure for the GetProposedTransaction function. type ProposalObject struct { Author string `json:"author"` Title string `json:"title"` @@ -223,7 +223,7 @@ type ProposalObject struct { AvailableKeyApprovals []string `json:"available_key_approvals"` } -//VestingDelegation structure for the GetVestingDelegations function. +// VestingDelegation structure for the GetVestingDelegations function. type VestingDelegation struct { ID types.Int `json:"id"` Delegator string `json:"delegator"` @@ -232,7 +232,7 @@ type VestingDelegation struct { MinDelegationTime types.Time `json:"min_delegation_time"` } -//WithdrawVestingRoutes structure for the GetWithdrawRoutes function. +// WithdrawVestingRoutes structure for the GetWithdrawRoutes function. type WithdrawVestingRoutes struct { FromAccount string `json:"from_account"` ToAccount string `json:"to_account"` @@ -240,21 +240,21 @@ type WithdrawVestingRoutes struct { AutoVest bool `json:"auto_vest"` } -//AccountOnSale structure for the GetAccountsOnSale function. +// AccountOnSale structure for the GetAccountsOnSale function. type AccountOnSale struct { Account string `json:"account"` AccountSeller string `json:"account_seller"` AccountOfferPrice types.Asset `json:"account_offer_price"` } -//SubAccountOnSale structure for the GetSubAccountsOnSale function. +// SubAccountOnSale structure for the GetSubAccountsOnSale function. type SubAccountOnSale struct { Account string `json:"account"` AccountSeller string `json:"account_seller"` AccountOfferPrice types.Asset `json:"account_offer_price"` } -//PaidSubscription structure for the GetPaidSubscriptions function. +// PaidSubscription structure for the GetPaidSubscriptions function. type PaidSubscription struct { ID types.Int `json:"id"` Creator string `json:"creator"` @@ -265,7 +265,7 @@ type PaidSubscription struct { UpdateTime types.Time `json:"update_time"` } -//PaidSubscriptionState structure for the GetPaidSubscriptionOptions function. +// PaidSubscriptionState structure for the GetPaidSubscriptionOptions function. type PaidSubscriptionState struct { ID types.Int `json:"id"` Creator string `json:"creator"` @@ -282,7 +282,7 @@ type PaidSubscriptionState struct { ActiveSubscribersWithAutoRenewalSummaryAmount int64 `json:"active_subscribers_with_auto_renewal_summary_amount"` } -//PaidSubscribeState structure for the GetPaidSubscriptions function. +// PaidSubscribeState structure for the GetPaidSubscriptions function. type PaidSubscribeState struct { ID types.Int `json:"id"` Subscriber string `json:"subscriber"` @@ -297,7 +297,7 @@ type PaidSubscribeState struct { AutoRenewal bool `json:"auto_renewal"` } -//InviteObject structure for the GetInviteById and GetInviteByKey function. +// InviteObject structure for the GetInviteById and GetInviteByKey function. type InviteObject struct { ID types.Int `json:"id"` Creator string `json:"creator"` @@ -311,7 +311,7 @@ type InviteObject struct { Status uint16 `json:"status"` } -//CommitteeObject structure for the GetCommitteeRequest function. +// CommitteeObject structure for the GetCommitteeRequest function. type CommitteeObject struct { ID types.Int `json:"id"` RequestID uint32 `json:"request_id"` @@ -334,14 +334,14 @@ type CommitteeObject struct { Votes []CommitteeVoteState `json:"votes"` } -//CommitteeVoteState structure for the GetCommitteeRequest function. +// CommitteeVoteState structure for the GetCommitteeRequest function. type CommitteeVoteState struct { Voter string `json:"voter"` VotePercent int16 `json:"vote_percent"` LastUpdate types.Time `json:"last_update"` } -//Escrow structure for the GetEscrow function. +// Escrow structure for the GetEscrow function. type Escrow struct { ID types.Int `json:"id"` EscrowID uint32 `json:"escrow_id"` @@ -358,7 +358,7 @@ type Escrow struct { IsApproved bool `json:"is_approved"` } -//AccountRecoveryRequest structure for the GetRecoveryRequest function. +// AccountRecoveryRequest structure for the GetRecoveryRequest function. type AccountRecoveryRequest struct { ID types.Int `json:"id"` AccountToRecover string `json:"account_to_recover"` @@ -366,7 +366,7 @@ type AccountRecoveryRequest struct { Expires types.Time `json:"expires"` } -//BroadcastResponse structure for the BroadcastTransactionSynchronous function +// BroadcastResponse structure for the BroadcastTransactionSynchronous function type BroadcastResponse struct { ID string `json:"id"` BlockNum int32 `json:"block_num"` @@ -374,7 +374,7 @@ type BroadcastResponse struct { Expired bool `json:"expired"` } -//WitnessSchedule structure for the GetWitnessSchedule function. +// WitnessSchedule structure for the GetWitnessSchedule function. type WitnessSchedule struct { ID types.Int `json:"id"` CurrentVirtualTime string `json:"current_virtual_time"` @@ -385,7 +385,7 @@ type WitnessSchedule struct { MajorityVersion string `json:"majority_version"` } -//Witness structure for the GetWitnessByAccount, GetWitnesses and GetWitnessByVote function. +// Witness structure for the GetWitnessByAccount, GetWitnesses and GetWitnessByVote function. type Witness struct { ID types.Int `json:"id"` Owner string `json:"owner"` diff --git a/api/database_api.go b/api/database_api.go index b4be011..57cb942 100644 --- a/api/database_api.go +++ b/api/database_api.go @@ -4,27 +4,27 @@ import ( "encoding/json" "errors" - "github.com/VIZ-Blockchain/viz-go-lib/operations" - "github.com/VIZ-Blockchain/viz-go-lib/types" + "github.com/biter777/viz-go-lib/operations" + "github.com/biter777/viz-go-lib/types" ) //database_api -//GetAccountCount returns the number of registered users. +// GetAccountCount returns the number of registered users. func (api *API) GetAccountCount() (*uint64, error) { var resp uint64 err := api.call("database_api", "get_account_count", EmptyParams, &resp) return &resp, err } -//GetAccounts api request get_accounts +// GetAccounts api request get_accounts func (api *API) GetAccounts(accountNames ...string) ([]*Account, error) { var resp []*Account err := api.call("database_api", "get_accounts", []interface{}{accountNames}, &resp) return resp, err } -//GetBlock api request get_block +// GetBlock api request get_block func (api *API) GetBlock(blockNum uint32) (*Block, error) { var resp Block err := api.call("database_api", "get_block", []uint32{blockNum}, &resp) @@ -32,7 +32,7 @@ func (api *API) GetBlock(blockNum uint32) (*Block, error) { return &resp, err } -//GetBlockHeader api request get_block_header +// GetBlockHeader api request get_block_header func (api *API) GetBlockHeader(blockNum uint32) (*BlockHeader, error) { var resp BlockHeader err := api.call("database_api", "get_block_header", []uint32{blockNum}, &resp) @@ -40,42 +40,42 @@ func (api *API) GetBlockHeader(blockNum uint32) (*BlockHeader, error) { return &resp, err } -//GetChainProperties api request get_chain_properties +// GetChainProperties api request get_chain_properties func (api *API) GetChainProperties() (*types.ChainProperties, error) { var resp types.ChainProperties err := api.call("database_api", "get_chain_properties", EmptyParams, &resp) return &resp, err } -//GetConfig api request get_config +// GetConfig api request get_config func (api *API) GetConfig() (*Config, error) { var resp Config err := api.call("database_api", "get_config", EmptyParams, &resp) return &resp, err } -//GetDatabaseInfo api request get_database_info +// GetDatabaseInfo api request get_database_info func (api *API) GetDatabaseInfo() (*DatabaseInfo, error) { var resp DatabaseInfo err := api.call("database_api", "get_database_info", EmptyParams, &resp) return &resp, err } -//GetDynamicGlobalProperties api request get_dynamic_global_properties +// GetDynamicGlobalProperties api request get_dynamic_global_properties func (api *API) GetDynamicGlobalProperties() (*DynamicGlobalProperties, error) { var resp DynamicGlobalProperties err := api.call("database_api", "get_dynamic_global_properties", EmptyParams, &resp) return &resp, err } -//GetEscrow api request get_escrow +// GetEscrow api request get_escrow func (api *API) GetEscrow(from string, escrowID uint32) (*Escrow, error) { var resp Escrow err := api.call("database_api", "get_escrow", []interface{}{from, escrowID}, &resp) return &resp, err } -//GetExpiringVestingDelegations api request get_expiring_vesting_delegations +// GetExpiringVestingDelegations api request get_expiring_vesting_delegations func (api *API) GetExpiringVestingDelegations(account string, from types.Time, limit ...uint32) ([]*VestingDelegationExpiration, error) { params := []interface{}{account, from} switch len(limit) { @@ -93,66 +93,67 @@ func (api *API) GetExpiringVestingDelegations(account string, from types.Time, l return resp, err } -//GetHardforkVersion api request get_hardfork_version +// GetHardforkVersion api request get_hardfork_version func (api *API) GetHardforkVersion() (*string, error) { var resp string err := api.call("database_api", "get_hardfork_version", EmptyParams, &resp) return &resp, err } -//GetNextScheduledHardfork api request get_next_scheduled_hardfork +// GetNextScheduledHardfork api request get_next_scheduled_hardfork func (api *API) GetNextScheduledHardfork() (*NextScheduledHardfork, error) { var resp NextScheduledHardfork err := api.call("database_api", "get_next_scheduled_hardfork", EmptyParams, &resp) return &resp, err } -//GetMasterHistory api request get_master_history +// GetMasterHistory api request get_master_history func (api *API) GetMasterHistory(accountName string) ([]*MasterHistory, error) { var resp []*MasterHistory err := api.call("database_api", "get_master_history", []interface{}{accountName}, &resp) return resp, err } -//GetPotentialSignatures api request get_potential_signatures +// GetPotentialSignatures api request get_potential_signatures func (api *API) GetPotentialSignatures(trx *operations.Transaction) ([]*string, error) { var resp []*string err := api.call("database_api", "get_potential_signatures", []interface{}{&trx}, &resp) return resp, err } -//GetProposedTransaction api request get_proposed_transactions +// GetProposedTransaction api request get_proposed_transactions func (api *API) GetProposedTransaction(account string, from, limit uint32) ([]*ProposalObject, error) { var resp []*ProposalObject err := api.call("database_api", "get_proposed_transactions", []interface{}{account, from, limit}, &resp) return resp, err } -//GetRecoveryRequest api request get_recovery_request +// GetRecoveryRequest api request get_recovery_request func (api *API) GetRecoveryRequest(accountName string) (*AccountRecoveryRequest, error) { var resp AccountRecoveryRequest err := api.call("database_api", "get_recovery_request", []interface{}{accountName}, &resp) return &resp, err } -//GetRequiredSignatures api request get_required_signatures +// GetRequiredSignatures api request get_required_signatures func (api *API) GetRequiredSignatures(trx *operations.Transaction, keys ...string) ([]*string, error) { var resp []*string err := api.call("database_api", "get_required_signatures", []interface{}{trx, keys}, &resp) return resp, err } -//GetTransactionHex api request get_transaction_hex +// GetTransactionHex api request get_transaction_hex func (api *API) GetTransactionHex(trx *operations.Transaction) (*string, error) { var resp string err := api.call("database_api", "get_transaction_hex", []interface{}{&trx}, &resp) return &resp, err } -//GetVestingDelegations api request get_vesting_delegations -//dtype: -// delegated -// any other +// GetVestingDelegations api request get_vesting_delegations +// dtype: +// +// delegated +// any other func (api *API) GetVestingDelegations(account, from, dtype string, limit ...uint32) ([]*VestingDelegation, error) { params := []interface{}{account, from} switch len(limit) { @@ -184,35 +185,35 @@ func (api *API) GetWithdrawRoutes(accountName string, withdrawRouteType uint32) return resp, err } -//LookupAccountNames api request lookup_account_names +// LookupAccountNames api request lookup_account_names func (api *API) LookupAccountNames(accountNames ...string) ([]*Account, error) { var resp []*Account err := api.call("database_api", "lookup_account_names", []interface{}{accountNames}, &resp) return resp, err } -//LookupAccounts api request lookup_accounts +// LookupAccounts api request lookup_accounts func (api *API) LookupAccounts(lowerBoundName string, limit uint32) ([]*string, error) { var resp []*string err := api.call("database_api", "lookup_accounts", []interface{}{lowerBoundName, limit}, &resp) return resp, err } -//GetVerifyAccountAuthority api request verify_account_authority +// GetVerifyAccountAuthority api request verify_account_authority func (api *API) GetVerifyAccountAuthority(accountName string, keys ...string) (*bool, error) { var resp bool err := api.call("database_api", "verify_account_authority", []interface{}{accountName, keys}, &resp) return &resp, err } -//GetVerifyAuthority api request verify_authority +// GetVerifyAuthority api request verify_authority func (api *API) GetVerifyAuthority(trx *operations.Transaction) (*bool, error) { var resp bool err := api.call("database_api", "verify_authority", []interface{}{&trx}, &resp) return &resp, err } -//GetAccountsOnSale api request get_accounts_on_sale +// GetAccountsOnSale api request get_accounts_on_sale func (api *API) GetAccountsOnSale(from, limit uint32) ([]*AccountOnSale, error) { if limit > 1000 { return nil, errors.New("database_api: get_accounts_on_sale -> limit must not exceed 1000") @@ -222,7 +223,7 @@ func (api *API) GetAccountsOnSale(from, limit uint32) ([]*AccountOnSale, error) return resp, err } -//GetSubAccountsOnSale api request get_subaccounts_on_sale +// GetSubAccountsOnSale api request get_subaccounts_on_sale func (api *API) GetSubAccountsOnSale(from, limit uint32) ([]*SubAccountOnSale, error) { if limit > 1000 { return nil, errors.New("database_api: get_subaccounts_on_sale -> limit must not exceed 1000") diff --git a/api/go.mod b/api/go.mod new file mode 100644 index 0000000..824d30e --- /dev/null +++ b/api/go.mod @@ -0,0 +1,3 @@ +module api + +go 1.19 diff --git a/api/network_broadcast_api.go b/api/network_broadcast_api.go index 2fee7bd..b67cb6a 100644 --- a/api/network_broadcast_api.go +++ b/api/network_broadcast_api.go @@ -1,17 +1,17 @@ package api import ( - "github.com/VIZ-Blockchain/viz-go-lib/operations" + "github.com/biter777/viz-go-lib/operations" ) //network_broadcast_api -//BroadcastTransaction api request broadcast_transaction +// BroadcastTransaction api request broadcast_transaction func (api *API) BroadcastTransaction(tx *operations.Transaction) error { return api.call("network_broadcast_api", "broadcast_transaction", []interface{}{tx}, nil) } -//BroadcastTransactionSynchronous api request broadcast_transaction_synchronous +// BroadcastTransactionSynchronous api request broadcast_transaction_synchronous func (api *API) BroadcastTransactionSynchronous(tx *operations.Transaction, maxBlockAge ...uint32) (*BroadcastResponse, error) { var params []interface{} if len(maxBlockAge) > 0 { diff --git a/api/operation_history.go b/api/operation_history.go index 4c07691..47b5e9d 100644 --- a/api/operation_history.go +++ b/api/operation_history.go @@ -1,19 +1,19 @@ package api import ( - "github.com/VIZ-Blockchain/viz-go-lib/operations" + "github.com/biter777/viz-go-lib/operations" ) //operation_history -//GetOpsInBlock api request get_ops_in_block +// GetOpsInBlock api request get_ops_in_block func (api *API) GetOpsInBlock(blockNum uint32, onlyVirtual bool) ([]*operations.OperationObject, error) { var resp []*operations.OperationObject err := api.call("operation_history", "get_ops_in_block", []interface{}{blockNum, onlyVirtual}, &resp) return resp, err } -//GetTransaction api request get_transaction +// GetTransaction api request get_transaction func (api *API) GetTransaction(id string) (*operations.Transaction, error) { var resp operations.Transaction err := api.call("operation_history", "get_transaction", []string{id}, &resp) From f27012f172ddfced85d3a990e0b4e7f17ea4788c Mon Sep 17 00:00:00 2001 From: biter777 <33280398+biter777@users.noreply.github.com> Date: Sun, 28 May 2023 11:58:43 +0300 Subject: [PATCH 07/41] Add files via upload --- encoding/transaction/go.mod | 9 +++++++++ encoding/transaction/go.sum | 39 +++++++++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 encoding/transaction/go.mod create mode 100644 encoding/transaction/go.sum diff --git a/encoding/transaction/go.mod b/encoding/transaction/go.mod new file mode 100644 index 0000000..e66f712 --- /dev/null +++ b/encoding/transaction/go.mod @@ -0,0 +1,9 @@ +module transaction + +go 1.19 + +require ( + github.com/btcsuite/btcd v0.20.1-beta + github.com/btcsuite/btcutil v1.0.2 + golang.org/x/crypto v0.9.0 +) diff --git a/encoding/transaction/go.sum b/encoding/transaction/go.sum new file mode 100644 index 0000000..1ec2c69 --- /dev/null +++ b/encoding/transaction/go.sum @@ -0,0 +1,39 @@ +github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= +github.com/btcsuite/btcd v0.20.1-beta h1:Ik4hyJqN8Jfyv3S4AGBOmyouMsYE3EdYODkMbQjwPGw= +github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ= +github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f/go.mod h1:TdznJufoqS23FtqVCzL0ZqgP5MqXbb4fg/WgDys70nA= +github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= +github.com/btcsuite/btcutil v1.0.2 h1:9iZ1Terx9fMIOtq1VrwdqfsATL9MC2l8ZrUY6YZ2uts= +github.com/btcsuite/btcutil v1.0.2/go.mod h1:j9HUFwoQRsZL3V4n+qG+CUnEGHOarIxfC3Le2Yhbcts= +github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd/go.mod h1:HHNXQzUsZCxOoE+CPiyCTO6x34Zs86zZUiwtpXoGdtg= +github.com/btcsuite/goleveldb v0.0.0-20160330041536-7834afc9e8cd/go.mod h1:F+uVaaLLH7j4eDXPRvw78tMflu7Ie2bzYOH4Y8rRKBY= +github.com/btcsuite/snappy-go v0.0.0-20151229074030-0bdef8d06723/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc= +github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtEyQwv5/p4Mg4C0fgbePVuGr935/5ddU9Z3TmDRY= +github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs= +github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495 h1:6IyqGr3fnd0tM3YxipK27TUskaOVUjU2nG45yzwcQKY= +github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= +github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ= +github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4= +github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20200115085410-6d4e4cb37c7d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.9.0 h1:LF6fAI+IutBocDJ2OT0Q1g8plpYljMZ4+lty+dsqw3g= +golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0= +golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= From 0b00f64da75459d60347199691773d332364376c Mon Sep 17 00:00:00 2001 From: biter777 <33280398+biter777@users.noreply.github.com> Date: Sun, 28 May 2023 11:59:12 +0300 Subject: [PATCH 08/41] Add files via upload --- encoding/wif/go.mod | 13 ++++++++++ encoding/wif/go.sum | 53 ++++++++++++++++++++++++++++++++++++++++ encoding/wif/validate.go | 2 +- 3 files changed, 67 insertions(+), 1 deletion(-) create mode 100644 encoding/wif/go.mod create mode 100644 encoding/wif/go.sum diff --git a/encoding/wif/go.mod b/encoding/wif/go.mod new file mode 100644 index 0000000..d050237 --- /dev/null +++ b/encoding/wif/go.mod @@ -0,0 +1,13 @@ +module wif + +go 1.19 + +require ( + github.com/biter777/viz-go-lib v0.0.0-20230528080733-c48bb5bfeccb + github.com/btcsuite/btcutil v1.0.2 +) + +require ( + github.com/btcsuite/btcd v0.21.0-beta // indirect + golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad // indirect +) diff --git a/encoding/wif/go.sum b/encoding/wif/go.sum new file mode 100644 index 0000000..1a09817 --- /dev/null +++ b/encoding/wif/go.sum @@ -0,0 +1,53 @@ +github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= +github.com/biter777/viz-go-lib v0.0.0-20230528080733-c48bb5bfeccb h1:VCi+TLFhOHtVKPglIy0jxwJua9lLuFD4BQHh66a6mro= +github.com/biter777/viz-go-lib v0.0.0-20230528080733-c48bb5bfeccb/go.mod h1:VqANrcdW/H1nu3Lk9hXfkXKHqgGcjmBcO1nvk825kds= +github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ= +github.com/btcsuite/btcd v0.21.0-beta h1:At9hIZdJW0s9E/fAz28nrz6AmcNlSVucCH796ZteX1M= +github.com/btcsuite/btcd v0.21.0-beta/go.mod h1:ZSWyehm27aAuS9bvkATT+Xte3hjHZ+MRgMY/8NJ7K94= +github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f/go.mod h1:TdznJufoqS23FtqVCzL0ZqgP5MqXbb4fg/WgDys70nA= +github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= +github.com/btcsuite/btcutil v1.0.2 h1:9iZ1Terx9fMIOtq1VrwdqfsATL9MC2l8ZrUY6YZ2uts= +github.com/btcsuite/btcutil v1.0.2/go.mod h1:j9HUFwoQRsZL3V4n+qG+CUnEGHOarIxfC3Le2Yhbcts= +github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd/go.mod h1:HHNXQzUsZCxOoE+CPiyCTO6x34Zs86zZUiwtpXoGdtg= +github.com/btcsuite/goleveldb v0.0.0-20160330041536-7834afc9e8cd/go.mod h1:F+uVaaLLH7j4eDXPRvw78tMflu7Ie2bzYOH4Y8rRKBY= +github.com/btcsuite/goleveldb v1.0.0/go.mod h1:QiK9vBlgftBg6rWQIj6wFzbPfRjiykIEhBH4obrXJ/I= +github.com/btcsuite/snappy-go v0.0.0-20151229074030-0bdef8d06723/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc= +github.com/btcsuite/snappy-go v1.0.0/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc= +github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtEyQwv5/p4Mg4C0fgbePVuGr935/5ddU9Z3TmDRY= +github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs= +github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/decred/dcrd/lru v1.0.0/go.mod h1:mxKOwFd7lFjN2GZYsiz/ecgqR6kkYAl+0pz0tEMk218= +github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= +github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= +github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ= +github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4= +github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/gomega v1.4.1/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= +github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20200115085410-6d4e4cb37c7d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad h1:DN0cp81fZ3njFcrLCytUHRSUkqBjfTo4Tx9RJTWs0EY= +golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= +golang.org/x/net v0.0.0-20180719180050-a680a1efc54d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/encoding/wif/validate.go b/encoding/wif/validate.go index 12fedd8..127eefd 100644 --- a/encoding/wif/validate.go +++ b/encoding/wif/validate.go @@ -3,7 +3,7 @@ package wif import ( "bytes" - "github.com/VIZ-Blockchain/viz-go-lib/encoding/transaction" + "github.com/biter777/viz-go-lib/encoding/transaction" ) // WifIsValid check that private key conform to public key From 094978d41bd70cb41fdd68725cf8aa4c1aa63439 Mon Sep 17 00:00:00 2001 From: biter777 <33280398+biter777@users.noreply.github.com> Date: Sun, 28 May 2023 11:59:41 +0300 Subject: [PATCH 09/41] Add files via upload --- example/SetBlockAppliedCallback/main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/example/SetBlockAppliedCallback/main.go b/example/SetBlockAppliedCallback/main.go index 9ba4638..c958157 100644 --- a/example/SetBlockAppliedCallback/main.go +++ b/example/SetBlockAppliedCallback/main.go @@ -7,8 +7,8 @@ import ( "os/signal" "sync" - "github.com/VIZ-Blockchain/viz-go-lib" - "github.com/VIZ-Blockchain/viz-go-lib/api" + "github.com/biter777/viz-go-lib" + "github.com/biter777/viz-go-lib/api" ) func main() { From 05c82fc1104dd135fec9de951196d638fdb09f33 Mon Sep 17 00:00:00 2001 From: biter777 <33280398+biter777@users.noreply.github.com> Date: Sun, 28 May 2023 12:00:10 +0300 Subject: [PATCH 10/41] Add files via upload --- example/TemplateAPI/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/example/TemplateAPI/main.go b/example/TemplateAPI/main.go index 29f34d1..cf5a9fd 100644 --- a/example/TemplateAPI/main.go +++ b/example/TemplateAPI/main.go @@ -3,7 +3,7 @@ package main import ( "fmt" - "github.com/VIZ-Blockchain/viz-go-lib" + "github.com/biter777/viz-go-lib" ) func main() { From dc1b0c4986c4a13c29c87dc1d7d98211550aea9e Mon Sep 17 00:00:00 2001 From: biter777 <33280398+biter777@users.noreply.github.com> Date: Sun, 28 May 2023 12:00:32 +0300 Subject: [PATCH 11/41] Add files via upload --- example/TemplateOperation/main.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/example/TemplateOperation/main.go b/example/TemplateOperation/main.go index 3f3c391..690f4c3 100644 --- a/example/TemplateOperation/main.go +++ b/example/TemplateOperation/main.go @@ -3,9 +3,9 @@ package main import ( "fmt" - "github.com/VIZ-Blockchain/viz-go-lib" - "github.com/VIZ-Blockchain/viz-go-lib/operations" - "github.com/VIZ-Blockchain/viz-go-lib/types" + "github.com/biter777/viz-go-lib" + "github.com/biter777/viz-go-lib/operations" + "github.com/biter777/viz-go-lib/types" ) func main() { From 5f2db82586b4f3473268eb06b2863281f4a662b6 Mon Sep 17 00:00:00 2001 From: biter777 <33280398+biter777@users.noreply.github.com> Date: Sun, 28 May 2023 12:01:30 +0300 Subject: [PATCH 12/41] Add files via upload --- operations/go.mod | 3 +++ operations/operation_account_create.go | 12 ++++++------ operations/operation_account_metadata.go | 10 +++++----- operations/operation_account_update.go | 12 ++++++------ operations/operation_account_witness_proxy.go | 10 +++++----- operations/operation_account_witness_vote.go | 10 +++++----- operations/operation_award.go | 12 ++++++------ operations/operation_buy_account.go | 12 ++++++------ operations/operation_chain_properties_update.go | 12 ++++++------ operations/operation_change_recovery_account.go | 10 +++++----- operations/operation_claim_invite_balance.go | 10 +++++----- operations/operation_committee_vote_request.go | 10 +++++----- .../operation_committee_worker_cancel_request.go | 10 +++++----- .../operation_committee_worker_create_request.go | 12 ++++++------ operations/operation_content.go | 14 +++++++------- operations/operation_create_invite.go | 12 ++++++------ operations/operation_custom.go | 10 +++++----- operations/operation_delegate_vesting_shares.go | 12 ++++++------ operations/operation_delete_content.go | 10 +++++----- operations/operation_escrow_approve.go | 10 +++++----- operations/operation_escrow_dispute.go | 10 +++++----- operations/operation_escrow_release.go | 12 ++++++------ operations/operation_escrow_transfer.go | 12 ++++++------ operations/operation_invite_registration.go | 10 +++++----- operations/operation_object.go | 8 ++++---- operations/operation_paid_subscribe.go | 12 ++++++------ operations/operation_proposal_create.go | 12 ++++++------ operations/operation_proposal_delete.go | 10 +++++----- operations/operation_proposal_update.go | 10 +++++----- operations/operation_recover_account.go | 12 ++++++------ operations/operation_request_account_recovery.go | 12 ++++++------ operations/operation_set_account_price.go | 12 ++++++------ operations/operation_set_paid_subscription.go | 12 ++++++------ operations/operation_set_subaccount_price.go | 12 ++++++------ operations/operation_set_withdraw_vesting_route.go | 10 +++++----- operations/operation_transfer.go | 12 ++++++------ operations/operation_transfer_to_vesting.go | 12 ++++++------ .../operation_versioned_chain_properties_update.go | 12 ++++++------ operations/operation_vote.go | 10 +++++----- operations/operation_withdraw_vesting.go | 12 ++++++------ operations/operation_witness_update.go | 10 +++++----- operations/proposal_object.go | 12 ++++++------ operations/transaction.go | 4 ++-- operations/voperation_account_sale.go | 8 ++++---- operations/voperation_author_reward.go | 8 ++++---- operations/voperation_benefactor_award.go | 8 ++++---- operations/voperation_committee_pay_request.go | 8 ++++---- operations/voperation_content_benefactor_reward.go | 8 ++++---- operations/voperation_content_reward.go | 8 ++++---- operations/voperation_curation_reward.go | 8 ++++---- operations/voperation_fill_vesting_withdraw.go | 8 ++++---- operations/voperation_paid_subscription_action.go | 8 ++++---- operations/voperation_receive_award.go | 8 ++++---- operations/voperation_return_vesting_delegation.go | 8 ++++---- operations/voperation_witness_reward.go | 8 ++++---- 55 files changed, 281 insertions(+), 278 deletions(-) create mode 100644 operations/go.mod diff --git a/operations/go.mod b/operations/go.mod new file mode 100644 index 0000000..8f72910 --- /dev/null +++ b/operations/go.mod @@ -0,0 +1,3 @@ +module operations + +go 1.19 diff --git a/operations/operation_account_create.go b/operations/operation_account_create.go index df0746e..20e8c7e 100644 --- a/operations/operation_account_create.go +++ b/operations/operation_account_create.go @@ -1,11 +1,11 @@ package operations import ( - "github.com/VIZ-Blockchain/viz-go-lib/encoding/transaction" - "github.com/VIZ-Blockchain/viz-go-lib/types" + "github.com/biter777/viz-go-lib/encoding/transaction" + "github.com/biter777/viz-go-lib/types" ) -//AccountCreateOperation represents account_create operation data. +// AccountCreateOperation represents account_create operation data. type AccountCreateOperation struct { Fee *types.Asset `json:"fee"` Delegation *types.Asset `json:"delegation"` @@ -20,17 +20,17 @@ type AccountCreateOperation struct { Extensions []interface{} `json:"extensions"` } -//Type function that defines the type of operation AccountCreateOperation. +// Type function that defines the type of operation AccountCreateOperation. func (op *AccountCreateOperation) Type() OpType { return TypeAccountCreate } -//Data returns the operation data AccountCreateOperation. +// Data returns the operation data AccountCreateOperation. func (op *AccountCreateOperation) Data() interface{} { return op } -//MarshalTransaction is a function of converting type AccountCreateOperation to bytes. +// MarshalTransaction is a function of converting type AccountCreateOperation to bytes. func (op *AccountCreateOperation) MarshalTransaction(encoder *transaction.Encoder) error { enc := transaction.NewRollingEncoder(encoder) enc.EncodeUVarint(uint64(TypeAccountCreate.Code())) diff --git a/operations/operation_account_metadata.go b/operations/operation_account_metadata.go index 2b1e636..05cfcf2 100644 --- a/operations/operation_account_metadata.go +++ b/operations/operation_account_metadata.go @@ -1,26 +1,26 @@ package operations import ( - "github.com/VIZ-Blockchain/viz-go-lib/encoding/transaction" + "github.com/biter777/viz-go-lib/encoding/transaction" ) -//AccountMetadataOperation represents account_metadata operation data. +// AccountMetadataOperation represents account_metadata operation data. type AccountMetadataOperation struct { Account string `json:"account"` JSONMetadata string `json:"json_metadata"` } -//Type function that defines the type of operation AccountMetadataOperation. +// Type function that defines the type of operation AccountMetadataOperation. func (op *AccountMetadataOperation) Type() OpType { return TypeAccountMetadata } -//Data returns the operation data AccountMetadataOperation. +// Data returns the operation data AccountMetadataOperation. func (op *AccountMetadataOperation) Data() interface{} { return op } -//MarshalTransaction is a function of converting type AccountMetadataOperation to bytes. +// MarshalTransaction is a function of converting type AccountMetadataOperation to bytes. func (op *AccountMetadataOperation) MarshalTransaction(encoder *transaction.Encoder) error { enc := transaction.NewRollingEncoder(encoder) enc.EncodeUVarint(uint64(TypeAccountMetadata.Code())) diff --git a/operations/operation_account_update.go b/operations/operation_account_update.go index 108e4ca..57ffdd7 100644 --- a/operations/operation_account_update.go +++ b/operations/operation_account_update.go @@ -1,11 +1,11 @@ package operations import ( - "github.com/VIZ-Blockchain/viz-go-lib/encoding/transaction" - "github.com/VIZ-Blockchain/viz-go-lib/types" + "github.com/biter777/viz-go-lib/encoding/transaction" + "github.com/biter777/viz-go-lib/types" ) -//AccountUpdateOperation represents account_update operation data. +// AccountUpdateOperation represents account_update operation data. type AccountUpdateOperation struct { Account string `json:"account"` Master *types.Authority `json:"master,omitempty"` @@ -15,17 +15,17 @@ type AccountUpdateOperation struct { JSONMetadata string `json:"json_metadata"` } -//Type function that defines the type of operation AccountUpdateOperation. +// Type function that defines the type of operation AccountUpdateOperation. func (op *AccountUpdateOperation) Type() OpType { return TypeAccountUpdate } -//Data returns the operation data AccountUpdateOperation. +// Data returns the operation data AccountUpdateOperation. func (op *AccountUpdateOperation) Data() interface{} { return op } -//MarshalTransaction is a function of converting type AccountUpdateOperation to bytes. +// MarshalTransaction is a function of converting type AccountUpdateOperation to bytes. func (op *AccountUpdateOperation) MarshalTransaction(encoder *transaction.Encoder) error { enc := transaction.NewRollingEncoder(encoder) enc.EncodeUVarint(uint64(TypeAccountUpdate.Code())) diff --git a/operations/operation_account_witness_proxy.go b/operations/operation_account_witness_proxy.go index 437f00a..ce433ca 100644 --- a/operations/operation_account_witness_proxy.go +++ b/operations/operation_account_witness_proxy.go @@ -1,26 +1,26 @@ package operations import ( - "github.com/VIZ-Blockchain/viz-go-lib/encoding/transaction" + "github.com/biter777/viz-go-lib/encoding/transaction" ) -//AccountWitnessProxyOperation represents account_witness_proxy operation data. +// AccountWitnessProxyOperation represents account_witness_proxy operation data. type AccountWitnessProxyOperation struct { Account string `json:"account"` Proxy string `json:"proxy"` } -//Type function that defines the type of operation AccountWitnessProxyOperation. +// Type function that defines the type of operation AccountWitnessProxyOperation. func (op *AccountWitnessProxyOperation) Type() OpType { return TypeAccountWitnessProxy } -//Data returns the operation data AccountWitnessProxyOperation. +// Data returns the operation data AccountWitnessProxyOperation. func (op *AccountWitnessProxyOperation) Data() interface{} { return op } -//MarshalTransaction is a function of converting type AccountWitnessProxyOperation to bytes. +// MarshalTransaction is a function of converting type AccountWitnessProxyOperation to bytes. func (op *AccountWitnessProxyOperation) MarshalTransaction(encoder *transaction.Encoder) error { enc := transaction.NewRollingEncoder(encoder) enc.EncodeUVarint(uint64(TypeAccountWitnessProxy.Code())) diff --git a/operations/operation_account_witness_vote.go b/operations/operation_account_witness_vote.go index 1ae2597..28f08a1 100644 --- a/operations/operation_account_witness_vote.go +++ b/operations/operation_account_witness_vote.go @@ -1,27 +1,27 @@ package operations import ( - "github.com/VIZ-Blockchain/viz-go-lib/encoding/transaction" + "github.com/biter777/viz-go-lib/encoding/transaction" ) -//AccountWitnessVoteOperation represents account_witness_vote operation data. +// AccountWitnessVoteOperation represents account_witness_vote operation data. type AccountWitnessVoteOperation struct { Account string `json:"account"` Witness string `json:"witness"` Approve bool `json:"approve"` } -//Type function that defines the type of operation AccountWitnessVoteOperation. +// Type function that defines the type of operation AccountWitnessVoteOperation. func (op *AccountWitnessVoteOperation) Type() OpType { return TypeAccountWitnessVote } -//Data returns the operation data AccountWitnessVoteOperation. +// Data returns the operation data AccountWitnessVoteOperation. func (op *AccountWitnessVoteOperation) Data() interface{} { return op } -//MarshalTransaction is a function of converting type AccountWitnessVoteOperation to bytes. +// MarshalTransaction is a function of converting type AccountWitnessVoteOperation to bytes. func (op *AccountWitnessVoteOperation) MarshalTransaction(encoder *transaction.Encoder) error { enc := transaction.NewRollingEncoder(encoder) enc.EncodeUVarint(uint64(TypeAccountWitnessVote.Code())) diff --git a/operations/operation_award.go b/operations/operation_award.go index 3e5eba2..32329ee 100644 --- a/operations/operation_award.go +++ b/operations/operation_award.go @@ -1,11 +1,11 @@ package operations import ( - "github.com/VIZ-Blockchain/viz-go-lib/encoding/transaction" - "github.com/VIZ-Blockchain/viz-go-lib/types" + "github.com/biter777/viz-go-lib/encoding/transaction" + "github.com/biter777/viz-go-lib/types" ) -//AwardOperation represents award operation data. +// AwardOperation represents award operation data. type AwardOperation struct { Initiator string `json:"initiator"` Receiver string `json:"receiver"` @@ -15,17 +15,17 @@ type AwardOperation struct { Beneficiaries []types.Beneficiary `json:"beneficiaries"` } -//Type function that defines the type of operation AwardOperation. +// Type function that defines the type of operation AwardOperation. func (op *AwardOperation) Type() OpType { return TypeAward } -//Data returns the operation data AwardOperation. +// Data returns the operation data AwardOperation. func (op *AwardOperation) Data() interface{} { return op } -//MarshalTransaction is a function of converting type AwardOperation to bytes. +// MarshalTransaction is a function of converting type AwardOperation to bytes. func (op *AwardOperation) MarshalTransaction(encoder *transaction.Encoder) error { enc := transaction.NewRollingEncoder(encoder) enc.EncodeUVarint(uint64(TypeAward.Code())) diff --git a/operations/operation_buy_account.go b/operations/operation_buy_account.go index bdce61e..6977424 100644 --- a/operations/operation_buy_account.go +++ b/operations/operation_buy_account.go @@ -1,11 +1,11 @@ package operations import ( - "github.com/VIZ-Blockchain/viz-go-lib/encoding/transaction" - "github.com/VIZ-Blockchain/viz-go-lib/types" + "github.com/biter777/viz-go-lib/encoding/transaction" + "github.com/biter777/viz-go-lib/types" ) -//BuyAccountOperation represents buy_account operation data. +// BuyAccountOperation represents buy_account operation data. type BuyAccountOperation struct { Buyer string `json:"buyer"` Account string `json:"account"` @@ -14,17 +14,17 @@ type BuyAccountOperation struct { TokensToShares *types.Asset `json:"tokens_to_shares"` } -//Type function that defines the type of operation BuyAccountOperation. +// Type function that defines the type of operation BuyAccountOperation. func (op *BuyAccountOperation) Type() OpType { return TypeBuyAccount } -//Data returns the operation data BuyAccountOperation. +// Data returns the operation data BuyAccountOperation. func (op *BuyAccountOperation) Data() interface{} { return op } -//MarshalTransaction is a function of converting type BuyAccountOperation to bytes. +// MarshalTransaction is a function of converting type BuyAccountOperation to bytes. func (op *BuyAccountOperation) MarshalTransaction(encoder *transaction.Encoder) error { enc := transaction.NewRollingEncoder(encoder) enc.EncodeUVarint(uint64(TypeBuyAccount.Code())) diff --git a/operations/operation_chain_properties_update.go b/operations/operation_chain_properties_update.go index 5e29018..a4d98b2 100644 --- a/operations/operation_chain_properties_update.go +++ b/operations/operation_chain_properties_update.go @@ -1,27 +1,27 @@ package operations import ( - "github.com/VIZ-Blockchain/viz-go-lib/encoding/transaction" - "github.com/VIZ-Blockchain/viz-go-lib/types" + "github.com/biter777/viz-go-lib/encoding/transaction" + "github.com/biter777/viz-go-lib/types" ) -//ChainPropertiesUpdateOperation represents chain_properties_update operation data. +// ChainPropertiesUpdateOperation represents chain_properties_update operation data. type ChainPropertiesUpdateOperation struct { Owner string `json:"owner"` Props *types.ChainPropertiesOLD `json:"props"` } -//Type function that defines the type of operation ChainPropertiesUpdateOperation. +// Type function that defines the type of operation ChainPropertiesUpdateOperation. func (op *ChainPropertiesUpdateOperation) Type() OpType { return TypeChainPropertiesUpdate } -//Data returns the operation data ChainPropertiesUpdateOperation. +// Data returns the operation data ChainPropertiesUpdateOperation. func (op *ChainPropertiesUpdateOperation) Data() interface{} { return op } -//MarshalTransaction is a function of converting type ChainPropertiesUpdateOperation to bytes. +// MarshalTransaction is a function of converting type ChainPropertiesUpdateOperation to bytes. func (op *ChainPropertiesUpdateOperation) MarshalTransaction(encoder *transaction.Encoder) error { enc := transaction.NewRollingEncoder(encoder) enc.EncodeUVarint(uint64(TypeChainPropertiesUpdate.Code())) diff --git a/operations/operation_change_recovery_account.go b/operations/operation_change_recovery_account.go index e6d8f2a..a3d5dea 100644 --- a/operations/operation_change_recovery_account.go +++ b/operations/operation_change_recovery_account.go @@ -1,27 +1,27 @@ package operations import ( - "github.com/VIZ-Blockchain/viz-go-lib/encoding/transaction" + "github.com/biter777/viz-go-lib/encoding/transaction" ) -//ChangeRecoveryAccountOperation represents change_recovery_account operation data. +// ChangeRecoveryAccountOperation represents change_recovery_account operation data. type ChangeRecoveryAccountOperation struct { AccountToRecover string `json:"account_to_recover"` NewRecoveryAccount string `json:"new_recovery_account"` Extensions []interface{} `json:"extensions"` } -//Type function that defines the type of operation ChangeRecoveryAccountOperation. +// Type function that defines the type of operation ChangeRecoveryAccountOperation. func (op *ChangeRecoveryAccountOperation) Type() OpType { return TypeChangeRecoveryAccount } -//Data returns the operation data ChangeRecoveryAccountOperation. +// Data returns the operation data ChangeRecoveryAccountOperation. func (op *ChangeRecoveryAccountOperation) Data() interface{} { return op } -//MarshalTransaction is a function of converting type ChangeRecoveryAccountOperation to bytes. +// MarshalTransaction is a function of converting type ChangeRecoveryAccountOperation to bytes. func (op *ChangeRecoveryAccountOperation) MarshalTransaction(encoder *transaction.Encoder) error { enc := transaction.NewRollingEncoder(encoder) enc.EncodeUVarint(uint64(TypeChangeRecoveryAccount.Code())) diff --git a/operations/operation_claim_invite_balance.go b/operations/operation_claim_invite_balance.go index f52f168..3aa9fa8 100644 --- a/operations/operation_claim_invite_balance.go +++ b/operations/operation_claim_invite_balance.go @@ -1,27 +1,27 @@ package operations import ( - "github.com/VIZ-Blockchain/viz-go-lib/encoding/transaction" + "github.com/biter777/viz-go-lib/encoding/transaction" ) -//ClaimInviteBalanceOperation represents claim_invite_balance operation data. +// ClaimInviteBalanceOperation represents claim_invite_balance operation data. type ClaimInviteBalanceOperation struct { Initiator string `json:"initiator"` Receiver string `json:"receiver"` InviteSecret string `json:"invite_secret"` } -//Type function that defines the type of operation ClaimInviteBalanceOperation. +// Type function that defines the type of operation ClaimInviteBalanceOperation. func (op *ClaimInviteBalanceOperation) Type() OpType { return TypeClaimInviteBalance } -//Data returns the operation data ClaimInviteBalanceOperation. +// Data returns the operation data ClaimInviteBalanceOperation. func (op *ClaimInviteBalanceOperation) Data() interface{} { return op } -//MarshalTransaction is a function of converting type ClaimInviteBalanceOperation to bytes. +// MarshalTransaction is a function of converting type ClaimInviteBalanceOperation to bytes. func (op *ClaimInviteBalanceOperation) MarshalTransaction(encoder *transaction.Encoder) error { enc := transaction.NewRollingEncoder(encoder) enc.EncodeUVarint(uint64(TypeClaimInviteBalance.Code())) diff --git a/operations/operation_committee_vote_request.go b/operations/operation_committee_vote_request.go index 6418048..c0dc094 100644 --- a/operations/operation_committee_vote_request.go +++ b/operations/operation_committee_vote_request.go @@ -1,27 +1,27 @@ package operations import ( - "github.com/VIZ-Blockchain/viz-go-lib/encoding/transaction" + "github.com/biter777/viz-go-lib/encoding/transaction" ) -//CommitteeVoteRequestOperation represents committee_vote_request operation data. +// CommitteeVoteRequestOperation represents committee_vote_request operation data. type CommitteeVoteRequestOperation struct { Voter string `json:"voter"` RequestID uint32 `json:"request_id"` VotePercent int16 `json:"vote_percent"` } -//Type function that defines the type of operation CommitteeVoteRequestOperation. +// Type function that defines the type of operation CommitteeVoteRequestOperation. func (op *CommitteeVoteRequestOperation) Type() OpType { return TypeCommitteeVoteRequest } -//Data returns the operation data CommitteeVoteRequestOperation. +// Data returns the operation data CommitteeVoteRequestOperation. func (op *CommitteeVoteRequestOperation) Data() interface{} { return op } -//MarshalTransaction is a function of converting type CommitteeVoteRequestOperation to bytes. +// MarshalTransaction is a function of converting type CommitteeVoteRequestOperation to bytes. func (op *CommitteeVoteRequestOperation) MarshalTransaction(encoder *transaction.Encoder) error { enc := transaction.NewRollingEncoder(encoder) enc.EncodeUVarint(uint64(TypeCommitteeVoteRequest.Code())) diff --git a/operations/operation_committee_worker_cancel_request.go b/operations/operation_committee_worker_cancel_request.go index f7e1ee3..a8af2d2 100644 --- a/operations/operation_committee_worker_cancel_request.go +++ b/operations/operation_committee_worker_cancel_request.go @@ -1,26 +1,26 @@ package operations import ( - "github.com/VIZ-Blockchain/viz-go-lib/encoding/transaction" + "github.com/biter777/viz-go-lib/encoding/transaction" ) -//CommitteeWorkerCancelRequestOperation represents committee_worker_cancel_request operation data. +// CommitteeWorkerCancelRequestOperation represents committee_worker_cancel_request operation data. type CommitteeWorkerCancelRequestOperation struct { Creator string `json:"creator"` RequestID uint32 `json:"request_id"` } -//Type function that defines the type of operation CommitteeWorkerCancelRequestOperation. +// Type function that defines the type of operation CommitteeWorkerCancelRequestOperation. func (op *CommitteeWorkerCancelRequestOperation) Type() OpType { return TypeCommitteeWorkerCancelRequest } -//Data returns the operation data CommitteeWorkerCancelRequestOperation. +// Data returns the operation data CommitteeWorkerCancelRequestOperation. func (op *CommitteeWorkerCancelRequestOperation) Data() interface{} { return op } -//MarshalTransaction is a function of converting type CommitteeWorkerCancelRequestOperation to bytes. +// MarshalTransaction is a function of converting type CommitteeWorkerCancelRequestOperation to bytes. func (op *CommitteeWorkerCancelRequestOperation) MarshalTransaction(encoder *transaction.Encoder) error { enc := transaction.NewRollingEncoder(encoder) enc.EncodeUVarint(uint64(TypeCommitteeWorkerCancelRequest.Code())) diff --git a/operations/operation_committee_worker_create_request.go b/operations/operation_committee_worker_create_request.go index 5fb8ee3..6b3a8c1 100644 --- a/operations/operation_committee_worker_create_request.go +++ b/operations/operation_committee_worker_create_request.go @@ -1,11 +1,11 @@ package operations import ( - "github.com/VIZ-Blockchain/viz-go-lib/encoding/transaction" - "github.com/VIZ-Blockchain/viz-go-lib/types" + "github.com/biter777/viz-go-lib/encoding/transaction" + "github.com/biter777/viz-go-lib/types" ) -//CommitteeWorkerCreateRequestOperation represents committee_worker_create_request operation data. +// CommitteeWorkerCreateRequestOperation represents committee_worker_create_request operation data. type CommitteeWorkerCreateRequestOperation struct { Creator string `json:"creator"` URL string `json:"url"` @@ -15,17 +15,17 @@ type CommitteeWorkerCreateRequestOperation struct { Duration uint32 `json:"duration"` } -//Type function that defines the type of operation CommitteeWorkerCreateRequestOperation. +// Type function that defines the type of operation CommitteeWorkerCreateRequestOperation. func (op *CommitteeWorkerCreateRequestOperation) Type() OpType { return TypeCommitteeWorkerCreateRequest } -//Data returns the operation data CommitteeWorkerCreateRequestOperation. +// Data returns the operation data CommitteeWorkerCreateRequestOperation. func (op *CommitteeWorkerCreateRequestOperation) Data() interface{} { return op } -//MarshalTransaction is a function of converting type CommitteeWorkerCreateRequestOperation to bytes. +// MarshalTransaction is a function of converting type CommitteeWorkerCreateRequestOperation to bytes. func (op *CommitteeWorkerCreateRequestOperation) MarshalTransaction(encoder *transaction.Encoder) error { enc := transaction.NewRollingEncoder(encoder) enc.EncodeUVarint(uint64(TypeCommitteeWorkerCreateRequest.Code())) diff --git a/operations/operation_content.go b/operations/operation_content.go index efd6b30..5db9fad 100644 --- a/operations/operation_content.go +++ b/operations/operation_content.go @@ -3,11 +3,11 @@ package operations import ( "encoding/json" - "github.com/VIZ-Blockchain/viz-go-lib/encoding/transaction" - "github.com/VIZ-Blockchain/viz-go-lib/types" + "github.com/biter777/viz-go-lib/encoding/transaction" + "github.com/biter777/viz-go-lib/types" ) -//ContentOperation represents content operation data. +// ContentOperation represents content operation data. type ContentOperation struct { ParentAuthor string `json:"parent_author"` ParentPermlink string `json:"parent_permlink"` @@ -19,22 +19,22 @@ type ContentOperation struct { Extensions []interface{} `json:"extensions"` } -//Type function that defines the type of operation ContentOperation. +// Type function that defines the type of operation ContentOperation. func (op *ContentOperation) Type() OpType { return TypeContent } -//Data returns the operation data ContentOperation. +// Data returns the operation data ContentOperation. func (op *ContentOperation) Data() interface{} { return op } -//IsStory function specifies the type of publication. +// IsStory function specifies the type of publication. func (op *ContentOperation) IsStory() bool { return op.ParentAuthor == "" } -//MarshalTransaction is a function of converting type ContentOperation to bytes. +// MarshalTransaction is a function of converting type ContentOperation to bytes. func (op *ContentOperation) MarshalTransaction(encoder *transaction.Encoder) error { enc := transaction.NewRollingEncoder(encoder) enc.EncodeUVarint(uint64(TypeContent.Code())) diff --git a/operations/operation_create_invite.go b/operations/operation_create_invite.go index 2e6e266..6a4c094 100644 --- a/operations/operation_create_invite.go +++ b/operations/operation_create_invite.go @@ -1,28 +1,28 @@ package operations import ( - "github.com/VIZ-Blockchain/viz-go-lib/encoding/transaction" - "github.com/VIZ-Blockchain/viz-go-lib/types" + "github.com/biter777/viz-go-lib/encoding/transaction" + "github.com/biter777/viz-go-lib/types" ) -//CreateInviteOperation represents create_invite operation data. +// CreateInviteOperation represents create_invite operation data. type CreateInviteOperation struct { Creator string `json:"creator"` Balance *types.Asset `json:"balance"` InviteKey string `json:"invite_key"` } -//Type function that defines the type of operation CreateInviteOperation. +// Type function that defines the type of operation CreateInviteOperation. func (op *CreateInviteOperation) Type() OpType { return TypeCreateInvite } -//Data returns the operation data CreateInviteOperation. +// Data returns the operation data CreateInviteOperation. func (op *CreateInviteOperation) Data() interface{} { return op } -//MarshalTransaction is a function of converting type CreateInviteOperation to bytes. +// MarshalTransaction is a function of converting type CreateInviteOperation to bytes. func (op *CreateInviteOperation) MarshalTransaction(encoder *transaction.Encoder) error { enc := transaction.NewRollingEncoder(encoder) enc.EncodeUVarint(uint64(TypeCreateInvite.Code())) diff --git a/operations/operation_custom.go b/operations/operation_custom.go index 444f692..1f4d20b 100644 --- a/operations/operation_custom.go +++ b/operations/operation_custom.go @@ -1,10 +1,10 @@ package operations import ( - "github.com/VIZ-Blockchain/viz-go-lib/encoding/transaction" + "github.com/biter777/viz-go-lib/encoding/transaction" ) -//CustomOperation represents custom operation data. +// CustomOperation represents custom operation data. type CustomOperation struct { RequiredActiveAuths []string `json:"required_active_auths"` RequiredRegularAuths []string `json:"required_regular_auths"` @@ -12,17 +12,17 @@ type CustomOperation struct { JSON string `json:"json"` } -//Type function that defines the type of operation. +// Type function that defines the type of operation. func (op *CustomOperation) Type() OpType { return TypeCustom } -//Data returns the operation data. +// Data returns the operation data. func (op *CustomOperation) Data() interface{} { return op } -//MarshalTransaction is a function of converting type CustomOperation to bytes. +// MarshalTransaction is a function of converting type CustomOperation to bytes. func (op *CustomOperation) MarshalTransaction(encoder *transaction.Encoder) error { enc := transaction.NewRollingEncoder(encoder) enc.EncodeUVarint(uint64(TypeCustom.Code())) diff --git a/operations/operation_delegate_vesting_shares.go b/operations/operation_delegate_vesting_shares.go index d6b37a5..296e30d 100644 --- a/operations/operation_delegate_vesting_shares.go +++ b/operations/operation_delegate_vesting_shares.go @@ -1,28 +1,28 @@ package operations import ( - "github.com/VIZ-Blockchain/viz-go-lib/encoding/transaction" - "github.com/VIZ-Blockchain/viz-go-lib/types" + "github.com/biter777/viz-go-lib/encoding/transaction" + "github.com/biter777/viz-go-lib/types" ) -//DelegateVestingSharesOperation represents delegate_vesting_shares operation data. +// DelegateVestingSharesOperation represents delegate_vesting_shares operation data. type DelegateVestingSharesOperation struct { Delegator string `json:"delegator"` Delegatee string `json:"delegatee"` VestingShares *types.Asset `json:"vesting_shares"` } -//Type function that defines the type of operation DelegateVestingSharesOperation. +// Type function that defines the type of operation DelegateVestingSharesOperation. func (op *DelegateVestingSharesOperation) Type() OpType { return TypeDelegateVestingShares } -//Data returns the operation data DelegateVestingSharesOperation. +// Data returns the operation data DelegateVestingSharesOperation. func (op *DelegateVestingSharesOperation) Data() interface{} { return op } -//MarshalTransaction is a function of converting type DelegateVestingSharesOperation to bytes. +// MarshalTransaction is a function of converting type DelegateVestingSharesOperation to bytes. func (op *DelegateVestingSharesOperation) MarshalTransaction(encoder *transaction.Encoder) error { enc := transaction.NewRollingEncoder(encoder) enc.EncodeUVarint(uint64(TypeDelegateVestingShares.Code())) diff --git a/operations/operation_delete_content.go b/operations/operation_delete_content.go index 535a66d..a362341 100644 --- a/operations/operation_delete_content.go +++ b/operations/operation_delete_content.go @@ -1,26 +1,26 @@ package operations import ( - "github.com/VIZ-Blockchain/viz-go-lib/encoding/transaction" + "github.com/biter777/viz-go-lib/encoding/transaction" ) -//DeleteContentOperation represents delete_content operation data. +// DeleteContentOperation represents delete_content operation data. type DeleteContentOperation struct { Author string `json:"author"` Permlink string `json:"permlink"` } -//Type function that defines the type of operation DeleteContentOperation. +// Type function that defines the type of operation DeleteContentOperation. func (op *DeleteContentOperation) Type() OpType { return TypeDeleteContent } -//Data returns the operation data DeleteContentOperation. +// Data returns the operation data DeleteContentOperation. func (op *DeleteContentOperation) Data() interface{} { return op } -//MarshalTransaction is a function of converting type DeleteContentOperation to bytes. +// MarshalTransaction is a function of converting type DeleteContentOperation to bytes. func (op *DeleteContentOperation) MarshalTransaction(encoder *transaction.Encoder) error { enc := transaction.NewRollingEncoder(encoder) enc.EncodeUVarint(uint64(TypeDeleteContent.Code())) diff --git a/operations/operation_escrow_approve.go b/operations/operation_escrow_approve.go index f5af612..73df0b5 100644 --- a/operations/operation_escrow_approve.go +++ b/operations/operation_escrow_approve.go @@ -1,10 +1,10 @@ package operations import ( - "github.com/VIZ-Blockchain/viz-go-lib/encoding/transaction" + "github.com/biter777/viz-go-lib/encoding/transaction" ) -//EscrowApproveOperation represents escrow_approve operation data. +// EscrowApproveOperation represents escrow_approve operation data. type EscrowApproveOperation struct { From string `json:"from"` To string `json:"to"` @@ -14,17 +14,17 @@ type EscrowApproveOperation struct { Approve bool `json:"approve"` } -//Type function that defines the type of operation EscrowApproveOperation. +// Type function that defines the type of operation EscrowApproveOperation. func (op *EscrowApproveOperation) Type() OpType { return TypeEscrowApprove } -//Data returns the operation data EscrowApproveOperation. +// Data returns the operation data EscrowApproveOperation. func (op *EscrowApproveOperation) Data() interface{} { return op } -//MarshalTransaction is a function of converting type EscrowApproveOperation to bytes. +// MarshalTransaction is a function of converting type EscrowApproveOperation to bytes. func (op *EscrowApproveOperation) MarshalTransaction(encoder *transaction.Encoder) error { enc := transaction.NewRollingEncoder(encoder) enc.EncodeUVarint(uint64(TypeEscrowApprove.Code())) diff --git a/operations/operation_escrow_dispute.go b/operations/operation_escrow_dispute.go index 06eaad6..40b87c5 100644 --- a/operations/operation_escrow_dispute.go +++ b/operations/operation_escrow_dispute.go @@ -1,10 +1,10 @@ package operations import ( - "github.com/VIZ-Blockchain/viz-go-lib/encoding/transaction" + "github.com/biter777/viz-go-lib/encoding/transaction" ) -//EscrowDisputeOperation represents escrow_dispute operation data. +// EscrowDisputeOperation represents escrow_dispute operation data. type EscrowDisputeOperation struct { From string `json:"from"` To string `json:"to"` @@ -13,17 +13,17 @@ type EscrowDisputeOperation struct { EscrowID uint32 `json:"escrow_id"` } -//Type function that defines the type of operation EscrowDisputeOperation. +// Type function that defines the type of operation EscrowDisputeOperation. func (op *EscrowDisputeOperation) Type() OpType { return TypeEscrowDispute } -//Data returns the operation data EscrowDisputeOperation. +// Data returns the operation data EscrowDisputeOperation. func (op *EscrowDisputeOperation) Data() interface{} { return op } -//MarshalTransaction is a function of converting type EscrowDisputeOperation to bytes. +// MarshalTransaction is a function of converting type EscrowDisputeOperation to bytes. func (op *EscrowDisputeOperation) MarshalTransaction(encoder *transaction.Encoder) error { enc := transaction.NewRollingEncoder(encoder) enc.EncodeUVarint(uint64(TypeEscrowDispute.Code())) diff --git a/operations/operation_escrow_release.go b/operations/operation_escrow_release.go index af25159..2faf91c 100644 --- a/operations/operation_escrow_release.go +++ b/operations/operation_escrow_release.go @@ -1,11 +1,11 @@ package operations import ( - "github.com/VIZ-Blockchain/viz-go-lib/encoding/transaction" - "github.com/VIZ-Blockchain/viz-go-lib/types" + "github.com/biter777/viz-go-lib/encoding/transaction" + "github.com/biter777/viz-go-lib/types" ) -//EscrowReleaseOperation represents escrow_release operation data. +// EscrowReleaseOperation represents escrow_release operation data. type EscrowReleaseOperation struct { From string `json:"from"` To string `json:"to"` @@ -16,17 +16,17 @@ type EscrowReleaseOperation struct { TokenAmount *types.Asset `json:"token_amount"` } -//Type function that defines the type of operation EscrowReleaseOperation. +// Type function that defines the type of operation EscrowReleaseOperation. func (op *EscrowReleaseOperation) Type() OpType { return TypeEscrowRelease } -//Data returns the operation data EscrowReleaseOperation. +// Data returns the operation data EscrowReleaseOperation. func (op *EscrowReleaseOperation) Data() interface{} { return op } -//MarshalTransaction is a function of converting type EscrowReleaseOperation to bytes. +// MarshalTransaction is a function of converting type EscrowReleaseOperation to bytes. func (op *EscrowReleaseOperation) MarshalTransaction(encoder *transaction.Encoder) error { enc := transaction.NewRollingEncoder(encoder) enc.EncodeUVarint(uint64(TypeEscrowRelease.Code())) diff --git a/operations/operation_escrow_transfer.go b/operations/operation_escrow_transfer.go index 96c15ab..4c46f45 100644 --- a/operations/operation_escrow_transfer.go +++ b/operations/operation_escrow_transfer.go @@ -1,11 +1,11 @@ package operations import ( - "github.com/VIZ-Blockchain/viz-go-lib/encoding/transaction" - "github.com/VIZ-Blockchain/viz-go-lib/types" + "github.com/biter777/viz-go-lib/encoding/transaction" + "github.com/biter777/viz-go-lib/types" ) -//EscrowTransferOperation represents escrow_transfer operation data. +// EscrowTransferOperation represents escrow_transfer operation data. type EscrowTransferOperation struct { From string `json:"from"` To string `json:"to"` @@ -18,17 +18,17 @@ type EscrowTransferOperation struct { JSONMeta string `json:"json_meta"` } -//Type function that defines the type of operation EscrowTransferOperation. +// Type function that defines the type of operation EscrowTransferOperation. func (op *EscrowTransferOperation) Type() OpType { return TypeEscrowTransfer } -//Data returns the operation data EscrowTransferOperation. +// Data returns the operation data EscrowTransferOperation. func (op *EscrowTransferOperation) Data() interface{} { return op } -//MarshalTransaction is a function of converting type EscrowTransferOperation to bytes. +// MarshalTransaction is a function of converting type EscrowTransferOperation to bytes. func (op *EscrowTransferOperation) MarshalTransaction(encoder *transaction.Encoder) error { enc := transaction.NewRollingEncoder(encoder) enc.EncodeUVarint(uint64(TypeEscrowTransfer.Code())) diff --git a/operations/operation_invite_registration.go b/operations/operation_invite_registration.go index 3f04533..3dfada2 100644 --- a/operations/operation_invite_registration.go +++ b/operations/operation_invite_registration.go @@ -1,10 +1,10 @@ package operations import ( - "github.com/VIZ-Blockchain/viz-go-lib/encoding/transaction" + "github.com/biter777/viz-go-lib/encoding/transaction" ) -//InviteRegistrationOperation represents invite_registration operation data. +// InviteRegistrationOperation represents invite_registration operation data. type InviteRegistrationOperation struct { Initiator string `json:"initiator"` NewAccountName string `json:"new_account_name"` @@ -12,17 +12,17 @@ type InviteRegistrationOperation struct { NewAccountKey string `json:" new_account_key"` } -//Type function that defines the type of operation InviteRegistrationOperation. +// Type function that defines the type of operation InviteRegistrationOperation. func (op *InviteRegistrationOperation) Type() OpType { return TypeInviteRegistration } -//Data returns the operation data InviteRegistrationOperation. +// Data returns the operation data InviteRegistrationOperation. func (op *InviteRegistrationOperation) Data() interface{} { return op } -//MarshalTransaction is a function of converting type InviteRegistrationOperation to bytes. +// MarshalTransaction is a function of converting type InviteRegistrationOperation to bytes. func (op *InviteRegistrationOperation) MarshalTransaction(encoder *transaction.Encoder) error { enc := transaction.NewRollingEncoder(encoder) enc.EncodeUVarint(uint64(TypeInviteRegistration.Code())) diff --git a/operations/operation_object.go b/operations/operation_object.go index edc0777..40d2817 100644 --- a/operations/operation_object.go +++ b/operations/operation_object.go @@ -3,10 +3,10 @@ package operations import ( "encoding/json" - "github.com/VIZ-Blockchain/viz-go-lib/types" + "github.com/biter777/viz-go-lib/types" ) -//OperationObject type from parameter JSON +// OperationObject type from parameter JSON type OperationObject struct { BlockNumber uint32 `json:"block"` TransactionID string `json:"trx_id"` @@ -28,7 +28,7 @@ type rawOperationObject struct { Timestamp *types.Time `json:"timestamp"` } -//UnmarshalJSON unpacking the JSON parameter in the OperationObject type. +// UnmarshalJSON unpacking the JSON parameter in the OperationObject type. func (op *OperationObject) UnmarshalJSON(p []byte) error { var raw rawOperationObject if err := json.Unmarshal(p, &raw); err != nil { @@ -46,7 +46,7 @@ func (op *OperationObject) UnmarshalJSON(p []byte) error { return nil } -//MarshalJSON function for packing the OperationObject type in JSON. +// MarshalJSON function for packing the OperationObject type in JSON. func (op *OperationObject) MarshalJSON() ([]byte, error) { return JSONMarshal(&rawOperationObject{ BlockNumber: op.BlockNumber, diff --git a/operations/operation_paid_subscribe.go b/operations/operation_paid_subscribe.go index 3f6d5fc..b632b84 100644 --- a/operations/operation_paid_subscribe.go +++ b/operations/operation_paid_subscribe.go @@ -1,11 +1,11 @@ package operations import ( - "github.com/VIZ-Blockchain/viz-go-lib/encoding/transaction" - "github.com/VIZ-Blockchain/viz-go-lib/types" + "github.com/biter777/viz-go-lib/encoding/transaction" + "github.com/biter777/viz-go-lib/types" ) -//PaidSubscribeOperation represents paid_subscribe operation data. +// PaidSubscribeOperation represents paid_subscribe operation data. type PaidSubscribeOperation struct { Subscriber string `json:"subscriber"` Account string `json:"account"` @@ -15,17 +15,17 @@ type PaidSubscribeOperation struct { AutoRenewal bool `json:"auto_renewal"` } -//Type function that defines the type of operation PaidSubscribeOperation. +// Type function that defines the type of operation PaidSubscribeOperation. func (op *PaidSubscribeOperation) Type() OpType { return TypePaidSubscribe } -//Data returns the operation data PaidSubscribeOperation. +// Data returns the operation data PaidSubscribeOperation. func (op *PaidSubscribeOperation) Data() interface{} { return op } -//MarshalTransaction is a function of converting type PaidSubscribeOperation to bytes. +// MarshalTransaction is a function of converting type PaidSubscribeOperation to bytes. func (op *PaidSubscribeOperation) MarshalTransaction(encoder *transaction.Encoder) error { enc := transaction.NewRollingEncoder(encoder) enc.EncodeUVarint(uint64(TypePaidSubscribe.Code())) diff --git a/operations/operation_proposal_create.go b/operations/operation_proposal_create.go index 6e2e7f7..40cc2be 100644 --- a/operations/operation_proposal_create.go +++ b/operations/operation_proposal_create.go @@ -1,11 +1,11 @@ package operations import ( - "github.com/VIZ-Blockchain/viz-go-lib/encoding/transaction" - "github.com/VIZ-Blockchain/viz-go-lib/types" + "github.com/biter777/viz-go-lib/encoding/transaction" + "github.com/biter777/viz-go-lib/types" ) -//ProposalCreateOperation represents proposal_create operation data. +// ProposalCreateOperation represents proposal_create operation data. type ProposalCreateOperation struct { Author string `json:"author"` Title string `json:"title"` @@ -16,17 +16,17 @@ type ProposalCreateOperation struct { Extensions []interface{} `json:"extensions"` } -//Type function that defines the type of operation ProposalCreateOperation. +// Type function that defines the type of operation ProposalCreateOperation. func (op *ProposalCreateOperation) Type() OpType { return TypeProposalCreate } -//Data returns the operation data ProposalCreateOperation. +// Data returns the operation data ProposalCreateOperation. func (op *ProposalCreateOperation) Data() interface{} { return op } -//MarshalTransaction is a function of converting type ProposalCreateOperation to bytes. +// MarshalTransaction is a function of converting type ProposalCreateOperation to bytes. func (op *ProposalCreateOperation) MarshalTransaction(encoder *transaction.Encoder) error { enc := transaction.NewRollingEncoder(encoder) enc.EncodeUVarint(uint64(TypeProposalCreate.Code())) diff --git a/operations/operation_proposal_delete.go b/operations/operation_proposal_delete.go index 48e31e1..5ea3586 100644 --- a/operations/operation_proposal_delete.go +++ b/operations/operation_proposal_delete.go @@ -1,10 +1,10 @@ package operations import ( - "github.com/VIZ-Blockchain/viz-go-lib/encoding/transaction" + "github.com/biter777/viz-go-lib/encoding/transaction" ) -//ProposalDeleteOperation represents proposal_delete operation data. +// ProposalDeleteOperation represents proposal_delete operation data. type ProposalDeleteOperation struct { Author string `json:"author"` Title string `json:"title"` @@ -12,17 +12,17 @@ type ProposalDeleteOperation struct { Extensions []interface{} `json:"extensions"` } -//Type function that defines the type of operation ProposalDeleteOperation. +// Type function that defines the type of operation ProposalDeleteOperation. func (op *ProposalDeleteOperation) Type() OpType { return TypeProposalDelete } -//Data returns the operation data ProposalDeleteOperation. +// Data returns the operation data ProposalDeleteOperation. func (op *ProposalDeleteOperation) Data() interface{} { return op } -//MarshalTransaction is a function of converting type ProposalDeleteOperation to bytes. +// MarshalTransaction is a function of converting type ProposalDeleteOperation to bytes. func (op *ProposalDeleteOperation) MarshalTransaction(encoder *transaction.Encoder) error { enc := transaction.NewRollingEncoder(encoder) enc.EncodeUVarint(uint64(TypeProposalDelete.Code())) diff --git a/operations/operation_proposal_update.go b/operations/operation_proposal_update.go index 775190b..093ce3b 100644 --- a/operations/operation_proposal_update.go +++ b/operations/operation_proposal_update.go @@ -1,10 +1,10 @@ package operations import ( - "github.com/VIZ-Blockchain/viz-go-lib/encoding/transaction" + "github.com/biter777/viz-go-lib/encoding/transaction" ) -//ProposalUpdateOperation represents proposal_update operation data. +// ProposalUpdateOperation represents proposal_update operation data. type ProposalUpdateOperation struct { Author string `json:"author"` Title string `json:"title"` @@ -19,17 +19,17 @@ type ProposalUpdateOperation struct { Extensions []interface{} `json:"extensions"` } -//Type function that defines the type of operation ProposalUpdateOperation. +// Type function that defines the type of operation ProposalUpdateOperation. func (op *ProposalUpdateOperation) Type() OpType { return TypeProposalUpdate } -//Data returns the operation data ProposalUpdateOperation. +// Data returns the operation data ProposalUpdateOperation. func (op *ProposalUpdateOperation) Data() interface{} { return op } -//MarshalTransaction is a function of converting type ProposalUpdateOperation to bytes. +// MarshalTransaction is a function of converting type ProposalUpdateOperation to bytes. func (op *ProposalUpdateOperation) MarshalTransaction(encoder *transaction.Encoder) error { enc := transaction.NewRollingEncoder(encoder) enc.EncodeUVarint(uint64(TypeProposalUpdate.Code())) diff --git a/operations/operation_recover_account.go b/operations/operation_recover_account.go index 973857f..8552fd7 100644 --- a/operations/operation_recover_account.go +++ b/operations/operation_recover_account.go @@ -1,11 +1,11 @@ package operations import ( - "github.com/VIZ-Blockchain/viz-go-lib/encoding/transaction" - "github.com/VIZ-Blockchain/viz-go-lib/types" + "github.com/biter777/viz-go-lib/encoding/transaction" + "github.com/biter777/viz-go-lib/types" ) -//RecoverAccountOperation represents recover_account operation data. +// RecoverAccountOperation represents recover_account operation data. type RecoverAccountOperation struct { AccountToRecover string `json:"account_to_recover"` NewMasterAuthority *types.Authority `json:"new_master_authority"` @@ -13,17 +13,17 @@ type RecoverAccountOperation struct { Extensions []interface{} `json:"extensions"` } -//Type function that defines the type of operation RecoverAccountOperation. +// Type function that defines the type of operation RecoverAccountOperation. func (op *RecoverAccountOperation) Type() OpType { return TypeRecoverAccount } -//Data returns the operation data RecoverAccountOperation. +// Data returns the operation data RecoverAccountOperation. func (op *RecoverAccountOperation) Data() interface{} { return op } -//MarshalTransaction is a function of converting type RecoverAccountOperation to bytes. +// MarshalTransaction is a function of converting type RecoverAccountOperation to bytes. func (op *RecoverAccountOperation) MarshalTransaction(encoder *transaction.Encoder) error { enc := transaction.NewRollingEncoder(encoder) enc.EncodeUVarint(uint64(TypeRecoverAccount.Code())) diff --git a/operations/operation_request_account_recovery.go b/operations/operation_request_account_recovery.go index 37f177c..b8fb52a 100644 --- a/operations/operation_request_account_recovery.go +++ b/operations/operation_request_account_recovery.go @@ -1,11 +1,11 @@ package operations import ( - "github.com/VIZ-Blockchain/viz-go-lib/encoding/transaction" - "github.com/VIZ-Blockchain/viz-go-lib/types" + "github.com/biter777/viz-go-lib/encoding/transaction" + "github.com/biter777/viz-go-lib/types" ) -//RequestAccountRecoveryOperation represents request_account_recovery operation data. +// RequestAccountRecoveryOperation represents request_account_recovery operation data. type RequestAccountRecoveryOperation struct { RecoveryAccount string `json:"recovery_account"` AccountToRecover string `json:"account_to_recover"` @@ -13,17 +13,17 @@ type RequestAccountRecoveryOperation struct { Extensions []interface{} `json:"extensions"` } -//Type function that defines the type of operation RequestAccountRecoveryOperation. +// Type function that defines the type of operation RequestAccountRecoveryOperation. func (op *RequestAccountRecoveryOperation) Type() OpType { return TypeRequestAccountRecovery } -//Data returns the operation data RequestAccountRecoveryOperation. +// Data returns the operation data RequestAccountRecoveryOperation. func (op *RequestAccountRecoveryOperation) Data() interface{} { return op } -//MarshalTransaction is a function of converting type RequestAccountRecoveryOperation to bytes. +// MarshalTransaction is a function of converting type RequestAccountRecoveryOperation to bytes. func (op *RequestAccountRecoveryOperation) MarshalTransaction(encoder *transaction.Encoder) error { enc := transaction.NewRollingEncoder(encoder) enc.EncodeUVarint(uint64(TypeRequestAccountRecovery.Code())) diff --git a/operations/operation_set_account_price.go b/operations/operation_set_account_price.go index dc4d6bc..a601b18 100644 --- a/operations/operation_set_account_price.go +++ b/operations/operation_set_account_price.go @@ -1,11 +1,11 @@ package operations import ( - "github.com/VIZ-Blockchain/viz-go-lib/encoding/transaction" - "github.com/VIZ-Blockchain/viz-go-lib/types" + "github.com/biter777/viz-go-lib/encoding/transaction" + "github.com/biter777/viz-go-lib/types" ) -//SetAccountPriceOperation represents set_account_price operation data. +// SetAccountPriceOperation represents set_account_price operation data. type SetAccountPriceOperation struct { Account string `json:"account"` AccountSeller string `json:"account_seller"` @@ -13,17 +13,17 @@ type SetAccountPriceOperation struct { AccountOnSale bool `json:"account_on_sale"` } -//Type function that defines the type of operation SetAccountPriceOperation. +// Type function that defines the type of operation SetAccountPriceOperation. func (op *SetAccountPriceOperation) Type() OpType { return TypeSetAccountPrice } -//Data returns the operation data SetAccountPriceOperation. +// Data returns the operation data SetAccountPriceOperation. func (op *SetAccountPriceOperation) Data() interface{} { return op } -//MarshalTransaction is a function of converting type SetAccountPriceOperation to bytes. +// MarshalTransaction is a function of converting type SetAccountPriceOperation to bytes. func (op *SetAccountPriceOperation) MarshalTransaction(encoder *transaction.Encoder) error { enc := transaction.NewRollingEncoder(encoder) enc.EncodeUVarint(uint64(TypeSetAccountPrice.Code())) diff --git a/operations/operation_set_paid_subscription.go b/operations/operation_set_paid_subscription.go index f68730c..59c766e 100644 --- a/operations/operation_set_paid_subscription.go +++ b/operations/operation_set_paid_subscription.go @@ -1,11 +1,11 @@ package operations import ( - "github.com/VIZ-Blockchain/viz-go-lib/encoding/transaction" - "github.com/VIZ-Blockchain/viz-go-lib/types" + "github.com/biter777/viz-go-lib/encoding/transaction" + "github.com/biter777/viz-go-lib/types" ) -//SetPaidSubscriptionOperation represents set_paid_subscription operation data. +// SetPaidSubscriptionOperation represents set_paid_subscription operation data. type SetPaidSubscriptionOperation struct { Account string `json:"account"` URL string `json:"url"` @@ -14,17 +14,17 @@ type SetPaidSubscriptionOperation struct { Period uint16 `json:"period"` } -//Type function that defines the type of operation SetPaidSubscriptionOperation. +// Type function that defines the type of operation SetPaidSubscriptionOperation. func (op *SetPaidSubscriptionOperation) Type() OpType { return TypeSetPaidSubscription } -//Data returns the operation data SetPaidSubscriptionOperation. +// Data returns the operation data SetPaidSubscriptionOperation. func (op *SetPaidSubscriptionOperation) Data() interface{} { return op } -//MarshalTransaction is a function of converting type SetPaidSubscriptionOperation to bytes. +// MarshalTransaction is a function of converting type SetPaidSubscriptionOperation to bytes. func (op *SetPaidSubscriptionOperation) MarshalTransaction(encoder *transaction.Encoder) error { enc := transaction.NewRollingEncoder(encoder) enc.EncodeUVarint(uint64(TypeSetPaidSubscription.Code())) diff --git a/operations/operation_set_subaccount_price.go b/operations/operation_set_subaccount_price.go index 15ebb7e..5a26937 100644 --- a/operations/operation_set_subaccount_price.go +++ b/operations/operation_set_subaccount_price.go @@ -1,11 +1,11 @@ package operations import ( - "github.com/VIZ-Blockchain/viz-go-lib/encoding/transaction" - "github.com/VIZ-Blockchain/viz-go-lib/types" + "github.com/biter777/viz-go-lib/encoding/transaction" + "github.com/biter777/viz-go-lib/types" ) -//SetSubaccountPriceOperation represents set_subaccount_price operation data. +// SetSubaccountPriceOperation represents set_subaccount_price operation data. type SetSubaccountPriceOperation struct { Account string `json:"account"` SubAccountSeller string `json:"subaccount_seller"` @@ -13,17 +13,17 @@ type SetSubaccountPriceOperation struct { SubAccountOnSale bool `json:"subaccount_on_sale"` } -//Type function that defines the type of operation SetSubaccountPriceOperation. +// Type function that defines the type of operation SetSubaccountPriceOperation. func (op *SetSubaccountPriceOperation) Type() OpType { return TypeSetSubaccountPrice } -//Data returns the operation data SetSubaccountPriceOperation. +// Data returns the operation data SetSubaccountPriceOperation. func (op *SetSubaccountPriceOperation) Data() interface{} { return op } -//MarshalTransaction is a function of converting type SetSubaccountPriceOperation to bytes. +// MarshalTransaction is a function of converting type SetSubaccountPriceOperation to bytes. func (op *SetSubaccountPriceOperation) MarshalTransaction(encoder *transaction.Encoder) error { enc := transaction.NewRollingEncoder(encoder) enc.EncodeUVarint(uint64(TypeSetSubaccountPrice.Code())) diff --git a/operations/operation_set_withdraw_vesting_route.go b/operations/operation_set_withdraw_vesting_route.go index a6c470e..46b5c64 100644 --- a/operations/operation_set_withdraw_vesting_route.go +++ b/operations/operation_set_withdraw_vesting_route.go @@ -1,10 +1,10 @@ package operations import ( - "github.com/VIZ-Blockchain/viz-go-lib/encoding/transaction" + "github.com/biter777/viz-go-lib/encoding/transaction" ) -//SetWithdrawVestingRouteOperation represents set_withdraw_vesting_route operation data. +// SetWithdrawVestingRouteOperation represents set_withdraw_vesting_route operation data. type SetWithdrawVestingRouteOperation struct { FromAccount string `json:"from_account"` ToAccount string `json:"to_account"` @@ -12,17 +12,17 @@ type SetWithdrawVestingRouteOperation struct { AutoVest bool `json:"auto_vest"` } -//Type function that defines the type of operation SetWithdrawVestingRouteOperation. +// Type function that defines the type of operation SetWithdrawVestingRouteOperation. func (op *SetWithdrawVestingRouteOperation) Type() OpType { return TypeSetWithdrawVestingRoute } -//Data returns the operation data SetWithdrawVestingRouteOperation. +// Data returns the operation data SetWithdrawVestingRouteOperation. func (op *SetWithdrawVestingRouteOperation) Data() interface{} { return op } -//MarshalTransaction is a function of converting type SetWithdrawVestingRouteOperation to bytes. +// MarshalTransaction is a function of converting type SetWithdrawVestingRouteOperation to bytes. func (op *SetWithdrawVestingRouteOperation) MarshalTransaction(encoder *transaction.Encoder) error { enc := transaction.NewRollingEncoder(encoder) enc.EncodeUVarint(uint64(TypeSetWithdrawVestingRoute.Code())) diff --git a/operations/operation_transfer.go b/operations/operation_transfer.go index aeaeac2..c208727 100644 --- a/operations/operation_transfer.go +++ b/operations/operation_transfer.go @@ -1,11 +1,11 @@ package operations import ( - "github.com/VIZ-Blockchain/viz-go-lib/encoding/transaction" - "github.com/VIZ-Blockchain/viz-go-lib/types" + "github.com/biter777/viz-go-lib/encoding/transaction" + "github.com/biter777/viz-go-lib/types" ) -//TransferOperation represents transfer operation data. +// TransferOperation represents transfer operation data. type TransferOperation struct { From string `json:"from"` To string `json:"to"` @@ -13,17 +13,17 @@ type TransferOperation struct { Memo string `json:"memo"` } -//Type function that defines the type of operation TransferOperation. +// Type function that defines the type of operation TransferOperation. func (op *TransferOperation) Type() OpType { return TypeTransfer } -//Data returns the operation data TransferOperation. +// Data returns the operation data TransferOperation. func (op *TransferOperation) Data() interface{} { return op } -//MarshalTransaction is a function of converting type TransferOperation to bytes. +// MarshalTransaction is a function of converting type TransferOperation to bytes. func (op *TransferOperation) MarshalTransaction(encoder *transaction.Encoder) error { enc := transaction.NewRollingEncoder(encoder) enc.EncodeUVarint(uint64(TypeTransfer.Code())) diff --git a/operations/operation_transfer_to_vesting.go b/operations/operation_transfer_to_vesting.go index 962c005..2217234 100644 --- a/operations/operation_transfer_to_vesting.go +++ b/operations/operation_transfer_to_vesting.go @@ -1,28 +1,28 @@ package operations import ( - "github.com/VIZ-Blockchain/viz-go-lib/encoding/transaction" - "github.com/VIZ-Blockchain/viz-go-lib/types" + "github.com/biter777/viz-go-lib/encoding/transaction" + "github.com/biter777/viz-go-lib/types" ) -//TransferToVestingOperation represents transfer_to_vesting operation data. +// TransferToVestingOperation represents transfer_to_vesting operation data. type TransferToVestingOperation struct { From string `json:"from"` To string `json:"to"` Amount *types.Asset `json:"amount"` } -//Type function that defines the type of operation TransferToVestingOperation. +// Type function that defines the type of operation TransferToVestingOperation. func (op *TransferToVestingOperation) Type() OpType { return TypeTransferToVesting } -//Data returns the operation data TransferToVestingOperation. +// Data returns the operation data TransferToVestingOperation. func (op *TransferToVestingOperation) Data() interface{} { return op } -//MarshalTransaction is a function of converting type TransferToVestingOperation to bytes. +// MarshalTransaction is a function of converting type TransferToVestingOperation to bytes. func (op *TransferToVestingOperation) MarshalTransaction(encoder *transaction.Encoder) error { enc := transaction.NewRollingEncoder(encoder) enc.EncodeUVarint(uint64(TypeTransferToVesting.Code())) diff --git a/operations/operation_versioned_chain_properties_update.go b/operations/operation_versioned_chain_properties_update.go index 3cf3351..6c9eb5b 100644 --- a/operations/operation_versioned_chain_properties_update.go +++ b/operations/operation_versioned_chain_properties_update.go @@ -1,27 +1,27 @@ package operations import ( - "github.com/VIZ-Blockchain/viz-go-lib/encoding/transaction" - "github.com/VIZ-Blockchain/viz-go-lib/types" + "github.com/biter777/viz-go-lib/encoding/transaction" + "github.com/biter777/viz-go-lib/types" ) -//VersionedChainPropertiesUpdateOperation represents versioned_chain_properties_update operation data. +// VersionedChainPropertiesUpdateOperation represents versioned_chain_properties_update operation data. type VersionedChainPropertiesUpdateOperation struct { Owner string `json:"owner"` Props *types.ChainProperties `json:"props"` } -//Type function that defines the type of operation VersionedChainPropertiesUpdateOperation. +// Type function that defines the type of operation VersionedChainPropertiesUpdateOperation. func (op *VersionedChainPropertiesUpdateOperation) Type() OpType { return TypeVersionedChainPropertiesUpdate } -//Data returns the operation data VersionedChainPropertiesUpdateOperation. +// Data returns the operation data VersionedChainPropertiesUpdateOperation. func (op *VersionedChainPropertiesUpdateOperation) Data() interface{} { return op } -//MarshalTransaction is a function of converting type VersionedChainPropertiesUpdateOperation to bytes. +// MarshalTransaction is a function of converting type VersionedChainPropertiesUpdateOperation to bytes. func (op *VersionedChainPropertiesUpdateOperation) MarshalTransaction(encoder *transaction.Encoder) error { enc := transaction.NewRollingEncoder(encoder) enc.EncodeUVarint(uint64(TypeVersionedChainPropertiesUpdate.Code())) diff --git a/operations/operation_vote.go b/operations/operation_vote.go index 51041c2..69f9d29 100644 --- a/operations/operation_vote.go +++ b/operations/operation_vote.go @@ -1,10 +1,10 @@ package operations import ( - "github.com/VIZ-Blockchain/viz-go-lib/encoding/transaction" + "github.com/biter777/viz-go-lib/encoding/transaction" ) -//VoteOperation represents vote operation data. +// VoteOperation represents vote operation data. type VoteOperation struct { Voter string `json:"voter"` Author string `json:"author"` @@ -12,17 +12,17 @@ type VoteOperation struct { Weight int16 `json:"weight"` } -//Type function that defines the type of operation VoteOperation. +// Type function that defines the type of operation VoteOperation. func (op *VoteOperation) Type() OpType { return TypeVote } -//Data returns the operation data VoteOperation. +// Data returns the operation data VoteOperation. func (op *VoteOperation) Data() interface{} { return op } -//MarshalTransaction is a function of converting type VoteOperation to bytes. +// MarshalTransaction is a function of converting type VoteOperation to bytes. func (op *VoteOperation) MarshalTransaction(encoder *transaction.Encoder) error { enc := transaction.NewRollingEncoder(encoder) enc.EncodeUVarint(uint64(TypeVote.Code())) diff --git a/operations/operation_withdraw_vesting.go b/operations/operation_withdraw_vesting.go index 1373010..213e6a1 100644 --- a/operations/operation_withdraw_vesting.go +++ b/operations/operation_withdraw_vesting.go @@ -1,27 +1,27 @@ package operations import ( - "github.com/VIZ-Blockchain/viz-go-lib/encoding/transaction" - "github.com/VIZ-Blockchain/viz-go-lib/types" + "github.com/biter777/viz-go-lib/encoding/transaction" + "github.com/biter777/viz-go-lib/types" ) -//WithdrawVestingOperation represents withdraw_vesting operation data. +// WithdrawVestingOperation represents withdraw_vesting operation data. type WithdrawVestingOperation struct { Account string `json:"account"` VestingShares *types.Asset `json:"vesting_shares"` } -//Type function that defines the type of operation WithdrawVestingOperation. +// Type function that defines the type of operation WithdrawVestingOperation. func (op *WithdrawVestingOperation) Type() OpType { return TypeWithdrawVesting } -//Data returns the operation data WithdrawVestingOperation. +// Data returns the operation data WithdrawVestingOperation. func (op *WithdrawVestingOperation) Data() interface{} { return op } -//MarshalTransaction is a function of converting type WithdrawVestingOperation to bytes. +// MarshalTransaction is a function of converting type WithdrawVestingOperation to bytes. func (op *WithdrawVestingOperation) MarshalTransaction(encoder *transaction.Encoder) error { enc := transaction.NewRollingEncoder(encoder) enc.EncodeUVarint(uint64(TypeWithdrawVesting.Code())) diff --git a/operations/operation_witness_update.go b/operations/operation_witness_update.go index f044ecb..3807b27 100644 --- a/operations/operation_witness_update.go +++ b/operations/operation_witness_update.go @@ -1,27 +1,27 @@ package operations import ( - "github.com/VIZ-Blockchain/viz-go-lib/encoding/transaction" + "github.com/biter777/viz-go-lib/encoding/transaction" ) -//WitnessUpdateOperation represents witness_update operation data. +// WitnessUpdateOperation represents witness_update operation data. type WitnessUpdateOperation struct { Owner string `json:"owner"` URL string `json:"url"` BlockSigningKey string `json:"block_signing_key"` } -//Type function that defines the type of operation WitnessUpdateOperation. +// Type function that defines the type of operation WitnessUpdateOperation. func (op *WitnessUpdateOperation) Type() OpType { return TypeWitnessUpdate } -//Data returns the operation data WitnessUpdateOperation. +// Data returns the operation data WitnessUpdateOperation. func (op *WitnessUpdateOperation) Data() interface{} { return op } -//MarshalTransaction is a function of converting type WitnessUpdateOperation to bytes. +// MarshalTransaction is a function of converting type WitnessUpdateOperation to bytes. func (op *WitnessUpdateOperation) MarshalTransaction(encoder *transaction.Encoder) error { enc := transaction.NewRollingEncoder(encoder) enc.EncodeUVarint(uint64(TypeWitnessUpdate.Code())) diff --git a/operations/proposal_object.go b/operations/proposal_object.go index f12546f..899fc88 100644 --- a/operations/proposal_object.go +++ b/operations/proposal_object.go @@ -3,13 +3,13 @@ package operations import ( "encoding/json" - "github.com/VIZ-Blockchain/viz-go-lib/encoding/transaction" + "github.com/biter777/viz-go-lib/encoding/transaction" ) -//ProposalObjects array of values of type ProposalObject. +// ProposalObjects array of values of type ProposalObject. type ProposalObjects []ProposalObject -//ProposalObject type from parameter JSON +// ProposalObject type from parameter JSON type ProposalObject struct { Operation Operation `json:"op"` OperationType OpType `json:"-"` @@ -19,7 +19,7 @@ type rawProposalObject struct { Operation *operationTuple `json:"op"` } -//UnmarshalJSON unpacking the JSON parameter in the ProposalObject type. +// UnmarshalJSON unpacking the JSON parameter in the ProposalObject type. func (op *ProposalObject) UnmarshalJSON(p []byte) error { var raw rawProposalObject if err := json.Unmarshal(p, &raw); err != nil { @@ -31,14 +31,14 @@ func (op *ProposalObject) UnmarshalJSON(p []byte) error { return nil } -//MarshalJSON function for packing the ProposalObject type in JSON. +// MarshalJSON function for packing the ProposalObject type in JSON. func (op *ProposalObject) MarshalJSON() ([]byte, error) { return JSONMarshal(&rawProposalObject{ Operation: &operationTuple{op.Operation.Type(), op.Operation}, }) } -//MarshalTransaction is a function of converting type ProposalObjects to bytes. +// MarshalTransaction is a function of converting type ProposalObjects to bytes. func (op ProposalObjects) MarshalTransaction(encoder *transaction.Encoder) error { enc := transaction.NewRollingEncoder(encoder) diff --git a/operations/transaction.go b/operations/transaction.go index d6c2872..352910a 100644 --- a/operations/transaction.go +++ b/operations/transaction.go @@ -3,8 +3,8 @@ package operations import ( "errors" - "github.com/VIZ-Blockchain/viz-go-lib/encoding/transaction" - "github.com/VIZ-Blockchain/viz-go-lib/types" + "github.com/biter777/viz-go-lib/encoding/transaction" + "github.com/biter777/viz-go-lib/types" ) // Transaction represents a blockchain transaction. diff --git a/operations/voperation_account_sale.go b/operations/voperation_account_sale.go index 9674b23..fe0c568 100644 --- a/operations/voperation_account_sale.go +++ b/operations/voperation_account_sale.go @@ -1,10 +1,10 @@ package operations import ( - "github.com/VIZ-Blockchain/viz-go-lib/types" + "github.com/biter777/viz-go-lib/types" ) -//AccountSaleOperation represents account_sale operation data. +// AccountSaleOperation represents account_sale operation data. type AccountSaleOperation struct { Account string `json:"account"` Price types.Asset `json:"price"` @@ -12,12 +12,12 @@ type AccountSaleOperation struct { Seller string `json:"seller"` } -//Type function that defines the type of operation AccountSaleOperation. +// Type function that defines the type of operation AccountSaleOperation. func (op *AccountSaleOperation) Type() OpType { return TypeAccountSale } -//Data returns the operation data AccountSaleOperation. +// Data returns the operation data AccountSaleOperation. func (op *AccountSaleOperation) Data() interface{} { return op } diff --git a/operations/voperation_author_reward.go b/operations/voperation_author_reward.go index 941d8bb..f6b9ee1 100644 --- a/operations/voperation_author_reward.go +++ b/operations/voperation_author_reward.go @@ -1,10 +1,10 @@ package operations import ( - "github.com/VIZ-Blockchain/viz-go-lib/types" + "github.com/biter777/viz-go-lib/types" ) -//AuthorRewardOperation represents author_reward operation data. +// AuthorRewardOperation represents author_reward operation data. type AuthorRewardOperation struct { Author string `json:"author"` Permlink string `json:"permlink"` @@ -12,12 +12,12 @@ type AuthorRewardOperation struct { VestingPayout types.Asset `json:"vesting_payout"` } -//Type function that defines the type of operation AuthorRewardOperation. +// Type function that defines the type of operation AuthorRewardOperation. func (op *AuthorRewardOperation) Type() OpType { return TypeAuthorReward } -//Data returns the operation data AuthorRewardOperation. +// Data returns the operation data AuthorRewardOperation. func (op *AuthorRewardOperation) Data() interface{} { return op } diff --git a/operations/voperation_benefactor_award.go b/operations/voperation_benefactor_award.go index 4033016..5517afb 100644 --- a/operations/voperation_benefactor_award.go +++ b/operations/voperation_benefactor_award.go @@ -1,10 +1,10 @@ package operations import ( - "github.com/VIZ-Blockchain/viz-go-lib/types" + "github.com/biter777/viz-go-lib/types" ) -//BenefactorAwardOperation represents benefactor_award operation data. +// BenefactorAwardOperation represents benefactor_award operation data. type BenefactorAwardOperation struct { Initiator string `json:"initiator"` Benefactor string `json:"benefactor"` @@ -14,12 +14,12 @@ type BenefactorAwardOperation struct { Shares types.Asset `json:"shares"` } -//Type function that defines the type of operation BenefactorAwardOperation. +// Type function that defines the type of operation BenefactorAwardOperation. func (op *BenefactorAwardOperation) Type() OpType { return TypeBenefactorAward } -//Data returns the operation data BenefactorAwardOperation. +// Data returns the operation data BenefactorAwardOperation. func (op *BenefactorAwardOperation) Data() interface{} { return op } diff --git a/operations/voperation_committee_pay_request.go b/operations/voperation_committee_pay_request.go index 3a0fee2..6d32f08 100644 --- a/operations/voperation_committee_pay_request.go +++ b/operations/voperation_committee_pay_request.go @@ -1,22 +1,22 @@ package operations import ( - "github.com/VIZ-Blockchain/viz-go-lib/types" + "github.com/biter777/viz-go-lib/types" ) -//CommitteePayRequestOperation represents committee_pay_request operation data. +// CommitteePayRequestOperation represents committee_pay_request operation data. type CommitteePayRequestOperation struct { Worker string `json:"worker"` RequestID uint32 `json:"request_id"` Tokens types.Asset `json:"tokens"` } -//Type function that defines the type of operation CommitteePayRequestOperation. +// Type function that defines the type of operation CommitteePayRequestOperation. func (op *CommitteePayRequestOperation) Type() OpType { return TypeCommitteePayRequest } -//Data returns the operation data CommitteePayRequestOperation. +// Data returns the operation data CommitteePayRequestOperation. func (op *CommitteePayRequestOperation) Data() interface{} { return op } diff --git a/operations/voperation_content_benefactor_reward.go b/operations/voperation_content_benefactor_reward.go index 1cfaeeb..6d87447 100644 --- a/operations/voperation_content_benefactor_reward.go +++ b/operations/voperation_content_benefactor_reward.go @@ -1,10 +1,10 @@ package operations import ( - "github.com/VIZ-Blockchain/viz-go-lib/types" + "github.com/biter777/viz-go-lib/types" ) -//ContentBenefactorRewardOperation represents content_benefactor_reward operation data. +// ContentBenefactorRewardOperation represents content_benefactor_reward operation data. type ContentBenefactorRewardOperation struct { Benefactor string `json:"benefactor"` Author string `json:"author"` @@ -12,12 +12,12 @@ type ContentBenefactorRewardOperation struct { Reward types.Asset `json:"reward"` } -//Type function that defines the type of operation ContentBenefactorRewardOperation. +// Type function that defines the type of operation ContentBenefactorRewardOperation. func (op *ContentBenefactorRewardOperation) Type() OpType { return TypeContentBenefactorReward } -//Data returns the operation data ContentBenefactorRewardOperation. +// Data returns the operation data ContentBenefactorRewardOperation. func (op *ContentBenefactorRewardOperation) Data() interface{} { return op } diff --git a/operations/voperation_content_reward.go b/operations/voperation_content_reward.go index e526965..1c0e383 100644 --- a/operations/voperation_content_reward.go +++ b/operations/voperation_content_reward.go @@ -1,22 +1,22 @@ package operations import ( - "github.com/VIZ-Blockchain/viz-go-lib/types" + "github.com/biter777/viz-go-lib/types" ) -//ContentRewardOperation represents content_reward operation data. +// ContentRewardOperation represents content_reward operation data. type ContentRewardOperation struct { Author string `json:"author"` Permlink string `json:"permlink"` Payout types.Asset `json:"payout"` } -//Type function that defines the type of operation ContentRewardOperation. +// Type function that defines the type of operation ContentRewardOperation. func (op *ContentRewardOperation) Type() OpType { return TypeContentReward } -//Data returns the operation data ContentRewardOperation. +// Data returns the operation data ContentRewardOperation. func (op *ContentRewardOperation) Data() interface{} { return op } diff --git a/operations/voperation_curation_reward.go b/operations/voperation_curation_reward.go index 48da166..6862069 100644 --- a/operations/voperation_curation_reward.go +++ b/operations/voperation_curation_reward.go @@ -1,10 +1,10 @@ package operations import ( - "github.com/VIZ-Blockchain/viz-go-lib/types" + "github.com/biter777/viz-go-lib/types" ) -//CurationRewardOperation represents curation_reward operation data. +// CurationRewardOperation represents curation_reward operation data. type CurationRewardOperation struct { Curator string `json:"curator"` Reward types.Asset `json:"reward"` @@ -12,12 +12,12 @@ type CurationRewardOperation struct { CommentPermlink string `json:"comment_permlink"` } -//Type function that defines the type of operation CurationRewardOperation. +// Type function that defines the type of operation CurationRewardOperation. func (op *CurationRewardOperation) Type() OpType { return TypeCurationReward } -//Data returns the operation data CurationRewardOperation. +// Data returns the operation data CurationRewardOperation. func (op *CurationRewardOperation) Data() interface{} { return op } diff --git a/operations/voperation_fill_vesting_withdraw.go b/operations/voperation_fill_vesting_withdraw.go index ba50e2c..2d723a8 100644 --- a/operations/voperation_fill_vesting_withdraw.go +++ b/operations/voperation_fill_vesting_withdraw.go @@ -1,10 +1,10 @@ package operations import ( - "github.com/VIZ-Blockchain/viz-go-lib/types" + "github.com/biter777/viz-go-lib/types" ) -//FillVestingWithdrawOperation represents fill_vesting_withdraw operation data. +// FillVestingWithdrawOperation represents fill_vesting_withdraw operation data. type FillVestingWithdrawOperation struct { FromAccount string `json:"from_account"` ToAccount string `json:"to_account"` @@ -12,12 +12,12 @@ type FillVestingWithdrawOperation struct { Deposited types.Asset `json:"deposited"` } -//Type function that defines the type of operation FillVestingWithdrawOperation. +// Type function that defines the type of operation FillVestingWithdrawOperation. func (op *FillVestingWithdrawOperation) Type() OpType { return TypeFillVestingWithdraw } -//Data returns the operation data FillVestingWithdrawOperation. +// Data returns the operation data FillVestingWithdrawOperation. func (op *FillVestingWithdrawOperation) Data() interface{} { return op } diff --git a/operations/voperation_paid_subscription_action.go b/operations/voperation_paid_subscription_action.go index b76f7be..542e39d 100644 --- a/operations/voperation_paid_subscription_action.go +++ b/operations/voperation_paid_subscription_action.go @@ -1,10 +1,10 @@ package operations import ( - "github.com/VIZ-Blockchain/viz-go-lib/types" + "github.com/biter777/viz-go-lib/types" ) -//PaidSubscriptionActionOperation represents paid_subscription_action operation data. +// PaidSubscriptionActionOperation represents paid_subscription_action operation data. type PaidSubscriptionActionOperation struct { Subscriber string `json:"subscriber"` Account string `json:"account"` @@ -15,12 +15,12 @@ type PaidSubscriptionActionOperation struct { SummaryAmount types.Asset `json:"summary_amount"` } -//Type function that defines the type of operation PaidSubscriptionActionOperation. +// Type function that defines the type of operation PaidSubscriptionActionOperation. func (op *PaidSubscriptionActionOperation) Type() OpType { return TypePaidSubscriptionAction } -//Data returns the operation data PaidSubscriptionActionOperation. +// Data returns the operation data PaidSubscriptionActionOperation. func (op *PaidSubscriptionActionOperation) Data() interface{} { return op } diff --git a/operations/voperation_receive_award.go b/operations/voperation_receive_award.go index 30b6ae4..5966723 100644 --- a/operations/voperation_receive_award.go +++ b/operations/voperation_receive_award.go @@ -1,10 +1,10 @@ package operations import ( - "github.com/VIZ-Blockchain/viz-go-lib/types" + "github.com/biter777/viz-go-lib/types" ) -//ReceiveAwardOperation represents receive_award operation data. +// ReceiveAwardOperation represents receive_award operation data. type ReceiveAwardOperation struct { Initiator string `json:"initiator"` Receiver string `json:"receiver"` @@ -13,12 +13,12 @@ type ReceiveAwardOperation struct { Shares types.Asset `json:"shares"` } -//Type function that defines the type of operation ReceiveAwardOperation. +// Type function that defines the type of operation ReceiveAwardOperation. func (op *ReceiveAwardOperation) Type() OpType { return TypeReceiveAward } -//Data returns the operation data ReceiveAwardOperation. +// Data returns the operation data ReceiveAwardOperation. func (op *ReceiveAwardOperation) Data() interface{} { return op } diff --git a/operations/voperation_return_vesting_delegation.go b/operations/voperation_return_vesting_delegation.go index 978462b..ce2a1f0 100644 --- a/operations/voperation_return_vesting_delegation.go +++ b/operations/voperation_return_vesting_delegation.go @@ -1,21 +1,21 @@ package operations import ( - "github.com/VIZ-Blockchain/viz-go-lib/types" + "github.com/biter777/viz-go-lib/types" ) -//ReturnVestingDelegationOperation represents return_vesting_delegation operation data. +// ReturnVestingDelegationOperation represents return_vesting_delegation operation data. type ReturnVestingDelegationOperation struct { Account string `json:"account"` VestingShares types.Asset `json:"vesting_shares"` } -//Type function that defines the type of operation ReturnVestingDelegationOperation. +// Type function that defines the type of operation ReturnVestingDelegationOperation. func (op *ReturnVestingDelegationOperation) Type() OpType { return TypeReturnVestingDelegation } -//Data returns the operation data ReturnVestingDelegationOperation. +// Data returns the operation data ReturnVestingDelegationOperation. func (op *ReturnVestingDelegationOperation) Data() interface{} { return op } diff --git a/operations/voperation_witness_reward.go b/operations/voperation_witness_reward.go index 15f6bed..d5148e8 100644 --- a/operations/voperation_witness_reward.go +++ b/operations/voperation_witness_reward.go @@ -1,21 +1,21 @@ package operations import ( - "github.com/VIZ-Blockchain/viz-go-lib/types" + "github.com/biter777/viz-go-lib/types" ) -//WitnessRewardOperation represents witness_reward operation data. +// WitnessRewardOperation represents witness_reward operation data. type WitnessRewardOperation struct { Witness string `json:"witness"` Shares types.Asset `json:"shares"` } -//Type function that defines the type of operation WitnessRewardOperation. +// Type function that defines the type of operation WitnessRewardOperation. func (op *WitnessRewardOperation) Type() OpType { return TypeWitnessReward } -//Data returns the operation data WitnessRewardOperation. +// Data returns the operation data WitnessRewardOperation. func (op *WitnessRewardOperation) Data() interface{} { return op } From 6f5d8e9cd53696fff73b59502a9d9d51a6771711 Mon Sep 17 00:00:00 2001 From: biter777 <33280398+biter777@users.noreply.github.com> Date: Sun, 28 May 2023 12:02:02 +0300 Subject: [PATCH 13/41] Add files via upload --- transactions/go.mod | 3 +++ transactions/sign_the_shit.go | 5 +++-- transactions/signed_transaction.go | 17 +++++++++-------- transactions/transactions.go | 6 +++--- 4 files changed, 18 insertions(+), 13 deletions(-) create mode 100644 transactions/go.mod diff --git a/transactions/go.mod b/transactions/go.mod new file mode 100644 index 0000000..629fc91 --- /dev/null +++ b/transactions/go.mod @@ -0,0 +1,3 @@ +module transactions + +go 1.19 diff --git a/transactions/sign_the_shit.go b/transactions/sign_the_shit.go index 2060ffd..48d7024 100644 --- a/transactions/sign_the_shit.go +++ b/transactions/sign_the_shit.go @@ -6,15 +6,16 @@ import ( "crypto/sha256" "errors" "fmt" + //"encoding/hex" //"log" "math/big" - "github.com/VIZ-Blockchain/viz-go-lib/transactions/rfc6979" + "github.com/biter777/viz-go-lib/transactions/rfc6979" secp256k1 "github.com/btcsuite/btcd/btcec" ) -//SignSingle signature of the transaction by one of the keys +// SignSingle signature of the transaction by one of the keys func (tx *SignedTransaction) SignSingle(privB, data []byte) ([]byte, error) { privKeyBytes := [32]byte{} copy(privKeyBytes[:], privB) diff --git a/transactions/signed_transaction.go b/transactions/signed_transaction.go index 7b0cef9..7f5bc42 100644 --- a/transactions/signed_transaction.go +++ b/transactions/signed_transaction.go @@ -1,3 +1,4 @@ +//go:build !nosigning // +build !nosigning package transactions @@ -9,17 +10,17 @@ import ( "fmt" "time" - "github.com/VIZ-Blockchain/viz-go-lib/encoding/transaction" - "github.com/VIZ-Blockchain/viz-go-lib/operations" - "github.com/VIZ-Blockchain/viz-go-lib/types" + "github.com/biter777/viz-go-lib/encoding/transaction" + "github.com/biter777/viz-go-lib/operations" + "github.com/biter777/viz-go-lib/types" ) -//SignedTransaction structure of a signed transaction +// SignedTransaction structure of a signed transaction type SignedTransaction struct { *operations.Transaction } -//NewSignedTransaction initialization of a new signed transaction +// NewSignedTransaction initialization of a new signed transaction func NewSignedTransaction(tx *operations.Transaction) *SignedTransaction { if tx.Expiration == nil { expiration := time.Now().Add(30 * time.Second).UTC() @@ -29,7 +30,7 @@ func NewSignedTransaction(tx *operations.Transaction) *SignedTransaction { return &SignedTransaction{tx} } -//Serialize function serializes a transaction +// Serialize function serializes a transaction func (tx *SignedTransaction) Serialize() ([]byte, error) { var b bytes.Buffer encoder := transaction.NewEncoder(&b) @@ -40,7 +41,7 @@ func (tx *SignedTransaction) Serialize() ([]byte, error) { return b.Bytes(), nil } -//Digest function that returns a digest from a serialized transaction +// Digest function that returns a digest from a serialized transaction func (tx *SignedTransaction) Digest(chain string) ([]byte, error) { var msgBuffer bytes.Buffer @@ -69,7 +70,7 @@ func (tx *SignedTransaction) Digest(chain string) ([]byte, error) { return digest[:], nil } -//Sign function directly generating transaction signature +// Sign function directly generating transaction signature func (tx *SignedTransaction) Sign(privKeys [][]byte, chain string) error { var buf bytes.Buffer chainid, errdec := hex.DecodeString(chain) diff --git a/transactions/transactions.go b/transactions/transactions.go index f28697a..0827918 100644 --- a/transactions/transactions.go +++ b/transactions/transactions.go @@ -6,15 +6,15 @@ import ( "encoding/hex" "fmt" - "github.com/VIZ-Blockchain/viz-go-lib/types" + "github.com/biter777/viz-go-lib/types" ) -//RefBlockNum function returns blockNumber +// RefBlockNum function returns blockNumber func RefBlockNum(blockNumber uint32) types.UInt16 { return types.UInt16(blockNumber) } -//RefBlockPrefix function returns block prefix +// RefBlockPrefix function returns block prefix func RefBlockPrefix(blockID string) (types.UInt32, error) { // Block ID is hex-encoded. rawBlockID, err := hex.DecodeString(blockID) From 9e7c460698d171746678050fb72998a5aa8e6966 Mon Sep 17 00:00:00 2001 From: biter777 <33280398+biter777@users.noreply.github.com> Date: Sun, 28 May 2023 12:02:20 +0300 Subject: [PATCH 14/41] Add files via upload --- transactions/rfc6979/go.mod | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 transactions/rfc6979/go.mod diff --git a/transactions/rfc6979/go.mod b/transactions/rfc6979/go.mod new file mode 100644 index 0000000..7bf5edb --- /dev/null +++ b/transactions/rfc6979/go.mod @@ -0,0 +1,3 @@ +module rfc6979 + +go 1.19 From 13463d12dc59b6d735944c598535a85d25f4160c Mon Sep 17 00:00:00 2001 From: biter777 <33280398+biter777@users.noreply.github.com> Date: Sun, 28 May 2023 12:02:42 +0300 Subject: [PATCH 15/41] Add files via upload --- transports/go.mod | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 transports/go.mod diff --git a/transports/go.mod b/transports/go.mod new file mode 100644 index 0000000..c483bf8 --- /dev/null +++ b/transports/go.mod @@ -0,0 +1,3 @@ +module transports + +go 1.19 From 01e69280976686e73d08818fb8662f1667641170 Mon Sep 17 00:00:00 2001 From: biter777 <33280398+biter777@users.noreply.github.com> Date: Sun, 28 May 2023 12:03:17 +0300 Subject: [PATCH 16/41] Add files via upload --- transports/websocket/go.mod | 3 +++ transports/websocket/transport.go | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 transports/websocket/go.mod diff --git a/transports/websocket/go.mod b/transports/websocket/go.mod new file mode 100644 index 0000000..2c1362c --- /dev/null +++ b/transports/websocket/go.mod @@ -0,0 +1,3 @@ +module websocket + +go 1.19 diff --git a/transports/websocket/transport.go b/transports/websocket/transport.go index 76aeef8..33dd273 100644 --- a/transports/websocket/transport.go +++ b/transports/websocket/transport.go @@ -9,7 +9,7 @@ import ( "sync" "time" - "github.com/VIZ-Blockchain/viz-go-lib/types" + "github.com/biter777/viz-go-lib/types" "github.com/gorilla/websocket" ) From b3838208f15cda04615de9d3a3b083bd868496c0 Mon Sep 17 00:00:00 2001 From: biter777 <33280398+biter777@users.noreply.github.com> Date: Sun, 28 May 2023 12:03:41 +0300 Subject: [PATCH 17/41] Add files via upload --- transports/http/go.mod | 3 +++ transports/http/transport.go | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 transports/http/go.mod diff --git a/transports/http/go.mod b/transports/http/go.mod new file mode 100644 index 0000000..f7b12a6 --- /dev/null +++ b/transports/http/go.mod @@ -0,0 +1,3 @@ +module http + +go 1.19 diff --git a/transports/http/transport.go b/transports/http/transport.go index a9f22e2..b011e3f 100644 --- a/transports/http/transport.go +++ b/transports/http/transport.go @@ -10,7 +10,7 @@ import ( "sync" "time" - "github.com/VIZ-Blockchain/viz-go-lib/types" + "github.com/biter777/viz-go-lib/types" ) type Transport struct { From 2b175909c416a49f2c61670d3f3480bdbe008ae6 Mon Sep 17 00:00:00 2001 From: biter777 <33280398+biter777@users.noreply.github.com> Date: Sun, 28 May 2023 12:04:13 +0300 Subject: [PATCH 18/41] Add files via upload --- types/asset.go | 14 +++++----- types/authority.go | 6 ++--- types/chain_properties.go | 10 +++---- types/extensions_options.go | 8 +++--- types/go.mod | 11 ++++++++ types/go.sum | 53 +++++++++++++++++++++++++++++++++++++ types/int.go | 26 +++++++++--------- types/time.go | 10 +++---- types/uint.go | 32 +++++++++++----------- 9 files changed, 117 insertions(+), 53 deletions(-) create mode 100644 types/go.mod create mode 100644 types/go.sum diff --git a/types/asset.go b/types/asset.go index ab7dbd0..e1a0de8 100644 --- a/types/asset.go +++ b/types/asset.go @@ -5,16 +5,16 @@ import ( "strconv" "strings" - "github.com/VIZ-Blockchain/viz-go-lib/encoding/transaction" + "github.com/biter777/viz-go-lib/encoding/transaction" ) -//Asset type from parameter JSON +// Asset type from parameter JSON type Asset struct { Amount float64 Symbol string } -//UnmarshalJSON unpacking the JSON parameter in the Asset type. +// UnmarshalJSON unpacking the JSON parameter in the Asset type. func (op *Asset) UnmarshalJSON(data []byte) error { str, errUnq := strconv.Unquote(string(data)) if errUnq != nil { @@ -33,12 +33,12 @@ func (op *Asset) UnmarshalJSON(data []byte) error { return nil } -//MarshalJSON function for packing the Asset type in JSON. +// MarshalJSON function for packing the Asset type in JSON. func (op *Asset) MarshalJSON() ([]byte, error) { return json.Marshal(op.String()) } -//MarshalTransaction is a function of converting type Asset to bytes. +// MarshalTransaction is a function of converting type Asset to bytes. func (op *Asset) MarshalTransaction(encoder *transaction.Encoder) error { ans, err := json.Marshal(op) if err != nil { @@ -73,7 +73,7 @@ func (op *Asset) MarshalTransaction(encoder *transaction.Encoder) error { return enc.Err() } -//String function convert type Asset to string. +// String function convert type Asset to string. func (op *Asset) String() string { var ammf string if op.Symbol != "SHARES" { @@ -84,7 +84,7 @@ func (op *Asset) String() string { return ammf + " " + op.Symbol } -//StringAmount function convert type Asset.Amount to string. +// StringAmount function convert type Asset.Amount to string. func (op *Asset) StringAmount() string { return strconv.FormatFloat(op.Amount, 'f', 3, 64) } diff --git a/types/authority.go b/types/authority.go index 89c8aa6..147b0cf 100644 --- a/types/authority.go +++ b/types/authority.go @@ -1,17 +1,17 @@ package types import ( - "github.com/VIZ-Blockchain/viz-go-lib/encoding/transaction" + "github.com/biter777/viz-go-lib/encoding/transaction" ) -//Authority is an additional structure used by other structures. +// Authority is an additional structure used by other structures. type Authority struct { WeightThreshold uint32 `json:"weight_threshold"` AccountAuths StringInt64Map `json:"account_auths"` KeyAuths StringInt64Map `json:"key_auths"` } -//MarshalTransaction is a function of converting type Authority to bytes. +// MarshalTransaction is a function of converting type Authority to bytes. func (auth *Authority) MarshalTransaction(encoder *transaction.Encoder) error { enc := transaction.NewRollingEncoder(encoder) enc.EncodeNumber(uint32(auth.WeightThreshold)) diff --git a/types/chain_properties.go b/types/chain_properties.go index 156d086..eedaee0 100644 --- a/types/chain_properties.go +++ b/types/chain_properties.go @@ -1,10 +1,10 @@ package types import ( - "github.com/VIZ-Blockchain/viz-go-lib/encoding/transaction" + "github.com/biter777/viz-go-lib/encoding/transaction" ) -//ChainProperties is an additional structure used by other structures. +// ChainProperties is an additional structure used by other structures. type ChainProperties struct { AccountCreationFee Asset `json:"account_creation_fee,omitempty"` MaximumBlockSize uint32 `json:"maximum_block_size,omitempty"` @@ -26,7 +26,7 @@ type ChainProperties struct { WitnessMissPenaltyDuration uint32 `json:"witness_miss_penalty_duration,omitempty"` } -//MarshalTransaction is a function of converting type ChainProperties to bytes. +// MarshalTransaction is a function of converting type ChainProperties to bytes. func (cp *ChainProperties) MarshalTransaction(encoder *transaction.Encoder) error { enc := transaction.NewRollingEncoder(encoder) enc.Encode(cp.AccountCreationFee) @@ -52,14 +52,14 @@ func (cp *ChainProperties) MarshalTransaction(encoder *transaction.Encoder) erro // Очень старое возможно даже можно будет удалить. -//ChainProperties is an additional structure used by other structures. +// ChainProperties is an additional structure used by other structures. type ChainPropertiesOLD struct { AccountCreationFee *Asset `json:"account_creation_fee"` MaximumBlockSize uint32 `json:"maximum_block_size"` SBDInterestRate uint16 `json:"sbd_interest_rate"` } -//MarshalTransaction is a function of converting type ChainPropertiesOLD to bytes. +// MarshalTransaction is a function of converting type ChainPropertiesOLD to bytes. func (cp *ChainPropertiesOLD) MarshalTransaction(encoder *transaction.Encoder) error { enc := transaction.NewRollingEncoder(encoder) enc.Encode(cp.AccountCreationFee) diff --git a/types/extensions_options.go b/types/extensions_options.go index 8e06bdb..eb254b8 100644 --- a/types/extensions_options.go +++ b/types/extensions_options.go @@ -1,21 +1,21 @@ package types import ( - "github.com/VIZ-Blockchain/viz-go-lib/encoding/transaction" + "github.com/biter777/viz-go-lib/encoding/transaction" ) -//Beneficiary is an additional structure used by other structures. +// Beneficiary is an additional structure used by other structures. type Beneficiary struct { Account string `json:"account"` Weight uint16 `json:"weight"` } -//CommentPayoutBeneficiaries is an additional structure used by other structures. +// CommentPayoutBeneficiaries is an additional structure used by other structures. type CommentPayoutBeneficiaries struct { Beneficiaries []Beneficiary `json:"beneficiaries"` } -//MarshalTransaction is a function of converting type CommentPayoutBeneficiaries to bytes. +// MarshalTransaction is a function of converting type CommentPayoutBeneficiaries to bytes. func (cp *CommentPayoutBeneficiaries) MarshalTransaction(encoder *transaction.Encoder) error { enc := transaction.NewRollingEncoder(encoder) enc.Encode(byte(0)) diff --git a/types/go.mod b/types/go.mod new file mode 100644 index 0000000..c73a777 --- /dev/null +++ b/types/go.mod @@ -0,0 +1,11 @@ +module types + +go 1.19 + +require github.com/biter777/viz-go-lib v0.0.0-20230528080733-c48bb5bfeccb + +require ( + github.com/btcsuite/btcd v0.21.0-beta // indirect + github.com/btcsuite/btcutil v1.0.2 // indirect + golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad // indirect +) diff --git a/types/go.sum b/types/go.sum new file mode 100644 index 0000000..1a09817 --- /dev/null +++ b/types/go.sum @@ -0,0 +1,53 @@ +github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= +github.com/biter777/viz-go-lib v0.0.0-20230528080733-c48bb5bfeccb h1:VCi+TLFhOHtVKPglIy0jxwJua9lLuFD4BQHh66a6mro= +github.com/biter777/viz-go-lib v0.0.0-20230528080733-c48bb5bfeccb/go.mod h1:VqANrcdW/H1nu3Lk9hXfkXKHqgGcjmBcO1nvk825kds= +github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ= +github.com/btcsuite/btcd v0.21.0-beta h1:At9hIZdJW0s9E/fAz28nrz6AmcNlSVucCH796ZteX1M= +github.com/btcsuite/btcd v0.21.0-beta/go.mod h1:ZSWyehm27aAuS9bvkATT+Xte3hjHZ+MRgMY/8NJ7K94= +github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f/go.mod h1:TdznJufoqS23FtqVCzL0ZqgP5MqXbb4fg/WgDys70nA= +github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= +github.com/btcsuite/btcutil v1.0.2 h1:9iZ1Terx9fMIOtq1VrwdqfsATL9MC2l8ZrUY6YZ2uts= +github.com/btcsuite/btcutil v1.0.2/go.mod h1:j9HUFwoQRsZL3V4n+qG+CUnEGHOarIxfC3Le2Yhbcts= +github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd/go.mod h1:HHNXQzUsZCxOoE+CPiyCTO6x34Zs86zZUiwtpXoGdtg= +github.com/btcsuite/goleveldb v0.0.0-20160330041536-7834afc9e8cd/go.mod h1:F+uVaaLLH7j4eDXPRvw78tMflu7Ie2bzYOH4Y8rRKBY= +github.com/btcsuite/goleveldb v1.0.0/go.mod h1:QiK9vBlgftBg6rWQIj6wFzbPfRjiykIEhBH4obrXJ/I= +github.com/btcsuite/snappy-go v0.0.0-20151229074030-0bdef8d06723/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc= +github.com/btcsuite/snappy-go v1.0.0/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc= +github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtEyQwv5/p4Mg4C0fgbePVuGr935/5ddU9Z3TmDRY= +github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs= +github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/decred/dcrd/lru v1.0.0/go.mod h1:mxKOwFd7lFjN2GZYsiz/ecgqR6kkYAl+0pz0tEMk218= +github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= +github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= +github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ= +github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4= +github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/gomega v1.4.1/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= +github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20200115085410-6d4e4cb37c7d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad h1:DN0cp81fZ3njFcrLCytUHRSUkqBjfTo4Tx9RJTWs0EY= +golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= +golang.org/x/net v0.0.0-20180719180050-a680a1efc54d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/types/int.go b/types/int.go index 2b2beda..5e18d80 100644 --- a/types/int.go +++ b/types/int.go @@ -6,7 +6,7 @@ import ( "fmt" "strconv" - "github.com/VIZ-Blockchain/viz-go-lib/encoding/transaction" + "github.com/biter777/viz-go-lib/encoding/transaction" ) func unmarshalInt(data []byte) (int64, error) { @@ -28,10 +28,10 @@ func unmarshalInt(data []byte) (int64, error) { return i, fmt.Errorf("types: failed to unmarshal integer: %v\n Error : %w", data, err) } -//Int8 type from parameter JSON +// Int8 type from parameter JSON type Int8 int8 -//UnmarshalJSON unpacking the JSON parameter in the Int8 type. +// UnmarshalJSON unpacking the JSON parameter in the Int8 type. func (num *Int8) UnmarshalJSON(data []byte) error { v, err := unmarshalInt(data) if err != nil { @@ -42,15 +42,15 @@ func (num *Int8) UnmarshalJSON(data []byte) error { return nil } -//MarshalTransaction is a function of converting type Int8 to bytes. +// MarshalTransaction is a function of converting type Int8 to bytes. func (num Int8) MarshalTransaction(encoder *transaction.Encoder) error { return encoder.EncodeNumber(int(num)) } -//Int16 type from parameter JSON +// Int16 type from parameter JSON type Int16 int16 -//UnmarshalJSON unpacking the JSON parameter in the Int16 type. +// UnmarshalJSON unpacking the JSON parameter in the Int16 type. func (num *Int16) UnmarshalJSON(data []byte) error { v, err := unmarshalInt(data) if err != nil { @@ -61,15 +61,15 @@ func (num *Int16) UnmarshalJSON(data []byte) error { return nil } -//MarshalTransaction is a function of converting type Int16 to bytes. +// MarshalTransaction is a function of converting type Int16 to bytes. func (num Int16) MarshalTransaction(encoder *transaction.Encoder) error { return encoder.EncodeNumber(int16(num)) } -//Int32 type from parameter JSON +// Int32 type from parameter JSON type Int32 int32 -//UnmarshalJSON unpacking the JSON parameter in the Int32 type. +// UnmarshalJSON unpacking the JSON parameter in the Int32 type. func (num *Int32) UnmarshalJSON(data []byte) error { v, err := unmarshalInt(data) if err != nil { @@ -80,15 +80,15 @@ func (num *Int32) UnmarshalJSON(data []byte) error { return nil } -//MarshalTransaction is a function of converting type Int32 to bytes. +// MarshalTransaction is a function of converting type Int32 to bytes. func (num Int32) MarshalTransaction(encoder *transaction.Encoder) error { return encoder.EncodeNumber(int32(num)) } -//Int64 type from parameter JSON +// Int64 type from parameter JSON type Int64 int64 -//UnmarshalJSON unpacking the JSON parameter in the Int64 type. +// UnmarshalJSON unpacking the JSON parameter in the Int64 type. func (num *Int64) UnmarshalJSON(data []byte) error { v, err := unmarshalInt(data) if err != nil { @@ -99,7 +99,7 @@ func (num *Int64) UnmarshalJSON(data []byte) error { return nil } -//MarshalTransaction is a function of converting type Int64 to bytes. +// MarshalTransaction is a function of converting type Int64 to bytes. func (num Int64) MarshalTransaction(encoder *transaction.Encoder) error { return encoder.EncodeNumber(int64(num)) } diff --git a/types/time.go b/types/time.go index 7702039..2983954 100644 --- a/types/time.go +++ b/types/time.go @@ -5,22 +5,22 @@ import ( "time" // RPC - "github.com/VIZ-Blockchain/viz-go-lib/encoding/transaction" + "github.com/biter777/viz-go-lib/encoding/transaction" ) const layout = `"2006-01-02T15:04:05"` -//Time type from parameter JSON +// Time type from parameter JSON type Time struct { *time.Time } -//MarshalJSON function for packing the Time type in JSON. +// MarshalJSON function for packing the Time type in JSON. func (t *Time) MarshalJSON() ([]byte, error) { return []byte(t.Time.Format(layout)), nil } -//UnmarshalJSON unpacking the JSON parameter in the Time type. +// UnmarshalJSON unpacking the JSON parameter in the Time type. func (t *Time) UnmarshalJSON(data []byte) error { parsed, err := time.ParseInLocation(layout, string(data), time.UTC) if err != nil { @@ -30,7 +30,7 @@ func (t *Time) UnmarshalJSON(data []byte) error { return nil } -//MarshalTransaction is a function of converting type Time to bytes. +// MarshalTransaction is a function of converting type Time to bytes. func (t *Time) MarshalTransaction(encoder *transaction.Encoder) error { return encoder.Encode(uint32(t.Time.Unix())) } diff --git a/types/uint.go b/types/uint.go index e6f6820..b1a75a2 100644 --- a/types/uint.go +++ b/types/uint.go @@ -5,7 +5,7 @@ import ( "errors" "strconv" - "github.com/VIZ-Blockchain/viz-go-lib/encoding/transaction" + "github.com/biter777/viz-go-lib/encoding/transaction" ) func unmarshalUInt(data []byte) (uint64, error) { @@ -27,10 +27,10 @@ func unmarshalUInt(data []byte) (uint64, error) { return i, err } -//UInt type from parameter JSON +// UInt type from parameter JSON type UInt uint -//UnmarshalJSON unpacking the JSON parameter in the UInt type. +// UnmarshalJSON unpacking the JSON parameter in the UInt type. func (num *UInt) UnmarshalJSON(data []byte) error { v, err := unmarshalUInt(data) if err != nil { @@ -41,15 +41,15 @@ func (num *UInt) UnmarshalJSON(data []byte) error { return nil } -//MarshalTransaction is a function of converting type UInt to bytes. +// MarshalTransaction is a function of converting type UInt to bytes. func (num UInt) MarshalTransaction(encoder *transaction.Encoder) error { return encoder.EncodeNumber(uint(num)) } -//UInt8 type from parameter JSON +// UInt8 type from parameter JSON type UInt8 uint8 -//UnmarshalJSON unpacking the JSON parameter in the UInt8 type. +// UnmarshalJSON unpacking the JSON parameter in the UInt8 type. func (num *UInt8) UnmarshalJSON(data []byte) error { v, err := unmarshalUInt(data) if err != nil { @@ -60,15 +60,15 @@ func (num *UInt8) UnmarshalJSON(data []byte) error { return nil } -//MarshalTransaction is a function of converting type UInt8 to bytes. +// MarshalTransaction is a function of converting type UInt8 to bytes. func (num UInt8) MarshalTransaction(encoder *transaction.Encoder) error { return encoder.EncodeNumber(uint8(num)) } -//UInt16 type from parameter JSON +// UInt16 type from parameter JSON type UInt16 uint16 -//UnmarshalJSON unpacking the JSON parameter in the UInt16 type. +// UnmarshalJSON unpacking the JSON parameter in the UInt16 type. func (num *UInt16) UnmarshalJSON(data []byte) error { v, err := unmarshalUInt(data) if err != nil { @@ -79,15 +79,15 @@ func (num *UInt16) UnmarshalJSON(data []byte) error { return nil } -//MarshalTransaction is a function of converting type UInt16 to bytes. +// MarshalTransaction is a function of converting type UInt16 to bytes. func (num UInt16) MarshalTransaction(encoder *transaction.Encoder) error { return encoder.EncodeNumber(uint16(num)) } -//UInt32 type from parameter JSON +// UInt32 type from parameter JSON type UInt32 uint32 -//UnmarshalJSON unpacking the JSON parameter in the UInt32 type. +// UnmarshalJSON unpacking the JSON parameter in the UInt32 type. func (num *UInt32) UnmarshalJSON(data []byte) error { v, err := unmarshalUInt(data) if err != nil { @@ -98,15 +98,15 @@ func (num *UInt32) UnmarshalJSON(data []byte) error { return nil } -//MarshalTransaction is a function of converting type UInt32 to bytes. +// MarshalTransaction is a function of converting type UInt32 to bytes. func (num UInt32) MarshalTransaction(encoder *transaction.Encoder) error { return encoder.EncodeNumber(uint32(num)) } -//UInt64 type from parameter JSON +// UInt64 type from parameter JSON type UInt64 uint64 -//UnmarshalJSON unpacking the JSON parameter in the UInt64 type. +// UnmarshalJSON unpacking the JSON parameter in the UInt64 type. func (num *UInt64) UnmarshalJSON(data []byte) error { v, err := unmarshalUInt(data) if err != nil { @@ -117,7 +117,7 @@ func (num *UInt64) UnmarshalJSON(data []byte) error { return nil } -//MarshalTransaction is a function of converting type UInt64 to bytes. +// MarshalTransaction is a function of converting type UInt64 to bytes. func (num UInt64) MarshalTransaction(encoder *transaction.Encoder) error { return encoder.EncodeNumber(uint64(num)) } From d6512c918d3d0a666a24394f0d56213dbcec8db4 Mon Sep 17 00:00:00 2001 From: biter777 <33280398+biter777@users.noreply.github.com> Date: Sun, 28 May 2023 12:04:51 +0300 Subject: [PATCH 19/41] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 52750a5..7f71d16 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# VIZ-Blockchain/viz-go-lib +# viz-go-lib [![GoDoc](https://godoc.org/github.com/VIZ-Blockchain/viz-go-lib?status.svg)](https://godoc.org/github.com/VIZ-Blockchain/viz-go-lib) [![Go Report Card](https://goreportcard.com/badge/github.com/VIZ-Blockchain/viz-go-lib)](https://goreportcard.com/report/github.com/VIZ-Blockchain/viz-go-lib) @@ -8,7 +8,7 @@ Golang RPC client library for [Viz](https://viz.world). ## Usage ```go -import "github.com/VIZ-Blockchain/viz-go-lib" +import "github.com/biter777/viz-go-lib" ``` From fcf130c16399a0b5e91f065e79cacfad265d45b1 Mon Sep 17 00:00:00 2001 From: biter777 <33280398+biter777@users.noreply.github.com> Date: Sun, 28 May 2023 12:08:07 +0300 Subject: [PATCH 20/41] Update go.mod --- go.mod | 9 --------- 1 file changed, 9 deletions(-) diff --git a/go.mod b/go.mod index e517a7c..2de4d7b 100644 --- a/go.mod +++ b/go.mod @@ -2,12 +2,3 @@ module viz go 1.19 -require github.com/biter777/viz-go-lib v0.0.0-20230528080733-c48bb5bfeccb - -require ( - github.com/VIZ-Blockchain/viz-go-lib v0.0.0-20210115080430-8e4544a2adfb // indirect - github.com/btcsuite/btcd v0.21.0-beta // indirect - github.com/btcsuite/btcutil v1.0.2 // indirect - github.com/gorilla/websocket v1.4.2 // indirect - golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad // indirect -) From 3b7ca4d3ae724f3adb32c191391e10083f407b8b Mon Sep 17 00:00:00 2001 From: biter777 <33280398+biter777@users.noreply.github.com> Date: Sun, 28 May 2023 12:08:25 +0300 Subject: [PATCH 21/41] Update go.sum --- go.sum | 57 +-------------------------------------------------------- 1 file changed, 1 insertion(+), 56 deletions(-) diff --git a/go.sum b/go.sum index 4038486..8b13789 100644 --- a/go.sum +++ b/go.sum @@ -1,56 +1 @@ -github.com/VIZ-Blockchain/viz-go-lib v0.0.0-20210115080430-8e4544a2adfb h1:jBqj1UhvFthN9H2OpBkAhmBNlBdaSuUEapE5jU7lW5I= -github.com/VIZ-Blockchain/viz-go-lib v0.0.0-20210115080430-8e4544a2adfb/go.mod h1:ix6x8rPxetkQ5T5GobYSd+JS0U95w3nE8xeMFF+kQg4= -github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= -github.com/biter777/viz-go-lib v0.0.0-20230528080733-c48bb5bfeccb h1:VCi+TLFhOHtVKPglIy0jxwJua9lLuFD4BQHh66a6mro= -github.com/biter777/viz-go-lib v0.0.0-20230528080733-c48bb5bfeccb/go.mod h1:VqANrcdW/H1nu3Lk9hXfkXKHqgGcjmBcO1nvk825kds= -github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ= -github.com/btcsuite/btcd v0.21.0-beta h1:At9hIZdJW0s9E/fAz28nrz6AmcNlSVucCH796ZteX1M= -github.com/btcsuite/btcd v0.21.0-beta/go.mod h1:ZSWyehm27aAuS9bvkATT+Xte3hjHZ+MRgMY/8NJ7K94= -github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f/go.mod h1:TdznJufoqS23FtqVCzL0ZqgP5MqXbb4fg/WgDys70nA= -github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= -github.com/btcsuite/btcutil v1.0.2 h1:9iZ1Terx9fMIOtq1VrwdqfsATL9MC2l8ZrUY6YZ2uts= -github.com/btcsuite/btcutil v1.0.2/go.mod h1:j9HUFwoQRsZL3V4n+qG+CUnEGHOarIxfC3Le2Yhbcts= -github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd/go.mod h1:HHNXQzUsZCxOoE+CPiyCTO6x34Zs86zZUiwtpXoGdtg= -github.com/btcsuite/goleveldb v0.0.0-20160330041536-7834afc9e8cd/go.mod h1:F+uVaaLLH7j4eDXPRvw78tMflu7Ie2bzYOH4Y8rRKBY= -github.com/btcsuite/goleveldb v1.0.0/go.mod h1:QiK9vBlgftBg6rWQIj6wFzbPfRjiykIEhBH4obrXJ/I= -github.com/btcsuite/snappy-go v0.0.0-20151229074030-0bdef8d06723/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc= -github.com/btcsuite/snappy-go v1.0.0/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc= -github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtEyQwv5/p4Mg4C0fgbePVuGr935/5ddU9Z3TmDRY= -github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs= -github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/decred/dcrd/lru v1.0.0/go.mod h1:mxKOwFd7lFjN2GZYsiz/ecgqR6kkYAl+0pz0tEMk218= -github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc= -github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= -github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= -github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ= -github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4= -github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/gomega v1.4.1/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= -github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20200115085410-6d4e4cb37c7d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad h1:DN0cp81fZ3njFcrLCytUHRSUkqBjfTo4Tx9RJTWs0EY= -golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= -golang.org/x/net v0.0.0-20180719180050-a680a1efc54d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= -gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= + From 25898595c14c44cc8e4104dde95861fac93d36da Mon Sep 17 00:00:00 2001 From: biter777 <33280398+biter777@users.noreply.github.com> Date: Sun, 28 May 2023 12:12:36 +0300 Subject: [PATCH 22/41] Update go.mod --- go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 2de4d7b..eb213ee 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module viz +module github.com/biter777/viz-go-lib go 1.19 From af73456df265f001779d32ea6cdf860eec73b9d2 Mon Sep 17 00:00:00 2001 From: biter777 <33280398+biter777@users.noreply.github.com> Date: Sun, 28 May 2023 12:13:26 +0300 Subject: [PATCH 23/41] Update go.mod --- types/go.mod | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/types/go.mod b/types/go.mod index c73a777..db099e4 100644 --- a/types/go.mod +++ b/types/go.mod @@ -1,11 +1,4 @@ -module types +module github.com/biter777/viz-go-lib/types go 1.19 -require github.com/biter777/viz-go-lib v0.0.0-20230528080733-c48bb5bfeccb - -require ( - github.com/btcsuite/btcd v0.21.0-beta // indirect - github.com/btcsuite/btcutil v1.0.2 // indirect - golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad // indirect -) From b3b4cb56a197cd68dc44c506a4f33b941c6c70ea Mon Sep 17 00:00:00 2001 From: biter777 <33280398+biter777@users.noreply.github.com> Date: Sun, 28 May 2023 12:13:44 +0300 Subject: [PATCH 24/41] Update go.mod --- transports/go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transports/go.mod b/transports/go.mod index c483bf8..a8ff474 100644 --- a/transports/go.mod +++ b/transports/go.mod @@ -1,3 +1,3 @@ -module transports +module github.com/biter777/viz-go-lib/transports go 1.19 From f165e492504b87dcd84d32f06817c69d57e20baa Mon Sep 17 00:00:00 2001 From: biter777 <33280398+biter777@users.noreply.github.com> Date: Sun, 28 May 2023 12:13:57 +0300 Subject: [PATCH 25/41] Update go.mod --- transports/http/go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transports/http/go.mod b/transports/http/go.mod index f7b12a6..2cec105 100644 --- a/transports/http/go.mod +++ b/transports/http/go.mod @@ -1,3 +1,3 @@ -module http +module github.com/biter777/viz-go-lib/http go 1.19 From 72877958f3974f6afbd45a26e099987e62feae6b Mon Sep 17 00:00:00 2001 From: biter777 <33280398+biter777@users.noreply.github.com> Date: Sun, 28 May 2023 12:14:10 +0300 Subject: [PATCH 26/41] Update go.mod --- transactions/go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transactions/go.mod b/transactions/go.mod index 629fc91..0ba7253 100644 --- a/transactions/go.mod +++ b/transactions/go.mod @@ -1,3 +1,3 @@ -module transactions +module github.com/biter777/viz-go-lib/transactions go 1.19 From 789b40d0cb56c7f003b761290a848b7d46c05b2d Mon Sep 17 00:00:00 2001 From: biter777 <33280398+biter777@users.noreply.github.com> Date: Sun, 28 May 2023 12:14:23 +0300 Subject: [PATCH 27/41] Update go.mod --- transactions/rfc6979/go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transactions/rfc6979/go.mod b/transactions/rfc6979/go.mod index 7bf5edb..5ada19d 100644 --- a/transactions/rfc6979/go.mod +++ b/transactions/rfc6979/go.mod @@ -1,3 +1,3 @@ -module rfc6979 +module github.com/biter777/viz-go-lib/rfc6979 go 1.19 From 45025f5c7958940d9730d790394011038847f47e Mon Sep 17 00:00:00 2001 From: biter777 <33280398+biter777@users.noreply.github.com> Date: Sun, 28 May 2023 12:14:40 +0300 Subject: [PATCH 28/41] Update go.mod --- operations/go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/operations/go.mod b/operations/go.mod index 8f72910..e782571 100644 --- a/operations/go.mod +++ b/operations/go.mod @@ -1,3 +1,3 @@ -module operations +module github.com/biter777/viz-go-lib/operations go 1.19 From fa619518cc4fa26c6b0ae29727c85063bd6e0e2d Mon Sep 17 00:00:00 2001 From: biter777 <33280398+biter777@users.noreply.github.com> Date: Sun, 28 May 2023 12:15:07 +0300 Subject: [PATCH 29/41] Update go.mod --- encoding/wif/go.mod | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/encoding/wif/go.mod b/encoding/wif/go.mod index d050237..045e073 100644 --- a/encoding/wif/go.mod +++ b/encoding/wif/go.mod @@ -1,13 +1,4 @@ -module wif +module github.com/biter777/viz-go-lib/wif go 1.19 -require ( - github.com/biter777/viz-go-lib v0.0.0-20230528080733-c48bb5bfeccb - github.com/btcsuite/btcutil v1.0.2 -) - -require ( - github.com/btcsuite/btcd v0.21.0-beta // indirect - golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad // indirect -) From a8cc225461c4d7c071b5718003920afb16fbae4c Mon Sep 17 00:00:00 2001 From: biter777 <33280398+biter777@users.noreply.github.com> Date: Sun, 28 May 2023 12:15:18 +0300 Subject: [PATCH 30/41] Update go.sum --- encoding/wif/go.sum | 54 +-------------------------------------------- 1 file changed, 1 insertion(+), 53 deletions(-) diff --git a/encoding/wif/go.sum b/encoding/wif/go.sum index 1a09817..8b13789 100644 --- a/encoding/wif/go.sum +++ b/encoding/wif/go.sum @@ -1,53 +1 @@ -github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= -github.com/biter777/viz-go-lib v0.0.0-20230528080733-c48bb5bfeccb h1:VCi+TLFhOHtVKPglIy0jxwJua9lLuFD4BQHh66a6mro= -github.com/biter777/viz-go-lib v0.0.0-20230528080733-c48bb5bfeccb/go.mod h1:VqANrcdW/H1nu3Lk9hXfkXKHqgGcjmBcO1nvk825kds= -github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ= -github.com/btcsuite/btcd v0.21.0-beta h1:At9hIZdJW0s9E/fAz28nrz6AmcNlSVucCH796ZteX1M= -github.com/btcsuite/btcd v0.21.0-beta/go.mod h1:ZSWyehm27aAuS9bvkATT+Xte3hjHZ+MRgMY/8NJ7K94= -github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f/go.mod h1:TdznJufoqS23FtqVCzL0ZqgP5MqXbb4fg/WgDys70nA= -github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= -github.com/btcsuite/btcutil v1.0.2 h1:9iZ1Terx9fMIOtq1VrwdqfsATL9MC2l8ZrUY6YZ2uts= -github.com/btcsuite/btcutil v1.0.2/go.mod h1:j9HUFwoQRsZL3V4n+qG+CUnEGHOarIxfC3Le2Yhbcts= -github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd/go.mod h1:HHNXQzUsZCxOoE+CPiyCTO6x34Zs86zZUiwtpXoGdtg= -github.com/btcsuite/goleveldb v0.0.0-20160330041536-7834afc9e8cd/go.mod h1:F+uVaaLLH7j4eDXPRvw78tMflu7Ie2bzYOH4Y8rRKBY= -github.com/btcsuite/goleveldb v1.0.0/go.mod h1:QiK9vBlgftBg6rWQIj6wFzbPfRjiykIEhBH4obrXJ/I= -github.com/btcsuite/snappy-go v0.0.0-20151229074030-0bdef8d06723/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc= -github.com/btcsuite/snappy-go v1.0.0/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc= -github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtEyQwv5/p4Mg4C0fgbePVuGr935/5ddU9Z3TmDRY= -github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs= -github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/decred/dcrd/lru v1.0.0/go.mod h1:mxKOwFd7lFjN2GZYsiz/ecgqR6kkYAl+0pz0tEMk218= -github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= -github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= -github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ= -github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4= -github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/gomega v1.4.1/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= -github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20200115085410-6d4e4cb37c7d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad h1:DN0cp81fZ3njFcrLCytUHRSUkqBjfTo4Tx9RJTWs0EY= -golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= -golang.org/x/net v0.0.0-20180719180050-a680a1efc54d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= -gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= + From f03750227f7a98812a410be2eeee5650f5b30b0a Mon Sep 17 00:00:00 2001 From: biter777 <33280398+biter777@users.noreply.github.com> Date: Sun, 28 May 2023 12:15:33 +0300 Subject: [PATCH 31/41] Update go.sum --- encoding/transaction/go.sum | 40 +------------------------------------ 1 file changed, 1 insertion(+), 39 deletions(-) diff --git a/encoding/transaction/go.sum b/encoding/transaction/go.sum index 1ec2c69..8b13789 100644 --- a/encoding/transaction/go.sum +++ b/encoding/transaction/go.sum @@ -1,39 +1 @@ -github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= -github.com/btcsuite/btcd v0.20.1-beta h1:Ik4hyJqN8Jfyv3S4AGBOmyouMsYE3EdYODkMbQjwPGw= -github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ= -github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f/go.mod h1:TdznJufoqS23FtqVCzL0ZqgP5MqXbb4fg/WgDys70nA= -github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= -github.com/btcsuite/btcutil v1.0.2 h1:9iZ1Terx9fMIOtq1VrwdqfsATL9MC2l8ZrUY6YZ2uts= -github.com/btcsuite/btcutil v1.0.2/go.mod h1:j9HUFwoQRsZL3V4n+qG+CUnEGHOarIxfC3Le2Yhbcts= -github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd/go.mod h1:HHNXQzUsZCxOoE+CPiyCTO6x34Zs86zZUiwtpXoGdtg= -github.com/btcsuite/goleveldb v0.0.0-20160330041536-7834afc9e8cd/go.mod h1:F+uVaaLLH7j4eDXPRvw78tMflu7Ie2bzYOH4Y8rRKBY= -github.com/btcsuite/snappy-go v0.0.0-20151229074030-0bdef8d06723/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc= -github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtEyQwv5/p4Mg4C0fgbePVuGr935/5ddU9Z3TmDRY= -github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs= -github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495 h1:6IyqGr3fnd0tM3YxipK27TUskaOVUjU2nG45yzwcQKY= -github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= -github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ= -github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4= -github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20200115085410-6d4e4cb37c7d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.9.0 h1:LF6fAI+IutBocDJ2OT0Q1g8plpYljMZ4+lty+dsqw3g= -golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0= -golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= -gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= + From 12b23428986778367896c837ebdd92b34186c75f Mon Sep 17 00:00:00 2001 From: biter777 <33280398+biter777@users.noreply.github.com> Date: Sun, 28 May 2023 12:15:50 +0300 Subject: [PATCH 32/41] Update go.mod --- encoding/transaction/go.mod | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/encoding/transaction/go.mod b/encoding/transaction/go.mod index e66f712..89fd474 100644 --- a/encoding/transaction/go.mod +++ b/encoding/transaction/go.mod @@ -1,9 +1,4 @@ -module transaction +module github.com/biter777/viz-go-lib/transaction go 1.19 -require ( - github.com/btcsuite/btcd v0.20.1-beta - github.com/btcsuite/btcutil v1.0.2 - golang.org/x/crypto v0.9.0 -) From 3eacbed58d3df0e2143f33eb145a686deadfceee Mon Sep 17 00:00:00 2001 From: biter777 <33280398+biter777@users.noreply.github.com> Date: Sun, 28 May 2023 12:16:38 +0300 Subject: [PATCH 33/41] Update go.mod --- transports/websocket/go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transports/websocket/go.mod b/transports/websocket/go.mod index 2c1362c..4cc4f8c 100644 --- a/transports/websocket/go.mod +++ b/transports/websocket/go.mod @@ -1,3 +1,3 @@ -module websocket +module github.com/biter777/viz-go-lib/transports/websocket go 1.19 From f4bf2bd68788f813a78fcad1ff56745bb8f4bab9 Mon Sep 17 00:00:00 2001 From: biter777 <33280398+biter777@users.noreply.github.com> Date: Sun, 28 May 2023 12:16:58 +0300 Subject: [PATCH 34/41] Update go.mod --- transports/http/go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transports/http/go.mod b/transports/http/go.mod index 2cec105..1fab01a 100644 --- a/transports/http/go.mod +++ b/transports/http/go.mod @@ -1,3 +1,3 @@ -module github.com/biter777/viz-go-lib/http +module github.com/biter777/viz-go-lib/transports/http go 1.19 From ec6e35cb07612655b7c24ad5032410b27a750cfc Mon Sep 17 00:00:00 2001 From: biter777 <33280398+biter777@users.noreply.github.com> Date: Sun, 28 May 2023 12:17:25 +0300 Subject: [PATCH 35/41] Update go.mod --- transactions/rfc6979/go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transactions/rfc6979/go.mod b/transactions/rfc6979/go.mod index 5ada19d..517a2b6 100644 --- a/transactions/rfc6979/go.mod +++ b/transactions/rfc6979/go.mod @@ -1,3 +1,3 @@ -module github.com/biter777/viz-go-lib/rfc6979 +module github.com/biter777/viz-go-lib/transactions/rfc6979 go 1.19 From 877622e9c9b33ef66b2972911cf8fa41b3715f74 Mon Sep 17 00:00:00 2001 From: biter777 <33280398+biter777@users.noreply.github.com> Date: Sun, 28 May 2023 12:18:02 +0300 Subject: [PATCH 36/41] Update go.mod --- encoding/wif/go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/encoding/wif/go.mod b/encoding/wif/go.mod index 045e073..8fe498a 100644 --- a/encoding/wif/go.mod +++ b/encoding/wif/go.mod @@ -1,4 +1,4 @@ -module github.com/biter777/viz-go-lib/wif +module github.com/biter777/viz-go-lib/enconding/wif go 1.19 From 1cd45ddf074f1f342266a1907f95c72052c58c3f Mon Sep 17 00:00:00 2001 From: biter777 <33280398+biter777@users.noreply.github.com> Date: Sun, 28 May 2023 12:18:29 +0300 Subject: [PATCH 37/41] Update go.mod --- encoding/transaction/go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/encoding/transaction/go.mod b/encoding/transaction/go.mod index 89fd474..bdb3a0a 100644 --- a/encoding/transaction/go.mod +++ b/encoding/transaction/go.mod @@ -1,4 +1,4 @@ -module github.com/biter777/viz-go-lib/transaction +module github.com/biter777/viz-go-lib/enconding/transaction go 1.19 From aa802ac557e512ef29add3236188dee775f5ad58 Mon Sep 17 00:00:00 2001 From: biter777 <33280398+biter777@users.noreply.github.com> Date: Sun, 28 May 2023 12:18:53 +0300 Subject: [PATCH 38/41] Update go.mod --- api/go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/go.mod b/api/go.mod index 824d30e..4d034db 100644 --- a/api/go.mod +++ b/api/go.mod @@ -1,3 +1,3 @@ -module api +module github.com/biter777/viz-go-lib/api go 1.19 From e8fb104f3c450dbed71413f0c17b75dcf3a1af2b Mon Sep 17 00:00:00 2001 From: biter777 <33280398+biter777@users.noreply.github.com> Date: Sun, 28 May 2023 12:22:35 +0300 Subject: [PATCH 39/41] Update go.mod --- encoding/wif/go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/encoding/wif/go.mod b/encoding/wif/go.mod index 8fe498a..4340bef 100644 --- a/encoding/wif/go.mod +++ b/encoding/wif/go.mod @@ -1,4 +1,4 @@ -module github.com/biter777/viz-go-lib/enconding/wif +module wif go 1.19 From edac22817a8ba0dfbc95d7b69a66cdd9a4a0ad1d Mon Sep 17 00:00:00 2001 From: biter777 <33280398+biter777@users.noreply.github.com> Date: Sun, 28 May 2023 12:33:57 +0300 Subject: [PATCH 40/41] Update go.mod --- encoding/transaction/go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/encoding/transaction/go.mod b/encoding/transaction/go.mod index bdb3a0a..d4e6cd4 100644 --- a/encoding/transaction/go.mod +++ b/encoding/transaction/go.mod @@ -1,4 +1,4 @@ -module github.com/biter777/viz-go-lib/enconding/transaction +module github.com/biter777/viz-go-lib/encoding/transaction go 1.19 From aa9d8ac946f57cb8147f6a4b510d60d4256ca111 Mon Sep 17 00:00:00 2001 From: biter777 <33280398+biter777@users.noreply.github.com> Date: Sun, 28 May 2023 12:34:18 +0300 Subject: [PATCH 41/41] Update go.mod --- encoding/wif/go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/encoding/wif/go.mod b/encoding/wif/go.mod index 4340bef..731408b 100644 --- a/encoding/wif/go.mod +++ b/encoding/wif/go.mod @@ -1,4 +1,4 @@ -module wif +module github.com/biter777/viz-go-lib/encoding/wif go 1.19