Documentation
¶
Index ¶
- Constants
- func SignQueryParams(resource, secret string) string
- type AuxiliaryChain
- type Balance
- type BalanceResponse
- type BalanceService
- type BaseTokenResponse
- type BaseTokenService
- type BaseTokens
- type Chain
- type ChainResponse
- type ChainsService
- type Client
- type Device
- type DeviceManagerService
- type DeviceParams
- type DeviceResponse
- type DevicesService
- type Empty
- type MetaProperty
- type NewDevice
- type Options
- type OriginChain
- type PricePoint
- type PricePointResponse
- type PricePointService
- type QueryParams
- type RecoveryOwner
- type RecoveryOwnerResponse
- type RecoveryOwnerService
- type Rule
- type RuleResponse
- type RulesService
- type Session
- type SessionParams
- type SessionsResponse
- type SessionsService
- type Token
- type TokenResponse
- type TokenService
- type Transaction
- type TransactionParams
- type TransactionResponse
- type TransactionsService
- type Transfer
- type User
- type UserResponse
- type UsersService
- type WebhooksService
Constants ¶
View Source
const SIGNATURE_KIND = "OST1-HMAC-SHA256"
Variables ¶
This section is empty.
Functions ¶
func SignQueryParams ¶
Types ¶
type AuxiliaryChain ¶
type AuxiliaryChain struct {
ChainID int `json:"chain_id,omitempty"`
UtilityBrandedToken string `json:"utility_branded_token,omitempty"`
CompanyTokenHolders []string `json:"company_token_holders,omitempty"`
CompanyUUIDs []string `json:"company_uuids,omitempty"`
Organization *struct {
Contract string `json:"contract,omitempty"`
Owner string `json:"owner,omitempty"`
} `json:"organization,omitempty"`
}
type BalanceResponse ¶
type BalanceService ¶
type BalanceService service
func (*BalanceService) Get ¶
func (s *BalanceService) Get(userID string) (*BalanceResponse, error)
type BaseTokenResponse ¶
type BaseTokenResponse struct {
Success bool `json:"success,omitempty"`
Data *struct {
ResultType string `json:"result_type,omitempty"`
BaseTokens *BaseTokens `json:"base_tokens,omitempty"`
} `json:"data,omitempty"`
}
type BaseTokenService ¶
type BaseTokenService service
func (*BaseTokenService) Get ¶
func (s *BaseTokenService) Get() (*BaseTokenResponse, error)
type BaseTokens ¶
type BaseTokens struct {
OST struct {
Name string `json:"name,omitempty"`
Decimals int `json:"decimals"`
OriginChainErc20tokenContractAddress string `json:"origin_chain_erc20token_contract_address,omitempty"`
} `json:"OST,omitempty"`
USDC struct {
Name string `json:"name,omitempty"`
Decimals int `json:"decimals"`
OriginChainErc20tokenContractAddress string `json:"origin_chain_erc20token_contract_address,omitempty"`
} `json:"USDC,omitempty"`
}
type ChainResponse ¶
type ChainsService ¶
type ChainsService service
func (*ChainsService) Get ¶
func (s *ChainsService) Get(ID int) (*ChainResponse, error)
type Client ¶
type Client struct {
Balance *BalanceService
BaseToken *BaseTokenService
Chains *ChainsService
DeviceManager *DeviceManagerService
Devices *DevicesService
PricePoint *PricePointService
RecoveryOwner *RecoveryOwnerService
Rules *RulesService
Sessions *SessionsService
Token *TokenService
Transactions *TransactionsService
Users *UsersService
Webhooks *WebhooksService
// contains filtered or unexported fields
}
type Device ¶
type Device struct {
UserID string `json:"user_id,omitempty"`
Address string `json:"address,omitempty"`
LinkedAddress string `json:"linked_address,omitempty"`
ApiSignerAddress string `json:"api_signer_address,omitempty"`
Status string `json:"status,omitempty"`
UpdatedTimestamp int `json:"updated_timestamp,omitempty"`
}
type DeviceManagerService ¶
type DeviceManagerService service
type DeviceParams ¶
type DeviceParams struct {
QueryParams
Addresses []string `url:"addresses,omitempty"`
Limit int `url:"limit,omitempty"`
}
type DeviceResponse ¶
type DevicesService ¶
type DevicesService service
func (*DevicesService) Create ¶
func (s *DevicesService) Create(userID string, params NewDevice) (*DeviceResponse, error)
func (*DevicesService) Get ¶
func (s *DevicesService) Get(userID, address string) (*DeviceResponse, error)
func (*DevicesService) GetList ¶
func (s *DevicesService) GetList(userID string, params DeviceParams) (*DeviceResponse, error)
type MetaProperty ¶
type NewDevice ¶
type NewDevice struct {
QueryParams
Address string `json:"address,omitempty"`
ApiSignerAddress string `json:"api_signer_address,omitempty"`
}
type OriginChain ¶
type PricePoint ¶
type PricePoint struct {
OST *struct {
USD float64 `json:"USD,omitempty"`
EUR float64 `json:"EUR,omitempty"`
GBP float64 `json:"GBP,omitempty"`
Decimals int `json:"decimals,omitempty"`
UpdatedAt int `json:"updated_at,omitempty"`
} `json:"OST,omitempty"`
USDC *struct {
USD float64 `json:"USD,omitempty"`
EUR float64 `json:"EUR,omitempty"`
GBP float64 `json:"GBP,omitempty"`
Decimals int `json:"decimals,omitempty"`
UpdatedAt int `json:"updated_at,omitempty"`
} `json:"USDC,omitempty"`
}
type PricePointResponse ¶
type PricePointResponse struct {
Success bool `json:"success,omitempty"`
Data *struct {
ResultType string `json:"result_type,omitempty"`
PricePoint *PricePoint `json:"price_point,omitempty"`
} `json:"data,omitempty"`
}
type PricePointService ¶
type PricePointService service
func (*PricePointService) Get ¶
func (s *PricePointService) Get(chainID int) (*PricePointResponse, error)
type QueryParams ¶
type RecoveryOwner ¶
type RecoveryOwnerResponse ¶
type RecoveryOwnerResponse struct {
Success bool `json:"success,omitempty"`
Data *struct {
ResultType string `json:"result_type,omitempty"`
RecoveryOwner RecoveryOwner `json:"rules,omitempty"`
} `json:"data,omitempty"`
}
type RecoveryOwnerService ¶
type RecoveryOwnerService service
func (*RecoveryOwnerService) Get ¶
func (s *RecoveryOwnerService) Get(userID, recoveryOwnerAddress string) (*RecoveryOwnerResponse, error)
type RuleResponse ¶
type RulesService ¶
type RulesService service
func (*RulesService) GetList ¶
func (s *RulesService) GetList() (*RuleResponse, error)
type Session ¶
type Session struct {
UserID string `json:"user_id,omitempty"`
Address string `json:"address,omitempty"`
ExpirationHeight int `json:"expiration_height,omitempty"`
ApproxExpirationTimestamp int `json:"approx_expiration_timestamp,omitempty"`
SpendingLimit string `json:"spending_limit,omitempty"`
Nonce int `json:"nonce,omitempty"`
Status string `json:"status,omitempty"`
UpdatedTimestamp int `json:"updated_timestamp,omitempty"`
}
type SessionParams ¶
type SessionParams struct {
QueryParams
Addresses []string `url:"addresses,omitempty"`
Limit int `url:"limit,omitempty"`
}
type SessionsResponse ¶
type SessionsService ¶
type SessionsService service
func (*SessionsService) Get ¶
func (s *SessionsService) Get(userID, sessionAddress string) (*SessionsResponse, error)
func (*SessionsService) GetList ¶
func (s *SessionsService) GetList(userID string, params SessionParams) (*SessionsResponse, error)
type Token ¶
type Token struct {
ID int `json:"id,omitempty"`
Name string `json:"name,omitempty"`
Symbol string `json:"symbol,omitempty"`
BaseToken string `json:"base_token,omitempty"`
ConversionFactor int `json:"conversion_factor,omitempty"`
TotalSupply string `json:"total_supply,omitempty"`
Decimals int `json:"decimals,omitempty"`
OriginChain *OriginChain `json:"origin_chain,omitempty"`
Stakers []string `json:"stakers,omitempty"`
AuxiliaryChain []AuxiliaryChain `json:"auxiliary_chains,omitempty"`
UpdatedTimestamp int `json:"updated_timestamp,omitempty"`
}
type TokenResponse ¶
type TokenService ¶
type TokenService service
func (*TokenService) Get ¶
func (s *TokenService) Get() (*TokenResponse, error)
type Transaction ¶
type Transaction struct {
ID string `json:"id,omitempty"`
TransactionHash string `json:"transaction_hash,omitempty"`
From string `json:"from,omitempty"`
To string `json:"to,omitempty"`
Nonce int `json:"nonce,omitempty"`
Value string `json:"value,omitempty"`
GasPrice string `json:"gas_price,omitempty"`
GasUsed int `json:"gas_used,omitempty"`
TransactionFee string `json:"transaction_fee,omitempty"`
BlockConfirmation int `json:"block_confirmation,omitempty"`
Status string `json:"status,omitempty"`
UpdatedTimestamp int `json:"updated_timestamp,omitempty"`
BlockNumber int `json:"block_number,omitempty"`
RuleName string `json:"rule_name,omitempty"`
Transfers []Transfer `json:"transfers,omitempty"`
MetaProperty *MetaProperty `json:"meta_property,omitempty"`
}
type TransactionParams ¶
type TransactionParams struct {
QueryParams
To string `url:"to,omitempty"`
RawCallData string `url:"raw_call_data,omitempty"`
MetaProperty *MetaProperty `url:"meta_property,omitempty"`
}
type TransactionResponse ¶
type TransactionResponse struct {
Success bool `json:"success,omitempty"`
Data *struct {
ResultType string `json:"result_type,omitempty"`
Transaction *Transaction `json:"transaction,omitempty"`
Transactions []Transaction `json:"transactions,omitempty"`
} `json:"data,omitempty"`
}
type TransactionsService ¶
type TransactionsService service
func (*TransactionsService) Execute ¶
func (s *TransactionsService) Execute(userID string, params TransactionParams) (*TransactionResponse, error)
func (*TransactionsService) Get ¶
func (s *TransactionsService) Get(userID, transactionID string) (*TransactionResponse, error)
func (*TransactionsService) GetList ¶
func (s *TransactionsService) GetList(userID string) (*TransactionResponse, error)
type User ¶
type User struct {
ID string `json:"id,omitempty"`
TokenID int `json:"token_id,omitempty"`
TokenHolderAddress string `json:"token_holder_address,omitempty"`
DeviceManagerAddress string `json:"device_manager_address,omitempty"`
RecoveryAddress string `json:"recovery_address,omitempty"`
RecoveryOwnerAddress string `json:"recovery_owner_address,omitempty"`
Type string `json:"type,omitempty"`
Status string `json:"status,omitempty"`
UpdatedTimestamp int `json:"updated_timestamp,omitempty"`
}
type UserResponse ¶
type UsersService ¶
type UsersService service
func (*UsersService) Create ¶
func (s *UsersService) Create() (*UserResponse, error)
func (*UsersService) Get ¶
func (s *UsersService) Get(ID string) (*UserResponse, error)
func (*UsersService) GetList ¶
func (s *UsersService) GetList() (*UserResponse, error)
type WebhooksService ¶
type WebhooksService service
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
example
|
|
|
balance
command
|
|
|
base_token
command
|
|
|
chains
command
|
|
|
devices/get_device
command
|
|
|
devices/list_devices
command
|
|
|
price_point
command
|
|
|
recovery_owner
command
|
|
|
rules
command
|
|
|
sessions/get_session
command
|
|
|
sessions/list_sessions
command
|
|
|
token
command
|
|
|
transactions/execute_transaction
command
|
|
|
transactions/get_transaction
command
|
|
|
users/create_user
command
|
|
|
users/get_user
command
|
|
|
users/list_users
command
|
Click to show internal directories.
Click to hide internal directories.