Skip to content

Commit 3f56531

Browse files
committed
add JSDocs for scope(s)Object types
1 parent 41e0413 commit 3f56531

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

packages/multichain/src/scope/types.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,21 @@ import type {
1212
Json,
1313
} from '@metamask/utils';
1414

15-
// These External prefixed types represent the CAIP-217
16-
// Scope and ScopeObject as defined in the spec.
15+
/**
16+
* Represents a `scopeString` as defined in [CAIP-217](https://chainagnostic.org/CAIPs/caip-217).
17+
*/
1718
export type ExternalScopeString = CaipChainId | CaipNamespace;
19+
/**
20+
* Represents a `scopeObject` as defined in [CAIP-217](https://chainagnostic.org/CAIPs/caip-217).
21+
*/
1822
export type ExternalScopeObject = Omit<ScopeObject, 'accounts'> & {
1923
references?: CaipReference[];
2024
accounts?: CaipAccountId[];
2125
};
26+
/**
27+
* Represents a `scope` as defined in [CAIP-217](https://chainagnostic.org/CAIPs/caip-217).
28+
* TODO update the language in CAIP-217 to use "scope" instead of "scopeObject" for this full record type.
29+
*/
2230
export type ExternalScopesObject = Record<
2331
ExternalScopeString,
2432
ExternalScopeObject

0 commit comments

Comments
 (0)