weaveapi

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 30, 2023 License: MIT Imports: 29 Imported by: 0

Documentation

Index

Constants

View Source
const ALL_ACTIVE = 2147483647
View Source
const DEFAULT_COMMITMENT = "GGumV86X6FZzHRo8bLvbW2LJ3PZ45EqRPWeogP8ufcm3"
View Source
const DEFAULT_COMPUTE_TIMEOUT_SEC = 300
View Source
const DEFAULT_CREATE_TIMEOUT_SEC = 300
View Source
const DEFAULT_DROP_TIMEOUT_SEC = 300
View Source
const DEFAULT_GENERATORS = 128
View Source
const DEFAULT_GUARANTEED_DELIVERY = true
View Source
const DEFAULT_HASH_ACKS = 1
View Source
const DEFAULT_MEMORY_ACKS = false
View Source
const DEFAULT_MIN_ACKS = 1
View Source
const DEFAULT_OP_TIMEOUT_SEC = 300
View Source
const DEFAULT_PUBLISH_TIMEOUT_SEC = 300
View Source
const DEFAULT_READ_TIMEOUT_SEC = 300
View Source
const DEFAULT_TIME_TO_LIVE_SEC = 300
View Source
const DEFAULT_WRITE_TIMEOUT_SEC = 300
View Source
const WS_CONN_TIMEOUT = 100

Variables

View Source
var ALL_ACTIVE_NODES = []string{"*"}

Functions

func AESDecrypt

func AESDecrypt(data []byte, key []byte, seed []byte, iv string) []byte

func AESEncrypt

func AESEncrypt(data string, key []byte, seed []byte, iv string) []byte

func ConnectWeaveApi

func ConnectWeaveApi(configFile string, credentials string) (NodeApi, Session)

func DeserializePrivate

func DeserializePrivate(PrivateKey string, Password string) *eciesgo.PrivateKey

func DeserializePublic

func DeserializePublic(key string) (*eciesgo.PublicKey, error)

func FromHex

func FromHex(encoded string) []byte

func GenerateKeys

func GenerateKeys() (string, string)

func GetDefaultGateway

func GetDefaultGateway() string

func HandleError

func HandleError(error error)

func IntegritySignature

func IntegritySignature(clientPublicKey string, session Session, scope string, records Records, tableDefinition ordered.OrderedMap, seedHex string, signFn func(message string) string) ordered.OrderedMap

func IsJson

func IsJson(s string) bool

func NodeApiGenerateKeys

func NodeApiGenerateKeys() (string, string)

func PKCS5Padding

func PKCS5Padding(ciphertext []byte, blockSize int) []byte

func PKCS5Trimming

func PKCS5Trimming(encrypt []byte) []byte

func ParseHost

func ParseHost(host string) string

func ReadKey

func ReadKey(keyProperty string, keyFileProperty string) string

func SharedSecret

func SharedSecret(privateKey *publicKey.PrivateKey, serverPublicKey *publicKey.PublicKey) []byte

func SignHttp

func SignHttp(secret []byte, url string, apiKey string, nonce string, data string) string

func SignRequest

func SignRequest(secret []byte, toSign string) string

func SignWs

func SignWs(secret []byte, data ordered.OrderedMap) string

func ToJson

func ToJson(obj interface{}) string

func WeaveClientConfig

func WeaveClientConfig(pub string, pvk string, node string, organization string) ordered.OrderedMap

Types

type AbstractClient

type AbstractClient interface {
	Init()
	ApiContext() *ApiContext
	Login(organization string, account string, scopes string, credentials string) futures.Future[interface{}]
	CreateTable(session Session, scope string, table string, createOptions CreateOptions) futures.Future[interface{}]
	DropTable(session Session, scope string, table string) futures.Future[interface{}]
	Write(session Session, scope string, records Records, writeOptions WriteOptions) futures.Future[interface{}]
	Read(session Session, scope string, table string, filter interface{}, readOptions ReadOptions) futures.Future[interface{}]
	GetTableDefinition(session Session, scope string, table string) futures.Future[interface{}]
	Logout(session Session) futures.Future[interface{}]
	Status(session Session) futures.Future[interface{}]
	Terms(session Session, scope string, table string, options CreateOptions) futures.Future[interface{}]
	UpdateLayout(session Session, scope string, table string, layout interface{}) futures.Future[interface{}]
	UpdateConfig(session Session, path string, values interface{}) futures.Future[interface{}]
	GrantRole(session Session, account string, roles interface{}) futures.Future[interface{}]
	Count(session Session, scope string, table string, filter interface{}, readOptions ReadOptions) futures.Future[interface{}]
	Delete(session Session, scope string, table string, filter interface{}, deleteOptions DeleteOptions) futures.Future[interface{}]
	DownloadTable(session Session, scope string, table string, filter interface{}, format string, readOptions ReadOptions) futures.Future[interface{}]
	Hashes(session Session, scope string, table string, filter interface{}, readOptions ReadOptions) futures.Future[interface{}]
	HashCheckpoint(session Session, enable bool) futures.Future[interface{}]
	PublishDataset(session Session, did string, name string, description string, license string,
		metadata string, weave string, fullDescription string, logo string, category string, scope string, table string,
		filter interface{}, format string, price int64, token string, pageorder uint64, publishOptions PublishOptions) futures.Future[interface{}]
	EnableProduct(session Session, did string, productType string, active bool) futures.Future[interface{}]
	DownloadDataset(session Session, did string, readOptions ReadOptions) futures.Future[interface{}]
	PublishTask(session Session, did string, name string, description string, license string, metadata string,
		weave string, fullDescription string, logo string, category string, task string, price int64,
		token string, pageorder int64, publishOptions PublishOptions) futures.Future[interface{}]
	RunTask(session Session, did string, computeOptions ComputeOptions) futures.Future[interface{}]
	Subscribe(session Session, scope string, table string, filter interface{},
		subscribeOptions SubscribeOptions, updateHandler interface{}) futures.Future[interface{}]
	Unsubscribe(session Session, subscriptionId string) futures.Future[interface{}]
	Compute(session Session, image string, computeOptions ComputeOptions) futures.Future[interface{}]
	GetImage(session Session, image string, localOutputFolder string, computeOptions ComputeOptions) futures.Future[interface{}]
	Flearn(session Session, image string, flOptions FLOptions) futures.Future[interface{}]
	SplitLearn(session Session, image string, slOptions SLOptions) futures.Future[interface{}]
	ForwardApi(session Session, feedId string, params ordered.OrderedMap) futures.Future[interface{}]
	UploadApi(session Session, params ordered.OrderedMap) futures.Future[interface{}]
	HeGetInputs(session Session, datasources []interface{}, args []interface{}) futures.Future[interface{}]
	HeGetOutputs(session Session, encoded string, args []interface{}) futures.Future[interface{}]
	HeEncode(session Session, items []interface{}) futures.Future[interface{}]
	Mpc(session Session, scope string, table string, algo string, fields []string, filter interface{}, mpcOptions MPCOptions) futures.Future[interface{}]
	StorageProof(session Session, scope string, table string, filter interface{}, challenge string, options ReadOptions) futures.Future[interface{}]
	ZkStorageProof(session Session, scope string, table string, filter interface{}, challenge string, options ReadOptions) futures.Future[interface{}]
	MerkleTree(session Session, scope string, table string, filter interface{}, salt string, digest string, options ReadOptions) futures.Future[interface{}]
	MerkleProof(session Session, scope string, table string, hash string) futures.Future[interface{}]
	RootHash(session Session, scope string, table string) futures.Future[interface{}]
	ZkMerkleTree(session Session, scope string, table string, filter interface{}, salt string,
		digest string, rounds int, seed int, options ZKOptions) futures.Future[interface{}]
	MimcHash(session Session, data string, rounds int, seed int) futures.Future[interface{}]
	ProofsLastHash(session Session, scope string, table string) futures.Future[interface{}]
	UpdateProofs(session Session, scope string, table string) futures.Future[interface{}]
	VerifyMerkleHash(session Session, tree string, hash string, digest string) futures.Future[interface{}]
	ZkProof(session Session, scope string, table string, gadget string, params string,
		fields []string, filter interface{}, zkOptions ZKOptions) futures.Future[interface{}]
	ZkDataProof(session Session, gadget string, params string, values []interface{}, zkOptions ZKOptions) futures.Future[interface{}]
	VerifyZkProof(session Session, proof string, gadget string, params string, commitment string, nGenerators int) futures.Future[interface{}]
	TaskLineage(session Session, taskId string) futures.Future[interface{}]
	VerifyTaskLineage(session Session, lineageData ordered.OrderedMap) futures.Future[interface{}]
	TaskOutputData(session Session, taskId string, options OutputOptions) futures.Future[interface{}]
	History(session Session, scope string, table string, filter interface{}, historyOptions HistoryOptions) futures.Future[interface{}]
	Writers(session Session, scope string, table string, filter interface{}) futures.Future[interface{}]
	Tasks(session Session, scope string, table string, filter interface{}) futures.Future[interface{}]
	Lineage(session Session, scope string, table string, filter interface{}) futures.Future[interface{}]
	DeployOracle(session Session, oracleType string, targetBlockchain string, source string, deployOptions DeployOptions) futures.Future[interface{}]
	DeployFeed(session Session, image string, options DeployOptions) futures.Future[interface{}]
	RemoveFeed(session Session, feedId string) futures.Future[interface{}]
	StartFeed(session Session, feedId string, options ComputeOptions) futures.Future[interface{}]
	StopFeed(session Session, feedId string) futures.Future[interface{}]
	IssueCredentials(session Session, issuer string, holder string, credentials ordered.OrderedMap, options CredentialsOptions) futures.Future[interface{}]
	VerifyCredentials(session Session, credentials ordered.OrderedMap, options CredentialsOptions) futures.Future[interface{}]
	CreatePresentation(session Session, credentials ordered.OrderedMap, subject string, options CredentialsOptions) futures.Future[interface{}]
	SignPresentation(session Session, presentation ordered.OrderedMap, domain string, challenge string, options CredentialsOptions) futures.Future[interface{}]
	VerifyDataSignature(session Session, signer string, signature string, toSign string) futures.Future[interface{}]
	VerifyPresentation(session Session, presentation ordered.OrderedMap, domain string,
		challenge string, options CredentialsOptions) futures.Future[interface{}]
	PostMessage(session Session, targetInboxKey string, message string, options MessageOptions) futures.Future[interface{}]
	PollMessages(session Session, inboxKey string, options MessageOptions) futures.Future[interface{}]
	GetSidechainDetails(session Session) futures.Future[interface{}]
	GetUserDetails(session Session, publicKey string) futures.Future[interface{}]
	GetNodes(session Session) futures.Future[interface{}]
	GetScopes(session Session) futures.Future[interface{}]
	GetTables(session Session, scope string) futures.Future[interface{}]
	GetNodeConfig(session Session, nodePublicKey string) futures.Future[interface{}]
	GetAccountNotifications(session Session) futures.Future[interface{}]
	Balance(session Session, accountAddress string, scope string, token string) futures.Future[interface{}]
	Transfer(session Session, accountAddress string, scope string, token string, amount big.Int) futures.Future[interface{}]
	Call(session Session, contractAddress string, scope string, fn string, data []byte) futures.Future[interface{}]
	UpdateFees(session Session, scope string, fees string) futures.Future[interface{}]
	ContractState(session Session, contractAddress string, scope string) futures.Future[interface{}]
	CreateUserAccount(session Session, organization string, account string, publicKey string, roles []string) futures.Future[interface{}]
	ResetConfig(session Session) futures.Future[interface{}]
	Withdraw(session Session, token string, amount big.Int) futures.Future[interface{}]
}

type ApiContext

type ApiContext struct {
	Seed             []byte
	SeedHex          string
	PublicKey        string
	ServerPubKey     *eciesgo.PublicKey
	ServerSigKey     *eciesgo.PublicKey
	ClientPublicKey  *eciesgo.PublicKey
	ClientPrivateKey *eciesgo.PrivateKey
	SigKeys          *ed25519.PrivateKey
	SigKey           string
}

func NewApiContext

func NewApiContext(Seed []byte, SeedHex string, ServerPublicKey string, ServerSigKey string, ClientPublicKey string, ClientPrivateKey string) ApiContext

func (*ApiContext) CreateEd25519Signature

func (context *ApiContext) CreateEd25519Signature(message string) string

func (*ApiContext) Verify

func (context *ApiContext) Verify(publicKey eciesgo.PublicKey, signature []byte, message string) bool

func (*ApiContext) VerifyEd25519Signature

func (context *ApiContext) VerifyEd25519Signature(publicKey ed25519.PublicKey, signature []byte, message string) bool

type ChainClientConfig

type ChainClientConfig struct {
	ApiVersion        string     `json:"apiVersion";default:""`
	HttpConfig        HttpConfig `json:"http"`
	WsConfig          WsConfig   `json:"ws"`
	Seed              string     `json:"seed";default:""`
	ClientPubKey      string     `json:"publicKey";default:""`
	ClientPubKeyFile  string     `json:"publicKeyFile";default:""`
	ClientPrivKey     string     `json:"privateKey";default:""`
	ClientPrivKeyFile string     `json:"privateKeyFile";default:""`
	// contains filtered or unexported fields
}

type ClientConfig

type ClientConfig struct {
	Organization      string            `json:"organization"`
	Account           string            `json:"account"`
	Scope             string            `json:"scope"`
	ChainClientConfig ChainClientConfig `json:"chainClientConfig"`
}

type ComputeOptions

type ComputeOptions struct {
	Sync           bool
	TimeoutSec     int
	PeersConsensus int
	Scopes         string
	Params         ordered.OrderedMap
}

func COMPUTE_DEFAULT

func COMPUTE_DEFAULT() ComputeOptions

func NewComputeOptions

func NewComputeOptions(sync bool, timeoutSec int, peersConsensus int, scopes string, params ordered.OrderedMap) ComputeOptions

type CreateOptions

type CreateOptions struct {
	FailIfExists     bool               `json:"failIfExists"`
	Replicate        bool               `json:"replicate"`
	Layout           ordered.OrderedMap `json:"layout"`
	CreateTimeoutSec int                `json:"createTimeoutSec"`
}

func CREATE_DEFAULT

func CREATE_DEFAULT() CreateOptions

func CREATE_FAILSAFE

func CREATE_FAILSAFE() CreateOptions

func NewCreateOptions

func NewCreateOptions(failIfExists bool, replicate bool, layout ordered.OrderedMap, createTimeoutSec int) CreateOptions

func (*CreateOptions) ToJson

func (createOptions *CreateOptions) ToJson() string

type CredentialsOptions

type CredentialsOptions struct {
	OpTimeoutSec           int
	ProofType              string
	ExpirationTimestampGMT interface{}
}

func NewCredentialsOptions

func NewCredentialsOptions(opTimeoutSec int, proofType string, expirationTimestampGMT interface{}) CredentialsOptions

func VS_DEFAULT

func VS_DEFAULT() CredentialsOptions

type DeleteOptions

type DeleteOptions struct {
	AllowDistribute          bool   `json:"allowDistribute"`
	CorrelationUuid          string `json:"correlationUuid"`
	ThresholdMultisigContext string `json:"thresholdMultisigContext"`
}

func DELETE_DEFAULT

func DELETE_DEFAULT() DeleteOptions

func NewDeleteOptions

func NewDeleteOptions(allowDistribute bool, correlationUuid string, thresholdMultisigContext string) DeleteOptions

type DeployOptions

type DeployOptions struct {
	Sync       bool
	TimeoutSec int
	Params     ordered.OrderedMap
}

func DEFAULT_DEPLOY

func DEFAULT_DEPLOY() DeployOptions

func NewDeployOptions

func NewDeployOptions(sync bool, timeoutSec int, params ordered.OrderedMap) DeployOptions

type DropOptions

type DropOptions struct {
	FailIfExists   bool `json:"failIfNotExists"`
	Replicate      bool `json:"replicate"`
	DropTimeoutSec int  `json:"dropTimeoutSec"`
}

func DROP_DEFAULT

func DROP_DEFAULT() DropOptions

func DROP_FAILSAFE

func DROP_FAILSAFE() DropOptions

func NewDropOptions

func NewDropOptions(failIfExists bool, replicate bool, DropTimeoutSec int) DropOptions

type FLOptions

type FLOptions struct {
	Sync           bool
	TimeoutSec     int
	PeersConsensus int
	Scopes         string
	Params         ordered.OrderedMap
}

func FL_DEFAULT

func FL_DEFAULT() FLOptions

func NewFLOptions

func NewFLOptions(sync bool, timeoutSec int, peersConsensus int, scopes string, params ordered.OrderedMap) FLOptions

type HistoryOptions

type HistoryOptions struct {
	OperationTypes []string
}

func HISTORY_DEFAULT

func HISTORY_DEFAULT() HistoryOptions

func NewHistoryOptions

func NewHistoryOptions(operationTypes []string) HistoryOptions

type HttpClient

type HttpClient struct {
	ChainClientConfig ChainClientConfig
	ClientPublicKey   string
	ClientPrivateKey  string
	ServerSigKey      string
	SecretKey         []byte
	// contains filtered or unexported fields
}

func NewHttpClient

func NewHttpClient(ChainClientConfig ChainClientConfig) HttpClient

func (*HttpClient) ApiContext

func (client *HttpClient) ApiContext() *ApiContext

func (*HttpClient) Balance

func (client *HttpClient) Balance(session Session, accountAddress string, scope string, token string) futures.Future[interface{}]

func (*HttpClient) Call

func (client *HttpClient) Call(session Session, contractAddress string, scope string, fn string, data []byte) futures.Future[interface{}]

func (*HttpClient) Compute

func (client *HttpClient) Compute(session Session, image string, computeOptions ComputeOptions) futures.Future[interface{}]

func (*HttpClient) ContractState

func (client *HttpClient) ContractState(session Session, contractAddress string, scope string) futures.Future[interface{}]

func (*HttpClient) Count

func (client *HttpClient) Count(session Session, scope string, table string, filter interface{}, readOptions ReadOptions) futures.Future[interface{}]

func (*HttpClient) CreatePresentation

func (client *HttpClient) CreatePresentation(session Session, credentials ordered.OrderedMap, subject string, options CredentialsOptions) futures.Future[interface{}]

func (*HttpClient) CreateTable

func (client *HttpClient) CreateTable(session Session, scope string, table string, createOptions CreateOptions) futures.Future[interface{}]

func (*HttpClient) CreateUserAccount

func (client *HttpClient) CreateUserAccount(session Session, organization string, account string, publicKey string, roles []string) futures.Future[interface{}]

func (*HttpClient) Delete

func (client *HttpClient) Delete(session Session, scope string, table string, filter interface{}, deleteOptions DeleteOptions) futures.Future[interface{}]

func (*HttpClient) DeployFeed

func (client *HttpClient) DeployFeed(session Session, image string, options DeployOptions) futures.Future[interface{}]

func (*HttpClient) DeployOracle

func (client *HttpClient) DeployOracle(session Session, oracleType string, targetBlockchain string, source string, deployOptions DeployOptions) futures.Future[interface{}]

func (*HttpClient) DownloadDataset

func (client *HttpClient) DownloadDataset(session Session, did string, readOptions ReadOptions) futures.Future[interface{}]

func (*HttpClient) DownloadTable

func (client *HttpClient) DownloadTable(session Session, scope string, table string, filter interface{}, format string, readOptions ReadOptions) futures.Future[interface{}]

func (*HttpClient) DropTable

func (client *HttpClient) DropTable(session Session, scope string, table string) futures.Future[interface{}]

func (*HttpClient) EnableProduct

func (client *HttpClient) EnableProduct(session Session, did string, productType string, active bool) futures.Future[interface{}]

func (*HttpClient) Flearn

func (client *HttpClient) Flearn(session Session, image string, flOptions FLOptions) futures.Future[interface{}]

func (*HttpClient) ForwardApi

func (client *HttpClient) ForwardApi(session Session, feedId string, params ordered.OrderedMap) futures.Future[interface{}]

func (*HttpClient) GetAccountNotifications

func (client *HttpClient) GetAccountNotifications(session Session) futures.Future[interface{}]

func (*HttpClient) GetImage

func (client *HttpClient) GetImage(session Session, image string, localOutputFolder string, computeOptions ComputeOptions) futures.Future[interface{}]

func (*HttpClient) GetNodeConfig

func (client *HttpClient) GetNodeConfig(session Session, nodePublicKey string) futures.Future[interface{}]

func (*HttpClient) GetNodes

func (client *HttpClient) GetNodes(session Session) futures.Future[interface{}]

func (*HttpClient) GetScopes

func (client *HttpClient) GetScopes(session Session) futures.Future[interface{}]

func (*HttpClient) GetSidechainDetails

func (client *HttpClient) GetSidechainDetails(session Session) futures.Future[interface{}]

func (*HttpClient) GetTableDefinition

func (client *HttpClient) GetTableDefinition(session Session, scope string, table string) futures.Future[interface{}]

func (*HttpClient) GetTables

func (client *HttpClient) GetTables(session Session, scope string) futures.Future[interface{}]

func (*HttpClient) GetUserDetails

func (client *HttpClient) GetUserDetails(session Session, publicKey string) futures.Future[interface{}]

func (*HttpClient) GrantRole

func (client *HttpClient) GrantRole(session Session, account string, roles interface{}) futures.Future[interface{}]

func (*HttpClient) HashCheckpoint

func (client *HttpClient) HashCheckpoint(session Session, enable bool) futures.Future[interface{}]

func (*HttpClient) Hashes

func (client *HttpClient) Hashes(session Session, scope string, table string, filter interface{}, readOptions ReadOptions) futures.Future[interface{}]

func (*HttpClient) HeEncode

func (client *HttpClient) HeEncode(session Session, items []interface{}) futures.Future[interface{}]

func (*HttpClient) HeGetInputs

func (client *HttpClient) HeGetInputs(session Session, datasources []interface{}, args []interface{}) futures.Future[interface{}]

func (*HttpClient) HeGetOutputs

func (client *HttpClient) HeGetOutputs(session Session, encoded string, args []interface{}) futures.Future[interface{}]

func (*HttpClient) History

func (client *HttpClient) History(session Session, scope string, table string, filter interface{}, historyOptions HistoryOptions) futures.Future[interface{}]

func (*HttpClient) Init

func (client *HttpClient) Init()

func (*HttpClient) IssueCredentials

func (client *HttpClient) IssueCredentials(session Session, issuer string, holder string, credentials ordered.OrderedMap, options CredentialsOptions) futures.Future[interface{}]

func (*HttpClient) Lineage

func (client *HttpClient) Lineage(session Session, scope string, table string, filter interface{}) futures.Future[interface{}]

func (*HttpClient) Login

func (client *HttpClient) Login(organization string, account string, scopes string, credentials string) futures.Future[interface{}]

func (*HttpClient) Logout

func (client *HttpClient) Logout(session Session) futures.Future[interface{}]

func (*HttpClient) MerkleProof

func (client *HttpClient) MerkleProof(session Session, scope string, table string, hash string) futures.Future[interface{}]

func (*HttpClient) MerkleTree

func (client *HttpClient) MerkleTree(session Session, scope string, table string, filter interface{}, salt string, digest string, options ReadOptions) futures.Future[interface{}]

func (*HttpClient) MimcHash

func (client *HttpClient) MimcHash(session Session, data string, rounds int, seed int) futures.Future[interface{}]

func (*HttpClient) Mpc

func (client *HttpClient) Mpc(session Session, scope string, table string, algo string, fields []string, filter interface{}, mpcOptions MPCOptions) futures.Future[interface{}]

func (*HttpClient) PollMessages

func (client *HttpClient) PollMessages(session Session, inboxKey string, options MessageOptions) futures.Future[interface{}]

func (*HttpClient) PostMessage

func (client *HttpClient) PostMessage(session Session, targetInboxKey string, message string, options MessageOptions) futures.Future[interface{}]

func (*HttpClient) ProofsLastHash

func (client *HttpClient) ProofsLastHash(session Session, scope string, table string) futures.Future[interface{}]

func (*HttpClient) PublicKey

func (client *HttpClient) PublicKey() Record

func (*HttpClient) PublishDataset

func (client *HttpClient) PublishDataset(session Session, did string, name string, description string, license string, metadata string, weave string, fullDescription string, logo string, category string, scope string, table string, filter interface{}, format string, price int64, token string, pageorder uint64, publishOptions PublishOptions) futures.Future[interface{}]

func (*HttpClient) PublishTask

func (client *HttpClient) PublishTask(session Session, did string, name string, description string, license string, metadata string, weave string, fullDescription string, logo string, category string, task string, price int64, token string, pageorder int64, publishOptions PublishOptions) futures.Future[interface{}]

func (*HttpClient) Read

