onramp

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: 4 Imported by: 0

Documentation

Index

Constants

View Source
const ContractType = "OnRamp"

ContractType labels OnRamp.

Variables

View Source
var AcceptOwnership = cldfops.NewOperation(
	"onramp:accept-ownership",
	stellarops.ContractDeploymentVersion,
	"Accepts OnRamp ownership after transfer_ownership",
	func(b cldfops.Bundle, d stellardeps.StellarDeps, in AcceptOwnershipInput) (stellarops.Void, error) {
		c := onrampbindings.NewOnRampClient(d.Invoker, in.ContractID)
		if err := c.AcceptOwnership(b.GetContext()); err != nil {
			return stellarops.Void{}, err
		}
		return stellarops.Void{}, nil
	},
)

AcceptOwnership calls `accept_ownership` on OnRamp.

View Source
var ApplyDestChainConfigUpdates = cldfops.NewOperation(
	"onramp:apply-dest-chain-config-updates",
	stellarops.ContractDeploymentVersion,
	"Applies OnRamp destination chain configuration updates",
	func(b cldfops.Bundle, d stellardeps.StellarDeps, in ApplyDestChainConfigUpdatesInput) (stellarops.Void, error) {
		c := onrampbindings.NewOnRampClient(d.Invoker, in.ContractID)
		if err := c.ApplyDestChainConfigUpdates(b.GetContext(), in.Updates); err != nil {
			return stellarops.Void{}, err
		}
		return stellarops.Void{}, nil
	},
)

ApplyDestChainConfigUpdates calls OnRamp `apply_dest_chain_config_updates`.

View Source
var Deploy = stellarops.NewDeployOperation("onramp:deploy", "Deploys the OnRamp Soroban contract from WASM")

Deploy uploads onramp.wasm.

View Source
var Initialize = cldfops.NewOperation(
	"onramp:initialize",
	stellarops.ContractDeploymentVersion,
	"Initializes OnRamp with owner, static, and dynamic configuration",
	func(b cldfops.Bundle, d stellardeps.StellarDeps, in InitializeInput) (stellarops.Void, error) {
		c := onrampbindings.NewOnRampClient(d.Invoker, in.ContractID)
		if err := c.Initialize(b.GetContext(), in.Owner, in.StaticConfig, in.DynamicConfig); err != nil {
			return stellarops.Void{}, err
		}
		return stellarops.Void{}, nil
	},
)

Initialize calls OnRamp `initialize`.

View Source
var TransferOwnership = cldfops.NewOperation(
	"onramp:transfer-ownership",
	stellarops.ContractDeploymentVersion,
	"Transfers OnRamp ownership to a pending new owner",
	func(b cldfops.Bundle, d stellardeps.StellarDeps, in TransferOwnershipInput) (stellarops.Void, error) {
		c := onrampbindings.NewOnRampClient(d.Invoker, in.ContractID)
		if err := c.TransferOwnership(b.GetContext(), in.NewOwner); err != nil {
			return stellarops.Void{}, err
		}
		return stellarops.Void{}, nil
	},
)

TransferOwnership calls `transfer_ownership` on OnRamp.

Functions

This section is empty.

Types

type AcceptOwnershipInput

type AcceptOwnershipInput struct {
	ContractID string `json:"contract_id"`
}

AcceptOwnershipInput completes two-step ownership transfer for the caller.

type ApplyDestChainConfigUpdatesInput

type ApplyDestChainConfigUpdatesInput struct {
	ContractID string                               `json:"contract_id"`
	Updates    []onrampbindings.DestChainConfigArgs `json:"updates"`
}

ApplyDestChainConfigUpdatesInput applies destination chain configs on OnRamp.

type InitializeInput

type InitializeInput struct {
	ContractID    string                       `json:"contract_id"`
	Owner         string                       `json:"owner"`
	StaticConfig  onrampbindings.StaticConfig  `json:"static_config"`
	DynamicConfig onrampbindings.DynamicConfig `json:"dynamic_config"`
}

InitializeInput configures static and dynamic OnRamp settings.

type TransferOwnershipInput

type TransferOwnershipInput struct {
	ContractID string `json:"contract_id"`
	NewOwner   string `json:"new_owner"`
}

TransferOwnershipInput starts two-step ownership transfer.

Jump to

Keyboard shortcuts

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