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(common-scripts): support eth displaying for omnilock #718

Merged
merged 8 commits into from
Jun 24, 2024

Conversation

homura
Copy link
Collaborator

@homura homura commented Jun 24, 2024

Description

Fixes #717

This PR supports the IdentityFlagsEthereumDisplaying auth mode for Omnilock

Quick Start

import { commons } from '@ckb-lumos/lumos'

const signature = await commons.omnilock.ethereumDisplaying.signMessage(
  provider.selectedAddress,
  txSkeleton.get("signingEntries").get(0)!.message,
  window.ethereum
);

const signedWitness = bytes.hexify(
    blockchain.WitnessArgs.pack({
      lock: OmnilockWitnessLock.pack({ signature }),
    })
  );

txSkeleton = txSkeleton.update('witnesses', inputIndexOfTheOmnilock)

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

  • Unit test

@homura homura requested a review from Keith-CY June 24, 2024 08:47
Copy link

vercel bot commented Jun 24, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
lumos-website ✅ Ready (Inspect) Visit Preview Jun 24, 2024 9:58am

Copy link

codecov bot commented Jun 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.76%. Comparing base (f2f5666) to head (58905f9).

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #718      +/-   ##
===========================================
- Coverage    87.11%   85.76%   -1.36%     
===========================================
  Files          131      132       +1     
  Lines        25286    25346      +60     
  Branches      2746     2674      -72     
===========================================
- Hits         22027    21737     -290     
- Misses        3219     3569     +350     
  Partials        40       40              
Files Coverage Δ
...common-scripts/src/omnilock-ethereum-displaying.ts 100.00% <100.00%> (ø)
packages/common-scripts/src/omnilock.ts 91.73% <100.00%> (+0.28%) ⬆️

... and 7 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f2f5666...58905f9. Read the comment docs.

@homura homura merged commit d279b87 into develop Jun 24, 2024
8 of 9 checks passed
@homura homura deleted the eth-displaying branch June 24, 2024 10:12
@github-actions github-actions bot mentioned this pull request Jun 24, 2024
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

Successfully merging this pull request may close these issues.

Got error when transfer ckb using omni_lock address
2 participants