func (client *HttpClient) Read(session Session, scope string, table string, filter interface{}, readOptions ReadOptions) futures.Future[interface{}]

func (*HttpClient) RemoveFeed

func (client *HttpClient) RemoveFeed(session Session, feedId string) futures.Future[interface{}]

func (*HttpClient) ResetConfig

func (client *HttpClient) ResetConfig(session Session) futures.Future[interface{}]

func (*HttpClient) RootHash

func (client *HttpClient) RootHash(session Session, scope string, table string) futures.Future[interface{}]

func (*HttpClient) RunTask

func (client *HttpClient) RunTask(session Session, did string, computeOptions ComputeOptions) futures.Future[interface{}]

func (*HttpClient) SigKey

func (client *HttpClient) SigKey() Record

func (*HttpClient) SignPresentation

func (client *HttpClient) SignPresentation(session Session, presentation ordered.OrderedMap, domain string, challenge string, options CredentialsOptions) futures.Future[interface{}]

func (*HttpClient) SplitLearn

func (client *HttpClient) SplitLearn(session Session, image string, slOptions SLOptions) futures.Future[interface{}]

func (*HttpClient) StartFeed

func (client *HttpClient) StartFeed(session Session, feedId string, options ComputeOptions) futures.Future[interface{}]

func (*HttpClient) Status

func (client *HttpClient) Status(session Session) futures.Future[interface{}]

func (*HttpClient) StopFeed

func (client *HttpClient) StopFeed(session Session, feedId string) futures.Future[interface{}]

func (*HttpClient) StorageProof

func (client *HttpClient) StorageProof(session Session, scope string, table string, filter interface{}, challenge string, options ReadOptions) futures.Future[interface{}]

func (*HttpClient) Subscribe

func (client *HttpClient) Subscribe(session Session, scope string, table string, filter interface{}, subscribeOptions SubscribeOptions, updateHandler interface{}) futures.Future[interface{}]

func (*HttpClient) TaskLineage

func (client *HttpClient) TaskLineage(session Session, taskId string) futures.Future[interface{}]

func (*HttpClient) TaskOutputData

func (client *HttpClient) TaskOutputData(session Session, taskId string, options OutputOptions) futures.Future[interface{}]

func (*HttpClient) Tasks

func (client *HttpClient) Tasks(session Session, scope string, table string, filter interface{}) futures.Future[interface{}]

func (*HttpClient) Terms

func (client *HttpClient) Terms(session Session, scope string, table string, options CreateOptions) futures.Future[interface{}]

func (*HttpClient) Transfer

func (client *HttpClient) Transfer(session Session, accountAddress string, scope string, token string, amount big.Int) futures.Future[interface{}]

func (*HttpClient) Unsubscribe

func (client *HttpClient) Unsubscribe(session Session, subscriptionId string) futures.Future[interface{}]

func (*HttpClient) UpdateConfig

func (client *HttpClient) UpdateConfig(session Session, path string, values interface{}) futures.Future[interface{}]

func (*HttpClient) UpdateFees

func (client *HttpClient) UpdateFees(session Session, scope string, fees string) futures.Future[interface{}]

func (*HttpClient) UpdateLayout

func (client *HttpClient) UpdateLayout(session Session, scope string, table string, layout interface{}) futures.Future[interface{}]

func (*HttpClient) UpdateProofs

func (client *HttpClient) UpdateProofs(session Session, scope string, table string) futures.Future[interface{}]

func (*HttpClient) UploadApi

func (client *HttpClient) UploadApi(session Session, params ordered.OrderedMap) futures.Future[interface{}]

func (*HttpClient) VerifyCredentials

func (client *HttpClient) VerifyCredentials(session Session, credentials ordered.OrderedMap, options CredentialsOptions) futures.Future[interface{}]

func (*HttpClient) VerifyDataSignature

func (client *HttpClient) VerifyDataSignature(session Session, signer string, signature string, toSign string) futures.Future[interface{}]

func (*HttpClient) VerifyMerkleHash

func (client *HttpClient) VerifyMerkleHash(session Session, tree string, hash string, digest string) futures.Future[interface{}]

func (*HttpClient) VerifyPresentation

func (client *HttpClient) VerifyPresentation(session Session, presentation ordered.OrderedMap, domain string, challenge string, options CredentialsOptions) futures.Future[interface{}]

func (*HttpClient) VerifyTaskLineage

func (client *HttpClient) VerifyTaskLineage(session Session, lineageData ordered.OrderedMap) futures.Future[interface{}]

func (*HttpClient) VerifyZkProof

func (client *HttpClient) VerifyZkProof(session Session, proof string, gadget string, params string, commitment string, nGenerators int) futures.Future[interface{}]

func (*HttpClient) Withdraw

func (client *HttpClient) Withdraw(session Session, token string, amount big.Int) futures.Future[interface{}]

func (*HttpClient) Write

func (client *HttpClient) Write(session Session, scope string, records Records, writeOptions WriteOptions) futures.Future[interface{}]

func (*HttpClient) Writers

func (client *HttpClient) Writers(session Session, scope string, table string, filter interface{}) futures.Future[interface{}]

func (*HttpClient) ZkDataProof

func (client *HttpClient) ZkDataProof(session Session, gadget string, params string, values []interface{}, zkOptions ZKOptions) futures.Future[interface{}]

func (*HttpClient) ZkMerkleTree

func (client *HttpClient) ZkMerkleTree(session Session, scope string, table string, filter interface{}, salt string, digest string, rounds int, seed int, options ZKOptions) futures.Future[interface{}]

func (*HttpClient) ZkProof

func (client *HttpClient) ZkProof(session Session, scope string, table string, gadget string, params string, fields []string, filter interface{}, zkOptions ZKOptions) futures.Future[interface{}]

func (*HttpClient) ZkStorageProof

func (client *HttpClient) ZkStorageProof(session Session, scope string, table string, filter interface{}, challenge string, options ReadOptions) futures.Future[interface{}]

type HttpConfig

type HttpConfig struct {
	UseHttps bool   `json:"useHttps"`
	Host     string `json:"host"`
	Port     string `json:"port"`
}

type JavaRandom

type JavaRandom struct {
	// contains filtered or unexported fields
}

func NewRandom

func NewRandom(seed int64) JavaRandom

func (*JavaRandom) Next

func (random *JavaRandom) Next(bits int64) int64

func (*JavaRandom) NextBytes

func (random *JavaRandom) NextBytes(l *[32]int64)

func (*JavaRandom) NextInt

func (random *JavaRandom) NextInt(bound int64) (int64, error)

type MPCOptions

type MPCOptions struct {
	VerifyHash     bool
	ReadTimeoutSec int
	Sources        []string
}

func MPC_DEFAULT

func MPC_DEFAULT() MPCOptions

func MPC_DEFAULT_NO_CHAIN

func MPC_DEFAULT_NO_CHAIN() MPCOptions

func NewMPCOPtions

func NewMPCOPtions(verifyHash bool, readTimeoutSec int, sources []string) MPCOptions

type MessageOptions

type MessageOptions struct {
	OpTimeoutSec int
	TtlSec       int
}

func DEFAULT_MESSAGE

func DEFAULT_MESSAGE() MessageOptions

func NewMessageOptions

func NewMessageOptions(opTimeoutSec int, ttlSec int) MessageOptions

type NodeApi

type NodeApi struct {
	Config          ChainClientConfig
	ClientPublicKey string
	Client          AbstractClient
}

func NewNodeApi

func NewNodeApi(ChainClientConfig ChainClientConfig) NodeApi

func (*NodeApi) Balance

func (nodeApi *NodeApi) Balance(session Session, accountAddress string, scope string, token string) futures.Future[interface{}]

func (*NodeApi) Call

func (nodeApi *NodeApi) Call(session Session, contractAddress string, scope string, fn string, data []byte) futures.Future[interface{}]

func (*NodeApi) Compute

func (nodeApi *NodeApi) Compute(session Session, image string, computeOptions ComputeOptions) futures.Future[interface{}]

func (*NodeApi) ContractState

func (nodeApi *NodeApi) ContractState(session Session, contractAddress string, scope string) futures.Future[interface{}]

func (*NodeApi) Count

func (nodeApi *NodeApi) Count(session Session, scope string, table string, filter interface{}, readOptions ReadOptions) futures.Future[interface{}]

func (*NodeApi) CreatePresentation

func (nodeApi *NodeApi) CreatePresentation(session Session, credentials ordered.OrderedMap, subject string, options CredentialsOptions) futures.Future[interface{}]

