Documentation
¶
Overview ¶
sequence-api v0.4.0 470a0f88ea399c2a57ff8c22da54358c033ed5f0 -- Code generated by webrpc-gen@v0.18.7 with golang generator. DO NOT EDIT.
webrpc-gen -schema=api.ridl -target=golang -pkg=api -client -out=./clients/api.gen.go
Index ¶
- Constants
- Variables
- func HTTPRequestHeaders(ctx context.Context) (http.Header, bool)
- func MethodNameFromContext(ctx context.Context) string
- func RequestFromContext(ctx context.Context) *http.Request
- func ServiceNameFromContext(ctx context.Context) string
- func WebRPCSchemaHash() string
- func WebRPCSchemaVersion() string
- func WebRPCVersion() string
- func WithHTTPRequestHeaders(ctx context.Context, h http.Header) (context.Context, error)
- type API
- type APIClient
- type ContractCall
- type CurrencyGroup
- type CurrencyGroupToken
- type ExchangeRate
- type Friend
- type HTTPClient
- type InviteCode
- type InviteCodeAccount
- type InviteInfo
- type LinkedWallet
- type NumTxnsRelayed
- type OffchainInventory
- type OffchainPayment
- type Options
- type Page
- type PaymentResponse
- type Price
- type RuntimeChecks
- type RuntimeStatus
- type SardineEnabledToken
- type SardineFiatCurrency
- type SardineGetQuoteParams
- type SardineNFTCheckout
- type SardineNFTCheckoutParams
- type SardineOrder
- type SardinePaymentOption
- type SardinePaymentType
- type SardineQuote
- type SardineQuoteType
- type SardineRegion
- type SardineRegionPaymentMethod
- type SardineRegionState
- type SardineSupportedToken
- type SequenceContext
- type SortBy
- type SortOrder
- type SwapPrice
- type SwapQuote
- type Token
- type TokenPrice
- type TokenType
- type Transaction
- type TupleComponent
- type User
- type UserStorage
- type Version
- type WalletBackup
- type WebRPCError
Constants ¶
View Source
const APIPathPrefix = "/rpc/API/"
Variables ¶
View Source
var ( HTTPClientRequestHeadersCtxKey = &contextKey{"HTTPClientRequestHeaders"} HTTPRequestCtxKey = &contextKey{"HTTPRequest"} ServiceNameCtxKey = &contextKey{"ServiceName"} MethodNameCtxKey = &contextKey{"MethodName"} )
View Source
var ( ErrWebrpcEndpoint = WebRPCError{Code: 0, Name: "WebrpcEndpoint", Message: "endpoint error", HTTPStatus: 400} ErrWebrpcRequestFailed = WebRPCError{Code: -1, Name: "WebrpcRequestFailed", Message: "request failed", HTTPStatus: 400} ErrWebrpcBadRoute = WebRPCError{Code: -2, Name: "WebrpcBadRoute", Message: "bad route", HTTPStatus: 404} ErrWebrpcBadMethod = WebRPCError{Code: -3, Name: "WebrpcBadMethod", Message: "bad method", HTTPStatus: 405} ErrWebrpcBadRequest = WebRPCError{Code: -4, Name: "WebrpcBadRequest", Message: "bad request", HTTPStatus: 400} ErrWebrpcBadResponse = WebRPCError{Code: -5, Name: "WebrpcBadResponse", Message: "bad response", HTTPStatus: 500} ErrWebrpcServerPanic = WebRPCError{Code: -6, Name: "WebrpcServerPanic", Message: "server panic", HTTPStatus: 500} ErrWebrpcInternalError = WebRPCError{Code: -7, Name: "WebrpcInternalError", Message: "internal error", HTTPStatus: 500} ErrWebrpcClientDisconnected = WebRPCError{Code: -8, Name: "WebrpcClientDisconnected", Message: "client disconnected", HTTPStatus: 400} ErrWebrpcStreamLost = WebRPCError{Code: -9, Name: "WebrpcStreamLost", Message: "stream lost", HTTPStatus: 400} ErrWebrpcStreamFinished = WebRPCError{Code: -10, Name: "WebrpcStreamFinished", Message: "stream finished", HTTPStatus: 200} )
Webrpc errors
View Source
var ( ErrPermissionDenied = WebRPCError{Code: 1001, Name: "PermissionDenied", Message: "Permission denied", HTTPStatus: 403} ErrSessionExpired = WebRPCError{Code: 1002, Name: "SessionExpired", Message: "Session expired", HTTPStatus: 403} ErrAborted = WebRPCError{Code: 1005, Name: "Aborted", Message: "Request aborted", HTTPStatus: 400} ErrGeoblocked = WebRPCError{Code: 1006, Name: "Geoblocked", Message: "Geoblocked region", HTTPStatus: 451} ErrInvalidArgument = WebRPCError{Code: 2000, Name: "InvalidArgument", Message: "Invalid argument", HTTPStatus: 400} ErrQueryFailed = WebRPCError{Code: 2003, Name: "QueryFailed", Message: "Query failed", HTTPStatus: 400} ErrNotFound = WebRPCError{Code: 3000, Name: "NotFound", Message: "Resource not found", HTTPStatus: 400} )
Schema errors
View Source
var SardinePaymentType_name = map[uint32]string{
0: "ach",
1: "debit",
2: "credit",
3: "us_debit",
4: "international_debit",
5: "international_credit",
}
View Source
var SardinePaymentType_value = map[string]uint32{
"ach": 0,
"debit": 1,
"credit": 2,
"us_debit": 3,
"international_debit": 4,
"international_credit": 5,
}
View Source
var SardineQuoteType_name = map[uint32]string{
0: "buy",
1: "sell",
}
View Source
var SardineQuoteType_value = map[string]uint32{
"buy": 0,
"sell": 1,
}
View Source
var SortOrder_name = map[uint32]string{
0: "DESC",
1: "ASC",
}
View Source
var SortOrder_value = map[string]uint32{
"DESC": 0,
"ASC": 1,
}
View Source
var TokenType_name = map[uint8]string{
0: "ERC20",
1: "ERC721",
2: "ERC1155",
}
View Source
var TokenType_value = map[string]uint8{
"ERC20": 0,
"ERC721": 1,
"ERC1155": 2,
}
View Source
var WebRPCServices = map[string][]string{
"API": {
"Ping",
"Version",
"RuntimeStatus",
"Clock",
"GetSequenceContext",
"GetAuthToken",
"GetAuthToken2",
"SendPasswordlessLink",
"FriendList",
"GetFriendByAddress",
"SearchFriends",
"AddFriend",
"UpdateFriendNickname",
"RemoveFriend",
"ContractCall",
"DecodeContractCall",
"LookupContractCallSelectors",
"UserStorageFetch",
"UserStorageSave",
"UserStorageDelete",
"UserStorageFetchAll",
"GetMoonpayLink",
"ResolveENSAddress",
"IsValidSignature",
"IsValidMessageSignature",
"IsValidTypedDataSignature",
"IsValidETHAuthProof",
"SardineGetClientToken",
"SardineGetNFTCheckoutToken",
"SardineGetNFTCheckoutOrderStatus",
"SardineGetSupportedRegions",
"SardineGetSupportedFiatCurrencies",
"SardineGetSupportedTokens",
"SardineGetEnabledTokens",
"SardineGetQuote",
"GetSardineClientToken",
"GetSardineNFTCheckoutToken",
"GetSardineNFTCheckoutOrderStatus",
"GetCoinPrices",
"GetCollectiblePrices",
"GetExchangeRate",
"MemoryStore",
"MemoryLoad",
"GetInviteInfo",
"IsValidAccessCode",
"InternalClaimAccessCode",
"BlockNumberAtTime",
"PaperSessionSecret",
"PaperSessionSecret2",
"LinkWallet",
"GetLinkedWallets",
"RemoveLinkedWallet",
"GenerateWaaSVerificationURL",
"ValidateWaaSVerificationNonce",
"GetSwapPrices",
"GetSwapQuote",
"ListCurrencyGroups",
"AddOffchainInventory",
"GetOffchainInventory",
"ListOffchainInventories",
"UpdateOffchainInventory",
"DeleteOffchainInventory",
"RequestOffchainPayment",
"ListOffchainPayments",
},
}
Functions ¶
func MethodNameFromContext ¶ added in v0.31.0
func MethodNameFromContext(ctx