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

fork and change org to magickbase #6

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
[Github](https://github.com/LedgerHQ/ledgerjs/),
[Ledger Devs Slack](https://ledger-dev.slack.com/)

## @obsidiansystems/hw-app-ckb
## @magickbase/hw-app-ckb

> This repository is a fork of [obsidiansystems/hw-app-ckb](https://github.com/obsidiansystems/hw-app-ckb)

Ledger Hardware Wallet CKB JavaScript bindings.

Expand All @@ -15,7 +17,7 @@ for this package.
Here is a sample app for Node:

let Transport = require("@ledgerhq/hw-transport-node-hid").default;
let Ckb = require("@obsidiansystems/hw-app-ckb").default;
let Ckb = require("@magickbase/hw-app-ckb").default;

const getWalletId = async () => {
const transport = await Transport.create();
Expand Down Expand Up @@ -101,7 +103,7 @@ Nervos API
#### Examples

```javascript
import Ckb from "@obsidiansystems/hw-app-ckb";
import Ckb from "@magickbase/hw-app-ckb";
const ckb = new Ckb(transport);
```

Expand Down
2 changes: 1 addition & 1 deletion examples/sampleapp.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
let Transport = require("@ledgerhq/hw-transport-node-speculos").default;
let Ckb = require("@obsidiansystems/hw-app-ckb").default;
let Ckb = require("@magickbase/hw-app-ckb").default;

apduPort = 9999;
tp=Transport.open( { apduPort } );
Expand Down
14 changes: 8 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hw-app-ckb",
"version": "0.1.2",
"name": "@magickbase/hw-app-ckb",
"version": "0.2.0-alpha.0",
"description": "Ledger Hardware Wallet Nervos CKB API",
"keywords": [
"Ledger",
Expand All @@ -12,16 +12,18 @@
],
"repository": {
"type": "git",
"url": "https://github.com/obsidiansystems/hw-app-ckb"
"url": "https://github.com/magickbase/hw-app-ckb"
},
"bugs": {
"url": "https://github.com/obsidiansystems/hw-app-ckb/issues"
"url": "https://github.com/magickbase/hw-app-ckb/issues"
},
"homepage": "https://github.com/LedgerHQ/ledgerjs",
"homepage": "https://github.com/magickbase/hw-app-ckb",
"publishConfig": {
"access": "public"
},
"files": ["lib"],
"files": [
"lib"
],
"main": "lib/Ckb.js",
"module": "lib-es/Ckb.js",
"license": "Apache-2.0",
Expand Down
2 changes: 1 addition & 1 deletion src/Ckb.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const BECH32_LIMIT = 1023;
* Nervos API
*
* @example
* import Ckb from "@obsidiansystems/hw-app-ckb";
* import Ckb from "@magickbase/hw-app-ckb";
* const ckb = new Ckb(transport);
*/
export default class Ckb {
Expand Down
8 changes: 4 additions & 4 deletions src/annotated.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,13 @@ function fromStringEnum(val) {
// If the last bit is 0, it indicates using code hash to locate the contract code.
// The first 7 bits prepresent the VM version to run the contract code.
case "type":
return 0b0000000_1;
return 0b00000001;
case "data":
return 0b0000000_0;
return 0b00000000;
case "data1":
return 0b0000001_0;
return 0b00000010;
case "data2":
return 0b0000010_0;
return 0b00000100;
default:
throw new Error("Not a valid byte representation: "+val);
}
Expand Down