Documentation ¶
Index ¶
- Constants
- func GetPayload(p *Payload, endpt string) (*models.XummPayload, error)
- func WithWSBaseUrl(url string) func(p *Payload)
- type ConnectionError
- type EmptyIdError
- type EmptyUuidError
- type Payload
- func (p *Payload) CancelPayloadByUUID(uuid string) (*models.XummDeletePayloadResponse, error)
- func (p *Payload) CreateAndSubscribe(payloadBody models.XummPostPayload) (*models.XummPayload, error)
- func (p *Payload) GetPayloadByCustomId(customId string) (*models.XummPayload, error)
- func (p *Payload) GetPayloadByUUID(uuid string) (*models.XummPayload, error)
- func (p *Payload) PostPayload(body models.XummPostPayload) (*models.CreatedPayload, error)
- func (p *Payload) Subscribe(uuid string) (*models.XummPayload, error)
- type PayloadExpiredError
- type PayloadInterface
- type PayloadUuidError
- type TransactionType
- type TransactionTypeError
- type WSCfg
Constants ¶
const (
GETPAYLOADBYCUSTOMIDENDPOINT = "/platform/payload/ci/"
)
const (
PAYLOADENDPOINT = "/platform/payload"
)
const (
WEBSOCKETBASEURL = "wss://xumm.app/sign/"
)
Variables ¶
This section is empty.
Functions ¶
func GetPayload ¶
func GetPayload(p *Payload, endpt string) (*models.XummPayload, error)
func WithWSBaseUrl ¶ added in v1.1.0
Types ¶
type ConnectionError ¶
type ConnectionError struct {
UUID string
}
func (*ConnectionError) Error ¶
func (e *ConnectionError) Error() string
type EmptyIdError ¶
type EmptyIdError struct { }
EmptyIdError is returned when an empty string is provided for the payload custom id.
func (*EmptyIdError) Error ¶
func (e *EmptyIdError) Error() string
type EmptyUuidError ¶
type EmptyUuidError struct { }
EmptyUuidError is returned when an empty string is provided for the payload uuid.
func (*EmptyUuidError) Error ¶
func (e *EmptyUuidError) Error() string
type Payload ¶
func NewPayload ¶ added in v1.1.0
func (*Payload) CancelPayloadByUUID ¶
func (p *Payload) CancelPayloadByUUID(uuid string) (*models.XummDeletePayloadResponse, error)
CancelPayloadByUUID cancels a payload, so a user cannot open it anymore. Takes a single argument of a payload uuid string.
func (*Payload) CreateAndSubscribe ¶ added in v1.1.0
func (p *Payload) CreateAndSubscribe(payloadBody models.XummPostPayload) (*models.XummPayload, error)
func (*Payload) GetPayloadByCustomId ¶
func (p *Payload) GetPayloadByCustomId(customId string) (*models.XummPayload, error)
GetPayloadByCustomId returns the payload details or payload resolve status and result data by custom identifier. Takes a single argument of the payload custom id string.
func (*Payload) GetPayloadByUUID ¶
func (p *Payload) GetPayloadByUUID(uuid string) (*models.XummPayload, error)
GetPayloadByUUID returns the payload details or payload resolve status and result data. Takes a single argument of a payload uuid string.
func (*Payload) PostPayload ¶
func (p *Payload) PostPayload(body models.XummPostPayload) (*models.CreatedPayload, error)
PostPayload method submits a payload containing a sign request to the XUMM platform. Takes a single argument of a XummPostPayload which MUST have either TxJson or TxBlob field filled. If using TxJson, it must be formatted as per XRPL transaction format specification at xrpl.org.
type PayloadExpiredError ¶
type PayloadExpiredError struct {
UUID string
}
func (*PayloadExpiredError) Error ¶
func (e *PayloadExpiredError) Error() string
type PayloadInterface ¶
type PayloadInterface interface { PostPayload(models.XummPostPayload) (*models.CreatedPayload, error) GetPayloadByUUID(uuid string) (*models.XummPayload, error) GetPayloadByCustomId(customId string) (*models.XummPayload, error) CancelPayloadByUUID(uuid string) (*models.XummDeletePayloadResponse, error) Subscribe(uuid string) (*models.XummPayload, error) CreateAndSubscribe(payloadBody models.XummPostPayload) (*models.XummPayload, error) }
type PayloadUuidError ¶
type PayloadUuidError struct {
UUID string
}
func (*PayloadUuidError) Error ¶
func (e *PayloadUuidError) Error() string
type TransactionType ¶
type TransactionType uint32
const ( SignIn TransactionType = 1 << iota Payment OfferCreate OfferCancel EscrowFinish EscrowCreate EscrowCancel DepositPreauth CheckCreate CheckCash CheckCancel AccountSet PaymentChannelCreate PaymentChannelFund SetRegularKey SignerListSet TrustSet EnableAmendment AccountDelete SetFee )
func (*TransactionType) String ¶
func (t *TransactionType) String() string
func (*TransactionType) UnmarshalJSON ¶
func (t *TransactionType) UnmarshalJSON(data []byte) error
type TransactionTypeError ¶
type TransactionTypeError struct { }
TransactionTypeError is returned when an invalid transaction type is provided in the TxJson field of the XummPostPayload.
func (*TransactionTypeError) Error ¶
func (e *TransactionTypeError) Error() string