@bitgo/public-types 6.0.0 → 6.1.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.
@@ -7,3 +7,4 @@ export * from "./wallet";
7
7
  export * from "./tss";
8
8
  export * from "./lightning";
9
9
  export * from "./enterprise";
10
+ export * from "./webauthn";
@@ -23,4 +23,5 @@ __exportStar(require("./wallet"), exports);
23
23
  __exportStar(require("./tss"), exports);
24
24
  __exportStar(require("./lightning"), exports);
25
25
  __exportStar(require("./enterprise"), exports);
26
+ __exportStar(require("./webauthn"), exports);
26
27
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/schema/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iDAA+B;AAC/B,uDAAqC;AACrC,4CAA0B;AAC1B,0CAAwB;AACxB,2CAAyB;AACzB,2CAAyB;AACzB,wCAAsB;AACtB,8CAA4B;AAC5B,+CAA6B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/schema/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iDAA+B;AAC/B,uDAAqC;AACrC,4CAA0B;AAC1B,0CAAwB;AACxB,2CAAyB;AACzB,2CAAyB;AACzB,wCAAsB;AACtB,8CAA4B;AAC5B,+CAA6B;AAC7B,6CAA2B"}
@@ -0,0 +1,2 @@
1
+ export * from "./webauthnDevice";
2
+ export * from "./webAuthnOtpDevice";
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./webauthnDevice"), exports);
18
+ __exportStar(require("./webAuthnOtpDevice"), exports);
19
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/schema/webauthn/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mDAAiC;AACjC,sDAAoC"}
@@ -0,0 +1,7 @@
1
+ export interface WebAuthnOtpDevice {
2
+ id: string;
3
+ credentialId: string;
4
+ prfSalt?: string;
5
+ isPasskey?: boolean;
6
+ extensions?: Record<string, boolean>;
7
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=webAuthnOtpDevice.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webAuthnOtpDevice.js","sourceRoot":"","sources":["../../../../src/schema/webauthn/webAuthnOtpDevice.ts"],"names":[],"mappings":""}
@@ -0,0 +1,18 @@
1
+ import * as t from "io-ts";
2
+ export declare const AuthenticatorInfo: t.TypeC<{
3
+ credID: t.StringC;
4
+ fmt: t.StringC;
5
+ publicKey: t.StringC;
6
+ }>;
7
+ export type AuthenticatorInfo = t.TypeOf<typeof AuthenticatorInfo>;
8
+ export declare const WebauthnDevice: t.TypeC<{
9
+ otpDeviceId: t.StringC;
10
+ authenticatorInfo: t.TypeC<{
11
+ credID: t.StringC;
12
+ fmt: t.StringC;
13
+ publicKey: t.StringC;
14
+ }>;
15
+ prfSalt: t.StringC;
16
+ encryptedPrv: t.StringC;
17
+ }>;
18
+ export type WebauthnDevice = t.TypeOf<typeof WebauthnDevice>;
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ exports.WebauthnDevice = exports.AuthenticatorInfo = void 0;
27
+ const t = __importStar(require("io-ts"));
28
+ exports.AuthenticatorInfo = t.type({
29
+ credID: t.string,
30
+ fmt: t.string,
31
+ publicKey: t.string,
32
+ });
33
+ exports.WebauthnDevice = t.type({
34
+ otpDeviceId: t.string,
35
+ authenticatorInfo: exports.AuthenticatorInfo,
36
+ prfSalt: t.string,
37
+ encryptedPrv: t.string,
38
+ });
39
+ //# sourceMappingURL=webauthnDevice.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webauthnDevice.js","sourceRoot":"","sources":["../../../../src/schema/webauthn/webauthnDevice.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAA2B;AAEd,QAAA,iBAAiB,GAAG,CAAC,CAAC,IAAI,CAAC;IAEtC,MAAM,EAAE,CAAC,CAAC,MAAM;IAEhB,GAAG,EAAE,CAAC,CAAC,MAAM;IAEb,SAAS,EAAE,CAAC,CAAC,MAAM;CACpB,CAAC,CAAC;AAIU,QAAA,cAAc,GAAG,CAAC,CAAC,IAAI,CAAC;IACnC,WAAW,EAAE,CAAC,CAAC,MAAM;IACrB,iBAAiB,EAAE,yBAAiB;IACpC,OAAO,EAAE,CAAC,CAAC,MAAM;IACjB,YAAY,EAAE,CAAC,CAAC,MAAM;CACvB,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bitgo/public-types",
3
- "version": "6.0.0",
3
+ "version": "6.1.0",
4
4
  "description": "Collection of types exposed externally as part of the BitGo public API",
5
5
  "license": "UNLICENSED",
6
6
  "author": "",
@@ -7,3 +7,4 @@ export * from "./wallet";
7
7
  export * from "./tss";
8
8
  export * from "./lightning";
9
9
  export * from "./enterprise";
10
+ export * from "./webauthn";
@@ -0,0 +1,2 @@
1
+ export * from "./webauthnDevice";
2
+ export * from "./webAuthnOtpDevice";
@@ -0,0 +1,8 @@
1
+ export interface WebAuthnOtpDevice {
2
+ id: string;
3
+ /** Base64url-encoded WebAuthn credential ID */
4
+ credentialId: string;
5
+ prfSalt?: string;
6
+ isPasskey?: boolean;
7
+ extensions?: Record<string, boolean>;
8
+ }
@@ -0,0 +1,21 @@
1
+ import * as t from "io-ts";
2
+
3
+ export const AuthenticatorInfo = t.type({
4
+ /** Base64url-encoded WebAuthn credential ID */
5
+ credID: t.string,
6
+ /** Attestation format (e.g. "packed", "none") */
7
+ fmt: t.string,
8
+ /** Base64url-encoded COSE public key */
9
+ publicKey: t.string,
10
+ });
11
+
12
+ export type AuthenticatorInfo = t.TypeOf<typeof AuthenticatorInfo>;
13
+
14
+ export const WebauthnDevice = t.type({
15
+ otpDeviceId: t.string,
16
+ authenticatorInfo: AuthenticatorInfo,
17
+ prfSalt: t.string,
18
+ encryptedPrv: t.string,
19
+ });
20
+
21
+ export type WebauthnDevice = t.TypeOf<typeof WebauthnDevice>;