@airgap/module-kit 0.13.8-beta.6 → 0.13.8-beta.7
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/index.d.ts +3 -0
- package/index.js.map +1 -1
- package/module/module.d.ts +7 -5
- package/package.json +3 -2
- package/serializer/serializer.d.ts +12 -0
- package/serializer/serializer.js +3 -0
- package/serializer/serializer.js.map +1 -0
- package/types/serializer.d.ts +6 -0
- package/types/serializer.js +3 -0
- package/types/serializer.js.map +1 -0
package/index.d.ts
CHANGED
|
@@ -19,6 +19,7 @@ import { SingleTokenSubProtocol, SingleTokenSubProtocolExtension } from './proto
|
|
|
19
19
|
import { SubProtocol, SubProtocolExtension } from './protocol/extensions/sub-protocol/SubProtocolExtension';
|
|
20
20
|
import { TransactionStatusCheckerExtension } from './protocol/extensions/transaction/TransactionStatusCheckerExtension';
|
|
21
21
|
import { AirGapAnyProtocol, AirGapOfflineProtocol, AirGapOnlineProtocol, AirGapProtocol } from './protocol/protocol';
|
|
22
|
+
import { AirGapV3SerializerCompanion } from './serializer/serializer';
|
|
22
23
|
import { Address, AddressCursor, AddressWithCursor } from './types/address';
|
|
23
24
|
import { AirGapInterface } from './types/airgap';
|
|
24
25
|
import { Amount } from './types/amount';
|
|
@@ -31,6 +32,7 @@ import { RecursivePartial } from './types/meta/utility-types';
|
|
|
31
32
|
import { FullProtocolConfiguration, OfflineProtocolConfiguration, OnlineProtocolConfiguration, ProtocolConfiguration } from './types/module';
|
|
32
33
|
import { ProtocolAccountMetadata, ProtocolFeeMetadata, ProtocolMetadata, ProtocolNetwork, ProtocolNetworkType, ProtocolSymbol, ProtocolUnitsMetadata } from './types/protocol';
|
|
33
34
|
import { HexSecret, MnemonicSecret, Secret, SecretType } from './types/secret';
|
|
35
|
+
import { V3SchemaConfiguration } from './types/serializer';
|
|
34
36
|
import { Signature } from './types/signature';
|
|
35
37
|
import { SubProtocolType } from './types/sub-protocol';
|
|
36
38
|
import { AirGapTransaction, AirGapTransactionStatus, AirGapTransactionsWithCursor, SignedTransaction, TransactionConfiguration, TransactionCursor, TransactionDetails, TransactionType, UnsignedTransaction } from './types/transaction';
|
|
@@ -47,6 +49,7 @@ export { AirGapBlockExplorer, BlockExplorerMetadata };
|
|
|
47
49
|
export { newSuccessUIAlert, newInfoUIAlert, newWarningUIAlert, newErrorUIAlert, newPlainUIText, newAmount, newSecretKey, newExtendedSecretKey, newPublicKey, newExtendedPublicKey, newSignature, newUnsignedTransaction, newSignedTransaction };
|
|
48
50
|
export { AirGapModule, ModuleNetworkRegistry, ProtocolConfiguration, OfflineProtocolConfiguration, OnlineProtocolConfiguration, FullProtocolConfiguration };
|
|
49
51
|
export { AirGapOfflineProtocol, AirGapOnlineProtocol, AirGapProtocol, AirGapAnyProtocol, FetchDataForMultipleAddressesExtension, FetchDataForMultipleAddressesProtocol, MultiAddressPublicKeyExtension, MultiAddressPublicKeyProtocol, Bip32Extension, OfflineBip32Protocol, OnlineBip32Protocol, SubProtocolExtension, SubProtocol, SingleTokenSubProtocolExtension, SingleTokenSubProtocol, MultiTokenSubProtocolExtension, BaseMultiTokenSubProtocol, OnlineMultiTokenSubProtocol, CryptoExtension, AESExtension, AsymmetricEncryptionExtension, SignMessageExtension, TransactionStatusCheckerExtension, ProtocolMetadata, ProtocolUnitsMetadata, ProtocolSymbol, ProtocolFeeMetadata, ProtocolAccountMetadata, ProtocolNetworkType, ProtocolNetwork, SubProtocolType };
|
|
52
|
+
export { AirGapV3SerializerCompanion, V3SchemaConfiguration };
|
|
50
53
|
export { AirGapInterface };
|
|
51
54
|
export { AirGapUIAction, AirGapUIAlert, AirGapUIText, Address, AddressCursor, AddressWithCursor, Amount, Balance, MultiTokenBalanceConfiguration, BytesStringFormat, BytesString, HexString, FeeDefaults, FeeEstimation, KeyType, SecretKey, ExtendedSecretKey, PublicKey, ExtendedPublicKey, KeyPair, ExtendedKeyPair, SecretType, MnemonicSecret, HexSecret, Secret, Signature, TransactionType, UnsignedTransaction, SignedTransaction, AirGapTransaction, TransactionCursor, AirGapTransactionsWithCursor, TransactionDetails, TransactionConfiguration, AirGapTransactionStatus, RecursivePartial };
|
|
52
55
|
export { isAmount, Schema, implementsInterface, isAnyKey, isSecretKey, isExtendedSecretKey, isPublicKey, isExtendedPublicKey, createSupportedProtocols, isOfflineProtocol, isOnlineProtocol, isBip32Protocol, isSubProtocol, isSingleTokenSubProtocol, isMultiTokenSubProtocol, canFetchDataForMultipleAddresses, hasMultiAddressPublicKeys, hasConfigurableContract, canEncryptAES, canEncryptAsymmetric, canSignMessage, hasConfigurableTransactionInjector, isTransactionStatusChecker, protocolNetworkIdentifier, normalizeToUndefined };
|
package/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AACA,6CAA8C;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AACA,6CAA8C;AAqG5C,0FArGO,kBAAS,OAqGP;AApGX,uCAAwG;AAwGtG,qGAxGO,0BAAoB,OAwGP;AAFpB,qGAtG6B,0BAAoB,OAsG7B;AACpB,6FAvGmD,kBAAY,OAuGnD;AAFZ,6FArGiE,kBAAY,OAqGjE;AApGd,mDAAoD;AAwGlD,6FAxGO,wBAAY,OAwGP;AAvGd,uDAAsF;AAyGpF,qGAzGO,kCAAoB,OAyGP;AADpB,uGAxG6B,oCAAsB,OAwG7B;AAvGxB,8CAA4G;AA+F1G,gGA/FO,uBAAe,OA+FP;AAFf,+FA7FwB,sBAAc,OA6FxB;AADd,kGA5FwC,yBAAiB,OA4FxC;AAEjB,kGA9F2D,yBAAiB,OA8F3D;AA7FnB,4CAAoD;AA+FlD,+FA/FO,qBAAc,OA+FP;AA7FhB,4EAAwE;AA4GtE,sGA5GO,+CAAqB,OA4GP;AAjDvB,yCAAyC;AAgJvC,yFAhJO,iBAAQ,OAgJP;AA/IV,+CAA+D;AAiJ7D,oGAjJO,+BAAmB,OAiJP;AAhJrB,mCAA0G;AAiJxG,yFAjJO,cAAQ,OAiJP;AAIR,oGArJiB,yBAAmB,OAqJjB;AAFnB,oGAnJsC,yBAAmB,OAmJtC;AACnB,4FApJ2D,iBAAW,OAoJ3D;AAFX,4FAlJwE,iBAAW,OAkJxE;AAjJb,yCAAyD;AAqJvD,yGArJO,iCAAwB,OAqJP;AApJ1B,+CAAwD;AAoKtD,qGApKO,gCAAoB,OAoKP;AAnKtB,6CAgByB;AA6IvB,8FA5JA,wBAAa,OA4JA;AACb,qGA5JA,+BAAoB,OA4JA;AAJpB,iHAvJA,2CAAgC,OAuJA;AAKhC,+FA3JA,yBAAc,OA2JA;AAHd,wGAvJA,kCAAuB,OAuJA;AAIvB,mHA1JA,6CAAkC,OA0JA;AALlC,0GApJA,oCAAyB,OAoJA;AALzB,gGA9IA,0BAAe,OA8IA;AAGf,wGAhJA,kCAAuB,OAgJA;AALvB,kGA1IA,4BAAiB,OA0IA;AACjB,iGA1IA,2BAAgB,OA0IA;AAGhB,yGA5IA,mCAAwB,OA4IA;AADxB,8FA1IA,wBAAa,OA0IA;AAUb,2GAnJA,qCAA0B,OAmJA;AAC1B,0GAnJA,oCAAyB,OAmJA"}
|
package/module/module.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { AirGapBlockExplorer } from '../block-explorer/block-explorer';
|
|
2
|
+
import { AirGapOfflineProtocol, AirGapOnlineProtocol } from '../protocol/protocol';
|
|
3
|
+
import { AirGapV3SerializerCompanion } from '../serializer/serializer';
|
|
3
4
|
import { AirGapInterface } from '../types/airgap';
|
|
4
5
|
import { Complement } from '../types/meta/utility-types';
|
|
5
6
|
import { ProtocolConfiguration } from '../types/module';
|
|
@@ -9,9 +10,10 @@ interface ModuleGeneric<_Protocols extends string = string> {
|
|
|
9
10
|
declare type TypedProtocols<G extends Partial<ModuleGeneric>> = Complement<ModuleGeneric, G>['Protocols'];
|
|
10
11
|
interface _Module<_Protocols extends ModuleGeneric['Protocols'] = any> {
|
|
11
12
|
supportedProtocols: Record<_Protocols, ProtocolConfiguration>;
|
|
12
|
-
createOfflineProtocol(identifier: _Protocols): Promise<
|
|
13
|
-
createOnlineProtocol(identifier: _Protocols, networkId?: string): Promise<
|
|
14
|
-
createBlockExplorer(identifier: _Protocols, networkId?: string): Promise<
|
|
13
|
+
createOfflineProtocol(identifier: _Protocols): Promise<AirGapOfflineProtocol | undefined>;
|
|
14
|
+
createOnlineProtocol(identifier: _Protocols, networkId?: string): Promise<AirGapOnlineProtocol | undefined>;
|
|
15
|
+
createBlockExplorer(identifier: _Protocols, networkId?: string): Promise<AirGapBlockExplorer | undefined>;
|
|
16
|
+
createV3SerializerCompanion(): Promise<AirGapV3SerializerCompanion>;
|
|
15
17
|
}
|
|
16
18
|
export declare type Module<G extends Partial<ModuleGeneric> = {}> = _Module<TypedProtocols<G>>;
|
|
17
19
|
export declare type AirGapModule<G extends Partial<ModuleGeneric> = {}> = AirGapInterface<Module<G>>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@airgap/module-kit",
|
|
3
|
-
"version": "0.13.8-beta.
|
|
3
|
+
"version": "0.13.8-beta.7",
|
|
4
4
|
"description": "TODO",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"airgap",
|
|
@@ -30,7 +30,8 @@
|
|
|
30
30
|
},
|
|
31
31
|
"author": "Papers GmbH <contact@papers.ch> (https://papers.ch)",
|
|
32
32
|
"peerDependencies": {
|
|
33
|
-
"@airgap/coinlib-core": "^0.13.
|
|
33
|
+
"@airgap/coinlib-core": "^0.13.8-beta.6",
|
|
34
|
+
"@airgap/serializer": "^0.13.8-beta.6"
|
|
34
35
|
},
|
|
35
36
|
"nyc": {
|
|
36
37
|
"include": [
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { TransactionSignRequest, TransactionSignResponse } from '@airgap/serializer';
|
|
2
|
+
import { V3SchemaConfiguration } from '../types/serializer';
|
|
3
|
+
import { SignedTransaction, UnsignedTransaction } from '../types/transaction';
|
|
4
|
+
export interface AirGapV3SerializerCompanion {
|
|
5
|
+
schemas: V3SchemaConfiguration[];
|
|
6
|
+
toTransactionSignRequest(identifier: string, unsignedTransaction: UnsignedTransaction, publicKey: string, callbackUrl?: string): Promise<TransactionSignRequest>;
|
|
7
|
+
fromTransactionSignRequest(identifier: string, transactionSignRequest: TransactionSignRequest): Promise<UnsignedTransaction>;
|
|
8
|
+
validateTransactionSignRequest(identifier: string, transactionSignRequest: TransactionSignRequest): Promise<boolean>;
|
|
9
|
+
toTransactionSignResponse(identifier: string, signedTransaction: SignedTransaction, accountIdentifier: string): Promise<TransactionSignResponse>;
|
|
10
|
+
fromTransactionSignResponse(identifier: string, transactionSignResponse: TransactionSignResponse): Promise<SignedTransaction>;
|
|
11
|
+
validateTransactionSignResponse(identifier: string, transactionSignResponse: TransactionSignResponse): Promise<boolean>;
|
|
12
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"serializer.js","sourceRoot":"","sources":["../../src/serializer/serializer.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"serializer.js","sourceRoot":"","sources":["../../src/types/serializer.ts"],"names":[],"mappings":""}
|