jsclient

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2020 License: MIT Imports: 24 Imported by: 0

Documentation

Rendered for js/wasm

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EcdsaPubkeyToAddress

func EcdsaPubkeyToAddress(jsPubKeyBits js.Value) *then.Then

func EcdsaPubkeyToDid

func EcdsaPubkeyToDid(jsPubKeyBits js.Value) *then.Then

func GenerateKey

func GenerateKey() *then.Then

func JsConfigToHumanConfig

func JsConfigToHumanConfig(jsBits js.Value) (*config.NotaryGroup, error)

func KeyFromPrivateBytes

func KeyFromPrivateBytes(jsBits js.Value) *then.Then

func NewEmptyTree

func NewEmptyTree(jsBlockService js.Value, jsPublicKeyBits js.Value) *then.Then

NewEmptyTree is a little departurue from the normal Go SDK, it's a helper for JS to create a new blank ChainTree given a private key. It will populate the node store and return the tip of the new Dag (so javascript can reconstitute the chaintree on its side.)

func PassPhraseKey

func PassPhraseKey(jsPhrase, jsSalt js.Value) *then.Then

func TokenPayloadForTransaction

func TokenPayloadForTransaction(jsBlockService js.Value, jsTip js.Value, tokenName js.Value, sendTokenTxId js.Value, jsSendTxProofBits js.Value) *then.Then

func TokenPayloadForTransaction(chain *chaintree.ChainTree, tokenName *TokenName, sendTokenTxId string, sendTxState *signatures.TreeState) (*transactions.TokenPayload, error) {

Types

type JSClient

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

JSClient is a javascript bridging client

func New

func New(pubsub pubsubinterfaces.Pubsubber, humanConfig *config.NotaryGroup, store nodestore.DagStore) *JSClient

func (*JSClient) GetLatest

func (jsc *JSClient) GetLatest(jsDid js.Value) interface{}

in the js client both GetLatest and GetTip return a proof but this one will also play the transactions... see client.Client#GetLatest in order to make the new blocks available

func (*JSClient) GetTip

func (jsc *JSClient) GetTip(jsDid js.Value) interface{}

func (*JSClient) PlayTransactions

func (jsc *JSClient) PlayTransactions(jsKeyBits js.Value, tip js.Value, jsTransactions js.Value) interface{}

func (*JSClient) Start

func (jsc *JSClient) Start(ctx context.Context) error

func (*JSClient) VerifyProof

func (jsc *JSClient) VerifyProof(proofBits js.Value) interface{}

func (*JSClient) WaitForRound

func (jsc *JSClient) WaitForRound() *then.Then

Jump to

Keyboard shortcuts

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