Documentation
¶
Index ¶
- func ValidateSignersWeights(signers []Signer) (int, error)
- type Asset
- type LedgerEntryResult
- type Pagination
- type PaginationLinks
- type RPCGetHealthResult
- type RPCGetLedgerEntriesResult
- type RPCGetTransactionResult
- type RPCGetTransactionsResult
- type RPCPagination
- type RPCParams
- type RPCResourceConfig
- type RPCResponse
- type RPCRestorePreamble
- type RPCSendTransactionResult
- type RPCSimulateHostFunctionResult
- type RPCSimulateStateChange
- type RPCSimulateTransactionResult
- type RPCStatus
- type Signer
- type SignerType
- type Transaction
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateSignersWeights ¶
ValidateSignersWeights will validate:
- all full signers have the same weight
- all partial signers weights are less than the full signer weight
- there's at least one full signer.
Types ¶
type LedgerEntryResult ¶
type LedgerEntryResult struct { KeyXDR string `json:"key,omitempty"` DataXDR string `json:"xdr,omitempty"` LastModifiedLedger uint32 `json:"lastModifiedLedgerSeq"` // The ledger sequence until the entry is live, available for entries that have associated ttl ledger entries. LiveUntilLedgerSeq *uint32 `json:"liveUntilLedgerSeq,omitempty"` }
type Pagination ¶
type Pagination struct {
Links PaginationLinks `json:"_links"`
}
type PaginationLinks ¶
type RPCGetHealthResult ¶
type RPCGetLedgerEntriesResult ¶
type RPCGetLedgerEntriesResult struct { LatestLedger uint32 `json:"latestLedger"` Entries []LedgerEntryResult `json:"entries"` }
type RPCGetTransactionResult ¶
type RPCGetTransactionResult struct { Status RPCStatus `json:"status"` LatestLedger int64 `json:"latestLedger"` LatestLedgerCloseTime string `json:"latestLedgerCloseTime"` OldestLedger int64 `json:"oldestLedger"` OldestLedgerCloseTime string `json:"oldestLedgerCloseTime"` ApplicationOrder int64 `json:"applicationOrder"` Hash string `json:"txHash"` EnvelopeXDR string `json:"envelopeXdr"` ResultXDR string `json:"resultXdr"` ResultMetaXDR string `json:"resultMetaXdr"` Ledger int64 `json:"ledger"` CreatedAt string `json:"createdAt"` ErrorResultXDR string `json:"errorResultXdr"` }
type RPCGetTransactionsResult ¶
type RPCGetTransactionsResult struct { Transactions []Transaction `json:"transactions"` LatestLedger int64 `json:"latestLedger"` LatestLedgerCloseTime int64 `json:"latestLedgerCloseTimestamp"` OldestLedger int64 `json:"oldestLedger"` OldestLedgerCloseTime int64 `json:"oldestLedgerCloseTimestamp"` Cursor string `json:"cursor"` }
type RPCPagination ¶
type RPCParams ¶
type RPCParams struct { Transaction string `json:"transaction,omitempty"` Hash string `json:"hash,omitempty"` StartLedger int64 `json:"startLedger,omitempty"` Pagination RPCPagination `json:"pagination,omitempty"` LedgerKeys []string `json:"keys,omitempty"` ResourceConfig RPCResourceConfig `json:"resourceConfig,omitempty"` }
type RPCResourceConfig ¶
type RPCResourceConfig struct {
InstructionLeeway int `json:"instructionLeeway,omitempty"`
}
type RPCResponse ¶
type RPCResponse struct { Result json.RawMessage `json:"result"` JSONRPC string `json:"jsonrpc"` ID int64 `json:"id"` }
type RPCRestorePreamble ¶
type RPCRestorePreamble struct { MinResourceFee string `json:"minResourceFee,omitempty"` TransactionData xdr.SorobanTransactionData `json:"transactionData,omitempty"` }
func (RPCRestorePreamble) MarshalJSON ¶
func (r RPCRestorePreamble) MarshalJSON() ([]byte, error)
func (*RPCRestorePreamble) UnmarshalJSON ¶
func (r *RPCRestorePreamble) UnmarshalJSON(data []byte) error
UnmarshalJSON implements custom JSON unmarshalling for RPCRestorePreamble, parsing base64-encoded XDR fields into `xdr.*` objects.
type RPCSimulateHostFunctionResult ¶
type RPCSimulateHostFunctionResult struct { Auth []xdr.SorobanAuthorizationEntry `json:"auth"` XDR xdr.ScVal `json:"xdr"` }
func (RPCSimulateHostFunctionResult) MarshalJSON ¶
func (r RPCSimulateHostFunctionResult) MarshalJSON() ([]byte, error)
func (*RPCSimulateHostFunctionResult) UnmarshalJSON ¶
func (r *RPCSimulateHostFunctionResult) UnmarshalJSON(data []byte) error
type RPCSimulateStateChange ¶
type RPCSimulateTransactionResult ¶
type RPCSimulateTransactionResult struct { TransactionData xdr.SorobanTransactionData `json:"transactionData,omitempty"` Events []string `json:"events,omitempty"` MinResourceFee string `json:"minResourceFee,omitempty"` // Results contains the outcome of the simulated invoke contract operation. It will have at most one element if the simulation is successful, or be omitted if the simulation fails. Results []RPCSimulateHostFunctionResult `json:"results,omitempty"` LatestLedger int64 `json:"latestLedger,omitempty"` // Error is only present if the transaction failed. Error string `json:"error,omitempty"` // RestorePreamble is only present if the transaction result indicates the account needs to be restored. RestorePreamble RPCRestorePreamble `json:"restorePreamble,omitempty"` StateChanges []RPCSimulateStateChange `json:"stateChanges,omitempty"` }
func (RPCSimulateTransactionResult) MarshalJSON ¶
func (r RPCSimulateTransactionResult) MarshalJSON() ([]byte, error)
func (*RPCSimulateTransactionResult) UnmarshalJSON ¶
func (r *RPCSimulateTransactionResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements custom JSON unmarshalling for RPCSimulateTransactionResult, parsing base64-encoded XDR fields into `xdr.*` objects.
type RPCStatus ¶
type RPCStatus string
const ( // sendTransaction statuses PendingStatus RPCStatus = "PENDING" DuplicateStatus RPCStatus = "DUPLICATE" TryAgainLaterStatus RPCStatus = "TRY_AGAIN_LATER" ErrorStatus RPCStatus = "ERROR" // getTransaction statuses NotFoundStatus RPCStatus = "NOT_FOUND" FailedStatus RPCStatus = "FAILED" SuccessStatus RPCStatus = "SUCCESS" )
type Signer ¶
type Signer struct { Address string `json:"address" validate:"required,public_key"` Weight int `json:"weight" validate:"gte=1"` Type SignerType `json:"type" validate:"required,oneof=full partial"` }
type SignerType ¶
type SignerType string
const ( FullSignerType SignerType = "full" PartialSignerType SignerType = "partial" )
type Transaction ¶
type Transaction struct { Status RPCStatus `json:"status"` Hash string `json:"txHash"` ApplicationOrder int64 `json:"applicationOrder"` FeeBump bool `json:"feeBump"` EnvelopeXDR string `json:"envelopeXdr"` ResultXDR string `json:"resultXdr"` ResultMetaXDR string `json:"resultMetaXdr"` Ledger int64 `json:"ledger"` DiagnosticEventsXDR []string `json:"diagnosticEventsXdr"` CreatedAt uint32 `json:"createdAt"` }
Click to show internal directories.
Click to hide internal directories.