stellarutil

package
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 5, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultCommitteeVerifierVersionTag

func DefaultCommitteeVerifierVersionTag() [4]byte

DefaultCommitteeVerifierVersionTag returns the default bytes4 committee verifier version tag used when initializing the Stellar CommitteeVerifier. Matches bytes4(keccak256("CommitteeVerifier 2.0.0")) — same as EVM chains/evm/deployment/v2_0_0/verifier_tags.CommitteeVerifierV2 and ccvs-committee-verifier `DEFAULT_VERIFIER_VERSION_TAG`.

func FilterRemoteSelectors

func FilterRemoteSelectors(selectors []uint64, localSelector uint64) []uint64

FilterRemoteSelectors returns selectors other than 0 and localSelector, deduplicated and sorted.

func FindStellarRoot

func FindStellarRoot() (string, error)

FindStellarRoot locates the chainlink-stellar project root by walking up from CWD looking for go.mod. This works whether the devenv CLI is run from the chainlink-stellar root directly or from a subdirectory.

func GenerateContractAddress

func GenerateContractAddress(name, networkPassphrase string) []byte

GenerateContractAddress returns a deterministic Soroban contract address seed (32 bytes) from a logical name and network passphrase.

func MustGenerateMockContractID

func MustGenerateMockContractID(deployerAddress, contractName string) string

MustGenerateMockContractID returns a deterministic mock contract strkey (C…) for tests/devenv.

func ParseFeeAggregatorAddress

func ParseFeeAggregatorAddress(s string) (string, error)

ParseFeeAggregatorAddress normalizes a fee-aggregator address for Stellar OnRamp, VVR, and CommitteeVerifier. It accepts a Stellar strkey (G… account or C… contract) or 0x-prefixed 32-byte hex (raw address bytes). Hex input is encoded as an account strkey (G…); for a contract fee sink pass the C… strkey explicitly.

func ResolveSignersFromOffchainTopology

func ResolveSignersFromOffchainTopology(topology *offchain.EnvironmentTopology, sourceChainSelector uint64, preferredFamily string) ([][32]byte, uint32)

ResolveSignersFromOffchainTopology is the same as ResolveSignersFromTopology but uses the chainlink-ccip offchain topology type carried on DeployChainContractsInput.

func ResolveSignersFromTopology

func ResolveSignersFromTopology(topology *ccvdeployment.EnvironmentTopology, sourceChainSelector uint64, preferredFamily string) ([][32]byte, uint32)

ResolveSignersFromTopology extracts signer addresses and threshold for a given source chain selector from the environment topology.

Committee verifier contracts store 20-byte ETH-style ECDSA addresses, left-padded to 32 bytes on Soroban. Topology may record those under chainsel.FamilyEVM and/or chainsel.FamilyStellar (devenv enriches NOPs per impl factory family).

preferredFamily is tried first for each NOP (e.g. chainsel.FamilyStellar when the source lane is Stellar), then chainsel.FamilyEVM, then chainsel.FamilyStellar, without duplicates.

func StrkeyToHex

func StrkeyToHex(addr string) (string, error)

StrkeyToHex decodes a strkey address (C… contract or G… account) to a 0x-prefixed hex string.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL