Documentation
¶
Index ¶
- Constants
- func GenerateNonce(timestampMsec int64) string
- func NowMsec() int64
- type Attribute
- type CreateNonFungibleRequest
- type Event
- type Fee
- type Holder
- type IssueSessionTokenForBaseCoinTransferRequest
- type IssueSessionTokenForProxySettingRequest
- type ItemTokenContractInformation
- type LBD
- func (l LBD) CommitTransaction(requestSessionToken string) (*Transaction, error)
- func (l *LBD) CreateNonFungible(contractId, name, meta string) (*Transaction, error)
- func (l *LBD) Do(r Requester, sign bool) (*Response, error)
- func (l LBD) GetExplorerURL(tx *Transaction) string
- func (l LBD) IsAddress(s string) bool
- func (l *LBD) IssueSessionTokenForBaseCoinTransfer(fromUserId, to string, amount *big.Int, requestType RequestType) (*SessionToken, error)
- func (l *LBD) IssueSessionTokenForProxySetting(userId, contractId string, requestType RequestType) (*SessionToken, error)
- func (l LBD) ListAllNonFungibles(contractId string) ([]*TokenType, error)
- func (l *LBD) ListAllServiceTokens() ([]*ServiceToken, error)
- func (l LBD) ListAllServiceWallets() ([]*Wallet, error)
- func (l *LBD) MintMultipleNonFungible(contractId, to string, mintList []*MintList) (*Transaction, error)
- func (l *LBD) MintNonFungible(contractId, tokenType, name, meta, to string) (*Transaction, error)
- func (l *LBD) MintServiceToken(contractId string, to string, amount *big.Int) (*Transaction, error)
- func (l *LBD) RetrieveBalanceOfAllNonFungiblesServiceWallet(walletAddress, contractId string) ([]*NonFungible, error)
- func (l LBD) RetrieveBalanceOfAllNonFungiblesUserWallet(userId, contractId string) ([]*NonFungible, error)
- func (l LBD) RetrieveBalanceOfSpecificTypeOfNonFungiblesServiceWallet(walletAddress, contractId, tokenType string) ([]*NonFungibleToken, error)
- func (l LBD) RetrieveBalanceOfSpecificTypeOfNonFungiblesUserWallet(userId, contractId, tokenType string) ([]*NonFungibleToken, error)
- func (l LBD) RetrieveHolderOfSpecificNonFungible(contractId, tokenType, tokenIndex string) (*Holder, error)
- func (l LBD) RetrieveHoldersOfSpecificNonFungible(contractId, tokenType string) ([]*Holder, error)
- func (l LBD) RetrieveItemTokenContractInformation(contractId string) (*ItemTokenContractInformation, error)
- func (l *LBD) RetrieveNonFungibleInformation(contractId, tokenType, tokenIndex string) (*NonFungibleInformation, error)
- func (l *LBD) RetrieveNonFungibleTokenType(contractId, tokenType string) ([]byte, error)
- func (l LBD) RetrieveServerTime() (int64, error)
- func (l LBD) RetrieveServiceInformation(serviceId string) (*ServiceInformation, error)
- func (l *LBD) RetrieveServiceTokenInformation(contractId string) (*ServiceToken, error)
- func (l LBD) RetrieveSessionTokenStatus(requestSessionToken string) (SessionTokenStatus, error)
- func (l LBD) RetrieveText(txHash string) (*MemoInformation, error)
- func (l LBD) RetrieveTransactionInformation(txHash string) (*Transaction, error)
- func (l LBD) RetrieveUserInformation(userId string) (*UserInformation, error)
- func (l LBD) RetrieveUserWalletTransactionHistory(userId string) ([]*Transaction, error)
- func (l *LBD) SaveText(memo string) (*Transaction, error)
- func (l LBD) Sign(r Requester) string
- func (l *LBD) TransferBaseCoins(from *Wallet, to string, amount *big.Int) (*Transaction, error)
- func (l *LBD) TransferNonFungibleServiceWallet(walletAddress, walletSecret, contractId, to, tokenType, tokenIndex string) (*Transaction, error)
- func (l *LBD) TransferNonFungibleUserWallet(contractId, fromUserId, to, tokenType, tokenIndex string) (*Transaction, error)
- func (l *LBD) UpdateNonFungibleInformation(contractId, tokenType, tokenIndex, name, meta string) (*Transaction, error)
- func (l *LBD) UpdateNonFungibleTokenType(contractId, tokenType, name, meta string) (*Transaction, error)
- type Log
- type MemoInformation
- type MemosRequest
- type MintList
- type MintMultipleNonFungibleRequest
- type MintNonFungibleRequest
- type MintServiceTokenRequest
- type Msg
- type Network
- type NonFungible
- type NonFungibleInformation
- type NonFungibleToken
- type NonFungibleTokenType
- type Pager
- type PubKey
- type Request
- type RequestType
- type Requester
- type Response
- type ServiceInformation
- type ServiceToken
- type SessionToken
- type SessionTokenStatus
- type Signature
- type Token
- type TokenType
- type Transaction
- type TransferBaseCoinsRequest
- type TransferNonFungibleServiceWalletRequest
- type TransferNonFungibleUserWalletRequest
- type Tx
- type TxValue
- type UpdateNonFungibleInformationRequest
- type UpdateNonFungibleTokenTypeRequest
- type UserInformation
- type Wallet
Constants ¶
View Source
const ( CashewBaseURL = "https://test-api.blockchain.line.me" DaphneBaseURL = "https://api.blockchain.line.me" )
View Source
const (
DefaultLimit int = 50
)
Variables ¶
This section is empty.
Functions ¶
func GenerateNonce ¶
Types ¶
type CreateNonFungibleRequest ¶
type CreateNonFungibleRequest struct { *Request OwnerAddress string `json:"ownerAddress"` OwnerSecret string `json:"ownerSecret"` Name string `json:"name"` Meta string `json:"meta"` }
func (CreateNonFungibleRequest) Encode ¶
func (r CreateNonFungibleRequest) Encode() string
type IssueSessionTokenForBaseCoinTransferRequest ¶
type IssueSessionTokenForBaseCoinTransferRequest struct { *Request ToUserId string `json:"toUserId,omitempty"` ToAddress string `json:"toAddress,omitempty"` Amount string `json:"amount"` RequestType RequestType `json:"-"` }
func (IssueSessionTokenForBaseCoinTransferRequest) Encode ¶
func (r IssueSessionTokenForBaseCoinTransferRequest) Encode() string
type IssueSessionTokenForProxySettingRequest ¶
type IssueSessionTokenForProxySettingRequest struct { *Request OwnerAddress string `json:"ownerAddress"` OwnerSecret string `json:"ownerSecret"` RequestType RequestType `json:"-"` }
func (IssueSessionTokenForProxySettingRequest) Encode ¶
func (r IssueSessionTokenForProxySettingRequest) Encode() string
type LBD ¶
type LBD struct { Network Network Owner *Wallet Debug bool // contains filtered or unexported fields }
func (LBD) CommitTransaction ¶
func (l LBD) CommitTransaction(requestSessionToken string) (*Transaction, error)
func (*LBD) CreateNonFungible ¶
func (l *LBD) CreateNonFungible(contractId, name, meta string) (*Transaction, error)
func (LBD) GetExplorerURL ¶
func (l LBD) GetExplorerURL(tx *Transaction) string
func (*LBD) IssueSessionTokenForBaseCoinTransfer ¶
func (l *LBD) IssueSessionTokenForBaseCoinTransfer(fromUserId, to string, amount *big.Int, requestType RequestType) (*SessionToken, error)
func (*LBD) IssueSessionTokenForProxySetting ¶
func (l *LBD) IssueSessionTokenForProxySetting(userId, contractId string, requestType RequestType) (*SessionToken, error)
func (LBD) ListAllNonFungibles ¶
func (*LBD) ListAllServiceTokens ¶
func (l *LBD) ListAllServiceTokens() ([]*ServiceToken, error)
func (LBD) ListAllServiceWallets ¶
func (*LBD) MintMultipleNonFungible ¶
func (l *LBD) MintMultipleNonFungible(contractId, to string, mintList []*MintList) (*Transaction, error)
func (*LBD) MintNonFungible ¶
func (l *LBD) MintNonFungible(contractId, tokenType, name, meta, to string) (*Transaction, error)
func (*LBD) MintServiceToken ¶
func (*LBD) RetrieveBalanceOfAllNonFungiblesServiceWallet ¶
func (l *LBD) RetrieveBalanceOfAllNonFungiblesServiceWallet(walletAddress, contractId string) ([]*NonFungible, error)
func (LBD) RetrieveBalanceOfAllNonFungiblesUserWallet ¶
func (l LBD) RetrieveBalanceOfAllNonFungiblesUserWallet(userId, contractId string) ([]*NonFungible, error)
func (LBD) RetrieveBalanceOfSpecificTypeOfNonFungiblesServiceWallet ¶
func (l LBD) RetrieveBalanceOfSpecificTypeOfNonFungiblesServiceWallet(walletAddress, contractId, tokenType string) ([]*NonFungibleToken, error)
func (LBD) RetrieveBalanceOfSpecificTypeOfNonFungiblesUserWallet ¶
func (l LBD) RetrieveBalanceOfSpecificTypeOfNonFungiblesUserWallet(userId, contractId, tokenType string) ([]*NonFungibleToken, error)
func (LBD) RetrieveHolderOfSpecificNonFungible ¶
func (LBD) RetrieveHoldersOfSpecificNonFungible ¶
func (LBD) RetrieveItemTokenContractInformation ¶
func (l LBD) RetrieveItemTokenContractInformation(contractId string) (*ItemTokenContractInformation, error)
func (*LBD) RetrieveNonFungibleInformation ¶
func (l *LBD) RetrieveNonFungibleInformation(contractId, tokenType, tokenIndex string) (*NonFungibleInformation, error)
func (*LBD) RetrieveNonFungibleTokenType ¶
func (LBD) RetrieveServerTime ¶
func (LBD) RetrieveServiceInformation ¶
func (l LBD) RetrieveServiceInformation(serviceId string) (*ServiceInformation, error)
func (*LBD) RetrieveServiceTokenInformation ¶
func (l *LBD) RetrieveServiceTokenInformation(contractId string) (*ServiceToken, error)
func (LBD) RetrieveSessionTokenStatus ¶
func (l LBD) RetrieveSessionTokenStatus(requestSessionToken string) (SessionTokenStatus, error)
func (LBD) RetrieveText ¶
func (l LBD) RetrieveText(txHash string) (*MemoInformation, error)
func (LBD) RetrieveTransactionInformation ¶
func (l LBD) RetrieveTransactionInformation(txHash string) (*Transaction, error)
func (LBD) RetrieveUserInformation ¶
func (l LBD) RetrieveUserInformation(userId string) (*UserInformation, error)
func (LBD) RetrieveUserWalletTransactionHistory ¶
func (l LBD) RetrieveUserWalletTransactionHistory(userId string) ([]*Transaction, error)
func (*LBD) TransferBaseCoins ¶
func (*LBD) TransferNonFungibleServiceWallet ¶
func (l *LBD) TransferNonFungibleServiceWallet(walletAddress, walletSecret, contractId, to, tokenType, tokenIndex string) (*Transaction, error)
func (*LBD) TransferNonFungibleUserWallet ¶
func (l *LBD) TransferNonFungibleUserWallet(contractId, fromUserId, to, tokenType, tokenIndex string) (*Transaction, error)
func (*LBD) UpdateNonFungibleInformation ¶
func (l *LBD) UpdateNonFungibleInformation(contractId, tokenType, tokenIndex, name, meta string) (*Transaction, error)
func (*LBD) UpdateNonFungibleTokenType ¶
func (l *LBD) UpdateNonFungibleTokenType(contractId, tokenType, name, meta string) (*Transaction, error)
type MemoInformation ¶
type MemoInformation struct {
Memo string `json:"memo"`
}
type MemosRequest ¶
type MemosRequest struct { *Request WalletAddress string `json:"walletAddress"` WalletSecret string `json:"walletSecret"` Memo string `json:"memo"` }
func (MemosRequest) Encode ¶
func (r MemosRequest) Encode() string
type MintMultipleNonFungibleRequest ¶
type MintMultipleNonFungibleRequest struct { *Request OwnerAddress string `json:"ownerAddress"` OwnerSecret string `json:"ownerSecret"` MintList []*MintList `json:"mintList"` ToUserId string `json:"toUserId,omitempty"` ToAddress string `json:"toAddress,omitempty"` }
func (MintMultipleNonFungibleRequest) Encode ¶
func (r MintMultipleNonFungibleRequest) Encode() string
type MintNonFungibleRequest ¶
type MintNonFungibleRequest struct { *Request OwnerAddress string `json:"ownerAddress"` OwnerSecret string `json:"ownerSecret"` Name string `json:"name"` Meta string `json:"meta"` ToUserId string `json:"toUserId,omitempty"` ToAddress string `json:"toAddress,omitempty"` }
func (MintNonFungibleRequest) Encode ¶
func (r MintNonFungibleRequest) Encode() string
type MintServiceTokenRequest ¶
type MintServiceTokenRequest struct { *Request OwnerAddress string `json:"ownerAddress"` OwnerSecret string `json:"ownerSecret"` Amount string `json:"amount"` ToUserId string `json:"toUserId,omitempty"` ToAddress string `json:"toAddress,omitempty"` }
func (MintServiceTokenRequest) Encode ¶
func (r MintServiceTokenRequest) Encode() string
type Msg ¶
type Msg struct { Type string `json:"type"` Value json.RawMessage `json:"value"` }
type NonFungible ¶
type NonFungibleInformation ¶
type NonFungibleToken ¶
type NonFungibleToken struct { Name string `json:"name"` TokenType string `json:"tokenType"` TokenIndex string `json:"tokenIndex"` Meta string `json:"meta"` }
func (*NonFungibleToken) ID ¶
func (n *NonFungibleToken) ID() string
type NonFungibleTokenType ¶
type Request ¶
type Request struct {
// contains filtered or unexported fields
}
func NewGetRequest ¶
func NewPostRequest ¶
func NewPutRequest ¶
func NewRequest ¶
type RequestType ¶
type RequestType string
const ( RequestTypeRedirectUri RequestType = "redirectUri" RequestTypeAOA RequestType = "aoa" )
type Response ¶
type Response struct { ResponseTime int64 `json:"responseTime"` StatusCode int64 `json:"statusCode"` StatusMessage string `json:"statusMessage"` ResponseData json.RawMessage `json:"responseData"` }
type ServiceInformation ¶
type ServiceToken ¶
type ServiceToken struct { ContractID string `json:"contractId"` OwnerAddress string `json:"ownerAddress"` Name string `json:"name"` Symbol string `json:"symbol"` ImgURI string `json:"imgUri"` Meta string `json:"meta"` Decimals int64 `json:"decimals"` CreatedAt int64 `json:"createdAt"` TotalSupply string `json:"totalSupply"` TotalMint string `json:"totalMint"` TotalBurn string `json:"totalBurn"` ServiceID string `json:"serviceId"` }
type SessionToken ¶
type SessionToken struct { RequestSessionToken string `json:"requestSessionToken"` RedirectURI string `json:"redirectUri"` }
func UnmarshalSessionToken ¶
func UnmarshalSessionToken(data []byte) (*SessionToken, error)
func (*SessionToken) Marshal ¶
func (r *SessionToken) Marshal() ([]byte, error)
type SessionTokenStatus ¶
type SessionTokenStatus string
const ( SessionTokenStatusUnknown SessionTokenStatus = "Unknown" SessionTokenStatusAuthorized SessionTokenStatus = "Authorized" )
type Transaction ¶
type Transaction struct { Height int64 `json:"height"` Txhash string `json:"txhash"` Index int64 `json:"index"` Codespace string `json:"codespace"` Code int64 `json:"code"` Logs []Log `json:"logs"` GasWanted int64 `json:"gasWanted"` GasUsed int64 `json:"gasUsed"` Tx Tx `json:"tx"` Timestamp int64 `json:"timestamp"` }
func UnmarshalTransaction ¶
func UnmarshalTransaction(data []byte) (*Transaction, error)
func (*Transaction) Check ¶
func (t *Transaction) Check() (err error)
func (*Transaction) Marshal ¶
func (r *Transaction) Marshal() ([]byte, error)
type TransferBaseCoinsRequest ¶
type TransferBaseCoinsRequest struct { *Request WalletSecret string `json:"walletSecret"` ToUserId string `json:"toUserId,omitempty"` ToAddress string `json:"toAddress,omitempty"` Amount string `json:"amount"` }
func (TransferBaseCoinsRequest) Encode ¶
func (r TransferBaseCoinsRequest) Encode() string
type TransferNonFungibleServiceWalletRequest ¶
type TransferNonFungibleServiceWalletRequest struct { *Request WalletSecret string `json:"walletSecret"` ToUserId string `json:"toUserId,omitempty"` ToAddress string `json:"toAddress,omitempty"` }
func (TransferNonFungibleServiceWalletRequest) Encode ¶
func (r TransferNonFungibleServiceWalletRequest) Encode() string
type TransferNonFungibleUserWalletRequest ¶
type TransferNonFungibleUserWalletRequest struct { *Request OwnerAddress string `json:"ownerAddress"` OwnerSecret string `json:"ownerSecret"` ToUserId string `json:"toUserId,omitempty"` ToAddress string `json:"toAddress,omitempty"` }
func (TransferNonFungibleUserWalletRequest) Encode ¶
func (r TransferNonFungibleUserWalletRequest) Encode() string
type UpdateNonFungibleInformationRequest ¶
type UpdateNonFungibleInformationRequest struct { *Request OwnerAddress string `json:"ownerAddress"` OwnerSecret string `json:"ownerSecret"` Name string `json:"name"` Meta string `json:"meta,omitempty"` }
func (UpdateNonFungibleInformationRequest) Encode ¶
func (r UpdateNonFungibleInformationRequest) Encode() string
type UpdateNonFungibleTokenTypeRequest ¶
type UpdateNonFungibleTokenTypeRequest struct { *Request OwnerAddress string `json:"ownerAddress"` OwnerSecret string `json:"ownerSecret"` Name string `json:"name"` Meta string `json:"meta"` }
func (UpdateNonFungibleTokenTypeRequest) Encode ¶
func (r UpdateNonFungibleTokenTypeRequest) Encode() string
type UserInformation ¶
Click to show internal directories.
Click to hide internal directories.