Documentation ¶
Index ¶
- type GrpcServer
- func (s *GrpcServer) AddPeer(ctx context.Context, req *pb.AddPeerRequest) (*pb.AddPeerResponse, error)
- func (s *GrpcServer) BlockPeer(ctx context.Context, req *pb.BlockPeerRequest) (*pb.BlockPeerResponse, error)
- func (s *GrpcServer) ChangeWalletPassphrase(ctx context.Context, req *pb.ChangeWalletPassphraseRequest) (*pb.ChangeWalletPassphraseResponse, error)
- func (s *GrpcServer) Close()
- func (s *GrpcServer) CreateMultiSignature(ctx context.Context, req *pb.CreateMultiSignatureRequest) (*pb.CreateMultiSignatureResponse, error)
- func (s *GrpcServer) CreateMultisigAddress(ctx context.Context, req *pb.CreateMultisigAddressRequest) (*pb.CreateMultisigAddressResponse, error)
- func (s *GrpcServer) CreateMultisigSpendKeypair(ctx context.Context, req *pb.CreateMultisigSpendKeypairRequest) (*pb.CreateMultisigSpendKeypairResponse, error)
- func (s *GrpcServer) CreateMultisigViewKeypair(ctx context.Context, req *pb.CreateMultisigViewKeypairRequest) (*pb.CreateMultisigViewKeypairResponse, error)
- func (s *GrpcServer) CreateRawStakeTransaction(ctx context.Context, req *pb.CreateRawStakeTransactionRequest) (*pb.CreateRawStakeTransactionResponse, error)
- func (s *GrpcServer) CreateRawTransaction(ctx context.Context, req *pb.CreateRawTransactionRequest) (*pb.CreateRawTransactionResponse, error)
- func (s *GrpcServer) DeletePrivateKeys(ctx context.Context, req *pb.DeletePrivateKeysRequest) (*pb.DeletePrivateKeysResponse, error)
- func (s *GrpcServer) GetAccumulatorCheckpoint(ctx context.Context, req *pb.GetAccumulatorCheckpointRequest) (*pb.GetAccumulatorCheckpointResponse, error)
- func (s *GrpcServer) GetAddress(ctx context.Context, req *pb.GetAddressRequest) (*pb.GetAddressResponse, error)
- func (s *GrpcServer) GetAddressInfo(ctx context.Context, req *pb.GetAddressInfoRequest) (*pb.GetAddressInfoResponse, error)
- func (s *GrpcServer) GetAddresses(ctx context.Context, req *pb.GetAddressesRequest) (*pb.GetAddressesResponse, error)
- func (s *GrpcServer) GetBalance(ctx context.Context, req *pb.GetBalanceRequest) (*pb.GetBalanceResponse, error)
- func (s *GrpcServer) GetBlock(ctx context.Context, req *pb.GetBlockRequest) (*pb.GetBlockResponse, error)
- func (s *GrpcServer) GetBlockInfo(ctx context.Context, req *pb.GetBlockInfoRequest) (*pb.GetBlockInfoResponse, error)
- func (s *GrpcServer) GetBlockSizeSoftLimit(ctx context.Context, req *pb.GetBlockSizeSoftLimitRequest) (*pb.GetBlockSizeSoftLimitResponse, error)
- func (s *GrpcServer) GetBlockchainInfo(ctx context.Context, req *pb.GetBlockchainInfoRequest) (*pb.GetBlockchainInfoResponse, error)
- func (s *GrpcServer) GetCompressedBlock(ctx context.Context, req *pb.GetCompressedBlockRequest) (*pb.GetCompressedBlockResponse, error)
- func (s *GrpcServer) GetCompressedBlocks(ctx context.Context, req *pb.GetCompressedBlocksRequest) (*pb.GetCompressedBlocksResponse, error)
- func (s *GrpcServer) GetHeaders(ctx context.Context, req *pb.GetHeadersRequest) (*pb.GetHeadersResponse, error)
- func (s *GrpcServer) GetHostInfo(ctx context.Context, req *pb.GetHostInfoRequest) (*pb.GetHostInfoResponse, error)
- func (s *GrpcServer) GetMempool(ctx context.Context, req *pb.GetMempoolRequest) (*pb.GetMempoolResponse, error)
- func (s *GrpcServer) GetMempoolInfo(ctx context.Context, req *pb.GetMempoolInfoRequest) (*pb.GetMempoolInfoResponse, error)
- func (s *GrpcServer) GetMerkleProof(ctx context.Context, req *pb.GetMerkleProofRequest) (*pb.GetMerkleProofResponse, error)
- func (s *GrpcServer) GetMinFeePerKilobyte(ctx context.Context, req *pb.GetMinFeePerKilobyteRequest) (*pb.GetMinFeePerKilobyteResponse, error)
- func (s *GrpcServer) GetMinStake(ctx context.Context, req *pb.GetMinStakeRequest) (*pb.GetMinStakeResponse, error)
- func (s *GrpcServer) GetNetworkKey(ctx context.Context, req *pb.GetNetworkKeyRequest) (*pb.GetNetworkKeyResponse, error)
- func (s *GrpcServer) GetNewAddress(ctx context.Context, req *pb.GetNewAddressRequest) (*pb.GetNewAddressResponse, error)
- func (s *GrpcServer) GetPeers(ctx context.Context, req *pb.GetPeersRequest) (*pb.GetPeersResponse, error)
- func (s *GrpcServer) GetPrivateKey(ctx context.Context, req *pb.GetPrivateKeyRequest) (*pb.GetPrivateKeyResponse, error)
- func (s *GrpcServer) GetTimelockedAddress(ctx context.Context, req *pb.GetTimelockedAddressRequest) (*pb.GetTimelockedAddressResponse, error)
- func (s *GrpcServer) GetTransaction(ctx context.Context, req *pb.GetTransactionRequest) (*pb.GetTransactionResponse, error)
- func (s *GrpcServer) GetTransactions(ctx context.Context, req *pb.GetTransactionsRequest) (*pb.GetTransactionsResponse, error)
- func (s *GrpcServer) GetTreasuryWhitelist(ctx context.Context, req *pb.GetTreasuryWhitelistRequest) (*pb.GetTreasuryWhitelistResponse, error)
- func (s *GrpcServer) GetTxoProof(ctx context.Context, req *pb.GetTxoProofRequest) (*pb.GetTxoProofResponse, error)
- func (s *GrpcServer) GetUtxos(ctx context.Context, req *pb.GetUtxosRequest) (*pb.GetUtxosResponse, error)
- func (s *GrpcServer) GetValidator(ctx context.Context, req *pb.GetValidatorRequest) (*pb.GetValidatorResponse, error)
- func (s *GrpcServer) GetValidatorSet(ctx context.Context, req *pb.GetValidatorSetRequest) (*pb.GetValidatorSetResponse, error)
- func (s *GrpcServer) GetValidatorSetInfo(ctx context.Context, req *pb.GetValidatorSetInfoRequest) (*pb.GetValidatorSetInfoResponse, error)
- func (s *GrpcServer) GetWalletSeed(ctx context.Context, req *pb.GetWalletSeedRequest) (*pb.GetWalletSeedResponse, error)
- func (s *GrpcServer) GetWalletTransactions(ctx context.Context, req *pb.GetWalletTransactionsRequest) (*pb.GetWalletTransactionsResponse, error)
- func (s *GrpcServer) ImportAddress(ctx context.Context, req *pb.ImportAddressRequest) (*pb.ImportAddressResponse, error)
- func (s *GrpcServer) ProveMultisig(ctx context.Context, req *pb.ProveMultisigRequest) (*pb.ProveMultisigResponse, error)
- func (s *GrpcServer) ProveRawTransaction(ctx context.Context, req *pb.ProveRawTransactionRequest) (*pb.ProveRawTransactionResponse, error)
- func (s *GrpcServer) RecomputeChainState(ctx context.Context, req *pb.RecomputeChainStateRequest) (*pb.RecomputeChainStateResponse, error)
- func (s *GrpcServer) ReconsiderBlock(ctx context.Context, req *pb.ReconsiderBlockRequest) (*pb.ReconsiderBlockResponse, error)
- func (s *GrpcServer) RegisterViewKey(ctx context.Context, req *pb.RegisterViewKeyRequest) (*pb.RegisterViewKeyResponse, error)
- func (s *GrpcServer) SetAutoStakeRewards(ctx context.Context, req *pb.SetAutoStakeRewardsRequest) (*pb.SetAutoStakeRewardsResponse, error)
- func (s *GrpcServer) SetBlockSizeSoftLimit(ctx context.Context, req *pb.SetBlockSizeSoftLimitRequest) (*pb.SetBlockSizeSoftLimitResponse, error)
- func (s *GrpcServer) SetLogLevel(ctx context.Context, req *pb.SetLogLevelRequest) (*pb.SetLogLevelResponse, error)
- func (s *GrpcServer) SetMinFeePerKilobyte(ctx context.Context, req *pb.SetMinFeePerKilobyteRequest) (*pb.SetMinFeePerKilobyteResponse, error)
- func (s *GrpcServer) SetMinStake(ctx context.Context, req *pb.SetMinStakeRequest) (*pb.SetMinStakeResponse, error)
- func (s *GrpcServer) SetWalletPassphrase(ctx context.Context, req *pb.SetWalletPassphraseRequest) (*pb.SetWalletPassphraseResponse, error)
- func (s *GrpcServer) Spend(ctx context.Context, req *pb.SpendRequest) (*pb.SpendResponse, error)
- func (s *GrpcServer) Stake(ctx context.Context, req *pb.StakeRequest) (*pb.StakeResponse, error)
- func (s *GrpcServer) SubmitTransaction(ctx context.Context, req *pb.SubmitTransactionRequest) (*pb.SubmitTransactionResponse, error)
- func (s *GrpcServer) SubscribeBlocks(req *pb.SubscribeBlocksRequest, ...) error
- func (s *GrpcServer) SubscribeCompressedBlocks(req *pb.SubscribeCompressedBlocksRequest, ...) error
- func (s *GrpcServer) SubscribeTransactions(req *pb.SubscribeTransactionsRequest, ...) error
- func (s *GrpcServer) SweepWallet(ctx context.Context, req *pb.SweepWalletRequest) (*pb.SweepWalletResponse, error)
- func (s *GrpcServer) TimelockCoins(ctx context.Context, req *pb.TimelockCoinsRequest) (*pb.TimelockCoinsResponse, error)
- func (s *GrpcServer) UnblockPeer(ctx context.Context, req *pb.UnblockPeerRequest) (*pb.UnblockPeerResponse, error)
- func (s *GrpcServer) UpdateTreasuryWhitelist(ctx context.Context, req *pb.UpdateTreasuryWhitelistRequest) (*pb.UpdateTreasuryWhitelistResponse, error)
- func (s *GrpcServer) WalletLock(ctx context.Context, req *pb.WalletLockRequest) (*pb.WalletLockResponse, error)
- func (s *GrpcServer) WalletUnlock(ctx context.Context, req *pb.WalletUnlockRequest) (*pb.WalletUnlockResponse, error)
- type GrpcServerConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GrpcServer ¶
type GrpcServer struct { pb.UnimplementedBlockchainServiceServer pb.UnimplementedNodeServiceServer pb.UnimplementedWalletServiceServer pb.UnimplementedWalletServerServiceServer // contains filtered or unexported fields }
GrpcServer is the gRPC server implementation. It holds all the objects necessary to serve the RPCs and implements the ilxdrpc.proto interface.
func NewGrpcServer ¶
func NewGrpcServer(cfg *GrpcServerConfig) *GrpcServer
NewGrpcServer returns a new GrpcServer which has not yet be started.
func (*GrpcServer) AddPeer ¶
func (s *GrpcServer) AddPeer(ctx context.Context, req *pb.AddPeerRequest) (*pb.AddPeerResponse, error)
AddPeer attempts to connect to the provided peer
func (*GrpcServer) BlockPeer ¶
func (s *GrpcServer) BlockPeer(ctx context.Context, req *pb.BlockPeerRequest) (*pb.BlockPeerResponse, error)
BlockPeer blocks the given peer for the provided time period
func (*GrpcServer) ChangeWalletPassphrase ¶
func (s *GrpcServer) ChangeWalletPassphrase(ctx context.Context, req *pb.ChangeWalletPassphraseRequest) (*pb.ChangeWalletPassphraseResponse, error)
ChangeWalletPassphrase changes the passphrase used to encrypt the wallet private keys
func (*GrpcServer) Close ¶
func (s *GrpcServer) Close()
func (*GrpcServer) CreateMultiSignature ¶
func (s *GrpcServer) CreateMultiSignature(ctx context.Context, req *pb.CreateMultiSignatureRequest) (*pb.CreateMultiSignatureResponse, error)
CreateMultiSignature generates and returns a signature for use when proving a multisig transaction
func (*GrpcServer) CreateMultisigAddress ¶
func (s *GrpcServer) CreateMultisigAddress(ctx context.Context, req *pb.CreateMultisigAddressRequest) (*pb.CreateMultisigAddressResponse, error)
CreateMultisigAddress generates a new multisig address using the provided public keys
Note this address is *not* imported. You will need to call `ImportAddress` if you want to watch it.
func (*GrpcServer) CreateMultisigSpendKeypair ¶
func (s *GrpcServer) CreateMultisigSpendKeypair(ctx context.Context, req *pb.CreateMultisigSpendKeypairRequest) (*pb.CreateMultisigSpendKeypairResponse, error)
CreateMultisigSpendKeypair generates a spend keypair for use in a multisig address
func (*GrpcServer) CreateMultisigViewKeypair ¶
func (s *GrpcServer) CreateMultisigViewKeypair(ctx context.Context, req *pb.CreateMultisigViewKeypairRequest) (*pb.CreateMultisigViewKeypairResponse, error)
CreateMultisigViewKeypair generates a view keypair for use in a multisig address
func (*GrpcServer) CreateRawStakeTransaction ¶
func (s *GrpcServer) CreateRawStakeTransaction(ctx context.Context, req *pb.CreateRawStakeTransactionRequest) (*pb.CreateRawStakeTransactionResponse, error)
CreateRawStakeTransaction creates a new, unsigned (unproven) stake transaction using the given parameters
func (*GrpcServer) CreateRawTransaction ¶
func (s *GrpcServer) CreateRawTransaction(ctx context.Context, req *pb.CreateRawTransactionRequest) (*pb.CreateRawTransactionResponse, error)
CreateRawTransaction creates a new, unsigned (unproven) transaction using the given parameters
func (*GrpcServer) DeletePrivateKeys ¶
func (s *GrpcServer) DeletePrivateKeys(ctx context.Context, req *pb.DeletePrivateKeysRequest) (*pb.DeletePrivateKeysResponse, error)
DeletePrivateKeys deletes the wallet's private keys and seed from disk essentially turning the wallet into a watch-only wallet. It will still record incoming transactions but cannot spend them.
**Requires wallet to be unlocked**
func (*GrpcServer) GetAccumulatorCheckpoint ¶
func (s *GrpcServer) GetAccumulatorCheckpoint(ctx context.Context, req *pb.GetAccumulatorCheckpointRequest) (*pb.GetAccumulatorCheckpointResponse, error)
GetAccumulatorCheckpoint returns the accumulator at the requested height.
func (*GrpcServer) GetAddress ¶
func (s *GrpcServer) GetAddress(ctx context.Context, req *pb.GetAddressRequest) (*pb.GetAddressResponse, error)
GetAddress returns the most recent address of the wallet.
func (*GrpcServer) GetAddressInfo ¶
func (s *GrpcServer) GetAddressInfo(ctx context.Context, req *pb.GetAddressInfoRequest) (*pb.GetAddressInfoResponse, error)
GetAddressInfo returns additional metadata about an address.
func (*GrpcServer) GetAddresses ¶
func (s *GrpcServer) GetAddresses(ctx context.Context, req *pb.GetAddressesRequest) (*pb.GetAddressesResponse, error)
GetAddresses returns all the addresses create by the wallet.
func (*GrpcServer) GetBalance ¶
func (s *GrpcServer) GetBalance(ctx context.Context, req *pb.GetBalanceRequest) (*pb.GetBalanceResponse, error)
GetBalance returns the combined balance of all addresses in the wallet
func (*GrpcServer) GetBlock ¶
func (s *GrpcServer) GetBlock(ctx context.Context, req *pb.GetBlockRequest) (*pb.GetBlockResponse, error)
GetBlock returns the detailed data for a block.
func (*GrpcServer) GetBlockInfo ¶
func (s *GrpcServer) GetBlockInfo(ctx context.Context, req *pb.GetBlockInfoRequest) (*pb.GetBlockInfoResponse, error)
GetBlockInfo returns a BlockHeader plus some extra metadata.
func (*GrpcServer) GetBlockSizeSoftLimit ¶
func (s *GrpcServer) GetBlockSizeSoftLimit(ctx context.Context, req *pb.GetBlockSizeSoftLimitRequest) (*pb.GetBlockSizeSoftLimitResponse, error)
GetBlockSizeSoftLimit returns the node's current blocksize soft limit.
func (*GrpcServer) GetBlockchainInfo ¶
func (s *GrpcServer) GetBlockchainInfo(ctx context.Context, req *pb.GetBlockchainInfoRequest) (*pb.GetBlockchainInfoResponse, error)
GetBlockchainInfo returns data about the blockchain including the most recent block hash and height.
func (*GrpcServer) GetCompressedBlock ¶
func (s *GrpcServer) GetCompressedBlock(ctx context.Context, req *pb.GetCompressedBlockRequest) (*pb.GetCompressedBlockResponse, error)
GetCompressedBlock returns a block that is stripped down to just the outputs.
func (*GrpcServer) GetCompressedBlocks ¶
func (s *GrpcServer) GetCompressedBlocks(ctx context.Context, req *pb.GetCompressedBlocksRequest) (*pb.GetCompressedBlocksResponse, error)
GetCompressedBlocks returns a batch of CompressedBlocks according to the request parameters.
func (*GrpcServer) GetHeaders ¶
func (s *GrpcServer) GetHeaders(ctx context.Context, req *pb.GetHeadersRequest) (*pb.GetHeadersResponse, error)
GetHeaders returns a batch of headers according to the request parameters.
func (*GrpcServer) GetHostInfo ¶
func (s *GrpcServer) GetHostInfo(ctx context.Context, req *pb.GetHostInfoRequest) (*pb.GetHostInfoResponse, error)
GetHostInfo returns info about the libp2p host
func (*GrpcServer) GetMempool ¶
func (s *GrpcServer) GetMempool(ctx context.Context, req *pb.GetMempoolRequest) (*pb.GetMempoolResponse, error)
GetMempool returns all the transactions in the mempool
func (*GrpcServer) GetMempoolInfo ¶
func (s *GrpcServer) GetMempoolInfo(ctx context.Context, req *pb.GetMempoolInfoRequest) (*pb.GetMempoolInfoResponse, error)
GetMempoolInfo returns the state of the current mempool
func (*GrpcServer) GetMerkleProof ¶
func (s *GrpcServer) GetMerkleProof(ctx context.Context, req *pb.GetMerkleProofRequest) (*pb.GetMerkleProofResponse, error)
GetMerkleProof returns a Merkle (SPV) proof for a specific transaction in the provided block.
func (*GrpcServer) GetMinFeePerKilobyte ¶
func (s *GrpcServer) GetMinFeePerKilobyte(ctx context.Context, req *pb.GetMinFeePerKilobyteRequest) (*pb.GetMinFeePerKilobyteResponse, error)
GetMinFeePerKilobyte returns the node's current minimum transaction fee needed to relay transactions and admit them into the mempool.
func (*GrpcServer) GetMinStake ¶
func (s *GrpcServer) GetMinStake(ctx context.Context, req *pb.GetMinStakeRequest) (*pb.GetMinStakeResponse, error)
GetMinStake returns the node's current minimum stake policy.
func (*GrpcServer) GetNetworkKey ¶
func (s *GrpcServer) GetNetworkKey(ctx context.Context, req *pb.GetNetworkKeyRequest) (*pb.GetNetworkKeyResponse, error)
GetNetworkKey returns the node's network private key
func (*GrpcServer) GetNewAddress ¶
func (s *GrpcServer) GetNewAddress(ctx context.Context, req *pb.GetNewAddressRequest) (*pb.GetNewAddressResponse, error)
GetNewAddress generates a new address and returns it. Both a new spend key and view key will be derived from the mnemonic seed.
func (*GrpcServer) GetPeers ¶
func (s *GrpcServer) GetPeers(ctx context.Context, req *pb.GetPeersRequest) (*pb.GetPeersResponse, error)
GetPeers returns a list of peers that this node is connected to
func (*GrpcServer) GetPrivateKey ¶
func (s *GrpcServer) GetPrivateKey(ctx context.Context, req *pb.GetPrivateKeyRequest) (*pb.GetPrivateKeyResponse, error)
GetPrivateKey returns the serialized spend and view keys for the given address
**Requires wallet to be unlocked**
func (*GrpcServer) GetTimelockedAddress ¶
func (s *GrpcServer) GetTimelockedAddress(ctx context.Context, req *pb.GetTimelockedAddressRequest) (*pb.GetTimelockedAddressResponse, error)
GetTimelockedAddress returns a timelocked address that cannot be spent from until the given timelock has passed. The private key used for this address is the same as the wallet's most recent spend key used in a basic address. This implies the key can be derived from seed, however the wallet will not detect incoming payments to this address unless the timelock is included in the utxo's state field.
func (*GrpcServer) GetTransaction ¶
func (s *GrpcServer) GetTransaction(ctx context.Context, req *pb.GetTransactionRequest) (*pb.GetTransactionResponse, error)
GetTransaction returns the transaction for the given transaction ID.
func (*GrpcServer) GetTransactions ¶
func (s *GrpcServer) GetTransactions(ctx context.Context, req *pb.GetTransactionsRequest) (*pb.GetTransactionsResponse, error)
GetTransactions returns the list of transactions for the wallet
func (*GrpcServer) GetTreasuryWhitelist ¶
func (s *GrpcServer) GetTreasuryWhitelist(ctx context.Context, req *pb.GetTreasuryWhitelistRequest) (*pb.GetTreasuryWhitelistResponse, error)
GetTreasuryWhitelist returns the current treasury whitelist for the node.
func (*GrpcServer) GetTxoProof ¶
func (s *GrpcServer) GetTxoProof(ctx context.Context, req *pb.GetTxoProofRequest) (*pb.GetTxoProofResponse, error)
GetTxoProof returns the merkle inclusion proof for the given commitment. This information is needed by the client to create the zero knowledge proof needed to spend the transaction.
func (*GrpcServer) GetUtxos ¶
func (s *GrpcServer) GetUtxos(ctx context.Context, req *pb.GetUtxosRequest) (*pb.GetUtxosResponse, error)
GetUtxos returns a list of the wallet's current unspent transaction outputs (UTXOs)
func (*GrpcServer) GetValidator ¶
func (s *GrpcServer) GetValidator(ctx context.Context, req *pb.GetValidatorRequest) (*pb.GetValidatorResponse, error)
GetValidator returns all the information about the given validator including number of staked coins.
func (*GrpcServer) GetValidatorSet ¶
func (s *GrpcServer) GetValidatorSet(ctx context.Context, req *pb.GetValidatorSetRequest) (*pb.GetValidatorSetResponse, error)
GetValidatorSet returns all the validators in the current validator set.
func (*GrpcServer) GetValidatorSetInfo ¶
func (s *GrpcServer) GetValidatorSetInfo(ctx context.Context, req *pb.GetValidatorSetInfoRequest) (*pb.GetValidatorSetInfoResponse, error)
GetValidatorSetInfo returns information about the validator set.
func (*GrpcServer) GetWalletSeed ¶
func (s *GrpcServer) GetWalletSeed(ctx context.Context, req *pb.GetWalletSeedRequest) (*pb.GetWalletSeedResponse, error)
GetWalletSeed returns the mnemonic seed for the wallet. If the wallet seed has been deleted via the `DeletePrivateKeys` RPC an error will be returned.
**Requires wallet to be unlocked**
func (*GrpcServer) GetWalletTransactions ¶
func (s *GrpcServer) GetWalletTransactions(ctx context.Context, req *pb.GetWalletTransactionsRequest) (*pb.GetWalletTransactionsResponse, error)
GetWalletTransactions returns a list of transactions for the provided view key.
func (*GrpcServer) ImportAddress ¶
func (s *GrpcServer) ImportAddress(ctx context.Context, req *pb.ImportAddressRequest) (*pb.ImportAddressResponse, error)
ImportAddress imports a watch address into the wallet.
func (*GrpcServer) ProveMultisig ¶
func (s *GrpcServer) ProveMultisig(ctx context.Context, req *pb.ProveMultisigRequest) (*pb.ProveMultisigResponse, error)
ProveMultisig creates a proof for a transaction with a multisig input
func (*GrpcServer) ProveRawTransaction ¶
func (s *GrpcServer) ProveRawTransaction(ctx context.Context, req *pb.ProveRawTransactionRequest) (*pb.ProveRawTransactionResponse, error)
ProveRawTransaction creates the zk-proof for the transaction. Assuming there are no errors, this transaction should be ready for broadcast.
func (*GrpcServer) RecomputeChainState ¶
func (s *GrpcServer) RecomputeChainState(ctx context.Context, req *pb.RecomputeChainStateRequest) (*pb.RecomputeChainStateResponse, error)
RecomputeChainState deletes the accumulator, validator set, and nullifier set and rebuilds them by loading and re-processing all blocks from genesis.
func (*GrpcServer) ReconsiderBlock ¶
func (s *GrpcServer) ReconsiderBlock(ctx context.Context, req *pb.ReconsiderBlockRequest) (*pb.ReconsiderBlockResponse, error)
ReconsiderBlock tries to reprocess the given block
func (*GrpcServer) RegisterViewKey ¶
func (s *GrpcServer) RegisterViewKey(ctx context.Context, req *pb.RegisterViewKeyRequest) (*pb.RegisterViewKeyResponse, error)
RegisterViewKey registers a new view key with the server. The server will use this key when attempting to decrypt each output. If outputs decrypt, they will be indexed so the client can fetch them later.
To free up resources keys will automatically unregister if the wallet has not connected in some time.
func (*GrpcServer) SetAutoStakeRewards ¶
func (s *GrpcServer) SetAutoStakeRewards(ctx context.Context, req *pb.SetAutoStakeRewardsRequest) (*pb.SetAutoStakeRewardsResponse, error)
SetAutoStakeRewards make it such that any validator rewards that are earned are automatically staked
**Requires wallet to be unlocked**
func (*GrpcServer) SetBlockSizeSoftLimit ¶
func (s *GrpcServer) SetBlockSizeSoftLimit(ctx context.Context, req *pb.SetBlockSizeSoftLimitRequest) (*pb.SetBlockSizeSoftLimitResponse, error)
SetBlockSizeSoftLimit sets the node's blocksize soft limit policy.
func (*GrpcServer) SetLogLevel ¶
func (s *GrpcServer) SetLogLevel(ctx context.Context, req *pb.SetLogLevelRequest) (*pb.SetLogLevelResponse, error)
SetLogLevel changes the logging level of the node
func (*GrpcServer) SetMinFeePerKilobyte ¶
func (s *GrpcServer) SetMinFeePerKilobyte(ctx context.Context, req *pb.SetMinFeePerKilobyteRequest) (*pb.SetMinFeePerKilobyteResponse, error)
SetMinFeePerKilobyte sets the node's fee policy
func (*GrpcServer) SetMinStake ¶
func (s *GrpcServer) SetMinStake(ctx context.Context, req *pb.SetMinStakeRequest) (*pb.SetMinStakeResponse, error)
SetMinStake sets the node's minimum stake policy
func (*GrpcServer) SetWalletPassphrase ¶
func (s *GrpcServer) SetWalletPassphrase(ctx context.Context, req *pb.SetWalletPassphraseRequest) (*pb.SetWalletPassphraseResponse, error)
SetWalletPassphrase encrypts the wallet for the first time
func (*GrpcServer) Spend ¶
func (s *GrpcServer) Spend(ctx context.Context, req *pb.SpendRequest) (*pb.SpendResponse, error)
Spend sends coins from the wallet according to the provided parameters
**Requires wallet to be unlocked**
func (*GrpcServer) Stake ¶
func (s *GrpcServer) Stake(ctx context.Context, req *pb.StakeRequest) (*pb.StakeResponse, error)
Stake stakes the selected wallet UTXOs and turns the node into a validator
**Requires wallet to be unlocked**
func (*GrpcServer) SubmitTransaction ¶
func (s *GrpcServer) SubmitTransaction(ctx context.Context, req *pb.SubmitTransactionRequest) (*pb.SubmitTransactionResponse, error)
SubmitTransaction validates a transaction and submits it to the network. An error will be returned if it fails validation.
func (*GrpcServer) SubscribeBlocks ¶
func (s *GrpcServer) SubscribeBlocks(req *pb.SubscribeBlocksRequest, stream pb.BlockchainService_SubscribeBlocksServer) error
SubscribeBlocks returns a stream of notifications when new blocks are finalized and connected to the chain.
func (*GrpcServer) SubscribeCompressedBlocks ¶
func (s *GrpcServer) SubscribeCompressedBlocks(req *pb.SubscribeCompressedBlocksRequest, stream pb.BlockchainService_SubscribeCompressedBlocksServer) error
SubscribeCompressedBlocks returns a stream of CompressedBlock notifications when new blocks are finalized and connected to the chain.
func (*GrpcServer) SubscribeTransactions ¶
func (s *GrpcServer) SubscribeTransactions(req *pb.SubscribeTransactionsRequest, stream pb.WalletServerService_SubscribeTransactionsServer) error
SubscribeTransactions subscribes to a stream of TransactionsNotifications that match to the provided view key.
func (*GrpcServer) SweepWallet ¶
func (s *GrpcServer) SweepWallet(ctx context.Context, req *pb.SweepWalletRequest) (*pb.SweepWalletResponse, error)
SweepWallet sweeps all the coins from this wallet to the provided address. This RPC is provided so that you don't have to try to guess the correct fee to take the wallet's balance down to zero. Here the fee will be subtracted from the total funds.
**Requires wallet to be unlocked**
func (*GrpcServer) TimelockCoins ¶
func (s *GrpcServer) TimelockCoins(ctx context.Context, req *pb.TimelockCoinsRequest) (*pb.TimelockCoinsResponse, error)
TimelockCoins moves coins into a timelocked address using the requested timelock. The internal wallet will be able to spend the coins after the timelock expires and the transaction will be recoverable if the wallet is restored from seed.
This RPC primarily exists to lock coins for staking purposes.
**Requires wallet to be unlocked**
func (*GrpcServer) UnblockPeer ¶
func (s *GrpcServer) UnblockPeer(ctx context.Context, req *pb.UnblockPeerRequest) (*pb.UnblockPeerResponse, error)
UnblockPeer removes a peer from the block list
func (*GrpcServer) UpdateTreasuryWhitelist ¶
func (s *GrpcServer) UpdateTreasuryWhitelist(ctx context.Context, req *pb.UpdateTreasuryWhitelistRequest) (*pb.UpdateTreasuryWhitelistResponse, error)
UpdateTreasuryWhitelist adds or removes a transaction to from the treasury whitelist
func (*GrpcServer) WalletLock ¶
func (s *GrpcServer) WalletLock(ctx context.Context, req *pb.WalletLockRequest) (*pb.WalletLockResponse, error)
WalletLock encrypts the wallet's private keys
func (*GrpcServer) WalletUnlock ¶
func (s *GrpcServer) WalletUnlock(ctx context.Context, req *pb.WalletUnlockRequest) (*pb.WalletUnlockResponse, error)
WalletUnlock decrypts the wallet seed and holds it in memory for the specified period of time
type GrpcServerConfig ¶
type GrpcServerConfig struct { Server *grpc.Server HTTPServer *http.Server Chain *blockchain.Blockchain Network *net.Network Wallet *walletlib.Wallet Policy *policy.Policy BroadcastTxFunc func(tx *transactions.Transaction) error SetLogLevelFunc func(level zapcore.Level) ReindexChainFunc func() error RequestBlockFunc func(blockID types.ID, remotePeer peer.ID) AutoStakeFunc func(bool) error NetworkKeyFunc func() (crypto.PrivKey, error) ChainParams *params.NetworkParams Ds repo.Datastore TxMemPool *mempool.Mempool DisableNodeService bool DisableWalletService bool DisableWalletServer bool TxIndex *indexers.TxIndex WSIndex *indexers.WalletServerIndex }
GrpcServerConfig hols the various objects needed by the GrpcServer to perform its functions.