func (*NodeApi) CreateTable

func (nodeApi *NodeApi) CreateTable(session Session, scope string, table string, createOptions CreateOptions) futures.Future[interface{}]

func (*NodeApi) CreateUserAccount

func (nodeApi *NodeApi) CreateUserAccount(session Session, organization string, account string, publicKey string, roles []string) futures.Future[interface{}]

func (*NodeApi) Delete

func (nodeApi *NodeApi) Delete(session Session, scope string, table string, filter interface{}, deleteOptions DeleteOptions) futures.Future[interface{}]

func (*NodeApi) DeployFeed

func (nodeApi *NodeApi) DeployFeed(session Session, image string, options DeployOptions) futures.Future[interface{}]

func (*NodeApi) DeployOracle

func (nodeApi *NodeApi) DeployOracle(session Session, oracleType string, targetBlockchain string, source string, deployOptions DeployOptions) futures.Future[interface{}]

func (*NodeApi) DownloadDataset

func (nodeApi *NodeApi) DownloadDataset(session Session, did string, readOptions ReadOptions) futures.Future[interface{}]

func (*NodeApi) DownloadTable

func (nodeApi *NodeApi) DownloadTable(session Session, scope string, table string, filter interface{}, format string, readOptions ReadOptions) futures.Future[interface{}]

func (*NodeApi) DropTable

func (nodeApi *NodeApi) DropTable(session Session, scope string, table string) futures.Future[interface{}]

func (*NodeApi) EnableProduct

func (nodeApi *NodeApi) EnableProduct(session Session, did string, productType string, active bool) futures.Future[interface{}]

func (*NodeApi) Flearn

func (nodeApi *NodeApi) Flearn(session Session, image string, flOptions FLOptions) futures.Future[interface{}]

func (*NodeApi) ForwardApi

func (nodeApi *NodeApi) ForwardApi(session Session, feedId string, params ordered.OrderedMap) futures.Future[interface{}]

func (*NodeApi) GenerateKeys

func (NodeApi *NodeApi) GenerateKeys() (string, string)

func (*NodeApi) GetAccountNotifications

func (nodeApi *NodeApi) GetAccountNotifications(session Session) futures.Future[interface{}]

func (*NodeApi) GetImage

func (nodeApi *NodeApi) GetImage(session Session, image string, localOutputFolder string, computeOptions ComputeOptions) futures.Future[interface{}]

func (*NodeApi) GetNodeConfig

func (nodeApi *NodeApi) GetNodeConfig(session Session, nodePublicKey string) futures.Future[interface{}]

func (*NodeApi) GetNodes

func (nodeApi *NodeApi) GetNodes(session Session) futures.Future[interface{}]

func (*NodeApi) GetScopes

func (nodeApi *NodeApi) GetScopes(session Session) futures.Future[interface{}]

func (*NodeApi) GetSidechainDetails

func (nodeApi *NodeApi) GetSidechainDetails(session Session) futures.Future[interface{}]

func (*NodeApi) GetTableDefinition

func (nodeApi *NodeApi) GetTableDefinition(session Session, scope string, table string) futures.Future[interface{}]

func (*NodeApi) GetTables

func (nodeApi *NodeApi) GetTables(session Session, scope string) futures.Future[interface{}]

func (*NodeApi) GetUserDetails

func (nodeApi *NodeApi) GetUserDetails(session Session, publicKey string) futures.Future[interface{}]

func (*NodeApi) GrantRole

func (nodeApi *NodeApi) GrantRole(session Session, account string, roles interface{}) futures.Future[interface{}]

func (*NodeApi) HashCheckpoint

func (nodeApi *NodeApi) HashCheckpoint(session Session, enable bool) futures.Future[interface{}]

func (*NodeApi) HashRecord

func (nodeApi *NodeApi) HashRecord(row []interface{}, salt string, digest string) string

func (*NodeApi) Hashes

func (nodeApi *NodeApi) Hashes(session Session, scope string, table string, filter interface{}, readOptions ReadOptions) futures.Future[interface{}]

func (*NodeApi) HeEncode

func (nodeApi *NodeApi) HeEncode(session Session, items []interface{}) futures.Future[interface{}]

func (*NodeApi) HeGetInputs

func (nodeApi *NodeApi) HeGetInputs(session Session, datasources []interface{}, args []interface{}) futures.Future[interface{}]

func (*NodeApi) HeGetOutputs

func (nodeApi *NodeApi) HeGetOutputs(session Session, encoded string, args []interface{}) futures.Future[interface{}]

func (*NodeApi) History

func (nodeApi *NodeApi) History(session Session, scope string, table string, filter interface{}, historyOptions HistoryOptions) futures.Future[interface{}]

func (*NodeApi) Init

func (nodeApi *NodeApi) Init()

func (*NodeApi) IssueCredentials

func (nodeApi *NodeApi) IssueCredentials(session Session, issuer string, holder string, credentials ordered.OrderedMap, options CredentialsOptions) futures.Future[interface{}]

func (*NodeApi) Lineage

func (nodeApi *NodeApi) Lineage(session Session, scope string, table string, filter interface{}) futures.Future[interface{}]

func (*NodeApi) Login

func (nodeApi *NodeApi) Login(organization string, account string, scopes string, credentials string) futures.Future[interface{}]

func (*NodeApi) Logout

func (nodeApi *NodeApi) Logout(session Session) futures.Future[interface{}]

func (*NodeApi) MerkleProof

func (nodeApi *NodeApi) MerkleProof(session Session, scope string, table string, hash string) futures.Future[interface{}]

func (*NodeApi) MerkleTree

func (nodeApi *NodeApi) MerkleTree(session Session, scope string, table string, filter interface{}, salt string, digest string, options ReadOptions) futures.Future[interface{}]

func (*NodeApi) MimcHash

func (nodeApi *NodeApi) MimcHash(session Session, data string, rounds int, seed int) futures.Future[interface{}]

func (*NodeApi) Mpc

func (nodeApi *NodeApi) Mpc(session Session, scope string, table string, algo string, fields []string, filter interface{}, mpcOptions MPCOptions) futures.Future[interface{}]

func (*NodeApi) PollMessages

func (nodeApi *NodeApi) PollMessages(session Session, inboxKey string, options MessageOptions) futures.Future[interface{}]

func (*NodeApi) PostMessage

func (nodeApi *NodeApi) PostMessage(session Session, targetInboxKey string, message string, options MessageOptions) futures.Future[interface{}]

func (*NodeApi) ProofsLastHash

func (nodeApi *NodeApi) ProofsLastHash(session Session, scope string, table string) futures.Future[interface{}]

func (*NodeApi) PublishDataset

func (nodeApi *NodeApi) PublishDataset(session Session, did string, name string, description string, license string, metadata string, weave string, fullDescription string, logo string, category string, scope string, table string, filter interface{}, format string, price int64, token string, pageorder uint64, publishOptions PublishOptions) futures.Future[interface{}]

func (*NodeApi) PublishTask

func (nodeApi *NodeApi) PublishTask(session Session, did string, name string, description string, license string, metadata string, weave string, fullDescription string, logo string, category string, task string, price int64, token string, pageorder int64, publishOptions PublishOptions) futures.Future[interface{}]

func (*NodeApi) Read

func (nodeApi *NodeApi) Read(session Session, scope string, table string, filter interface{}, readOptions ReadOptions) futures.Future[interface{}]

func (*NodeApi) RemoveFeed

func (nodeApi *NodeApi) RemoveFeed(session Session, feedId string) futures.Future[interface{}]

func (*NodeApi) ResetConfig

func (nodeApi *NodeApi) ResetConfig(session Session) futures.Future[interface{}]

func (*NodeApi) RootHash

func (nodeApi *NodeApi) RootHash(session Session, scope string, table string) futures.Future[interface{}]

func (*NodeApi) RunTask

func (nodeApi *NodeApi) RunTask(session Session, did string, computeOptions ComputeOptions) futures.Future[interface{}]

func (*NodeApi) Sign

func (nodeApi *NodeApi) Sign(data string) string

func (*NodeApi) SignPresentation

func (nodeApi *NodeApi) SignPresentation(session Session, presentation ordered.OrderedMap, domain string, challenge string, options CredentialsOptions) futures.Future[interface{}]

func (*NodeApi) SplitLearn

