Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Abstracted ConnectedWallet operations to DWN API #1110

Closed
Tracked by #1106
prnk28 opened this issue Oct 4, 2024 — with Huly for GitHub · 2 comments · Fixed by #1166
Closed
Tracked by #1106

Implement Abstracted ConnectedWallet operations to DWN API #1110

prnk28 opened this issue Oct 4, 2024 — with Huly for GitHub · 2 comments · Fixed by #1166
Assignees
Labels
task:item Project Management - Action Item
Milestone

Comments

Copy link
Contributor

prnk28 commented Oct 4, 2024

Description

All ConnectedWallet methods are abstracted over API Methods. DWN Service Worker is responsible for sending Server Side Events which are interpreted by HTMX.

New Methods

  • getAuthInfo()
  • estimateFee()
  • broadcastTx()
  • pollTx()
  • broadcastTxSync()
  • signArbitrary()
  • signAndBroadcastTx()

Associated Files

These files will be modified by this task.

References

Related Issues

Tech Documents

Use these documents to help you complete the task.

@prnk28 prnk28 mentioned this issue Oct 4, 2024
7 tasks
@prnk28 prnk28 added the task:item Project Management - Action Item label Oct 4, 2024
@prnk28 prnk28 added this to the v0.6 milestone Oct 4, 2024
@prnk28 prnk28 added this to v0.6 Oct 4, 2024
@prnk28 prnk28 moved this from Icebox to Doing in v0.6 Oct 7, 2024
@prnk28 prnk28 self-assigned this Oct 8, 2024
@prnk28
Copy link
Contributor Author

prnk28 commented Oct 11, 2024

Golang SSE Emitter

// NewSSE creates a new sse manager with the specified worker pool size.
func (h *HTMX) NewSSE(workerPoolSize int) error {
	if sseManager != nil {
		return errors.New("sse manager already exists")
	}

	sseManager = sse.NewManager(workerPoolSize)
	return nil
}

// SSEHandler handles the server-sent events. this is a shortcut and is not the preferred way to handle sse.
func (h *HTMX) SSEHandler(w http.ResponseWriter, r *http.Request, cl sse.Listener) {
	if sseManager == nil {
		sseManager = sse.NewManager(DefaultSSEWorkerPoolSize)
	}

	sseManager.Handle(w, r, cl)
}

// SSESend sends a message to all connected clients.
func (h *HTMX) SSESend(message sse.Envelope) {
	if sseManager == nil {
		sseManager = sse.NewManager(DefaultSSEWorkerPoolSize)
	}

	sseManager.Send(message)
}

@prnk28 prnk28 pinned this issue Nov 4, 2024
@prnk28
Copy link
Contributor Author

prnk28 commented Nov 18, 2024

  • Wallet Interface spawned by Controller on as needed basis
  • proto.Actor spawned for signing operations using GetSignFunc()
  • controller/accstd and controller/wallet for Smart Account implementation

@prnk28 prnk28 linked a pull request Nov 18, 2024 that will close this issue
@github-project-automation github-project-automation bot moved this from Doing to Complete in v0.6 Nov 19, 2024
@prnk28 prnk28 unpinned this issue Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
task:item Project Management - Action Item
Projects
Status: Complete
Development

Successfully merging a pull request may close this issue.

1 participant