token_admin_registry

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 = "TokenAdminRegistry"

ContractType labels TokenAdminRegistry.

Variables

View Source
var AcceptAdminRole = cldfops.NewOperation(
	"token-admin-registry:accept-admin-role",
	stellarops.ContractDeploymentVersion,
	"Accepts administrator role for a token in TokenAdminRegistry",
	func(b cldfops.Bundle, d stellardeps.StellarDeps, in AcceptAdminRoleInput) (stellarops.Void, error) {
		c := tarbindings.NewTokenAdminRegistryClient(d.Invoker, in.ContractID)
		if err := c.AcceptAdminRole(b.GetContext(), in.LocalToken); err != nil {
			return stellarops.Void{}, err
		}
		return stellarops.Void{}, nil
	},
)

AcceptAdminRole calls `accept_admin_role`.

View Source
var AcceptOwnership = cldfops.NewOperation(
	"token-admin-registry:accept-ownership",
	stellarops.ContractDeploymentVersion,
	"Accepts TokenAdminRegistry ownership after transfer_ownership",
	func(b cldfops.Bundle, d stellardeps.StellarDeps, in AcceptOwnershipInput) (stellarops.Void, error) {
		c := tarbindings.NewTokenAdminRegistryClient(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 TokenAdminRegistry.

View Source
var Deploy = stellarops.NewDeployOperation("token-admin-registry:deploy", "Deploys the TokenAdminRegistry Soroban contract from WASM")

Deploy uploads token_admin_registry.wasm.

View Source
var Initialize = cldfops.NewOperation(
	"token-admin-registry:initialize",
	stellarops.ContractDeploymentVersion,
	"Initializes TokenAdminRegistry with owner",
	func(b cldfops.Bundle, d stellardeps.StellarDeps, in InitializeInput) (stellarops.Void, error) {
		c := tarbindings.NewTokenAdminRegistryClient(d.Invoker, in.ContractID)
		if err := c.Initialize(b.GetContext(), in.Owner); err != nil {
			return stellarops.Void{}, err
		}
		return stellarops.Void{}, nil
	},
)

Initialize calls TokenAdminRegistry `initialize`.

View Source
var ProposeAdministrator = cldfops.NewOperation(
	"token-admin-registry:propose-administrator",
	stellarops.ContractDeploymentVersion,
	"Proposes a token administrator in TokenAdminRegistry",
	func(b cldfops.Bundle, d stellardeps.StellarDeps, in ProposeAdministratorInput) (stellarops.Void, error) {
		c := tarbindings.NewTokenAdminRegistryClient(d.Invoker, in.ContractID)
		if err := c.ProposeAdministrator(b.GetContext(), in.Caller, in.LocalToken, in.Administrator); err != nil {
			return stellarops.Void{}, err
		}
		return stellarops.Void{}, nil
	},
)

ProposeAdministrator calls `propose_administrator`.

View Source
var SetPool = cldfops.NewOperation(
	"token-admin-registry:set-pool",
	stellarops.ContractDeploymentVersion,
	"Sets the default pool for a token in TokenAdminRegistry",
	func(b cldfops.Bundle, d stellardeps.StellarDeps, in SetPoolInput) (stellarops.Void, error) {
		c := tarbindings.NewTokenAdminRegistryClient(d.Invoker, in.ContractID)
		if err := c.SetPool(b.GetContext(), in.LocalToken, in.Pool); err != nil {
			return stellarops.Void{}, err
		}
		return stellarops.Void{}, nil
	},
)

SetPool calls `set_pool`.

View Source
var TransferOwnership = cldfops.NewOperation(
	"token-admin-registry:transfer-ownership",
	stellarops.ContractDeploymentVersion,
	"Transfers TokenAdminRegistry ownership to a pending new owner",
	func(b cldfops.Bundle, d stellardeps.StellarDeps, in TransferOwnershipInput) (stellarops.Void, error) {
		c := tarbindings.NewTokenAdminRegistryClient(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 TokenAdminRegistry.

Functions

This section is empty.

Types

type AcceptAdminRoleInput

type AcceptAdminRoleInput struct {
	ContractID string `json:"contract_id"`
	LocalToken string `json:"local_token"`
}

AcceptAdminRoleInput accepts the proposed admin role for a token.

type AcceptOwnershipInput

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

AcceptOwnershipInput completes two-step ownership transfer for the caller.

type InitializeInput

type InitializeInput struct {
	ContractID string `json:"contract_id"`
	Owner      string `json:"owner"`
}

InitializeInput sets registry owner.

type ProposeAdministratorInput

type ProposeAdministratorInput struct {
	ContractID    string `json:"contract_id"`
	Caller        string `json:"caller"`
	LocalToken    string `json:"local_token"`
	Administrator string `json:"administrator"`
}

ProposeAdministratorInput proposes a token administrator.

type SetPoolInput

type SetPoolInput struct {
	ContractID string  `json:"contract_id"`
	LocalToken string  `json:"local_token"`
	Pool       *string `json:"pool,omitempty"`
}

SetPoolInput registers the default pool for a token.

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