{"modulePath":"github.com/keep-network/keep-ecdsa","version":"v1.8.2","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package node\n\nPackage node defines a node executing the TSS protocol.\n\n## Types\n\n```go\ntype Node struct {\n\t// contains filtered or unexported fields\n}\n```\nNode holds interfaces to interact with the blockchain and network messages transport layer.\n\n```go\nfunc NewNode(\n\tchain chain.Handle,\n\tnetworkProvider net.Provider,\n\ttssConfig *tss.Config,\n) *Node\n```\nNewNode initializes node struct with provided chain interface and network provider. It also initializes TSS Pre-Parameters pool. But does not start parameters generation. This should be called separately.\n\n```go\nfunc (n *Node) AnnounceSignerPresence(\n\tctx context.Context,\n\toperatorPublicKey *operator.PublicKey,\n\tkeepID chain.ID,\n\tkeepMemberIDs []chain.ID,\n) ([]tss.MemberID, error)\n```\nAnnounceSignerPresence triggers the announce protocol in order to signal signer presence and gather information about other signers.\n\n```go\nfunc (n *Node) CalculateSignature(\n\tctx context.Context,\n\tkeep chain.BondedECDSAKeepHandle,\n\tsigner *tss.ThresholdSigner,\n\tdigest [32]byte,\n) error\n```\nCalculateSignature calculates a signature over a digest with threshold signer and publishes the result to the keep associated with the signer.\n\nThe attempt for generating and publishing signature is retried on failure until the provided context is done.\n\n```go\nfunc (n *Node) GenerateSignerForKeep(\n\tctx context.Context,\n\toperatorPublicKey *operator.PublicKey,\n\tkeep chain.BondedECDSAKeepHandle,\n\tmembers []chain.ID,\n\tkeepsRegistry *registry.Keeps,\n) (*tss.ThresholdSigner, error)\n```\nGenerateSignerForKeep generates a new threshold signer with ECDSA key pair and submits the public key to the on-chain keep.\n\nThe attempt for generating signer is retried on failure until the provided context is done.\n\n```go\nfunc (n *Node) InitializeTSSPreParamsPool()\n```\nInitializeTSSPreParamsPool generates TSS pre-parameters and stores them in a pool.\n\n```go\nfunc (n *Node) TSSPreParamsPoolSize() int\n```\nTSSPreParamsPoolSize returns the current size of the TSS params pool.\n\n","path":"github.com/keep-network/keep-ecdsa/pkg/node","name":"node","synopsis":"Package node defines a node executing the TSS protocol.","isRedistributable":true}
