Documentation
¶
Index ¶
- func EcdsaPubkeyToAddress(jsPubKeyBits js.Value) *then.Then
- func EcdsaPubkeyToDid(jsPubKeyBits js.Value) *then.Then
- func GenerateKey() *then.Then
- func JsConfigToHumanConfig(jsBits js.Value) (*config.NotaryGroup, error)
- func KeyFromPrivateBytes(jsBits js.Value) *then.Then
- func NewEmptyTree(jsBlockService js.Value, jsPublicKeyBits js.Value) *then.Then
- func PassPhraseKey(jsPhrase, jsSalt js.Value) *then.Then
- func TokenPayloadForTransaction(jsBlockService js.Value, jsTip js.Value, tokenName js.Value, ...) *then.Then
- type JSClient
- func (jsc *JSClient) GetLatest(jsDid js.Value) interface{}
- func (jsc *JSClient) GetTip(jsDid js.Value) interface{}
- func (jsc *JSClient) PlayTransactions(jsKeyBits js.Value, tip js.Value, jsTransactions js.Value) interface{}
- func (jsc *JSClient) Start(ctx context.Context) error
- func (jsc *JSClient) VerifyProof(proofBits js.Value) interface{}
- func (jsc *JSClient) WaitForRound() *then.Then
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateKey ¶
func JsConfigToHumanConfig ¶
func JsConfigToHumanConfig(jsBits js.Value) (*config.NotaryGroup, error)
func NewEmptyTree ¶
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 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 ¶
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