Documentation
¶
Index ¶
- Constants
- func Deserialize(stream string, into *ProxyCall) error
- func GetNonceTransaction(client *rpc.Client, account common.Address, blockNumber *big.Int) (uint64, error)
- func IsWritable(path string) (isWritable bool, err error)
- func NewHttpRpc(endpoint string) (*rpcApi, error)
- func NewKafkaClient(brokers []string, topic string, procCallBack func(message kafka.Message) bool) *kafkaClient
- func PublishTransaction(client *rpc.Client, tx *types.Transaction) error
- func TransactionReceipt(client *rpc.Client, txHash common.Hash) (*types.Receipt, error)
- type Account
- func (g *Account) Account() accounts.Account
- func (g *Account) Import(path string) error
- func (g *Account) SignTx(tx *types.Transaction, chainID *big.Int) (*types.Transaction, error)
- func (g *Account) SignTxWithPassphrase(tx *types.Transaction, passphrase string, chainID *big.Int) (*types.Transaction, error)
- type Config
- type DB
- type MiddleBooks
- type Proxy
- type ProxyCall
- type ProxyCallGuid
- type ProxyInfo
- type Scanner
Constants ¶
View Source
const ( FromBegining = -2 ToEnd = -1 )
View Source
const GovernanceAddress = "0xe10f734218c24be1d64864c25f3ae2f1d45ceda8"
테스트용 Account Address.
Variables ¶
This section is empty.
Functions ¶
func Deserialize ¶
func GetNonceTransaction ¶
func GetNonceTransaction(client *rpc.Client, account common.Address, blockNumber *big.Int) (uint64, error)
blockchain, pending area에서 nonce 값을 비교하여 큰 값을 가져 온다. todo 이 함수도 ethclient.go에 비슷한 기능이 함수가 있음
func IsWritable ¶
func NewHttpRpc ¶
ex) NewHttpRpc("http://192.168.0.15:8541")
func NewKafkaClient ¶
func NewKafkaClient(brokers []string, topic string, procCallBack func(message kafka.Message) bool) *kafkaClient
변수 초기화.
func PublishTransaction ¶
func PublishTransaction(client *rpc.Client, tx *types.Transaction) error
todo 이 함수도 ethclient.go에 비슷한 기능이 함수가 있음
Types ¶
type Account ¶
type Account struct {
// contains filtered or unexported fields
}
func NewImportAccount ¶
func NewImportAccount() *Account
func (*Account) Import ¶
Account private key가 keystore import 한다. ex) /node/keystore/UTC--2020-11..... 일 경우, Import("/node")
func (*Account) SignTx ¶
func (g *Account) SignTx(tx *types.Transaction, chainID *big.Int) (*types.Transaction, error)
Account 계정으로 Tx를 sign 한다.
func (*Account) SignTxWithPassphrase ¶
func (g *Account) SignTxWithPassphrase(tx *types.Transaction, passphrase string, chainID *big.Int) (*types.Transaction, error)
Account 계정으로 Tx를 sign한다. 패스워드 값필요.
type Config ¶
func LoadConfigFile ¶
type MiddleBooks ¶
type MiddleBooks struct {
// contains filtered or unexported fields
}
func NewMiddleBooks ¶
func NewMiddleBooks() *MiddleBooks
func (*MiddleBooks) Create ¶
func (m *MiddleBooks) Create(id string) (accounts.Account, error)
H/L의 계정(id)에 매칭되는 Reapchain 계정을 생성. 생성 후, 장부(Books)에 기록함.
func (*MiddleBooks) CreateMiddleBooks ¶
func (m *MiddleBooks) CreateMiddleBooks(path string) error
H/L의 계정을 이용하여 랜덤계정을 생성, private key들을 저장할 서버 디렉토리 지정한다.
type ProxyCall ¶
type ProxyCallGuid ¶
type ProxyCallGuid struct {
Category string `json:"category"` //iot|did|...
}
Click to show internal directories.
Click to hide internal directories.