@keetanetwork/anchor 0.0.97 → 0.0.100
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/client/index.d.ts +2 -0
- package/client/index.d.ts.map +1 -1
- package/client/index.js.map +1 -1
- package/lib/chaining.d.ts.map +1 -1
- package/lib/chaining.js +13 -3
- package/lib/chaining.js.map +1 -1
- package/lib/queue/index.d.ts +39 -16
- package/lib/queue/index.d.ts.map +1 -1
- package/lib/queue/index.js +72 -0
- package/lib/queue/index.js.map +1 -1
- package/lib/resolver.d.ts +44 -2
- package/lib/resolver.d.ts.map +1 -1
- package/lib/resolver.generated.js +391 -341
- package/lib/resolver.generated.js.map +1 -1
- package/lib/resolver.js +45 -1
- package/lib/resolver.js.map +1 -1
- package/npm-shrinkwrap.json +16 -13
- package/package.json +3 -3
- package/services/kyc/client.d.ts +3 -3
- package/services/kyc/client.d.ts.map +1 -1
- package/services/kyc/client.js +12 -6
- package/services/kyc/client.js.map +1 -1
- package/services/kyc/common.d.ts +9 -2
- package/services/kyc/common.d.ts.map +1 -1
- package/services/kyc/common.js.map +1 -1
- package/services/kyc/common.server.generated.js +6 -1
- package/services/kyc/common.server.generated.js.map +1 -1
- package/services/kyc/server.d.ts +13 -1
- package/services/kyc/server.d.ts.map +1 -1
- package/services/kyc/server.js +9 -0
- package/services/kyc/server.js.map +1 -1
- package/services/storage/clients/profile.d.ts +4 -4
- package/services/storage/clients/profile.d.ts.map +1 -1
- package/services/storage/clients/profile.generated.js +13 -13
- package/services/storage/clients/profile.js +1 -1
- package/services/storage/clients/profile.js.map +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolver.generated.js","sourceRoot":"","sources":["../../src/lib/resolver.generated.ts"],"names":[],"mappings":";;AAAA,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAI/C,MAAM,CAAC,MAAM,yBAAyB,40CAA4F,CAAC;AACnI,MAAM,C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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAAmH,CAAC;AACxK,MAAM,CAAC,MAAM,kCAAkC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAAmI,CAAC","sourcesContent":["import { createAssert, createIs } from \"typia\";\nimport type { CurrencySearchCanonical, CurrencySearchInput, ExternalURL, ServiceMetadata, ToJSONValuizable } from \"./resolver.js\";\nimport type { SignableServiceMetadata } from \"./anchor-metadata-server.js\";\n\nexport const isCurrencySearchCanonical: (input: unknown) => input is CurrencySearchCanonical = createIs<CurrencySearchCanonical>();\nexport const isCurrencySearchInput: (input: unknown) => input is CurrencySearchInput = createIs<CurrencySearchInput>();\n\n/**\n * Check if a value is an ExternalURL\n */\nexport const isExternalURL: (input: unknown) => input is ExternalURL = createIs<ExternalURL>();\n\nexport const assertServiceMetadata: (input: unknown) => ToJSONValuizable<ServiceMetadata> = createAssert<ToJSONValuizable<ServiceMetadata>>();\nexport const assertSignableServiceMetadataOperations: (input: unknown) => SignableServiceMetadata['operations'] = createAssert<SignableServiceMetadata['operations']>();\nexport const assertSignableServiceMetadataLegal: (input: unknown) => NonNullable<SignableServiceMetadata['legal']> = createAssert<NonNullable<SignableServiceMetadata['legal']>>();\n"]}
|
package/lib/resolver.js
CHANGED
|
@@ -13,6 +13,17 @@ import { assertServiceMetadata, assertSignableServiceMetadataLegal, assertSignab
|
|
|
13
13
|
const ExternalURLKey = '2b828e33-2692-46e9-817e-9b93d63f28fd';
|
|
14
14
|
;
|
|
15
15
|
const KeetaNetAccount = KeetaNetClient.lib.Account;
|
|
16
|
+
// #region Global Service Metadata
|
|
17
|
+
/**
|
|
18
|
+
* The type of legal entity a KYC provider can verify.
|
|
19
|
+
*
|
|
20
|
+
* - `individual` is the classic Know Your Customer (KYC) flow.
|
|
21
|
+
* - `business` is the Know Your Business (KYB) flow.
|
|
22
|
+
*
|
|
23
|
+
* Both are hosted redirect flows: the provider returns a `webURL` to a
|
|
24
|
+
* hosted experience it owns, and the client polls for the certificate.
|
|
25
|
+
*/
|
|
26
|
+
const kycEntityTypes = ['individual', 'business'];
|
|
16
27
|
function assertValidCountryCodes(input) {
|
|
17
28
|
if (typeof input !== 'object' || input === null) {
|
|
18
29
|
throw (new Error(`Expected an object, got ${typeof input}`));
|
|
@@ -852,6 +863,21 @@ async function verifyServiceEntrySignature(entry, logger) {
|
|
|
852
863
|
}
|
|
853
864
|
return (valid);
|
|
854
865
|
}
|
|
866
|
+
/**
|
|
867
|
+
* A service with no usable `entityTypes` declaration is `individual`-only;
|
|
868
|
+
* otherwise a type is supported only when its key is explicitly `true`.
|
|
869
|
+
*/
|
|
870
|
+
async function kycServiceSupportsEntityType(kycService, entityType) {
|
|
871
|
+
const declared = await kycService.entityTypes?.('object');
|
|
872
|
+
if (declared === undefined) {
|
|
873
|
+
return (entityType === 'individual');
|
|
874
|
+
}
|
|
875
|
+
const declaredValue = declared[entityType];
|
|
876
|
+
if (declaredValue === undefined) {
|
|
877
|
+
return (false);
|
|
878
|
+
}
|
|
879
|
+
return (await declaredValue('boolean'));
|
|
880
|
+
}
|
|
855
881
|
class Resolver {
|
|
856
882
|
#roots;
|
|
857
883
|
#trustedCAs;
|
|
@@ -1029,6 +1055,13 @@ class Resolver {
|
|
|
1029
1055
|
continue;
|
|
1030
1056
|
}
|
|
1031
1057
|
}
|
|
1058
|
+
if (criteria.entityType !== undefined) {
|
|
1059
|
+
const supported = await kycServiceSupportsEntityType(checkKYCService, criteria.entityType);
|
|
1060
|
+
this.#logger?.debug(`Resolver:${this.id}`, 'Checking entity type:', criteria.entityType, 'supported:', supported, 'for', checkKYCServiceID);
|
|
1061
|
+
if (!supported) {
|
|
1062
|
+
continue;
|
|
1063
|
+
}
|
|
1064
|
+
}
|
|
1032
1065
|
retval[checkKYCServiceID] = assertResolverLookupKYCResult(checkKYCService);
|
|
1033
1066
|
}
|
|
1034
1067
|
catch (checkKYCServiceError) {
|
|
@@ -1698,7 +1731,11 @@ class Resolver {
|
|
|
1698
1731
|
}
|
|
1699
1732
|
return (retval);
|
|
1700
1733
|
}
|
|
1701
|
-
|
|
1734
|
+
/**
|
|
1735
|
+
* When `entityType` is omitted, countries are listed across every KYC
|
|
1736
|
+
* service regardless of the entity types it declares.
|
|
1737
|
+
*/
|
|
1738
|
+
async listSupportedKYCCountries(entityType) {
|
|
1702
1739
|
const rootMetadata = await this.#getRootMetadata();
|
|
1703
1740
|
/*
|
|
1704
1741
|
* Get the services object
|
|
@@ -1721,6 +1758,12 @@ class Resolver {
|
|
|
1721
1758
|
if (kycService === undefined) {
|
|
1722
1759
|
continue;
|
|
1723
1760
|
}
|
|
1761
|
+
if (entityType !== undefined) {
|
|
1762
|
+
const isSupportedType = await kycServiceSupportsEntityType(kycService, entityType);
|
|
1763
|
+
if (!isSupportedType) {
|
|
1764
|
+
continue;
|
|
1765
|
+
}
|
|
1766
|
+
}
|
|
1724
1767
|
/*
|
|
1725
1768
|
* If the KYC service does not have a countryCodes
|
|
1726
1769
|
* property, then it can validate accounts in any
|
|
@@ -1969,4 +2012,5 @@ class Resolver {
|
|
|
1969
2012
|
}
|
|
1970
2013
|
}
|
|
1971
2014
|
export default Resolver;
|
|
2015
|
+
export { kycEntityTypes };
|
|
1972
2016
|
//# sourceMappingURL=resolver.js.map
|