func (nodeApi *NodeApi) SplitLearn(session Session, image string, slOptions SLOptions) futures.Future[interface{}]

func (*NodeApi) StartFeed

func (nodeApi *NodeApi) StartFeed(session Session, feedId string, options ComputeOptions) futures.Future[interface{}]

func (*NodeApi) Status

func (nodeApi *NodeApi) Status(session Session) futures.Future[interface{}]

func (*NodeApi) StopFeed

func (nodeApi *NodeApi) StopFeed(session Session, feedId string) futures.Future[interface{}]

func (*NodeApi) StorageProof

func (nodeApi *NodeApi) StorageProof(session Session, scope string, table string, filter interface{}, challenge string, options ReadOptions) futures.Future[interface{}]

func (*NodeApi) Subscribe

func (nodeApi *NodeApi) Subscribe(session Session, scope string, table string, filter interface{}, subscribeOptions SubscribeOptions, updateHandler interface{}) futures.Future[interface{}]

func (*NodeApi) TaskLineage

func (nodeApi *NodeApi) TaskLineage(session Session, taskId string) futures.Future[interface{}]

func (*NodeApi) TaskOutputData

func (nodeApi *NodeApi) TaskOutputData(session Session, taskId string, options OutputOptions) futures.Future[interface{}]

func (*NodeApi) Tasks

func (nodeApi *NodeApi) Tasks(session Session, scope string, table string, filter interface{}) futures.Future[interface{}]

func (*NodeApi) Terms

func (nodeApi *NodeApi) Terms(session Session, scope string, table string, options CreateOptions) futures.Future[interface{}]

func (*NodeApi) Transfer

func (nodeApi *NodeApi) Transfer(session Session, accountAddress string, scope string, token string, amount big.Int) futures.Future[interface{}]

func (*NodeApi) Unsubscribe

func (nodeApi *NodeApi) Unsubscribe(session Session, subscriptionId string) futures.Future[interface{}]

func (*NodeApi) UpdateConfig

func (nodeApi *NodeApi) UpdateConfig(session Session, path string, values interface{}) futures.Future[interface{}]

func (*NodeApi) UpdateFees

func (nodeApi *NodeApi) UpdateFees(session Session, scope string, fees string) futures.Future[interface{}]

func (*NodeApi) UpdateLayout

func (nodeApi *NodeApi) UpdateLayout(session Session, scope string, table string, layout interface{}) futures.Future[interface{}]

func (*NodeApi) UpdateProofs

func (nodeApi *NodeApi) UpdateProofs(session Session, scope string, table string) futures.Future[interface{}]

func (*NodeApi) UploadApi

func (nodeApi *NodeApi) UploadApi(session Session, params ordered.OrderedMap) futures.Future[interface{}]

func (*NodeApi) VerifyCredentials

func (nodeApi *NodeApi) VerifyCredentials(session Session, credentials ordered.OrderedMap, options CredentialsOptions) futures.Future[interface{}]

func (*NodeApi) VerifyDataSignature

func (nodeApi *NodeApi) VerifyDataSignature(session Session, signer string, signature string, toSign string) futures.Future[interface{}]

func (*NodeApi) VerifyKeySignature

func (nodeApi *NodeApi) VerifyKeySignature(publicKey ed25519.PublicKey, signature []byte, data string) bool

func (*NodeApi) VerifyLineageSignature

func (nodeApi *NodeApi) VerifyLineageSignature(signature string, inputHash string, computeHash string, paramsHash string, data string) bool

func (*NodeApi) VerifyMerkleHash

func (nodeApi *NodeApi) VerifyMerkleHash(session Session, tree string, hash string, digest string) futures.Future[interface{}]

func (*NodeApi) VerifyPresentation

func (nodeApi *NodeApi) VerifyPresentation(session Session, presentation ordered.OrderedMap, domain string, challenge string, options CredentialsOptions) futures.Future[interface{}]

func (*NodeApi) VerifySignature

func (nodeApi *NodeApi) VerifySignature(signature string, data string) bool

func (*NodeApi) VerifyTaskLineage

func (nodeApi *NodeApi) VerifyTaskLineage(session Session, lineageData ordered.OrderedMap) futures.Future[interface{}]

func (*NodeApi) VerifyZkProof

func (nodeApi *NodeApi) VerifyZkProof(session Session, proof string, gadget string, params string, commitment string, nGenerators int) futures.Future[interface{}]

func (*NodeApi) Withdraw

func (nodeApi *NodeApi) Withdraw(session Session, token string, amount big.Int) futures.Future[interface{}]

func (*NodeApi) Writers

func (nodeApi *NodeApi) Writers(session Session, scope string, table string, filter interface{}) futures.Future[interface{}]

func (*NodeApi) ZkDataProof

func (nodeApi *NodeApi) ZkDataProof(session Session, gadget string, params string, values []interface{}, zkOptions ZKOptions) futures.Future[interface{}]

func (*NodeApi) ZkMerkleTree

func (nodeApi *NodeApi) ZkMerkleTree(session Session, scope string, table string, filter interface{}, salt string, digest string, rounds int, seed int, options ZKOptions) futures.Future[interface{}]

func (*NodeApi) ZkProof

func (nodeApi *NodeApi) ZkProof(session Session, scope string, table string, gadget string, params string, fields []string, filter interface{}, zkOptions ZKOptions) futures.Future[interface{}]

func (*NodeApi) ZkStorageProof

func (nodeApi *NodeApi) ZkStorageProof(session Session, scope string, table string, filter interface{}, challenge string, options ReadOptions) futures.Future[interface{}]

type OutputOptions

type OutputOptions struct {
	OutputType string
}

func DEFAULT_OUTPUT

func DEFAULT_OUTPUT() OutputOptions

func NewOutputOptions

func NewOutputOptions(outputType string) OutputOptions

type PublishOptions

type PublishOptions struct {
	OptionType     string
	RollingUnit    string
	RollingCount   int
	VerifyHash     bool
	ReadTimeoutSec int
	PeersConsensus int
	EnableMux      bool
}

func NewPublishOptions

func NewPublishOptions(optionType string, rollingUnit string, rollingCount int, verifyHash bool, readTimeoutSec int, peersConsensus int, enableMux bool) PublishOptions

func PUBLISH_DEFAULT

func PUBLISH_DEFAULT() PublishOptions

type PublishTaskOptions

type PublishTaskOptions struct {
	ComputeTimeoutSec int
	Params            ordered.OrderedMap
	AllowCustomParams bool
}

func NewPublishTaskOptions

func NewPublishTaskOptions(computeTimeoutSec int, params ordered.OrderedMap, allowCustomParams bool) PublishTaskOptions

func PUBLISH_TASK_DEFAULT

func PUBLISH_TASK_DEFAULT() PublishTaskOptions

type ReadOptions

type ReadOptions struct {
	VerifyHash     bool `json:"verifyHash"`
	ReadTimeoutSec int  `json:"readTimeoutSec"`
	PeersConsesus  int  `json:"peersConsensus"`
	EnableMux      bool `json:"enableMux"`
	GetBatchHashes bool `json:"getBatchHashes"`
}

func NewReadOptions

func NewReadOptions(verifyHash bool, readTimeoutSec int, peersConsesus int, enableMux bool, getBatchHashes bool) ReadOptions

func READ_DEFAULT

func READ_DEFAULT() ReadOptions

func READ_DEFAULT_MUX

func READ_DEFAULT_MUX() ReadOptions

func READ_DEFAULT_MUX_NO_CHAIN

func READ_DEFAULT_MUX_NO_CHAIN() ReadOptions

func READ_DEFAULT_NO_CHAIN

func READ_DEFAULT_NO_CHAIN() ReadOptions

type Record

type Record struct {
	Id       string `json:"id"`
	Data     string `json:"data"`
	Metadata string `json:"metadata"`
}

func NewRecord

func NewRecord(id string, data string, metadata string) Record

type Records

type Records struct {
	Table     string               `json:"table"`
	Records   [][]interface{}      `json:"items"`
	Integrity []ordered.OrderedMap `json:"integrity"`
}

func NewRecords

func NewRecords(table string, records [][]interface{}, integrity []ordered.OrderedMap) Records

func (*Records) ToJson

func (records *Records) ToJson() string

type SLOptions

type SLOptions struct {
	Sync            bool
	TimeoutSec      int
	MinParticipants int
	Scopes          string
	Sources         []string
	Params          ordered.OrderedMap
}

func NewSLOptions

