types is now in lbc_sdk repo
This commit is contained in:
parent
a63abd641a
commit
57c40d9f07
4 changed files with 4 additions and 42 deletions
|
|
@ -8,7 +8,7 @@ import (
|
|||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/gregorybednov/lbc/blockchain/types"
|
||||
types "github.com/gregorybednov/lbc_sdk"
|
||||
|
||||
"github.com/dgraph-io/badger"
|
||||
abci "github.com/tendermint/tendermint/abci/types"
|
||||
|
|
|
|||
|
|
@ -1,41 +0,0 @@
|
|||
package types
|
||||
|
||||
// Types subpackage.
|
||||
// You can you use to make an RFC client for abci application.
|
||||
|
||||
type CommiterTxBody struct {
|
||||
Type string `json:"type"`
|
||||
ID string `json:"id"`
|
||||
Name string `json:"name"`
|
||||
CommiterPubKey string `json:"commiter_pubkey"`
|
||||
}
|
||||
|
||||
type PromiseTxBody struct {
|
||||
Type string `json:"type"`
|
||||
ID string `json:"id"`
|
||||
Description string `json:"description"`
|
||||
Timestamp int64 `json:"timestamp,omitempty"` // ← чтобы понимать клиент
|
||||
Title string `json:"title,omitempty"` // ← опционально, если когда-нибудь пригодится
|
||||
Deadline string `json:"deadline,omitempty"`
|
||||
}
|
||||
|
||||
type CommitmentTxBody struct {
|
||||
Type string `json:"type"`
|
||||
ID string `json:"id"`
|
||||
PromiseID string `json:"promise_id"`
|
||||
CommiterID string `json:"commiter_id"`
|
||||
CommiterSig string `json:"commiter_sig,omitempty"`
|
||||
}
|
||||
|
||||
type CompoundTx struct {
|
||||
Body struct {
|
||||
Promise *PromiseTxBody `json:"promise"`
|
||||
Commitment *CommitmentTxBody `json:"commitment"`
|
||||
} `json:"body"`
|
||||
Signature string `json:"signature"`
|
||||
}
|
||||
|
||||
type SignedTx struct {
|
||||
Body any `json:"body"`
|
||||
Signature string `json:"signature"`
|
||||
}
|
||||
1
go.mod
1
go.mod
|
|
@ -68,6 +68,7 @@ require (
|
|||
github.com/google/orderedcode v0.0.1 // indirect
|
||||
github.com/google/pprof v0.0.0-20241017200806-017d972448fc // indirect
|
||||
github.com/gorilla/websocket v1.5.3 // indirect
|
||||
github.com/gregorybednov/lbc_sdk v0.0.0-20250810102513-432a51e65f76 // indirect
|
||||
github.com/gtank/merlin v0.1.1 // indirect
|
||||
github.com/hashicorp/hcl v1.0.0 // indirect
|
||||
github.com/hjson/hjson-go/v4 v4.4.0 // indirect
|
||||
|
|
|
|||
2
go.sum
2
go.sum
|
|
@ -195,6 +195,8 @@ github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
|
|||
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg=
|
||||
github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
|
||||
github.com/gregorybednov/lbc_sdk v0.0.0-20250810102513-432a51e65f76 h1:e3A+1v+Mjt8nuJcVnHuhHZuh4052KRLCUBpH4g74rVs=
|
||||
github.com/gregorybednov/lbc_sdk v0.0.0-20250810102513-432a51e65f76/go.mod h1:DBE00+SaYBtD4qw+nOtSTLuF6h9Ia4TkuBMJB+6krik=
|
||||
github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw=
|
||||
github.com/gtank/merlin v0.1.1 h1:eQ90iG7K9pOhtereWsmyRJ6RAwcP4tHTDBHXNg+u5is=
|
||||
github.com/gtank/merlin v0.1.1/go.mod h1:T86dnYJhcGOh5BjZFCJWTDeTK7XW8uE+E21Cy/bIQ+s=
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue