Documentation ¶
Index ¶
- Constants
- Variables
- func NewNonceManager(lggr logger.Logger) *nonceManager
- func SetupLocalStarknetNode(t *testing.T) string
- func TestKeys(t *testing.T, count int) (rawkeys [][]byte)
- type ChainTxStore
- type Config
- type KeystoreAdapter
- type NonceManager
- type NonceManagerClient
- type StarkTXM
- type Tx
- type TxManager
- type TxStore
Constants ¶
View Source
const FEE_MARGIN uint64 = 115
View Source
const (
MaxQueueLen = 1000
)
Variables ¶
View Source
var ErrBadAdapterEncoding = errors.New("failed to decode raw signature as adapter signature")
View Source
var ( // seed = 0 keys for starknet-devnet PrivateKeys0Seed = []string{ "0xe3e70682c2094cac629f6fbed82c07cd", "0xf728b4fa42485e3a0a5d2f346baa9455", "0xeb1167b367a9c3787c65c1e582e2e662", "0xf7c1bd874da5e709d4713d60c8a70639", "0xe443df789558867f5ba91faf7a024204", "0x23a7711a8133287637ebdcd9e87a1613", "0x1846d424c17c627923c6612f48268673", "0xfcbd04c340212ef7cca5a5a19e4d6e3c", "0xb4862b21fb97d43588561712e8e5216a", "0x259f4329e6f4590b9a164106cf6a659e", } )
Functions ¶
func NewNonceManager ¶
func SetupLocalStarknetNode ¶
SetupLocalStarknetNode sets up a local starknet node via cli, and returns the url
Types ¶
type ChainTxStore ¶
type ChainTxStore struct {
// contains filtered or unexported fields
}
func NewChainTxStore ¶
func NewChainTxStore() *ChainTxStore
func (*ChainTxStore) Confirm ¶
func (c *ChainTxStore) Confirm(from caigotypes.Hash, hash string) error
func (*ChainTxStore) GetAllInflightCount ¶
func (c *ChainTxStore) GetAllInflightCount() map[caigotypes.Hash]int
func (*ChainTxStore) GetAllUnconfirmed ¶
func (c *ChainTxStore) GetAllUnconfirmed() map[caigotypes.Hash][]string
func (*ChainTxStore) Save ¶
func (c *ChainTxStore) Save(from caigotypes.Hash, nonce *big.Int, hash string) error
type KeystoreAdapter ¶
KeystoreAdapter is a starknet-specific adaption layer to translate between the generic Loop Keystore (bytes) and the type specific caigo Keystore (big.Int)
func NewKeystoreAdapter ¶
func NewKeystoreAdapter(lk loop.Keystore) KeystoreAdapter
NewKeystoreAdapter instantiates the KeystoreAdapter interface The implementation requires that the given [looppKs] produces a signature loop.Keystore.Sign that is []byte representation of adapters.Signature Callers are responsible for ensuring that the given LOOPp Keystore encodes signatures correctly.
type NonceManager ¶
type NonceManager interface { types.Service Register(ctx context.Context, address caigotypes.Hash, chainId string, client NonceManagerClient) error NextSequence(address caigotypes.Hash, chainID string) (*big.Int, error) IncrementNextSequence(address caigotypes.Hash, chainID string, currentNonce *big.Int) error }
type NonceManagerClient ¶
type StarkTXM ¶
type StarkTXM interface { relaytypes.Service TxManager }
type TxManager ¶
type TxManager interface { Enqueue(senderAddress caigotypes.Hash, accountAddress caigotypes.Hash, txFn caigotypes.FunctionCall) error InflightCount() (int, int) }
type TxStore ¶
type TxStore struct {
// contains filtered or unexported fields
}
TxStore tracks broadcast & unconfirmed txs
func NewTxStore ¶
func (*TxStore) GetUnconfirmed ¶
func (*TxStore) InflightCount ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.