Skip to content

Exact match with Bitcoin core API(?). #413

@jaoleal

Description

@jaoleal

We, at floresta, have the goal to match the rpc API with Bitcoin Core`s.

And we are actively transitioning to consume Request/Response types from corepc instead of reimplementing it from scratch, but some types are incomplete.

The case im working right now can be served as an example.

For importdescriptors command:

Bitcoin Core expects a

     [ (listof)
       {
         "desc": "str",
         "active": bool,
         "range": n or [n,n],
         "next_index": n,
         "timestamp": timestamp | "now",
         "internal": bool,
         "label": "str",
       },
     ]

Corepc_client(0.10) gives me a

pub struct ImportDescriptorsRequest {
    pub descriptor: String,
    pub timestamp: Value,
}

while i need a more complete such as i implement here in getfloresta/Floresta#675

pub struct DescriptorRequest {
    pub desc: String,
    pub active: bool,
    pub range: DerivationRange,
    pub next_index: Option<u32>,
    pub timestamp: RescanRequest,
    pub internal: bool,
    pub label: String,
}

But this would potentially grow the amount of work to maintain the lib and i not really sure if you guys have that same goal

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions