sats-connect 0.1.7 → 0.1.9
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/dist/src/address/index.js +18 -67
- package/dist/src/address/index.js.map +1 -1
- package/dist/src/address/types.d.ts +1 -1
- package/dist/src/call/index.js +19 -68
- package/dist/src/call/index.js.map +1 -1
- package/dist/src/transactions/signTransaction.js +21 -70
- package/dist/src/transactions/signTransaction.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +2 -2
- package/.github/workflows/release-package.yml +0 -33
- package/.prettierrc.json +0 -13
- package/index.ts +0 -4
- package/jest.config.js +0 -5
- package/src/address/index.ts +0 -23
- package/src/address/types.ts +0 -33
- package/src/call/index.ts +0 -38
- package/src/provider/index.ts +0 -19
- package/src/transactions/signTransaction.ts +0 -53
- package/tsconfig.json +0 -20
- package/webpack.config.js +0 -53
|
@@ -1,71 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
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 };
|
|
1
|
+
import { createUnsecuredToken } from 'jsontokens';
|
|
2
|
+
export const getAddress = async (options) => {
|
|
3
|
+
const { message, network, purposes } = options.payload;
|
|
4
|
+
const provider = window.BitcoinProvider;
|
|
5
|
+
if (!provider) {
|
|
6
|
+
throw new Error('No Bitcoin Wallet installed');
|
|
7
|
+
}
|
|
8
|
+
if (!purposes) {
|
|
9
|
+
throw new Error('Address purposes are required');
|
|
10
|
+
}
|
|
11
|
+
try {
|
|
12
|
+
const request = createUnsecuredToken(options.payload);
|
|
13
|
+
const addressResponse = await provider.connect(request);
|
|
14
|
+
options.onFinish?.(addressResponse);
|
|
15
|
+
}
|
|
16
|
+
catch (error) {
|
|
17
|
+
console.error('[Connect] Error during address request', error);
|
|
18
|
+
options.onCancel?.();
|
|
35
19
|
}
|
|
36
20
|
};
|
|
37
|
-
import { createUnsecuredToken } from 'jsontokens';
|
|
38
|
-
export var getAddress = function (options) { return __awaiter(void 0, void 0, void 0, function () {
|
|
39
|
-
var _a, message, network, purposes, provider, request, addressResponse, error_1;
|
|
40
|
-
var _b, _c;
|
|
41
|
-
return __generator(this, function (_d) {
|
|
42
|
-
switch (_d.label) {
|
|
43
|
-
case 0:
|
|
44
|
-
_a = options.payload, message = _a.message, network = _a.network, purposes = _a.purposes;
|
|
45
|
-
provider = window.BitcoinProvider;
|
|
46
|
-
if (!provider) {
|
|
47
|
-
throw new Error('No Bitcoin Wallet installed');
|
|
48
|
-
}
|
|
49
|
-
if (!purposes) {
|
|
50
|
-
throw new Error('Address purposes are required');
|
|
51
|
-
}
|
|
52
|
-
_d.label = 1;
|
|
53
|
-
case 1:
|
|
54
|
-
_d.trys.push([1, 3, , 4]);
|
|
55
|
-
request = createUnsecuredToken(options.payload);
|
|
56
|
-
return [4 /*yield*/, provider.connect(request)];
|
|
57
|
-
case 2:
|
|
58
|
-
addressResponse = _d.sent();
|
|
59
|
-
(_b = options.onFinish) === null || _b === void 0 ? void 0 : _b.call(options, addressResponse);
|
|
60
|
-
return [3 /*break*/, 4];
|
|
61
|
-
case 3:
|
|
62
|
-
error_1 = _d.sent();
|
|
63
|
-
console.error('[Connect] Error during address request', error_1);
|
|
64
|
-
(_c = options.onCancel) === null || _c === void 0 ? void 0 : _c.call(options);
|
|
65
|
-
return [3 /*break*/, 4];
|
|
66
|
-
case 4: return [2 /*return*/];
|
|
67
|
-
}
|
|
68
|
-
});
|
|
69
|
-
}); };
|
|
70
21
|
export * from './types';
|
|
71
22
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/address/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/address/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAQ,MAAM,YAAY,CAAC;AAGxD,MAAM,CAAC,MAAM,UAAU,GAAG,KAAK,EAAE,OAA0B,EAAE,EAAE;IAC7D,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAC,OAAO,CAAC;IACvD,MAAM,QAAQ,GAAG,MAAM,CAAC,eAAe,CAAC;IACxC,IAAI,CAAC,QAAQ,EAAE;QACb,MAAM,IAAI,KAAK,CAAC,6BAA6B,CAAC,CAAC;KAChD;IACD,IAAG,CAAC,QAAQ,EAAE;QACZ,MAAM,IAAI,KAAK,CAAC,+BAA+B,CAAC,CAAC;KAClD;IACD,IAAI;QACF,MAAM,OAAO,GAAG,oBAAoB,CAAC,OAAO,CAAC,OAA0B,CAAC,CAAC;QACzE,MAAM,eAAe,GAAG,MAAM,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QACxD,OAAO,CAAC,QAAQ,EAAE,CAAC,eAAe,CAAC,CAAC;KACrC;IAAC,OAAO,KAAK,EAAE;QACd,OAAO,CAAC,KAAK,CAAC,wCAAwC,EAAE,KAAK,CAAC,CAAC;QAC/D,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC;KACtB;AACH,CAAC,CAAC;AAEF,cAAc,SAAS,CAAC"}
|
package/dist/src/call/index.js
CHANGED
|
@@ -1,75 +1,26 @@
|
|
|
1
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
-
});
|
|
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 (g && (g = 0, op[0] && (_ = 0)), _) 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
1
|
import { createUnsecuredToken } from 'jsontokens';
|
|
38
2
|
export var CallMethod;
|
|
39
3
|
(function (CallMethod) {
|
|
40
4
|
CallMethod["SIGN_TRANSACTION"] = "signTransaction";
|
|
41
5
|
CallMethod["GET_ADDRESS"] = "getAddress";
|
|
42
6
|
})(CallMethod || (CallMethod = {}));
|
|
43
|
-
export
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
case 2:
|
|
63
|
-
callResponse = _c.sent();
|
|
64
|
-
(_a = options.onFinish) === null || _a === void 0 ? void 0 : _a.call(options, callResponse);
|
|
65
|
-
return [3 /*break*/, 4];
|
|
66
|
-
case 3:
|
|
67
|
-
error_1 = _c.sent();
|
|
68
|
-
console.error('[Connect] Error during call request', error_1);
|
|
69
|
-
(_b = options.onCancel) === null || _b === void 0 ? void 0 : _b.call(options);
|
|
70
|
-
return [3 /*break*/, 4];
|
|
71
|
-
case 4: return [2 /*return*/];
|
|
72
|
-
}
|
|
73
|
-
});
|
|
74
|
-
}); };
|
|
7
|
+
export const callWalletPopup = async (options) => {
|
|
8
|
+
const provider = window.BitcoinProvider;
|
|
9
|
+
const { method } = options.payload;
|
|
10
|
+
if (!provider) {
|
|
11
|
+
throw new Error('No Bitcoin Wallet installed');
|
|
12
|
+
}
|
|
13
|
+
if (!method) {
|
|
14
|
+
throw new Error('A wallet method is required');
|
|
15
|
+
}
|
|
16
|
+
const request = createUnsecuredToken(options.payload);
|
|
17
|
+
try {
|
|
18
|
+
const callResponse = await provider.call(request);
|
|
19
|
+
options.onFinish?.(callResponse);
|
|
20
|
+
}
|
|
21
|
+
catch (error) {
|
|
22
|
+
console.error('[Connect] Error during call request', error);
|
|
23
|
+
options.onCancel?.();
|
|
24
|
+
}
|
|
25
|
+
};
|
|
75
26
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/call/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/call/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAQ,MAAM,YAAY,CAAC;AAexD,MAAM,CAAN,IAAY,UAGX;AAHD,WAAY,UAAU;IACpB,kDAAoC,CAAA;IACpC,wCAA0B,CAAA;AAC5B,CAAC,EAHW,UAAU,KAAV,UAAU,QAGrB;AAED,MAAM,CAAC,MAAM,eAAe,GAAG,KAAK,EAAE,OAA0B,EAAE,EAAE;IAClE,MAAM,QAAQ,GAAG,MAAM,CAAC,eAAe,CAAC;IACxC,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,OAAO,CAAC;IACnC,IAAI,CAAC,QAAQ,EAAE;QACb,MAAM,IAAI,KAAK,CAAC,6BAA6B,CAAC,CAAC;KAChD;IACD,IAAG,CAAC,MAAM,EAAE;QACV,MAAM,IAAI,KAAK,CAAC,6BAA6B,CAAC,CAAC;KAChD;IACD,MAAM,OAAO,GAAG,oBAAoB,CAAC,OAAO,CAAC,OAA0B,CAAC,CAAC;IACzE,IAAI;QACF,MAAM,YAAY,GAAG,MAAM,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAClD,OAAO,CAAC,QAAQ,EAAE,CAAC,YAAY,CAAC,CAAC;KAClC;IAAC,OAAO,KAAK,EAAE;QACd,OAAO,CAAC,KAAK,CAAC,qCAAqC,EAAE,KAAK,CAAC,CAAC;QAC5D,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC;KACtB;AACH,CAAC,CAAC"}
|
|
@@ -1,73 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
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 };
|
|
1
|
+
import { createUnsecuredToken } from 'jsontokens';
|
|
2
|
+
export const signTransaction = async (options) => {
|
|
3
|
+
const { psbtBase64, inputsToSign } = options.payload;
|
|
4
|
+
const provider = window.BitcoinProvider;
|
|
5
|
+
if (!provider) {
|
|
6
|
+
throw new Error('No Bitcoin Wallet installed');
|
|
7
|
+
}
|
|
8
|
+
if (!psbtBase64) {
|
|
9
|
+
throw new Error('a value for psbtBase64 representing the tx hash is required');
|
|
10
|
+
}
|
|
11
|
+
if (!inputsToSign) {
|
|
12
|
+
throw new Error('an array specifying the inputs to be signed by the wallet is required');
|
|
13
|
+
}
|
|
14
|
+
try {
|
|
15
|
+
const request = createUnsecuredToken(options.payload);
|
|
16
|
+
const addressResponse = await provider.signTransaction(request);
|
|
17
|
+
options.onFinish?.(addressResponse);
|
|
18
|
+
}
|
|
19
|
+
catch (error) {
|
|
20
|
+
console.error('[Connect] Error during signPsbt request', error);
|
|
21
|
+
options.onCancel?.();
|
|
35
22
|
}
|
|
36
23
|
};
|
|
37
|
-
import { createUnsecuredToken } from 'jsontokens';
|
|
38
|
-
export var signTransaction = function (options) { return __awaiter(void 0, void 0, void 0, function () {
|
|
39
|
-
var _a, psbtBase64, inputsToSign, provider, request, addressResponse, error_1;
|
|
40
|
-
var _b, _c;
|
|
41
|
-
return __generator(this, function (_d) {
|
|
42
|
-
switch (_d.label) {
|
|
43
|
-
case 0:
|
|
44
|
-
_a = options.payload, psbtBase64 = _a.psbtBase64, inputsToSign = _a.inputsToSign;
|
|
45
|
-
provider = window.BitcoinProvider;
|
|
46
|
-
if (!provider) {
|
|
47
|
-
throw new Error('No Bitcoin Wallet installed');
|
|
48
|
-
}
|
|
49
|
-
if (!psbtBase64) {
|
|
50
|
-
throw new Error('a value for psbtBase64 representing the tx hash is required');
|
|
51
|
-
}
|
|
52
|
-
if (!inputsToSign) {
|
|
53
|
-
throw new Error('an array specifying the inputs to be signed by the wallet is required');
|
|
54
|
-
}
|
|
55
|
-
_d.label = 1;
|
|
56
|
-
case 1:
|
|
57
|
-
_d.trys.push([1, 3, , 4]);
|
|
58
|
-
request = createUnsecuredToken(options.payload);
|
|
59
|
-
return [4 /*yield*/, provider.signTransaction(request)];
|
|
60
|
-
case 2:
|
|
61
|
-
addressResponse = _d.sent();
|
|
62
|
-
(_b = options.onFinish) === null || _b === void 0 ? void 0 : _b.call(options, addressResponse);
|
|
63
|
-
return [3 /*break*/, 4];
|
|
64
|
-
case 3:
|
|
65
|
-
error_1 = _d.sent();
|
|
66
|
-
console.error('[Connect] Error during signPsbt request', error_1);
|
|
67
|
-
(_c = options.onCancel) === null || _c === void 0 ? void 0 : _c.call(options);
|
|
68
|
-
return [3 /*break*/, 4];
|
|
69
|
-
case 4: return [2 /*return*/];
|
|
70
|
-
}
|
|
71
|
-
});
|
|
72
|
-
}); };
|
|
73
24
|
//# sourceMappingURL=signTransaction.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"signTransaction.js","sourceRoot":"","sources":["../../../src/transactions/signTransaction.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"signTransaction.js","sourceRoot":"","sources":["../../../src/transactions/signTransaction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAQ,MAAM,YAAY,CAAC;AA+BxD,MAAM,CAAC,MAAM,eAAe,GAAG,KAAK,EAAE,OAA+B,EAAE,EAAE;IACvE,MAAM,EAAE,UAAU,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,OAAO,CAAC;IACrD,MAAM,QAAQ,GAAG,MAAM,CAAC,eAAe,CAAC;IACxC,IAAI,CAAC,QAAQ,EAAE;QACb,MAAM,IAAI,KAAK,CAAC,6BAA6B,CAAC,CAAC;KAChD;IACD,IAAI,CAAC,UAAU,EAAE;QACf,MAAM,IAAI,KAAK,CAAC,6DAA6D,CAAC,CAAC;KAChF;IACD,IAAI,CAAC,YAAY,EAAE;QACjB,MAAM,IAAI,KAAK,CAAC,uEAAuE,CAAC,CAAC;KAC1F;IACC,IAAI;QACF,MAAM,OAAO,GAAG,oBAAoB,CAAC,OAAO,CAAC,OAA0B,CAAC,CAAC;QACzE,MAAM,eAAe,GAAG,MAAM,QAAQ,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;QAChE,OAAO,CAAC,QAAQ,EAAE,CAAC,eAAe,CAAC,CAAC;KACrC;IAAC,OAAO,KAAK,EAAE;QACd,OAAO,CAAC,KAAK,CAAC,yCAAyC,EAAE,KAAK,CAAC,CAAC;QAChE,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC;KACtB;AACL,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"program":{"fileNames":["../node_modules/typescript/lib/lib.es5.d.ts","../node_modules/typescript/lib/lib.es2015.d.ts","../node_modules/typescript/lib/lib.es2016.d.ts","../node_modules/typescript/lib/lib.es2017.d.ts","../node_modules/typescript/lib/lib.es2018.d.ts","../node_modules/typescript/lib/lib.es2019.d.ts","../node_modules/typescript/lib/lib.es2020.d.ts","../node_modules/typescript/lib/lib.dom.d.ts","../node_modules/typescript/lib/lib.dom.iterable.d.ts","../node_modules/typescript/lib/lib.webworker.importscripts.d.ts","../node_modules/typescript/lib/lib.scripthost.d.ts","../node_modules/typescript/lib/lib.es2015.core.d.ts","../node_modules/typescript/lib/lib.es2015.collection.d.ts","../node_modules/typescript/lib/lib.es2015.generator.d.ts","../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../node_modules/typescript/lib/lib.es2015.promise.d.ts","../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../node_modules/typescript/lib/lib.es2017.object.d.ts","../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2017.string.d.ts","../node_modules/typescript/lib/lib.es2017.intl.d.ts","../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../node_modules/typescript/lib/lib.es2018.intl.d.ts","../node_modules/typescript/lib/lib.es2018.promise.d.ts","../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../node_modules/typescript/lib/lib.es2019.array.d.ts","../node_modules/typescript/lib/lib.es2019.object.d.ts","../node_modules/typescript/lib/lib.es2019.string.d.ts","../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../node_modules/typescript/lib/lib.es2019.intl.d.ts","../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../node_modules/typescript/lib/lib.es2020.date.d.ts","../node_modules/typescript/lib/lib.es2020.promise.d.ts","../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2020.string.d.ts","../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2020.intl.d.ts","../node_modules/typescript/lib/lib.es2020.number.d.ts","../node_modules/typescript/lib/lib.esnext.intl.d.ts","../node_modules/typescript/lib/lib.es2020.full.d.ts","../node_modules/jsontokens/lib/cryptoclients/secp256k1.d.ts","../node_modules/jsontokens/lib/cryptoclients/index.d.ts","../node_modules/jsontokens/lib/decode.d.ts","../node_modules/jsontokens/lib/signer.d.ts","../node_modules/jsontokens/lib/verifier.d.ts","../node_modules/jsontokens/lib/errors.d.ts","../node_modules/jsontokens/lib/index.d.ts","../src/transactions/signtransaction.ts","../src/provider/index.ts","../src/address/types.ts","../src/address/index.ts","../src/call/index.ts","../index.ts","../node_modules/@babel/types/lib/index.d.ts","../node_modules/@types/babel__generator/index.d.ts","../node_modules/@babel/parser/typings/babel-parser.d.ts","../node_modules/@types/babel__template/index.d.ts","../node_modules/@types/babel__traverse/index.d.ts","../node_modules/@types/babel__core/index.d.ts","../node_modules/@types/eslint/helpers.d.ts","../node_modules/@types/estree/index.d.ts","../node_modules/@types/json-schema/index.d.ts","../node_modules/@types/eslint/index.d.ts","../node_modules/@types/eslint-scope/index.d.ts","../node_modules/@types/node/assert.d.ts","../node_modules/@types/node/assert/strict.d.ts","../node_modules/@types/node/globals.d.ts","../node_modules/@types/node/async_hooks.d.ts","../node_modules/@types/node/buffer.d.ts","../node_modules/@types/node/child_process.d.ts","../node_modules/@types/node/cluster.d.ts","../node_modules/@types/node/console.d.ts","../node_modules/@types/node/constants.d.ts","../node_modules/@types/node/crypto.d.ts","../node_modules/@types/node/dgram.d.ts","../node_modules/@types/node/diagnostics_channel.d.ts","../node_modules/@types/node/dns.d.ts","../node_modules/@types/node/dns/promises.d.ts","../node_modules/@types/node/domain.d.ts","../node_modules/@types/node/dom-events.d.ts","../node_modules/@types/node/events.d.ts","../node_modules/@types/node/fs.d.ts","../node_modules/@types/node/fs/promises.d.ts","../node_modules/@types/node/http.d.ts","../node_modules/@types/node/http2.d.ts","../node_modules/@types/node/https.d.ts","../node_modules/@types/node/inspector.d.ts","../node_modules/@types/node/module.d.ts","../node_modules/@types/node/net.d.ts","../node_modules/@types/node/os.d.ts","../node_modules/@types/node/path.d.ts","../node_modules/@types/node/perf_hooks.d.ts","../node_modules/@types/node/process.d.ts","../node_modules/@types/node/punycode.d.ts","../node_modules/@types/node/querystring.d.ts","../node_modules/@types/node/readline.d.ts","../node_modules/@types/node/readline/promises.d.ts","../node_modules/@types/node/repl.d.ts","../node_modules/@types/node/stream.d.ts","../node_modules/@types/node/stream/promises.d.ts","../node_modules/@types/node/stream/consumers.d.ts","../node_modules/@types/node/stream/web.d.ts","../node_modules/@types/node/string_decoder.d.ts","../node_modules/@types/node/test.d.ts","../node_modules/@types/node/timers.d.ts","../node_modules/@types/node/timers/promises.d.ts","../node_modules/@types/node/tls.d.ts","../node_modules/@types/node/trace_events.d.ts","../node_modules/@types/node/tty.d.ts","../node_modules/@types/node/url.d.ts","../node_modules/@types/node/util.d.ts","../node_modules/@types/node/v8.d.ts","../node_modules/@types/node/vm.d.ts","../node_modules/@types/node/wasi.d.ts","../node_modules/@types/node/worker_threads.d.ts","../node_modules/@types/node/zlib.d.ts","../node_modules/@types/node/globals.global.d.ts","../node_modules/@types/node/index.d.ts","../node_modules/@types/graceful-fs/index.d.ts","../node_modules/@types/istanbul-lib-coverage/index.d.ts","../node_modules/@types/istanbul-lib-report/index.d.ts","../node_modules/@types/istanbul-reports/index.d.ts","../node_modules/@jest/expect-utils/build/index.d.ts","../node_modules/chalk/index.d.ts","../node_modules/@sinclair/typebox/typebox.d.ts","../node_modules/@jest/schemas/build/index.d.ts","../node_modules/pretty-format/build/index.d.ts","../node_modules/jest-diff/build/index.d.ts","../node_modules/jest-matcher-utils/build/index.d.ts","../node_modules/expect/build/index.d.ts","../node_modules/@types/jest/index.d.ts","../node_modules/@types/prettier/index.d.ts","../node_modules/@types/stack-utils/index.d.ts","../node_modules/@types/yargs-parser/index.d.ts","../node_modules/@types/yargs/index.d.ts"],"fileInfos":[{"version":"8730f4bf322026ff5229336391a18bcaa1f94d4f82416c8b2f3954e2ccaae2ba","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","4b421cbfb3a38a27c279dec1e9112c3d1da296f77a1a85ddadf7e7a425d45d18","1fc5ab7a764205c68fa10d381b08417795fc73111d6dd16b5b1ed36badb743d9",{"version":"3aafcb693fe5b5c3bd277bd4c3a617b53db474fe498fc5df067c5603b1eebde7","affectsGlobalScope":true},{"version":"f3d4da15233e593eacb3965cde7960f3fddf5878528d882bcedd5cbaba0193c7","affectsGlobalScope":true},{"version":"7fac8cb5fc820bc2a59ae11ef1c5b38d3832c6d0dfaec5acdb5569137d09a481","affectsGlobalScope":true},{"version":"097a57355ded99c68e6df1b738990448e0bf170e606707df5a7c0481ff2427cd","affectsGlobalScope":true},{"version":"adb996790133eb33b33aadb9c09f15c2c575e71fb57a62de8bf74dbf59ec7dfb","affectsGlobalScope":true},{"version":"8cc8c5a3bac513368b0157f3d8b31cfdcfe78b56d3724f30f80ed9715e404af8","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"c5c05907c02476e4bde6b7e76a79ffcd948aedd14b6a8f56e4674221b0417398","affectsGlobalScope":true},{"version":"5f406584aef28a331c36523df688ca3650288d14f39c5d2e555c95f0d2ff8f6f","affectsGlobalScope":true},{"version":"22f230e544b35349cfb3bd9110b6ef37b41c6d6c43c3314a31bd0d9652fcec72","affectsGlobalScope":true},{"version":"7ea0b55f6b315cf9ac2ad622b0a7813315bb6e97bf4bb3fbf8f8affbca7dc695","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"eb26de841c52236d8222f87e9e6a235332e0788af8c87a71e9e210314300410a","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"81cac4cbc92c0c839c70f8ffb94eb61e2d32dc1c3cf6d95844ca099463cf37ea","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"d154ea5bb7f7f9001ed9153e876b2d5b8f5c2bb9ec02b3ae0d239ec769f1f2ae","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951","affectsGlobalScope":true},{"version":"6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de","affectsGlobalScope":true},{"version":"6e7997ef61de3132e4d4b2250e75343f487903ddf5370e7ce33cf1b9db9a63ed","affectsGlobalScope":true},{"version":"2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993","affectsGlobalScope":true},{"version":"5e5e095c4470c8bab227dbbc61374878ecead104c74ab9960d3adcccfee23205","affectsGlobalScope":true},{"version":"09aa50414b80c023553090e2f53827f007a301bc34b0495bfb2c3c08ab9ad1eb","affectsGlobalScope":true},{"version":"d7f680a43f8cd12a6b6122c07c54ba40952b0c8aa140dcfcf32eb9e6cb028596","affectsGlobalScope":true},{"version":"3787b83e297de7c315d55d4a7c546ae28e5f6c0a361b7a1dcec1f1f50a54ef11","affectsGlobalScope":true},{"version":"e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40","affectsGlobalScope":true},{"version":"faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e","affectsGlobalScope":true},{"version":"06393d13ea207a1bfe08ec8d7be562549c5e2da8983f2ee074e00002629d1871","affectsGlobalScope":true},{"version":"2768ef564cfc0689a1b76106c421a2909bdff0acbe87da010785adab80efdd5c","affectsGlobalScope":true},{"version":"b248e32ca52e8f5571390a4142558ae4f203ae2f94d5bac38a3084d529ef4e58","affectsGlobalScope":true},{"version":"52d1bb7ab7a3306fd0375c8bff560feed26ed676a5b0457fa8027b563aecb9a4","affectsGlobalScope":true},"f58c6d0669d1ee04b2fcb0e87fb949b6828602f3f29c7bf6c76a214f16fd50d5","3a2a8aea8ed40b22c8fc1730eb93862fde113acfd8cb3f0b9e70596a6fa31c2a","5ff4838379c5c1437e2171e1c1a69840e4b50462c1ecb23d295b18962fe97d12","cc6a32bcc8e14d286d69736852e8a21258928d0c76cfb77bea3a7b1445d7a712","0db8e0154c0f208e687da06847cd3480f5ffc3467d85418fe8e7d6db624f0a27","d949ff6b0d61f5ee29356b6e64eb5e32359aaf8a42fefd73b0ab0cd22b1344d1","5be1cdd007ba9787a2f6a9786e493f17cac6340cf03eb33c79972b109cf0b8a9","8e8e613e24a88c3a66bee5b174b9a6b8f415db5c51529d5113388ff701d597d2",{"version":"e1bb94f7699e4530989cf96663e6e246d68121f9df447db6c0cf1d72bffa7741","signature":"ca5fc527a0c3ee6d9e1d9a9a8bd20701b9a2c0f569cae3f0415396cbb13f8b03"},{"version":"3f6c6edb7904e5ac71715d24773cbfd58ee03f15850d09301fa3843a75d38f4e","signature":"3f95c4c10df779f98e5366d7bcad886f8dd8cfde5162e2ae99aba8852b7728b3","affectsGlobalScope":true},{"version":"cdb0239e79a92939620c432b3858be4b18355f4af39253a5affbbef7342cccef","signature":"51d4dcb12fc23fce63055421d0798544bd4438849bee3ac45579a40b2e909b44"},{"version":"a8c3a63aed3faaf73b6f2377bf80c08d750f06879f50ad5ba8a275eade411056","signature":"a954229cc3db251fffd0d647b1a146a01f7d38e90134e6296dd4637f2c0a3d94"},{"version":"d1e2bd2ec9758e1ee6a53ea0ca56b4c96b5f10758952aa27c998e7af4e62225b","signature":"06b21b9c2d7b0749434f368df59c14012f2dfc6df843445a71fc39ede6d949d7"},"c8489403f3e956bc7f31ce41a70c4c47c55e62799bcafc1983b9c90938616cd7","3078727fed04c123165efdb42deeac5dceaa42ac62216ca13cb809dc7e13415f","cc957354aa3c94c9961ebf46282cfde1e81d107fc5785a61f62c67f1dd3ac2eb","b4f76b34637d79cefad486127115fed843762c69512d7101b7096e1293699679","93de1c6dab503f053efe8d304cb522bb3a89feab8c98f307a674a4fae04773e9","dae3d1adc67ac3dbd1cd471889301339ec439837b5df565982345be20c8fca9a","b6ddf3a46ccfa4441d8be84d2e9bf3087573c48804196faedbd4a25b60631beb",{"version":"64d4b35c5456adf258d2cf56c341e203a073253f229ef3208fc0d5020253b241","affectsGlobalScope":true},"a1c79f857f5c7754e14c93949dad8cfefcd7df2ecc0dc9dd79a30fd493e28449","f3e604694b624fa3f83f6684185452992088f5efb2cf136b62474aa106d6f1b6","4e75a89a181f3b091173e4c0828dec3fb1c24087d3bb4f37b4a31e0619e8336f","e050a0afcdbb269720a900c85076d18e0c1ab73e580202a2bf6964978181222a","7e771891adaa85b690266bc37bd6eb43bc57eecc4b54693ead36467e7369952a","a69c09dbea52352f479d3e7ac949fde3d17b195abe90b045d619f747b38d6d1a",{"version":"ca72190df0eb9b09d4b600821c8c7b6c9747b75a1c700c4d57dc0bb72abc074c","affectsGlobalScope":true},"11e2d554398d2bd460e7d06b2fa5827a297c8acfbe00b4f894a224ac0862857f",{"version":"fc811ced095f38ad4438bb94a8d665c63bf4943e58a71ada16627add5ad93226","affectsGlobalScope":true},"374ca798f244e464346f14301dc2a8b4b111af1a83b49fffef5906c338a1f922","5a94487653355b56018122d92392beb2e5f4a6c63ba5cef83bbe1c99775ef713",{"version":"d5135ad93b33adcce80b18f8065087934cdc1730d63db58562edcf017e1aad9b","affectsGlobalScope":true},"82408ed3e959ddc60d3e9904481b5a8dc16469928257af22a3f7d1a3bc7fd8c4","5eb881ed2a0d5b17ea36df5cd4c4be500e460c412f270c3170e906bec65580ac","bb9c4ffa5e6290c6980b63c815cdd1625876dadb2efaf77edbe82984be93e55e","489532ff54b714f0e0939947a1c560e516d3ae93d51d639ab02e907a0e950114","f30bb836526d930a74593f7b0f5c1c46d10856415a8f69e5e2fc3db80371e362","14b5aa23c5d0ae1907bc696ac7b6915d88f7d85799cc0dc2dcf98fbce2c5a67c","5c439dafdc09abe4d6c260a96b822fa0ba5be7203c71a63ab1f1423cd9e838ea",{"version":"6b526a5ec4a401ca7c26cfe6a48e641d8f30af76673bad3b06a1b4504594a960","affectsGlobalScope":true},{"version":"816ad2e607a96de5bcac7d437f843f5afd8957f1fa5eefa6bba8e4ed7ca8fd84","affectsGlobalScope":true},"cec36af22f514322f870e81d30675c78df82ae8bf4863f5fd4e4424c040c678d","d903fafe96674bc0b2ac38a5be4a8fc07b14c2548d1cdb165a80ea24c44c0c54","5eec82ac21f84d83586c59a16b9b8502d34505d1393393556682fe7e7fde9ef2","04eb6578a588d6a46f50299b55f30e3a04ef27d0c5a46c57d8fcc211cd530faa","8d3c583a07e0c37e876908c2d5da575019f689df8d9fa4c081d99119d53dba22","2c828a5405191d006115ab34e191b8474bc6c86ffdc401d1a9864b1b6e088a58",{"version":"e630e5528e899219ae319e83bef54bf3bcb91b01d76861ecf881e8e614b167f0","affectsGlobalScope":true},"2c45b35f4850881ab132f80d3cb51e8a359a4d8fafdc5ff2401d260dc27862f4","7c013aa892414a7fdcfd861ae524a668eaa3ede8c7c0acafaf611948122c8d93","b0973c3cbcdc59b37bf477731d468696ecaf442593ec51bab497a613a580fe30",{"version":"4989e92ba5b69b182d2caaea6295af52b7dc73a4f7a2e336a676722884e7139d","affectsGlobalScope":true},{"version":"b3624aed92dab6da8484280d3cb3e2f4130ec3f4ef3f8201c95144ae9e898bb6","affectsGlobalScope":true},"5153a2fd150e46ce57bb3f8db1318d33f6ad3261ed70ceeff92281c0608c74a3","210d54cd652ec0fec8c8916e4af59bb341065576ecda039842f9ffb2e908507c","36b03690b628eab08703d63f04eaa89c5df202e5f1edf3989f13ad389cd2c091","0effadd232a20498b11308058e334d3339cc5bf8c4c858393e38d9d4c0013dcf","25846d43937c672bab7e8195f3d881f93495df712ee901860effc109918938cc","fd93cee2621ff42dabe57b7be402783fd1aa69ece755bcba1e0290547ae60513","1b952304137851e45bc009785de89ada562d9376177c97e37702e39e60c2f1ff","69ee23dd0d215b09907ad30d23f88b7790c93329d1faf31d7835552a10cf7cbf","44b8b584a338b190a59f4f6929d072431950c7bd92ec2694821c11bce180c8a5","23b89798789dffbd437c0c423f5d02d11f9736aea73d6abf16db4f812ff36eda","09326ae5f7e3d49be5cd9ea00eb814770e71870a438faa2efd8bdd9b4db21320",{"version":"970a90f76d4d219ad60819d61f5994514087ba94c985647a3474a5a3d12714ed","affectsGlobalScope":true},"e10177274a35a9d07c825615340b2fcde2f610f53f3fb40269fd196b4288dda6","c4577fb855ca259bdbf3ea663ca73988ce5f84251a92b4aef80a1f4122b6f98e","3c13ef48634e7b5012fcf7e8fce7496352c2d779a7201389ca96a2a81ee4314d","5d0a25ec910fa36595f85a67ac992d7a53dd4064a1ba6aea1c9f14ab73a023f2",{"version":"f0900cd5d00fe1263ff41201fb8073dbeb984397e4af3b8002a5c207a30bdc33","affectsGlobalScope":true},{"version":"ff07a9a03c65732ccc59b3c65bc584173da093bd563a6565411c01f5703bd3cb","affectsGlobalScope":true},"06d7c42d256f0ce6afe1b2b6cfbc97ab391f29dadb00dd0ae8e8f23f5bc916c3","ec4bd1b200670fb567920db572d6701ed42a9641d09c4ff6869768c8f81b404c","e59a892d87e72733e2a9ca21611b9beb52977be2696c7ba4b216cbbb9a48f5aa",{"version":"da26af7362f53d122283bc69fed862b9a9fe27e01bc6a69d1d682e0e5a4df3e6","affectsGlobalScope":true},"8a300fa9b698845a1f9c41ecbe2c5966634582a8e2020d51abcace9b55aa959e",{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true},"ed2a670a77a1b80653c5bde2d813b0ab2e92872cc9b2b611ce11050b95139be6","bf88ef4208a770ca39a844b182b3695df536326ea566893fdc5b8418702a331e","8b06ac3faeacb8484d84ddb44571d8f410697f98d7bfa86c0fda60373a9f5215","7eb06594824ada538b1d8b48c3925a83e7db792f47a081a62cf3e5c4e23cf0ee","f5638f7c2f12a9a1a57b5c41b3c1ea7db3876c003bab68e6a57afd6bcc169af0","6c1e688f95fcaf53b1e41c0fdadf2c1cfc96fa924eaf7f9fdb60f96deb0a4986","0d14fa22c41fdc7277e6f71473b20ebc07f40f00e38875142335d5b63cdfc9d2","db25694be959314fd1e868d72e567746db1db9e2001fae545d12d2a8c1bba1b8","43883cf3635bb1846cbdc6c363787b76227677388c74f7313e3f0edb380840fa","2d47012580f859dae201d2eef898a416bdae719dffc087dfd06aefe3de2f9c8d","3e70a7e67c2cb16f8cd49097360c0309fe9d1e3210ff9222e9dac1f8df9d4fb6","ab68d2a3e3e8767c3fba8f80de099a1cfc18c0de79e42cb02ae66e22dfe14a66","2cec1a31729b9b01e9294c33fc9425d336eff067282809761ad2e74425d6d2a5",{"version":"eb9e147dbb7289f09af3b161483c09a9175c3b222ed587f4a3c0112841e7d6ff","affectsGlobalScope":true},"bc88e4049153bc4dddb4503ed7e624eb141edfa9064b3659d6c86e900fe9e621","b0d10e46cfe3f6c476b69af02eaa38e4ccc7430221ce3109ae84bb9fb8282298","70e9a18da08294f75bf23e46c7d69e67634c0765d355887b9b41f0d959e1426e","ae84439d1ae42b30ced3df38c4285f35b805be40dfc95b0647d0e59c70b11f97"],"options":{"allowUnreachableCode":false,"declaration":true,"esModuleInterop":true,"module":5,"noImplicitAny":true,"outDir":"./","skipLibCheck":true,"sourceMap":true,"strict":true,"target":7,"useUnknownInCatchVariables":false},"fileIdsList":[[54,55,57,58,117],[60,117],[117],[117,131],[60,61,62,63,64,117],[60,62,117],[67,69,117],[66,67,68,117],[88,117,124],[117,126],[117,127],[117,133,136],[71,117],[74,117],[75,80,108,117],[76,87,88,95,105,116,117],[76,77,87,95,117],[78,117],[79,80,88,96,117],[80,105,113,117],[81,83,87,95,117],[82,117],[83,84,117],[87,117],[85,87,117],[87,88,89,105,116,117],[87,88,89,102,105,108,117],[117,121],[83,90,95,105,116,117],[87,88,90,91,95,105,113,116,117],[90,92,105,113,116,117],[71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123],[87,93,117],[94,116,117],[83,87,95,105,117],[96,117],[97,117],[74,98,117],[99,115,117,121],[100,117],[101,117],[87,102,103,117],[102,104,117,119],[75,87,105,106,107,108,117],[75,105,107,117],[105,106,117],[108,117],[109,117],[87,111,112,117],[111,112,117],[80,95,105,113,117],[114,117],[95,115,117],[75,90,101,116,117],[80,117],[105,117,118],[117,119],[117,120],[75,80,87,89,98,105,116,117,119,121],[105,117,122],[117,140],[117,129,135],[117,133],[117,130,134],[47,117],[48,49,50,51,52,117],[48,49,117],[48,50,117],[117,132],[53,56,117],[55,117],[53,55,117],[54,57,117],[56],[55],[54,57]],"referencedMap":[[59,1],[62,2],[60,3],[129,3],[132,4],[131,3],[65,5],[61,2],[63,6],[64,2],[70,7],[66,3],[69,8],[67,3],[125,9],[126,3],[127,10],[128,11],[137,12],[68,3],[71,13],[72,13],[74,14],[75,15],[76,16],[77,17],[78,18],[79,19],[80,20],[81,21],[82,22],[83,23],[84,23],[86,24],[85,25],[87,24],[88,26],[89,27],[73,28],[123,3],[90,29],[91,30],[92,31],[124,32],[93,33],[94,34],[95,35],[96,36],[97,37],[98,38],[99,39],[100,40],[101,41],[102,42],[103,42],[104,43],[105,44],[107,45],[106,46],[108,47],[109,48],[110,3],[111,49],[112,50],[113,51],[114,52],[115,53],[116,54],[117,55],[118,56],[119,57],[120,58],[121,59],[122,60],[138,3],[139,3],[140,3],[141,61],[130,3],[136,62],[134,63],[135,64],[48,65],[47,3],[49,3],[52,3],[53,66],[50,67],[51,68],[133,69],[8,3],[9,3],[13,3],[12,3],[2,3],[14,3],[15,3],[16,3],[17,3],[18,3],[19,3],[20,3],[21,3],[3,3],[4,3],[25,3],[22,3],[23,3],[24,3],[26,3],[27,3],[28,3],[5,3],[29,3],[30,3],[31,3],[32,3],[6,3],[36,3],[33,3],[34,3],[35,3],[37,3],[7,3],[38,3],[46,3],[43,3],[44,3],[39,3],[40,3],[41,3],[42,3],[1,3],[45,3],[11,3],[10,3],[57,70],[56,71],[58,72],[55,73],[54,72]],"exportedModulesMap":[[59,1],[62,2],[60,3],[129,3],[132,4],[131,3],[65,5],[61,2],[63,6],[64,2],[70,7],[66,3],[69,8],[67,3],[125,9],[126,3],[127,10],[128,11],[137,12],[68,3],[71,13],[72,13],[74,14],[75,15],[76,16],[77,17],[78,18],[79,19],[80,20],[81,21],[82,22],[83,23],[84,23],[86,24],[85,25],[87,24],[88,26],[89,27],[73,28],[123,3],[90,29],[91,30],[92,31],[124,32],[93,33],[94,34],[95,35],[96,36],[97,37],[98,38],[99,39],[100,40],[101,41],[102,42],[103,42],[104,43],[105,44],[107,45],[106,46],[108,47],[109,48],[110,3],[111,49],[112,50],[113,51],[114,52],[115,53],[116,54],[117,55],[118,56],[119,57],[120,58],[121,59],[122,60],[138,3],[139,3],[140,3],[141,61],[130,3],[136,62],[134,63],[135,64],[48,65],[47,3],[49,3],[52,3],[53,66],[50,67],[51,68],[133,69],[8,3],[9,3],[13,3],[12,3],[2,3],[14,3],[15,3],[16,3],[17,3],[18,3],[19,3],[20,3],[21,3],[3,3],[4,3],[25,3],[22,3],[23,3],[24,3],[26,3],[27,3],[28,3],[5,3],[29,3],[30,3],[31,3],[32,3],[6,3],[36,3],[33,3],[34,3],[35,3],[37,3],[7,3],[38,3],[46,3],[43,3],[44,3],[39,3],[40,3],[41,3],[42,3],[1,3],[45,3],[11,3],[10,3],[57,74],[56,75],[58,75],[55,76],[54,75]],"semanticDiagnosticsPerFile":[59,62,60,129,132,131,65,61,63,64,70,66,69,67,125,126,127,128,137,68,71,72,74,75,76,77,78,79,80,81,82,83,84,86,85,87,88,89,73,123,90,91,92,124,93,94,95,96,97,98,99,100,101,102,103,104,105,107,106,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,138,139,140,141,130,136,134,135,48,47,49,52,53,50,51,133,8,9,13,12,2,14,15,16,17,18,19,20,21,3,4,25,22,23,24,26,27,28,5,29,30,31,32,6,36,33,34,35,37,7,38,46,43,44,39,40,41,42,1,45,11,10,57,56,58,55,54]},"version":"4.9.5"}
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sats-connect",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.9",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
|
+
"files": ["dist"],
|
|
5
6
|
"scripts": {
|
|
6
7
|
"test": "jest",
|
|
7
8
|
"build-debug": "webpack --mode development",
|
|
8
9
|
"build": "npm run clean && tsc --module ES6 --outDir ./dist",
|
|
9
|
-
"postinstall": "npm run build",
|
|
10
10
|
"clean": "rimraf dist",
|
|
11
11
|
"lint": "prettier --write ."
|
|
12
12
|
},
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
name: Release & Publish Package
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
release:
|
|
5
|
-
types: [created]
|
|
6
|
-
|
|
7
|
-
jobs:
|
|
8
|
-
build:
|
|
9
|
-
runs-on: ubuntu-latest
|
|
10
|
-
steps:
|
|
11
|
-
- uses: actions/checkout@v3
|
|
12
|
-
- uses: actions/setup-node@v3
|
|
13
|
-
with:
|
|
14
|
-
node-version: 16
|
|
15
|
-
- run: npm ci
|
|
16
|
-
# - run: npm test
|
|
17
|
-
|
|
18
|
-
publish-gpr:
|
|
19
|
-
needs: build
|
|
20
|
-
runs-on: ubuntu-latest
|
|
21
|
-
permissions:
|
|
22
|
-
packages: write
|
|
23
|
-
contents: read
|
|
24
|
-
steps:
|
|
25
|
-
- uses: actions/checkout@v3
|
|
26
|
-
- uses: actions/setup-node@v3
|
|
27
|
-
with:
|
|
28
|
-
node-version: 16
|
|
29
|
-
registry-url: https://npm.pkg.github.com/
|
|
30
|
-
- run: npm ci
|
|
31
|
-
- run: npm publish
|
|
32
|
-
env:
|
|
33
|
-
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
|
package/.prettierrc.json
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"arrowParens": "always",
|
|
3
|
-
"bracketSpacing": true,
|
|
4
|
-
"jsxBracketSameLine": false,
|
|
5
|
-
"jsxSingleQuote": false,
|
|
6
|
-
"quoteProps": "as-needed",
|
|
7
|
-
"singleQuote": true,
|
|
8
|
-
"semi": true,
|
|
9
|
-
"printWidth": 100,
|
|
10
|
-
"useTabs": false,
|
|
11
|
-
"tabWidth": 2,
|
|
12
|
-
"trailingComma": "es5"
|
|
13
|
-
}
|
package/index.ts
DELETED
package/jest.config.js
DELETED
package/src/address/index.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { createUnsecuredToken, Json } from 'jsontokens';
|
|
2
|
-
import { GetAddressOptions } from './types';
|
|
3
|
-
|
|
4
|
-
export const getAddress = async (options: GetAddressOptions) => {
|
|
5
|
-
const { message, network, purposes } = options.payload;
|
|
6
|
-
const provider = window.BitcoinProvider;
|
|
7
|
-
if (!provider) {
|
|
8
|
-
throw new Error('No Bitcoin Wallet installed');
|
|
9
|
-
}
|
|
10
|
-
if(!purposes) {
|
|
11
|
-
throw new Error('Address purposes are required');
|
|
12
|
-
}
|
|
13
|
-
try {
|
|
14
|
-
const request = createUnsecuredToken(options.payload as unknown as Json);
|
|
15
|
-
const addressResponse = await provider.connect(request);
|
|
16
|
-
options.onFinish?.(addressResponse);
|
|
17
|
-
} catch (error) {
|
|
18
|
-
console.error('[Connect] Error during address request', error);
|
|
19
|
-
options.onCancel?.();
|
|
20
|
-
}
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
export * from './types';
|
package/src/address/types.ts
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { BitcoinNetwork } from '../provider';
|
|
2
|
-
|
|
3
|
-
export enum AddressPurposes {
|
|
4
|
-
PAYMENT = 'payment',
|
|
5
|
-
ORDINALS = 'ordinals',
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
export interface Purpose {
|
|
9
|
-
derivation_path?: string;
|
|
10
|
-
purpose: AddressPurposes;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export interface GetAddressPayload {
|
|
14
|
-
purposes: Array<AddressPurposes>;
|
|
15
|
-
message: string;
|
|
16
|
-
network: BitcoinNetwork;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export interface Address {
|
|
20
|
-
address: string;
|
|
21
|
-
publicKey: string;
|
|
22
|
-
purpose: Purpose;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export interface GetAddressResponse {
|
|
26
|
-
addresses: Array<Address>
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export interface GetAddressOptions {
|
|
30
|
-
onFinish: (response: GetAddressResponse) => void;
|
|
31
|
-
onCancel: () => void;
|
|
32
|
-
payload: GetAddressPayload;
|
|
33
|
-
}
|
package/src/call/index.ts
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { createUnsecuredToken, Json } from 'jsontokens';
|
|
2
|
-
import { BitcoinNetwork } from '../provider';
|
|
3
|
-
|
|
4
|
-
export interface CallWalletPayload {
|
|
5
|
-
method: string;
|
|
6
|
-
network: BitcoinNetwork;
|
|
7
|
-
params?: Array<any>;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export interface CallWalletOptions {
|
|
11
|
-
onFinish: (response: Record<string, any>) => void;
|
|
12
|
-
onCancel: () => void;
|
|
13
|
-
payload: CallWalletPayload;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export enum CallMethod {
|
|
17
|
-
SIGN_TRANSACTION = 'signTransaction',
|
|
18
|
-
GET_ADDRESS = 'getAddress',
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export const callWalletPopup = async (options: CallWalletOptions) => {
|
|
22
|
-
const provider = window.BitcoinProvider;
|
|
23
|
-
const { method } = options.payload;
|
|
24
|
-
if (!provider) {
|
|
25
|
-
throw new Error('No Bitcoin Wallet installed');
|
|
26
|
-
}
|
|
27
|
-
if(!method) {
|
|
28
|
-
throw new Error('A wallet method is required');
|
|
29
|
-
}
|
|
30
|
-
const request = createUnsecuredToken(options.payload as unknown as Json);
|
|
31
|
-
try {
|
|
32
|
-
const callResponse = await provider.call(request);
|
|
33
|
-
options.onFinish?.(callResponse);
|
|
34
|
-
} catch (error) {
|
|
35
|
-
console.error('[Connect] Error during call request', error);
|
|
36
|
-
options.onCancel?.();
|
|
37
|
-
}
|
|
38
|
-
};
|
package/src/provider/index.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { SignTransactionResponse } from '../transactions/signTransaction';
|
|
2
|
-
import { GetAddressResponse } from '../address';
|
|
3
|
-
|
|
4
|
-
export interface BitcoinNetwork {
|
|
5
|
-
type: string;
|
|
6
|
-
address: string;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export interface BitcoinProvider {
|
|
10
|
-
connect: (request: string) => Promise<GetAddressResponse>;
|
|
11
|
-
call: (request: string) => Promise<Record<string, any>>;
|
|
12
|
-
signTransaction: (request: string) => Promise<SignTransactionResponse>;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
declare global {
|
|
16
|
-
interface Window {
|
|
17
|
-
BitcoinProvider?: BitcoinProvider;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { createUnsecuredToken, Json } from 'jsontokens';
|
|
2
|
-
import { BitcoinNetwork } from '../provider';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export interface InputToSign {
|
|
6
|
-
address: string,
|
|
7
|
-
signingIndexes: Array<number>,
|
|
8
|
-
sigHash?: number,
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
export interface SignTransactionPayload {
|
|
13
|
-
network: BitcoinNetwork;
|
|
14
|
-
message: string;
|
|
15
|
-
psbtBase64: string;
|
|
16
|
-
broadcast?: boolean;
|
|
17
|
-
inputsToSign: InputToSign[];
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export interface SignTransactionOptions {
|
|
21
|
-
payload: SignTransactionPayload;
|
|
22
|
-
onFinish: (response: any) => void;
|
|
23
|
-
onCancel: () => void;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export interface SignTransactionResponse {
|
|
27
|
-
psbtBase64: string;
|
|
28
|
-
txId?: string;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
export const signTransaction = async (options: SignTransactionOptions) => {
|
|
33
|
-
const { psbtBase64, inputsToSign } = options.payload;
|
|
34
|
-
const provider = window.BitcoinProvider;
|
|
35
|
-
if (!provider) {
|
|
36
|
-
throw new Error('No Bitcoin Wallet installed');
|
|
37
|
-
}
|
|
38
|
-
if (!psbtBase64) {
|
|
39
|
-
throw new Error('a value for psbtBase64 representing the tx hash is required');
|
|
40
|
-
}
|
|
41
|
-
if (!inputsToSign) {
|
|
42
|
-
throw new Error('an array specifying the inputs to be signed by the wallet is required');
|
|
43
|
-
}
|
|
44
|
-
try {
|
|
45
|
-
const request = createUnsecuredToken(options.payload as unknown as Json);
|
|
46
|
-
const addressResponse = await provider.signTransaction(request);
|
|
47
|
-
options.onFinish?.(addressResponse);
|
|
48
|
-
} catch (error) {
|
|
49
|
-
console.error('[Connect] Error during signPsbt request', error);
|
|
50
|
-
options.onCancel?.();
|
|
51
|
-
}
|
|
52
|
-
};
|
|
53
|
-
|
package/tsconfig.json
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"incremental": true,
|
|
4
|
-
"module": "es6",
|
|
5
|
-
"target": "es5",
|
|
6
|
-
"moduleResolution": "node",
|
|
7
|
-
"baseUrl": ".",
|
|
8
|
-
"declaration": true,
|
|
9
|
-
"sourceMap": true,
|
|
10
|
-
"outDir": "dist",
|
|
11
|
-
"esModuleInterop": true,
|
|
12
|
-
"forceConsistentCasingInFileNames": true,
|
|
13
|
-
"strict": true,
|
|
14
|
-
"useUnknownInCatchVariables": false,
|
|
15
|
-
"noImplicitAny": true,
|
|
16
|
-
"allowUnreachableCode": false,
|
|
17
|
-
"skipLibCheck": true
|
|
18
|
-
},
|
|
19
|
-
"exclude": ["./tests", "./dist"]
|
|
20
|
-
}
|
package/webpack.config.js
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
const webpack = require('webpack');
|
|
2
|
-
const path = require('path');
|
|
3
|
-
|
|
4
|
-
const NODE_ENV_PRODUCTION = 'production';
|
|
5
|
-
const NODE_ENV_DEVELOPMENT = 'development';
|
|
6
|
-
|
|
7
|
-
const isProduction = process.env.NODE_ENV === NODE_ENV_PRODUCTION;
|
|
8
|
-
|
|
9
|
-
module.exports = {
|
|
10
|
-
mode: isProduction ? NODE_ENV_PRODUCTION : NODE_ENV_DEVELOPMENT,
|
|
11
|
-
entry: ['./index.ts'],
|
|
12
|
-
output: {
|
|
13
|
-
filename: 'index.js',
|
|
14
|
-
library: 'sats_connect',
|
|
15
|
-
libraryTarget: 'var',
|
|
16
|
-
path: path.resolve(process.cwd(), 'dist'),
|
|
17
|
-
},
|
|
18
|
-
plugins: [
|
|
19
|
-
new webpack.ProvidePlugin({
|
|
20
|
-
process: 'process/browser',
|
|
21
|
-
fetch: 'cross-fetch',
|
|
22
|
-
}),
|
|
23
|
-
],
|
|
24
|
-
optimization: {
|
|
25
|
-
minimize: isProduction,
|
|
26
|
-
},
|
|
27
|
-
devtool: false,
|
|
28
|
-
module: {
|
|
29
|
-
rules: [
|
|
30
|
-
{
|
|
31
|
-
test: /\.[jt]sx?$/,
|
|
32
|
-
exclude: /node_modules/,
|
|
33
|
-
use: [
|
|
34
|
-
{
|
|
35
|
-
loader: require.resolve('ts-loader'),
|
|
36
|
-
options: {
|
|
37
|
-
transpileOnly: false,
|
|
38
|
-
},
|
|
39
|
-
},
|
|
40
|
-
],
|
|
41
|
-
},
|
|
42
|
-
],
|
|
43
|
-
},
|
|
44
|
-
resolve: {
|
|
45
|
-
extensions: ['.ts', '.js'],
|
|
46
|
-
fallback: {
|
|
47
|
-
url: require.resolve('url'),
|
|
48
|
-
stream: require.resolve('stream-browserify'),
|
|
49
|
-
vm: require.resolve('vm-browserify'),
|
|
50
|
-
assert: require.resolve('assert'),
|
|
51
|
-
},
|
|
52
|
-
},
|
|
53
|
-
};
|