Documentation
¶
Overview ¶
Package stellar is the single entry point for everything the platform does on the Stellar network — both classic operations (accounts, trustlines, payments) and Vault smart-contract calls.
Service composes classic.Service and soroban.Service, so one handle covers off-chain and on-chain work. Build it with NewService, passing the RPC client, network passphrase, treasury and admin keys, the Vault contract ID, and the USDC issuer. The package also re-exports the request/response types and sentinel errors from the types package, so callers need only import this one.
The sub-packages hold the implementations: classic for off-chain Stellar ops, soroban for the Vault contract client, rpc for transaction confirmation, types for the shared DTOs and errors, and testing for the RPC mock.
One thing worth knowing up front: child accounts are fully sponsored by the treasury and hold zero XLM. They exist as tracking and audit markers, never hold USDC, and are created without a trustline. See the classic package for the full custody and sponsorship model, and docs/stellar/client.md for the complete reference.
Index ¶
- Variables
- type BorrowRequest
- type BorrowResponse
- type BumpYieldRequest
- type BumpYieldResponse
- type ContractError
- type CreateAccountRequest
- type EstablishTrustlineRequest
- type MultiSigConfig
- type RepayForRequest
- type RepayRequest
- type RepayResponse
- type SendUSDCRequest
- type SendUSDCResponse
- type Service
- type SponsoredPaymentTransactionRequest
- type SponsoredPaymentTransactionResponse
- type VaultStatus
Constants ¶
This section is empty.
Variables ¶
var ( ErrFailedToBuildTransaction = types.ErrFailedToBuildTransaction ErrFailedToSignTransaction = types.ErrFailedToSignTransaction ErrFailedToSubmitTransaction = types.ErrFailedToSubmitTransaction ErrFailedToSignWithSponsorKey = types.ErrFailedToSignWithSponsorKey ErrFailedToConvertTransaction = types.ErrFailedToConvertTransaction ErrFailedToLoadAccount = types.ErrFailedToLoadAccount ErrFailedToConvertCreditAsset = types.ErrFailedToConvertCreditAsset ErrInvalidStellarAddress = types.ErrInvalidStellarAddress ErrInvalidTransactionAmount = types.ErrInvalidTransactionAmount ErrFailedToValidateTrustline = types.ErrFailedToValidateTrustline ErrMissingTrustline = types.ErrMissingTrustline ErrTransactionRejected = types.ErrTransactionRejected ErrTransactionRejectedPermanent = types.ErrTransactionRejectedPermanent ErrStellarCoreOverloaded = types.ErrStellarCoreOverloaded ErrTransactionFailed = types.ErrTransactionFailed ErrTransactionNotSuccessful = types.ErrTransactionNotSuccessful ErrContextCancelled = types.ErrContextCancelled ErrTransactionFailedOnLedger = types.ErrTransactionFailedOnLedger ErrUnknownTransactionStatus = types.ErrUnknownTransactionStatus ErrTransactionTimeout = types.ErrTransactionTimeout ErrFailedToGetTransactionDetails = types.ErrFailedToGetTransactionDetails ErrInvalidContractID = types.ErrInvalidContractID ErrNoSimulationResult = types.ErrNoSimulationResult ErrSimulationFailed = types.ErrSimulationFailed ErrVaultPaused = types.ErrVaultPaused ErrInsufficientBalance = types.ErrInsufficientBalance )
Re-export error variables
var MapContractError = types.MapContractError
Re-export function
Functions ¶
This section is empty.
Types ¶
type BorrowRequest ¶
type BorrowRequest = types.BorrowRequest
Re-export types from the types package for external consumers
type BorrowResponse ¶
type BorrowResponse = types.BorrowResponse
Re-export types from the types package for external consumers
type BumpYieldRequest ¶ added in v1.1.2
type BumpYieldRequest = types.BumpYieldRequest
Re-export types from the types package for external consumers
type BumpYieldResponse ¶ added in v1.1.2
type BumpYieldResponse = types.BumpYieldResponse
Re-export types from the types package for external consumers
type ContractError ¶
type ContractError = types.ContractError
Re-export types from the types package for external consumers
type CreateAccountRequest ¶
type CreateAccountRequest = types.CreateAccountRequest
Re-export types from the types package for external consumers
type EstablishTrustlineRequest ¶ added in v1.0.0
type EstablishTrustlineRequest = types.EstablishTrustlineRequest
Re-export types from the types package for external consumers
type MultiSigConfig ¶
type MultiSigConfig = types.MultiSigConfig
Re-export types from the types package for external consumers
type RepayForRequest ¶ added in v1.1.2
type RepayForRequest = types.RepayForRequest
Re-export types from the types package for external consumers
type RepayRequest ¶
type RepayRequest = types.RepayRequest
Re-export types from the types package for external consumers
type RepayResponse ¶
type RepayResponse = types.RepayResponse
Re-export types from the types package for external consumers
type SendUSDCRequest ¶
type SendUSDCRequest = types.SendUSDCRequest
Re-export types from the types package for external consumers
type SendUSDCResponse ¶
type SendUSDCResponse = types.SendUSDCResponse
Re-export types from the types package for external consumers
type SponsoredPaymentTransactionRequest ¶
type SponsoredPaymentTransactionRequest = types.SponsoredPaymentTransactionRequest
Re-export types from the types package for external consumers
type SponsoredPaymentTransactionResponse ¶
type SponsoredPaymentTransactionResponse = types.SponsoredPaymentTransactionResponse
Re-export types from the types package for external consumers
type VaultStatus ¶
type VaultStatus = types.VaultStatus
Re-export types from the types package for external consumers
Directories
¶
| Path | Synopsis |
|---|---|
|
Package classic holds the platform's non-Soroban Stellar operations: creating accounts, establishing trustlines, and moving USDC.
|
Package classic holds the platform's non-Soroban Stellar operations: creating accounts, establishing trustlines, and moving USDC. |
|
Package rpc waits for a submitted Stellar transaction to be applied to the ledger.
|
Package rpc waits for a submitted Stellar transaction to be applied to the ledger. |
|
Package soroban is the Go client for the Vault smart contract.
|
Package soroban is the Go client for the Vault smart contract. |
|
Package testing provides the shared test doubles for the stellar packages.
|
Package testing provides the shared test doubles for the stellar packages. |
|
Package types holds the request and response DTOs shared across the stellar packages, plus the error values they return.
|
Package types holds the request and response DTOs shared across the stellar packages, plus the error values they return. |