func NewSLOptions(sync bool, timeoutSec int, minParticipants int, scopes string, sources []string, params ordered.OrderedMap) SLOptions

func SL_DEFAULT

func SL_DEFAULT() SLOptions

type Session

type Session struct {
	Organization     string
	Account          string
	PublicKey        string
	Scopes           string
	ApiKey           string
	Secret           []byte
	SecretExpireUTC  time.Time
	IntegrityChecks  bool
	Nonce            uint64
	TableLayoutCache ordered.OrderedMap
	PrevRecordsData  ordered.OrderedMap
	ExpiryCUshionSec uint32
}

func NewSession

func NewSession(data ordered.OrderedMap, decryptedSecret string) Session

func (*Session) GetNonce

func (session *Session) GetNonce() uint64

type SubscribeOptions

type SubscribeOptions struct {
	VerifyHash      bool
	InitialSnapshot bool
	ReadTimeoutSec  int
	ExternalUpdates bool
	BatchingOptions interface{}
}

func NewSubscribeOptions

func NewSubscribeOptions(verifyHash bool, initialSnapshot bool, readTimeoutSec int, externalUpdates bool, batchingOptions interface{}) SubscribeOptions

func SUBSCRIBE_DEFAULT

func SUBSCRIBE_DEFAULT() SubscribeOptions

type WriteOptions

type WriteOptions struct {
	Guaranteed      bool `json:"guaranteed"`
	MinAcks         int  `json:"minAcks"`
	InMemoryAcks    bool `json:"inMemoryAcks"`
	MinHashAcks     int  `json:"minHashAcks"`
	WriteTimeoutSec int  `json:"writeTimeoutSec"`
	AllowDistribute bool `json:"allowDistribute"`
	SignOnChain     bool `json:"signOnChain"`
	SyncSigning     bool `json:"syncSigning"`
}

func NewWriteOptions

func NewWriteOptions(guaranteed bool, minAcks int, inMemoryAcks bool, minHashAcks int, writeTimeoutSec int, allowDistribute bool, signOnChain bool, syncSigning bool) WriteOptions

func WRITE_DEFAULT

func WRITE_DEFAULT() WriteOptions

func WRITE_DEFAULT_ASYNC

func WRITE_DEFAULT_ASYNC() WriteOptions

func WRITE_DEFAULT_NO_CHAIN

func WRITE_DEFAULT_NO_CHAIN() WriteOptions

type WsClient

type WsClient struct {
	ChainClientConfig ChainClientConfig
	ClientPublicKey   string
	ClientPrivateKey  string
	ServerSigKey      string
	SecretKey         []byte
	// contains filtered or unexported fields
}

func NewWsClient

func NewWsClient(ChainClientConfig ChainClientConfig) WsClient

func (*WsClient) ApiContext

func (client *WsClient) ApiContext() *ApiContext

func (*WsClient) Balance

func (client *WsClient) Balance(session Session, accountAddress string, scope string, token string) futures.Future[interface{}]

func (*WsClient) Call

func (client *WsClient) Call(session Session, contractAddress string, scope string, fn string, data []byte) futures.Future[interface{}]

func (WsClient) Client

func (client WsClient) Client() WsClient

func (*WsClient) Compute

func (client *WsClient) Compute(session Session, image string, computeOptions ComputeOptions) futures.Future[interface{}]

func (*WsClient) ContractState

func (client *WsClient) ContractState(session Session, contractAddress string, scope string) futures.Future[interface{}]

func (*WsClient) Count

func (client *WsClient) Count(session Session, scope string, table string, filter interface{}, readOptions ReadOptions) futures.Future[interface{}]

func (*WsClient) CreatePresentation

func (client *WsClient) CreatePresentation(session Session, credentials ordered.OrderedMap, subject string, options CredentialsOptions) futures.Future[interface{}]

func (*WsClient) CreateTable

func (client *WsClient) CreateTable(session Session, scope string, table string, createOptions CreateOptions) futures.Future[interface{}]

func (*WsClient) CreateUserAccount

func (client *WsClient) CreateUserAccount(session Session, organization string, account string, publicKey string, roles []string) futures.Future[interface{}]

func (*WsClient) Delete

func (client *WsClient) Delete(session Session, scope string, table string, filter interface{}, deleteOptions DeleteOptions) futures.Future[interface{}]

func (*WsClient) DeployFeed

func (client *WsClient) DeployFeed(session Session, image string, options DeployOptions) futures.Future[interface{}]

func (*WsClient) DeployOracle

func (client *WsClient) DeployOracle(session Session, oracleType string, targetBlockchain string, source string, deployOptions DeployOptions) futures.Future[interface{}]

func (*WsClient) DownloadDataset

func (client *WsClient) DownloadDataset(session Session, did string, readOptions ReadOptions) futures.Future[interface{}]

func (*WsClient) DownloadTable

func (client *WsClient) DownloadTable(session Session, scope string, table string, filter interface{}, format string, readOptions ReadOptions) futures.Future[interface{}]

func (*WsClient) DropTable

func (client *WsClient) DropTable(session Session, scope string, table string) futures.Future[interface{}]

func (*WsClient) EnableProduct

func (client *WsClient) EnableProduct(session Session, did string, productType string, active bool) futures.Future[interface{}]

func (*WsClient) Flearn

func (client *WsClient) Flearn(session Session, image string, flOptions FLOptions) futures.Future[interface{}]

func (*WsClient) ForwardApi

func (client *WsClient) ForwardApi(session Session, feedId string, params ordered.OrderedMap) futures.Future[interface{}]

func (*WsClient) GetAccountNotifications

func (client *WsClient) GetAccountNotifications(session Session) futures.Future[interface{}]

func (*WsClient) GetImage

func (client *WsClient) GetImage(session Session, image string, localOutputFolder string, computeOptions ComputeOptions) futures.Future[interface{}]

func (*WsClient) GetNodeConfig

func (client *WsClient) GetNodeConfig(session Session, nodePublicKey string) futures.Future[interface{}]

func (*WsClient) GetNodes

func (client *WsClient) GetNodes(session Session) futures.Future[interface{}]

func (*WsClient) GetScopes

func (client *WsClient) GetScopes(session Session) futures.Future[interface{}]

func (*WsClient) GetSidechainDetails

func (client *WsClient) GetSidechainDetails(session Session) futures.Future[interface{}]

func (*WsClient) GetTableDefinition

func (client *WsClient) GetTableDefinition(session Session, scope string, table string) futures.Future[interface{}]

func (*WsClient) GetTables

func (client *WsClient) GetTables(session Session, scope string) futures.Future[interface{}]

func (*WsClient) GetUserDetails

func (client *WsClient) GetUserDetails(session Session, publicKey string) futures.Future[interface{}]

func (*WsClient) GrantRole

func (client *WsClient) GrantRole(session Session, account string, roles interface{}) futures.Future[interface{}]

func (*WsClient) HashCheckpoint

func (client *WsClient) HashCheckpoint(session Session, enable bool) futures.Future[interface{}]

func (*WsClient) Hashes

func (client *WsClient) Hashes(session Session, scope string, table string, filter interface{}, readOptions ReadOptions) futures.Future[interface{}]

func (*WsClient) HeEncode

func (client *WsClient) HeEncode(session Session, items []interface{}) futures.Future[interface{}]

func (*WsClient) HeGetInputs

func (client *WsClient) HeGetInputs(session Session, datasources []interface{}, args []interface{}) futures.Future[interface{}]

func (*WsClient) HeGetOutputs

func (client *WsClient) HeGetOutputs(session Session, encoded string, args []interface{}) futures.Future[interface{}]

func (*WsClient) History

func (client *WsClient) History(session Session, scope string, table string, filter interface{}, historyOptions HistoryOptions) futures.Future[interface{}]

func (*WsClient) Init

func (client *WsClient) Init()

func (*WsClient) IssueCredentials

func (client *WsClient) IssueCredentials(session Session, issuer string, holder string, credentials ordered.OrderedMap, options CredentialsOptions) futures.Future[interface{}]

func (*WsClient) Lineage

func (client *WsClient) Lineage(session Session, scope string, table string, filter interface{}) futures.Future[interface{}]

func (*WsClient) Login

func (client *WsClient) Login(organization string, account string, scopes string, credentials string) futures.Future[interface{}]

func (*WsClient) Logout

func (client *WsClient) Logout(session Session) futures.Future[interface{}]

func (*WsClient) MerkleProof

