@notabene/javascript-sdk 2.19.0 → 2.19.1
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 +6 -6
- package/dist/cjs/notabene.d.ts +1 -40
- package/dist/cjs/package.json +1 -1
- package/dist/esm/notabene.d.ts +1 -40
- package/dist/esm/notabene.js +1525 -1651
- package/dist/esm/package.json +1 -1
- package/dist/notabene.d.ts +1 -40
- package/dist/notabene.js +1525 -1651
- package/package.json +1 -1
- package/src/__tests__/EmbeddedComponent.portless-message.test.ts +66 -0
- package/src/__tests__/EmbeddedComponent.test.ts +3 -3
- package/src/components/EmbeddedComponent.ts +18 -8
- package/src/notabene.ts +0 -2
- package/src/responseTransformer/README.md +0 -30
- package/src/responseTransformer/__tests__/transformer.test.ts +2 -2
- package/src/responseTransformer/index.ts +1 -3
- package/src/responseTransformer/mappers.ts +9 -218
- package/src/responseTransformer/transformer.ts +1 -57
- package/src/responseTransformer/types.ts +0 -18
- package/src/utils/MessageEventManager.ts +2 -0
- package/src/utils/__tests__/MessageEventManager.test.ts +8 -0
package/dist/esm/package.json
CHANGED
package/dist/notabene.d.ts
CHANGED
|
@@ -633,28 +633,6 @@ export declare function componentResponseToTxRequests(response: TransactionRespo
|
|
|
633
633
|
};
|
|
634
634
|
};
|
|
635
635
|
|
|
636
|
-
/**
|
|
637
|
-
* Transforms a Notabene component response to a Version 1 API request body
|
|
638
|
-
*
|
|
639
|
-
* @param response - The response from the Notabene TX Create component
|
|
640
|
-
* @returns The transformed request body ready for the Version 1 API
|
|
641
|
-
*
|
|
642
|
-
* @example
|
|
643
|
-
* ```typescript
|
|
644
|
-
* import { componentResponseToV1TxCreateRequest } from '$lib/notabene-tx-transformer';
|
|
645
|
-
*
|
|
646
|
-
* withdrawal.on('complete', async (result) => {
|
|
647
|
-
* const requestBody = componentResponseToV1TxCreateRequest(result.response);
|
|
648
|
-
*
|
|
649
|
-
* await fetch(endpointUrl, {
|
|
650
|
-
* method: 'POST',
|
|
651
|
-
* body: JSON.stringify(requestBody)
|
|
652
|
-
* });
|
|
653
|
-
* });
|
|
654
|
-
* ```
|
|
655
|
-
*/
|
|
656
|
-
export declare function componentResponseToV1TxCreateRequest(response: TransactionResponse<Withdrawal>): TransactionCreateRequest;
|
|
657
|
-
|
|
658
636
|
export declare interface ConnectionData<T extends ComponentRequest> {
|
|
659
637
|
readonly tx: T;
|
|
660
638
|
readonly authToken?: string;
|
|
@@ -1010,6 +988,7 @@ export declare class EmbeddedComponent<V, O> {
|
|
|
1010
988
|
private iframe?;
|
|
1011
989
|
private eventManager;
|
|
1012
990
|
private modal?;
|
|
991
|
+
private messageHandler?;
|
|
1013
992
|
/**
|
|
1014
993
|
* Creates an instance of EmbeddedComponent.
|
|
1015
994
|
* @param url - The URL of the embedded component
|
|
@@ -3282,24 +3261,6 @@ export declare interface Transaction extends ComponentRequest {
|
|
|
3282
3261
|
*/
|
|
3283
3262
|
export declare type TransactionAsset = NotabeneAsset | CAIP19 | DTI;
|
|
3284
3263
|
|
|
3285
|
-
export declare interface TransactionCreateRequest {
|
|
3286
|
-
transactionAsset: any;
|
|
3287
|
-
transactionAmount: string;
|
|
3288
|
-
beneficiaryDid?: string;
|
|
3289
|
-
originatorVASPdid: string;
|
|
3290
|
-
beneficiaryVASPdid?: string;
|
|
3291
|
-
beneficiaryVASPname?: string;
|
|
3292
|
-
beneficiaryVASPwebsite?: string;
|
|
3293
|
-
transactionBlockchainInfo: {
|
|
3294
|
-
origin?: string;
|
|
3295
|
-
destination?: string;
|
|
3296
|
-
};
|
|
3297
|
-
beneficiaryProof?: any;
|
|
3298
|
-
beneficiary?: any;
|
|
3299
|
-
originator?: any;
|
|
3300
|
-
originatorEqualsBeneficiary?: boolean;
|
|
3301
|
-
}
|
|
3302
|
-
|
|
3303
3264
|
export declare interface TransactionCreateRequestV2 {
|
|
3304
3265
|
originator: {
|
|
3305
3266
|
'@id': string;
|