@ledgerhq/hw-app-algorand 6.27.13 → 6.27.14-next.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/lib/Algorand.js +61 -95
- package/lib/Algorand.js.map +1 -1
- package/lib/utils.js +15 -19
- package/lib/utils.js.map +1 -1
- package/lib-es/Algorand.js +56 -91
- package/lib-es/Algorand.js.map +1 -1
- package/lib-es/utils.js +11 -15
- package/lib-es/utils.js.map +1 -1
- package/package.json +5 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @ledgerhq/hw-app-algorand
|
|
2
2
|
|
|
3
|
+
## 6.27.14-next.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [[`87d2349fd8`](https://github.com/LedgerHQ/ledger-live/commit/87d2349fd835e5deb39d1ee8dfcf3539f4195472)]:
|
|
8
|
+
- @ledgerhq/errors@6.12.5-next.0
|
|
9
|
+
- @ledgerhq/hw-transport@6.28.3-next.0
|
|
10
|
+
|
|
3
11
|
## 6.27.13
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
package/lib/Algorand.js
CHANGED
|
@@ -8,53 +8,26 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
-
function step(op) {
|
|
16
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (_) try {
|
|
18
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
-
switch (op[0]) {
|
|
21
|
-
case 0: case 1: t = op; break;
|
|
22
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
-
default:
|
|
26
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
-
if (t[2]) _.ops.pop();
|
|
31
|
-
_.trys.pop(); continue;
|
|
32
|
-
}
|
|
33
|
-
op = body.call(thisArg, _);
|
|
34
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
11
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
39
12
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
40
13
|
};
|
|
41
|
-
exports
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
const bip32_path_1 = __importDefault(require("bip32-path"));
|
|
16
|
+
const errors_1 = require("@ledgerhq/errors");
|
|
17
|
+
const utils_1 = require("./utils");
|
|
18
|
+
const CHUNK_SIZE = 250;
|
|
46
19
|
// const P1_FIRST = 0x00;
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
20
|
+
const P1_MORE = 0x80;
|
|
21
|
+
const P1_WITH_ACCOUNT_ID = 0x01;
|
|
22
|
+
const P2_LAST = 0x00;
|
|
23
|
+
const P2_MORE = 0x80;
|
|
24
|
+
const SW_OK = 0x9000;
|
|
25
|
+
const SW_CANCEL = 0x6986;
|
|
26
|
+
const P1_WITH_REQUEST_USER_APPROVAL = 0x80;
|
|
54
27
|
// algo spec
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
28
|
+
const CLA = 0x80;
|
|
29
|
+
const INS_GET_PUBLIC_KEY = 0x03;
|
|
30
|
+
const INS_SIGN_MSGPACK = 0x08;
|
|
58
31
|
/**
|
|
59
32
|
* Algorand API
|
|
60
33
|
*
|
|
@@ -62,8 +35,8 @@ var INS_SIGN_MSGPACK = 0x08;
|
|
|
62
35
|
* import Algorand from "@ledgerhq/hw-app-algorand";
|
|
63
36
|
* const algo = new Algorand(transport)
|
|
64
37
|
*/
|
|
65
|
-
|
|
66
|
-
|
|
38
|
+
class Algorand {
|
|
39
|
+
constructor(transport) {
|
|
67
40
|
this.transport = transport;
|
|
68
41
|
transport.decorateAppAPIMethods(this, ["getAddress", "sign"], "ALGO");
|
|
69
42
|
}
|
|
@@ -75,23 +48,23 @@ var Algorand = /** @class */ (function () {
|
|
|
75
48
|
* @example
|
|
76
49
|
* cosmos.getAddress("44'/283'/0'/0/0").then(o => o.address)
|
|
77
50
|
*/
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
51
|
+
getAddress(path, boolDisplay) {
|
|
52
|
+
const bipPath = bip32_path_1.default.fromString(path).toPathArray();
|
|
53
|
+
const buf = Buffer.alloc(4);
|
|
81
54
|
buf.writeUInt32BE(bipPath[2], 0);
|
|
82
55
|
return this.transport
|
|
83
56
|
.send(CLA, INS_GET_PUBLIC_KEY, boolDisplay ? P1_WITH_REQUEST_USER_APPROVAL : 0, 0, buf, [SW_OK])
|
|
84
|
-
.then(
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
57
|
+
.then((response) => {
|
|
58
|
+
const buffer = Buffer.from(response.slice(0, 32));
|
|
59
|
+
const publicKey = buffer.toString("hex");
|
|
60
|
+
const address = (0, utils_1.encodeAddress)(buffer);
|
|
88
61
|
return {
|
|
89
|
-
publicKey
|
|
90
|
-
address
|
|
62
|
+
publicKey,
|
|
63
|
+
address,
|
|
91
64
|
};
|
|
92
65
|
});
|
|
93
|
-
}
|
|
94
|
-
|
|
66
|
+
}
|
|
67
|
+
foreach(arr, callback) {
|
|
95
68
|
function iterate(index, array, result) {
|
|
96
69
|
if (index >= array.length) {
|
|
97
70
|
return result;
|
|
@@ -102,47 +75,40 @@ var Algorand = /** @class */ (function () {
|
|
|
102
75
|
return iterate(index + 1, array, result);
|
|
103
76
|
});
|
|
104
77
|
}
|
|
105
|
-
return Promise.resolve().then(
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
end = i + CHUNK_SIZE;
|
|
119
|
-
if (i > buffer.length) {
|
|
120
|
-
end = buffer.length;
|
|
121
|
-
}
|
|
122
|
-
chunks.push(buffer.slice(i, end));
|
|
78
|
+
return Promise.resolve().then(() => iterate(0, arr, []));
|
|
79
|
+
}
|
|
80
|
+
sign(path, message) {
|
|
81
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
82
|
+
const bipPath = bip32_path_1.default.fromString(path).toPathArray();
|
|
83
|
+
const buf = Buffer.alloc(4);
|
|
84
|
+
buf.writeUInt32BE(bipPath[2], 0);
|
|
85
|
+
const chunks = [];
|
|
86
|
+
const buffer = Buffer.concat([buf, Buffer.from(message, "hex")]);
|
|
87
|
+
for (let i = 0; i < buffer.length; i += CHUNK_SIZE) {
|
|
88
|
+
let end = i + CHUNK_SIZE;
|
|
89
|
+
if (i > buffer.length) {
|
|
90
|
+
end = buffer.length;
|
|
123
91
|
}
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
})];
|
|
92
|
+
chunks.push(buffer.slice(i, end));
|
|
93
|
+
}
|
|
94
|
+
let response = {};
|
|
95
|
+
return this.foreach(chunks, (data, j) => this.transport
|
|
96
|
+
.send(CLA, INS_SIGN_MSGPACK, j === 0 ? P1_WITH_ACCOUNT_ID : P1_MORE, j + 1 === chunks.length ? P2_LAST : P2_MORE, data, [SW_OK, SW_CANCEL])
|
|
97
|
+
.then((apduResponse) => (response = apduResponse))).then(() => {
|
|
98
|
+
const errorCodeData = response;
|
|
99
|
+
if (errorCodeData === 0x6986) {
|
|
100
|
+
throw new errors_1.UserRefusedOnDevice();
|
|
101
|
+
}
|
|
102
|
+
let signature = null;
|
|
103
|
+
if (response.length > 0) {
|
|
104
|
+
signature = response.slice(0, response.length);
|
|
105
|
+
}
|
|
106
|
+
return {
|
|
107
|
+
signature: signature,
|
|
108
|
+
};
|
|
142
109
|
});
|
|
143
110
|
});
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
exports["default"] = Algorand;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
exports.default = Algorand;
|
|
148
114
|
//# sourceMappingURL=Algorand.js.map
|
package/lib/Algorand.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Algorand.js","sourceRoot":"","sources":["../src/Algorand.ts"],"names":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,CAAC,MAAM,GAAG,CAAC,EAAE;oBACvB,SAAS,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;iBAChD;gBAED,OAAO;oBACL,SAAS,EAAE,SAAS;iBACrB,CAAC;YACJ,CAAC,CAAC,CAAC;QACL,CAAC;KAAA;CACF;AAnHD,2BAmHC"}
|
package/lib/utils.js
CHANGED
|
@@ -2,31 +2,27 @@
|
|
|
2
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
|
-
exports
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.encodeAddress = void 0;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
7
|
+
const tweetnacl_1 = __importDefault(require("tweetnacl"));
|
|
8
|
+
const hi_base32_1 = __importDefault(require("hi-base32"));
|
|
9
|
+
const js_sha512_1 = __importDefault(require("js-sha512"));
|
|
10
|
+
const PUBLIC_KEY_LENGTH = tweetnacl_1.default.sign.publicKeyLength;
|
|
11
|
+
const ALGORAND_ADDRESS_LENGTH = 58;
|
|
12
|
+
const ALGORAND_CHECKSUM_BYTE_LENGTH = 4;
|
|
13
|
+
const encodeAddress = (address) => {
|
|
14
|
+
const checksum = js_sha512_1.default.sha512_256
|
|
15
15
|
.array(address)
|
|
16
16
|
.slice(PUBLIC_KEY_LENGTH - ALGORAND_CHECKSUM_BYTE_LENGTH, PUBLIC_KEY_LENGTH);
|
|
17
|
-
|
|
17
|
+
const addr = hi_base32_1.default.encode(concatArrays(address, checksum));
|
|
18
18
|
return addr.toString().slice(0, ALGORAND_ADDRESS_LENGTH);
|
|
19
19
|
};
|
|
20
20
|
exports.encodeAddress = encodeAddress;
|
|
21
|
-
function concatArrays() {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
var size = arrs.reduce(function (sum, arr) { return sum + arr.length; }, 0);
|
|
27
|
-
var c = new Uint8Array(size);
|
|
28
|
-
var offset = 0;
|
|
29
|
-
for (var i = 0; i < arrs.length; i++) {
|
|
21
|
+
function concatArrays(...arrs) {
|
|
22
|
+
const size = arrs.reduce((sum, arr) => sum + arr.length, 0);
|
|
23
|
+
const c = new Uint8Array(size);
|
|
24
|
+
let offset = 0;
|
|
25
|
+
for (let i = 0; i < arrs.length; i++) {
|
|
30
26
|
c.set(arrs[i], offset);
|
|
31
27
|
offset += arrs[i].length;
|
|
32
28
|
}
|
package/lib/utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":";;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":";;;;;;AAAA,0DAA6B;AAC7B,0DAA+B;AAC/B,0DAA+B;AAE/B,MAAM,iBAAiB,GAAG,mBAAI,CAAC,IAAI,CAAC,eAAe,CAAC;AACpD,MAAM,uBAAuB,GAAG,EAAE,CAAC;AACnC,MAAM,6BAA6B,GAAG,CAAC,CAAC;AAEjC,MAAM,aAAa,GAAG,CAAC,OAAmB,EAAU,EAAE;IAC3D,MAAM,QAAQ,GAAG,mBAAM,CAAC,UAAU;SAC/B,KAAK,CAAC,OAAO,CAAC;SACd,KAAK,CACJ,iBAAiB,GAAG,6BAA6B,EACjD,iBAAiB,CAClB,CAAC;IACJ,MAAM,IAAI,GAAG,mBAAM,CAAC,MAAM,CAAC,YAAY,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC;IAE5D,OAAO,IAAI,CAAC,QAAQ,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,uBAAuB,CAAC,CAAC;AAC3D,CAAC,CAAC;AAVW,QAAA,aAAa,iBAUxB;AAEF,SAAS,YAAY,CAAC,GAAG,IAAyB;IAChD,MAAM,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,CAAC,GAAG,GAAG,GAAG,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;IAC5D,MAAM,CAAC,GAAG,IAAI,UAAU,CAAC,IAAI,CAAC,CAAC;IAE/B,IAAI,MAAM,GAAG,CAAC,CAAC;IACf,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QACpC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC;QACvB,MAAM,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;KAC1B;IAED,OAAO,CAAC,CAAC;AACX,CAAC"}
|
package/lib-es/Algorand.js
CHANGED
|
@@ -7,49 +7,22 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
7
7
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
11
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
12
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
13
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
14
|
-
function step(op) {
|
|
15
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
16
|
-
while (_) try {
|
|
17
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
18
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
19
|
-
switch (op[0]) {
|
|
20
|
-
case 0: case 1: t = op; break;
|
|
21
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
22
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
23
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
24
|
-
default:
|
|
25
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
26
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
27
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
28
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
29
|
-
if (t[2]) _.ops.pop();
|
|
30
|
-
_.trys.pop(); continue;
|
|
31
|
-
}
|
|
32
|
-
op = body.call(thisArg, _);
|
|
33
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
34
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
10
|
import BIPPath from "bip32-path";
|
|
38
11
|
import { UserRefusedOnDevice } from "@ledgerhq/errors";
|
|
39
12
|
import { encodeAddress } from "./utils";
|
|
40
|
-
|
|
13
|
+
const CHUNK_SIZE = 250;
|
|
41
14
|
// const P1_FIRST = 0x00;
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
15
|
+
const P1_MORE = 0x80;
|
|
16
|
+
const P1_WITH_ACCOUNT_ID = 0x01;
|
|
17
|
+
const P2_LAST = 0x00;
|
|
18
|
+
const P2_MORE = 0x80;
|
|
19
|
+
const SW_OK = 0x9000;
|
|
20
|
+
const SW_CANCEL = 0x6986;
|
|
21
|
+
const P1_WITH_REQUEST_USER_APPROVAL = 0x80;
|
|
49
22
|
// algo spec
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
23
|
+
const CLA = 0x80;
|
|
24
|
+
const INS_GET_PUBLIC_KEY = 0x03;
|
|
25
|
+
const INS_SIGN_MSGPACK = 0x08;
|
|
53
26
|
/**
|
|
54
27
|
* Algorand API
|
|
55
28
|
*
|
|
@@ -57,8 +30,8 @@ var INS_SIGN_MSGPACK = 0x08;
|
|
|
57
30
|
* import Algorand from "@ledgerhq/hw-app-algorand";
|
|
58
31
|
* const algo = new Algorand(transport)
|
|
59
32
|
*/
|
|
60
|
-
|
|
61
|
-
|
|
33
|
+
export default class Algorand {
|
|
34
|
+
constructor(transport) {
|
|
62
35
|
this.transport = transport;
|
|
63
36
|
transport.decorateAppAPIMethods(this, ["getAddress", "sign"], "ALGO");
|
|
64
37
|
}
|
|
@@ -70,23 +43,23 @@ var Algorand = /** @class */ (function () {
|
|
|
70
43
|
* @example
|
|
71
44
|
* cosmos.getAddress("44'/283'/0'/0/0").then(o => o.address)
|
|
72
45
|
*/
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
46
|
+
getAddress(path, boolDisplay) {
|
|
47
|
+
const bipPath = BIPPath.fromString(path).toPathArray();
|
|
48
|
+
const buf = Buffer.alloc(4);
|
|
76
49
|
buf.writeUInt32BE(bipPath[2], 0);
|
|
77
50
|
return this.transport
|
|
78
51
|
.send(CLA, INS_GET_PUBLIC_KEY, boolDisplay ? P1_WITH_REQUEST_USER_APPROVAL : 0, 0, buf, [SW_OK])
|
|
79
|
-
.then(
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
52
|
+
.then((response) => {
|
|
53
|
+
const buffer = Buffer.from(response.slice(0, 32));
|
|
54
|
+
const publicKey = buffer.toString("hex");
|
|
55
|
+
const address = encodeAddress(buffer);
|
|
83
56
|
return {
|
|
84
|
-
publicKey
|
|
85
|
-
address
|
|
57
|
+
publicKey,
|
|
58
|
+
address,
|
|
86
59
|
};
|
|
87
60
|
});
|
|
88
|
-
}
|
|
89
|
-
|
|
61
|
+
}
|
|
62
|
+
foreach(arr, callback) {
|
|
90
63
|
function iterate(index, array, result) {
|
|
91
64
|
if (index >= array.length) {
|
|
92
65
|
return result;
|
|
@@ -97,47 +70,39 @@ var Algorand = /** @class */ (function () {
|
|
|
97
70
|
return iterate(index + 1, array, result);
|
|
98
71
|
});
|
|
99
72
|
}
|
|
100
|
-
return Promise.resolve().then(
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
end = i + CHUNK_SIZE;
|
|
114
|
-
if (i > buffer.length) {
|
|
115
|
-
end = buffer.length;
|
|
116
|
-
}
|
|
117
|
-
chunks.push(buffer.slice(i, end));
|
|
73
|
+
return Promise.resolve().then(() => iterate(0, arr, []));
|
|
74
|
+
}
|
|
75
|
+
sign(path, message) {
|
|
76
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
77
|
+
const bipPath = BIPPath.fromString(path).toPathArray();
|
|
78
|
+
const buf = Buffer.alloc(4);
|
|
79
|
+
buf.writeUInt32BE(bipPath[2], 0);
|
|
80
|
+
const chunks = [];
|
|
81
|
+
const buffer = Buffer.concat([buf, Buffer.from(message, "hex")]);
|
|
82
|
+
for (let i = 0; i < buffer.length; i += CHUNK_SIZE) {
|
|
83
|
+
let end = i + CHUNK_SIZE;
|
|
84
|
+
if (i > buffer.length) {
|
|
85
|
+
end = buffer.length;
|
|
118
86
|
}
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
})];
|
|
87
|
+
chunks.push(buffer.slice(i, end));
|
|
88
|
+
}
|
|
89
|
+
let response = {};
|
|
90
|
+
return this.foreach(chunks, (data, j) => this.transport
|
|
91
|
+
.send(CLA, INS_SIGN_MSGPACK, j === 0 ? P1_WITH_ACCOUNT_ID : P1_MORE, j + 1 === chunks.length ? P2_LAST : P2_MORE, data, [SW_OK, SW_CANCEL])
|
|
92
|
+
.then((apduResponse) => (response = apduResponse))).then(() => {
|
|
93
|
+
const errorCodeData = response;
|
|
94
|
+
if (errorCodeData === 0x6986) {
|
|
95
|
+
throw new UserRefusedOnDevice();
|
|
96
|
+
}
|
|
97
|
+
let signature = null;
|
|
98
|
+
if (response.length > 0) {
|
|
99
|
+
signature = response.slice(0, response.length);
|
|
100
|
+
}
|
|
101
|
+
return {
|
|
102
|
+
signature: signature,
|
|
103
|
+
};
|
|
137
104
|
});
|
|
138
105
|
});
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
}());
|
|
142
|
-
export default Algorand;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
143
108
|
//# sourceMappingURL=Algorand.js.map
|
package/lib-es/Algorand.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Algorand.js","sourceRoot":"","sources":["../src/Algorand.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Algorand.js","sourceRoot":"","sources":["../src/Algorand.ts"],"names":[],"mappings":";;;;;;;;;AAiBA,OAAO,OAAO,MAAM,YAAY,CAAC;AACjC,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACxC,MAAM,UAAU,GAAG,GAAG,CAAC;AACvB,yBAAyB;AACzB,MAAM,OAAO,GAAG,IAAI,CAAC;AACrB,MAAM,kBAAkB,GAAG,IAAI,CAAC;AAChC,MAAM,OAAO,GAAG,IAAI,CAAC;AACrB,MAAM,OAAO,GAAG,IAAI,CAAC;AACrB,MAAM,KAAK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ha512";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export
|
|
8
|
-
|
|
4
|
+
const PUBLIC_KEY_LENGTH = nacl.sign.publicKeyLength;
|
|
5
|
+
const ALGORAND_ADDRESS_LENGTH = 58;
|
|
6
|
+
const ALGORAND_CHECKSUM_BYTE_LENGTH = 4;
|
|
7
|
+
export const encodeAddress = (address) => {
|
|
8
|
+
const checksum = sha512.sha512_256
|
|
9
9
|
.array(address)
|
|
10
10
|
.slice(PUBLIC_KEY_LENGTH - ALGORAND_CHECKSUM_BYTE_LENGTH, PUBLIC_KEY_LENGTH);
|
|
11
|
-
|
|
11
|
+
const addr = base32.encode(concatArrays(address, checksum));
|
|
12
12
|
return addr.toString().slice(0, ALGORAND_ADDRESS_LENGTH);
|
|
13
13
|
};
|
|
14
|
-
function concatArrays() {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
var size = arrs.reduce(function (sum, arr) { return sum + arr.length; }, 0);
|
|
20
|
-
var c = new Uint8Array(size);
|
|
21
|
-
var offset = 0;
|
|
22
|
-
for (var i = 0; i < arrs.length; i++) {
|
|
14
|
+
function concatArrays(...arrs) {
|
|
15
|
+
const size = arrs.reduce((sum, arr) => sum + arr.length, 0);
|
|
16
|
+
const c = new Uint8Array(size);
|
|
17
|
+
let offset = 0;
|
|
18
|
+
for (let i = 0; i < arrs.length; i++) {
|
|
23
19
|
c.set(arrs[i], offset);
|
|
24
20
|
offset += arrs[i].length;
|
|
25
21
|
}
|
package/lib-es/utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,MAAM,MAAM,WAAW,CAAC;AAC/B,OAAO,MAAM,MAAM,WAAW,CAAC;AAE/B,
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../src/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AAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ledgerhq/hw-app-algorand",
|
|
3
|
-
"version": "6.27.
|
|
3
|
+
"version": "6.27.14-next.0",
|
|
4
4
|
"description": "Ledger Hardware Wallet Algorand Application API",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Ledger",
|
|
@@ -31,20 +31,19 @@
|
|
|
31
31
|
"hi-base32": "^0.5.1",
|
|
32
32
|
"js-sha512": "^0.8.0",
|
|
33
33
|
"tweetnacl": "^1.0.3",
|
|
34
|
-
"@ledgerhq/errors": "^6.12.
|
|
35
|
-
"@ledgerhq/hw-transport": "^6.28.
|
|
34
|
+
"@ledgerhq/errors": "^6.12.5-next.0",
|
|
35
|
+
"@ledgerhq/hw-transport": "^6.28.3-next.0"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@types/jest": "^29.5.0",
|
|
39
39
|
"@types/node": "^18.15.3",
|
|
40
40
|
"documentation": "13.2.4",
|
|
41
41
|
"jest": "^28.1.1",
|
|
42
|
-
"rimraf": "^4.1
|
|
42
|
+
"rimraf": "^4.4.1",
|
|
43
43
|
"source-map-support": "^0.5.21",
|
|
44
44
|
"ts-jest": "^28.0.5",
|
|
45
45
|
"ts-node": "^10.4.0",
|
|
46
|
-
"
|
|
47
|
-
"@ledgerhq/hw-transport-mocker": "^6.27.13"
|
|
46
|
+
"@ledgerhq/hw-transport-mocker": "^6.27.14-next.0"
|
|
48
47
|
},
|
|
49
48
|
"gitHead": "dd0dea64b58e5a9125c8a422dcffd29e5ef6abec",
|
|
50
49
|
"scripts": {
|