func (client *WsClient) MerkleProof(session Session, scope string, table string, hash string) futures.Future[interface{}]

func (*WsClient) MerkleTree

func (client *WsClient) MerkleTree(session Session, scope string, table string, filter interface{}, salt string, digest string, options ReadOptions) futures.Future[interface{}]

func (*WsClient) MimcHash

func (client *WsClient) MimcHash(session Session, data string, rounds int, seed int) futures.Future[interface{}]

func (*WsClient) Mpc

func (client *WsClient) Mpc(session Session, scope string, table string, algo string, fields []string, filter interface{}, mpcOptions MPCOptions) futures.Future[interface{}]

func (*WsClient) Ping

func (client *WsClient) Ping() futures.Future[interface{}]

func (*WsClient) PollMessages

func (client *WsClient) PollMessages(session Session, inboxKey string, options MessageOptions) futures.Future[interface{}]

func (*WsClient) PostMessage

func (client *WsClient) PostMessage(session Session, targetInboxKey string, message string, options MessageOptions) futures.Future[interface{}]

func (*WsClient) ProofsLastHash

func (client *WsClient) ProofsLastHash(session Session, scope string, table string) futures.Future[interface{}]

func (*WsClient) PublicKey

func (client *WsClient) PublicKey() futures.Future[interface{}]

func (*WsClient) PublishDataset

func (client *WsClient) PublishDataset(session Session, did string, name string, description string, license string, metadata string, weave string, fullDescription string, logo string, category string, scope string, table string, filter interface{}, format string, price int64, token string, pageorder uint64, publishOptions PublishOptions) futures.Future[interface{}]

func (*WsClient) PublishTask

func (client *WsClient) PublishTask(session Session, did string, name string, description string, license string, metadata string, weave string, fullDescription string, logo string, category string, task string, price int64, token string, pageorder int64, publishOptions PublishOptions) futures.Future[interface{}]

func (*WsClient) Read

func (client *WsClient) Read(session Session, scope string, table string, filter interface{}, readOptions ReadOptions) futures.Future[interface{}]

func (*WsClient) RemoveFeed

func (client *WsClient) RemoveFeed(session Session, feedId string) futures.Future[interface{}]

func (*WsClient) ResetConfig

func (client *WsClient) ResetConfig(session Session) futures.Future[interface{}]

func (*WsClient) RootHash

func (client *WsClient) RootHash(session Session, scope string, table string) futures.Future[interface{}]

func (*WsClient) RunTask

func (client *WsClient) RunTask(session Session, did string, computeOptions ComputeOptions) futures.Future[interface{}]

func (*WsClient) SigKey

func (client *WsClient) SigKey() futures.Future[interface{}]

func (*WsClient) SignPresentation

func (client *WsClient) SignPresentation(session Session, presentation ordered.OrderedMap, domain string, challenge string, options CredentialsOptions) futures.Future[interface{}]

func (*WsClient) SplitLearn

func (client *WsClient) SplitLearn(session Session, image string, slOptions SLOptions) futures.Future[interface{}]

func (*WsClient) StartFeed

func (client *WsClient) StartFeed(session Session, feedId string, options ComputeOptions) futures.Future[interface{}]

func (*WsClient) Status

func (client *WsClient) Status(session Session) futures.Future[interface{}]

func (*WsClient) StopFeed

func (client *WsClient) StopFeed(session Session, feedId string) futures.Future[interface{}]

func (*WsClient) StorageProof

func (client *WsClient) StorageProof(session Session, scope string, table string, filter interface{}, challenge string, options ReadOptions) futures.Future[interface{}]

func (*WsClient) Subscribe

func (client *WsClient) Subscribe(session Session, scope string, table string, filter interface{}, subscribeOptions SubscribeOptions, updateHandler interface{}) futures.Future[interface{}]

func (*WsClient) TaskLineage

func (client *WsClient) TaskLineage(session Session, taskId string) futures.Future[interface{}]

func (*WsClient) TaskOutputData

func (client *WsClient) TaskOutputData(session Session, taskId string, options OutputOptions) futures.Future[interface{}]

func (*WsClient) Tasks

func (client *WsClient) Tasks(session Session, scope string, table string, filter interface{}) futures.Future[interface{}]

func (*WsClient) Terms

func (client *WsClient) Terms(session Session, scope string, table string, options CreateOptions) futures.Future[interface{}]

func (*WsClient) Transfer

func (client *WsClient) Transfer(session Session, accountAddress string, scope string, token string, amount big.Int) futures.Future[interface{}]

func (*WsClient) Unsubscribe

func (client *WsClient) Unsubscribe(session Session, subscriptionId string) futures.Future[interface{}]

func (*WsClient) UpdateConfig

func (client *WsClient) UpdateConfig(session Session, path string, values interface{}) futures.Future[interface{}]

func (*WsClient) UpdateFees

func (client *WsClient) UpdateFees(session Session, scope string, fees string) futures.Future[interface{}]

func (*WsClient) UpdateLayout

func (client *WsClient) UpdateLayout(session Session, scope string, table string, layout interface{}) futures.Future[interface{}]

func (*WsClient) UpdateProofs

func (client *WsClient) UpdateProofs(session Session, scope string, table string) futures.Future[interface{}]

func (*WsClient) UploadApi

func (client *WsClient) UploadApi(session Session, params ordered.OrderedMap) futures.Future[interface{}]

func (*WsClient) VerifyCredentials

func (client *WsClient) VerifyCredentials(session Session, credentials ordered.OrderedMap, options CredentialsOptions) futures.Future[interface{}]

func (*WsClient) VerifyDataSignature

func (client *WsClient) VerifyDataSignature(session Session, signer string, signature string, toSign string) futures.Future[interface{}]

func (*WsClient) VerifyMerkleHash

func (client *WsClient) VerifyMerkleHash(session Session, tree string, hash string, digest string) futures.Future[interface{}]

func (*WsClient) VerifyPresentation

func (client *WsClient) VerifyPresentation(session Session, presentation ordered.OrderedMap, domain string, challenge string, options CredentialsOptions) futures.Future[interface{}]

func (*WsClient) VerifyTaskLineage

func (client *WsClient) VerifyTaskLineage(session Session, lineageData ordered.OrderedMap) futures.Future[interface{}]

func (*WsClient) VerifyZkProof

func (client *WsClient) VerifyZkProof(session Session, proof string, gadget string, params string, commitment string, nGenerators int) futures.Future[interface{}]

func (*WsClient) Version

func (client *WsClient) Version() futures.Future[interface{}]

func (*WsClient) Withdraw

func (client *WsClient) Withdraw(session Session, token string, amount big.Int) futures.Future[interface{}]

func (*WsClient) Write

func (client *WsClient) Write(session Session, scope string, records Records, writeOptions WriteOptions) futures.Future[interface{}]

func (*WsClient) Writers

func (client *WsClient) Writers(session Session, scope string, table string, filter interface{}) futures.Future[interface{}]

func (*WsClient) ZkDataProof

func (client *WsClient) ZkDataProof(session Session, gadget string, params string, values []interface{}, zkOptions ZKOptions) futures.Future[interface{}]

func (*WsClient) ZkMerkleTree

func (client *WsClient) ZkMerkleTree(session Session, scope string, table string, filter interface{}, salt string, digest string, rounds int, seed int, options ZKOptions) futures.Future[interface{}]

func (*WsClient) ZkProof

func (client *WsClient) ZkProof(session Session, scope string, table string, gadget string, params string, fields []string, filter interface{}, zkOptions ZKOptions) futures.Future[interface{}]

func (*WsClient) ZkStorageProof

func (client *WsClient) ZkStorageProof(session Session, scope string, table string, filter interface{}, challenge string, options ReadOptions) futures.Future[interface{}]

type WsConfig

type WsConfig struct {
	UseWss bool   `json:"useWss"`
	Host   string `json:"host"`
	Port   string `json:"port"`
}

type ZKOptions

type ZKOptions struct {
	VerifyHash     bool
	ReadTimeoutSec int
	Sources        []string
	Generators     int
	Commitment     string
}

func NewZKOptions

func NewZKOptions(verifyHash bool, readTimeoutSec int, sources []string, generators int, commitment string) ZKOptions

func ZK_DEFAULT

func ZK_DEFAULT() ZKOptions

func ZK_DEFAULT_NO_CHAIN

func ZK_DEFAULT_NO_CHAIN() ZKOptions

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL