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

[Feat] - Ensure the bridge can dynmically get the signer aggregate pubkey #837

Open
setbern opened this issue Nov 13, 2024 · 2 comments
Open
Assignees
Labels
bridge web app The default web app for sBTC-v1.

Comments

@setbern
Copy link
Collaborator

setbern commented Nov 13, 2024

User story - Bridge should be able to get signer aggregate pubkey in order to sign the tapleaves.

This info can be fetched from the contract

;; Get the current aggregate pubkey.
;; This function returns the current aggregate pubkey.
(define-read-only (get-current-aggregate-pubkey)
  (var-get current-aggregate-pubkey)
)

The network rpc changes based on the network we're currently on

@setbern setbern added this to sBTC Nov 13, 2024
@setbern setbern self-assigned this Nov 13, 2024
@setbern setbern converted this from a draft issue Nov 13, 2024
@setbern setbern added the bridge web app The default web app for sBTC-v1. label Nov 13, 2024
@janniks
Copy link

janniks commented Nov 14, 2024

    const res = (await fetchCallReadOnlyFunction({
      contractAddress,
      contractName: 'sbtc-registry',
      functionName: 'get-current-aggregate-pubkey',
      functionArgs: [],
      senderAddress: STACKS_DEVNET.bootAddress, // zero address
      network: 'devnet', // will use localhost:3999
    })) as BufferCV;

    const pub = res.value.slice(2);

@janniks
Copy link

janniks commented Nov 14, 2024

For devenv contractAddress = 'SN3R84XZYA63QS28932XQF3G1J8R9PC3W76P9CSQS'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bridge web app The default web app for sBTC-v1.
Projects
Status: Todo
Development

No branches or pull requests

2 participants