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

can you provide example of signRemoveDataCap? #63

Open
fabriziogianni7 opened this issue Jun 20, 2023 · 1 comment
Open

can you provide example of signRemoveDataCap? #63

fabriziogianni7 opened this issue Jun 20, 2023 · 1 comment

Comments

@fabriziogianni7
Copy link

fabriziogianni7 commented Jun 20, 2023

Description

I need to use signRemoveDatacap but I'm not sure what should I pass in the arguments.

More specifically, I've no idea what I should put in the message:
I know that after i build the message I need to serialize the msg

const serializedMessage = signer.transactionSerialize(
      filecoinMessage
    )

and then use Buffer.from(serializedMessage, 'hex')

but how should I exactly build the message in the first place? Is there a test example for that?

🔗 zboto Link

@fabriziogianni7
Copy link
Author

fabriziogianni7 commented Jun 21, 2023

that's what I'm trying to do:

 const message= Buffer.from(JSON.stringify(
         {
            RemovalProposalID: 1,
            DataCapAmount: 30000000,
            VerifiedClient: "t01002",
         }
      )
      )
      const signedMessage = await this.ledgerApp.signRemoveDataCap(`m/44'/${this.lotusNode.code}'/0'/0/${indexAccount}`, message)
      ```

<!-- ClickUpRef: 90120004620021 -->

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant