@notabene/javascript-sdk 2.11.0 → 2.12.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/dist/cjs/notabene.cjs +1 -1
- package/dist/cjs/notabene.d.ts +62 -11
- package/dist/cjs/package.json +1 -1
- package/dist/esm/notabene.d.ts +62 -11
- package/dist/esm/notabene.js +190 -187
- package/dist/esm/package.json +1 -1
- package/dist/notabene.d.ts +62 -11
- package/dist/notabene.js +190 -187
- package/package.json +1 -1
- package/src/notabene.ts +8 -0
- package/src/types.ts +59 -14
- package/src/utils/connections.ts +2 -0
package/package.json
CHANGED
package/src/notabene.ts
CHANGED
|
@@ -13,6 +13,7 @@ import type {
|
|
|
13
13
|
ComponentResponse,
|
|
14
14
|
ConnectionOptions,
|
|
15
15
|
ConnectionRequest,
|
|
16
|
+
CosmosMetadata,
|
|
16
17
|
Counterparty,
|
|
17
18
|
CounterpartyAssistConfig,
|
|
18
19
|
CryptoCredential,
|
|
@@ -65,8 +66,11 @@ import type {
|
|
|
65
66
|
import {
|
|
66
67
|
AgentType,
|
|
67
68
|
CMType,
|
|
69
|
+
CodeVerificationStatus,
|
|
68
70
|
ErrorIdentifierCode,
|
|
69
71
|
HMType,
|
|
72
|
+
IdentityVerificationMethod,
|
|
73
|
+
OAuthProvider,
|
|
70
74
|
PersonType,
|
|
71
75
|
ProofStatus,
|
|
72
76
|
ProofTypes,
|
|
@@ -91,9 +95,12 @@ export {
|
|
|
91
95
|
export {
|
|
92
96
|
AgentType,
|
|
93
97
|
CMType,
|
|
98
|
+
CodeVerificationStatus,
|
|
94
99
|
decodeFragmentToObject,
|
|
95
100
|
ErrorIdentifierCode,
|
|
96
101
|
HMType,
|
|
102
|
+
IdentityVerificationMethod,
|
|
103
|
+
OAuthProvider,
|
|
97
104
|
PersonType,
|
|
98
105
|
ProofStatus,
|
|
99
106
|
ProofTypes,
|
|
@@ -115,6 +122,7 @@ export type {
|
|
|
115
122
|
ComponentResponse,
|
|
116
123
|
ConnectionOptions,
|
|
117
124
|
ConnectionRequest,
|
|
125
|
+
CosmosMetadata,
|
|
118
126
|
Counterparty,
|
|
119
127
|
CounterpartyAssistConfig,
|
|
120
128
|
CryptoCredential,
|
package/src/types.ts
CHANGED
|
@@ -561,6 +561,7 @@ export interface ComponentRequest {
|
|
|
561
561
|
* @public
|
|
562
562
|
*/
|
|
563
563
|
export interface Transaction extends ComponentRequest {
|
|
564
|
+
transactionId?: string;
|
|
564
565
|
agent: Agent;
|
|
565
566
|
counterparty: Counterparty;
|
|
566
567
|
asset: TransactionAsset;
|
|
@@ -582,14 +583,6 @@ export interface Refreshable {
|
|
|
582
583
|
refreshSource?: RefreshSource;
|
|
583
584
|
}
|
|
584
585
|
|
|
585
|
-
/**
|
|
586
|
-
* Extended transaction interface for deposits
|
|
587
|
-
* @public
|
|
588
|
-
*/
|
|
589
|
-
export interface DepositTransaction extends Transaction {
|
|
590
|
-
transactionId?: string; // Optional transactionId of a Notabene transaction. Will be returned with the payload to assist updating the Transaction
|
|
591
|
-
}
|
|
592
|
-
|
|
593
586
|
/**
|
|
594
587
|
* An object representing a withdrawal transaction
|
|
595
588
|
* @public
|
|
@@ -603,10 +596,7 @@ export interface Withdrawal
|
|
|
603
596
|
* An object representing a deposit transaction
|
|
604
597
|
* @public
|
|
605
598
|
*/
|
|
606
|
-
export interface Deposit
|
|
607
|
-
extends OriginatorFields,
|
|
608
|
-
DepositTransaction,
|
|
609
|
-
Refreshable {}
|
|
599
|
+
export interface Deposit extends OriginatorFields, Transaction, Refreshable {}
|
|
610
600
|
|
|
611
601
|
/**
|
|
612
602
|
* An object representing a request for a deposit
|
|
@@ -793,6 +783,47 @@ export type VASPOptions = {
|
|
|
793
783
|
searchable?: VASPSearchControl[]; // If array left empty all VASPs will be searchable
|
|
794
784
|
};
|
|
795
785
|
|
|
786
|
+
/**
|
|
787
|
+
* Available methods for identity verification
|
|
788
|
+
* @public
|
|
789
|
+
*/
|
|
790
|
+
export enum IdentityVerificationMethod {
|
|
791
|
+
SMS = 'sms',
|
|
792
|
+
EMAIL = 'email',
|
|
793
|
+
}
|
|
794
|
+
|
|
795
|
+
/**
|
|
796
|
+
* Status of a code verification
|
|
797
|
+
* @public
|
|
798
|
+
*/
|
|
799
|
+
export enum CodeVerificationStatus {
|
|
800
|
+
PENDING = 'pending',
|
|
801
|
+
APPROVED = 'approved',
|
|
802
|
+
FAILED = 'failed',
|
|
803
|
+
EXPIRED = 'expired',
|
|
804
|
+
MAX_ATTEMPTS_REACHED = 'max_attempts_reached',
|
|
805
|
+
UNREACHABLE = 'unreachable',
|
|
806
|
+
}
|
|
807
|
+
|
|
808
|
+
/**
|
|
809
|
+
* Supported OAuth providers for authentication
|
|
810
|
+
* @public
|
|
811
|
+
*/
|
|
812
|
+
export enum OAuthProvider {
|
|
813
|
+
COINBASE = 'coinbase',
|
|
814
|
+
}
|
|
815
|
+
|
|
816
|
+
/**
|
|
817
|
+
* Configuration options for identity verification
|
|
818
|
+
* @public
|
|
819
|
+
*/
|
|
820
|
+
export type IdentityVerificationConfig = {
|
|
821
|
+
/** The required verification method. If not specified, none will be used */
|
|
822
|
+
requiredMethod?: IdentityVerificationMethod;
|
|
823
|
+
/** OAuth provider(s) to use for authentication. Can be a single provider or array of providers */
|
|
824
|
+
oAuth?: OAuthProvider[] | OAuthProvider;
|
|
825
|
+
};
|
|
826
|
+
|
|
796
827
|
/**
|
|
797
828
|
* Counterparty Assist Configuration options for recipient selection
|
|
798
829
|
*
|
|
@@ -805,6 +836,7 @@ export type CounterpartyAssistConfig =
|
|
|
805
836
|
| boolean
|
|
806
837
|
| {
|
|
807
838
|
counterpartyTypes: PersonType[];
|
|
839
|
+
identityVerification?: IdentityVerificationConfig;
|
|
808
840
|
};
|
|
809
841
|
|
|
810
842
|
/**
|
|
@@ -1145,6 +1177,7 @@ export enum ProofTypes {
|
|
|
1145
1177
|
XRP_ED25519 = 'xrp-ed25519',
|
|
1146
1178
|
XLM_ED25519 = 'xlm-ed25519',
|
|
1147
1179
|
CIP8 = 'cip-8',
|
|
1180
|
+
COSMOS = 'cosmos-ecdsa',
|
|
1148
1181
|
MicroTransfer = 'microtransfer',
|
|
1149
1182
|
Screenshot = 'screenshot',
|
|
1150
1183
|
Connect = 'connect',
|
|
@@ -1235,6 +1268,16 @@ export interface SolanaMetadata {
|
|
|
1235
1268
|
message: SIWXInput;
|
|
1236
1269
|
}
|
|
1237
1270
|
|
|
1271
|
+
/**
|
|
1272
|
+
* Metadata for Cosmos ownership proofs
|
|
1273
|
+
* @remarks
|
|
1274
|
+
* - Includes the public key
|
|
1275
|
+
* @public
|
|
1276
|
+
*/
|
|
1277
|
+
export interface CosmosMetadata {
|
|
1278
|
+
pub_key: { type: string; value: string };
|
|
1279
|
+
}
|
|
1280
|
+
|
|
1238
1281
|
/**
|
|
1239
1282
|
* Interface for signature-based ownership proofs that use cryptographic message signing
|
|
1240
1283
|
*
|
|
@@ -1268,7 +1311,8 @@ export interface SignatureProof extends OwnershipProof {
|
|
|
1268
1311
|
| ProofTypes.CIP8
|
|
1269
1312
|
| ProofTypes.XRP_ED25519
|
|
1270
1313
|
| ProofTypes.CONCORDIUM
|
|
1271
|
-
| ProofTypes.XLM_ED25519
|
|
1314
|
+
| ProofTypes.XLM_ED25519
|
|
1315
|
+
| ProofTypes.COSMOS;
|
|
1272
1316
|
|
|
1273
1317
|
proof: string;
|
|
1274
1318
|
attestation: string;
|
|
@@ -1278,7 +1322,8 @@ export interface SignatureProof extends OwnershipProof {
|
|
|
1278
1322
|
| {
|
|
1279
1323
|
cardanoCoseKey?: string; // Cardano COSE key https://cips.cardano.org/cip/CIP-0030
|
|
1280
1324
|
}
|
|
1281
|
-
| SolanaMetadata
|
|
1325
|
+
| SolanaMetadata
|
|
1326
|
+
| CosmosMetadata;
|
|
1282
1327
|
}
|
|
1283
1328
|
|
|
1284
1329
|
/**
|
package/src/utils/connections.ts
CHANGED
|
@@ -15,6 +15,8 @@ export interface ConnectionData<T extends ComponentRequest> {
|
|
|
15
15
|
readonly authToken?: string;
|
|
16
16
|
readonly txOptions?: TransactionOptions;
|
|
17
17
|
readonly result?: TransactionResponse<T>;
|
|
18
|
+
readonly phoneNumber?: string;
|
|
19
|
+
readonly email?: string;
|
|
18
20
|
}
|
|
19
21
|
|
|
20
22
|
export interface ConnectionMetadata {
|