@airgap/module-kit 0.13.14-beta.0 → 0.13.14-beta.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/index.d.ts +2 -2
- package/index.js.map +1 -1
- package/package.json +3 -3
- package/protocol/protocol.d.ts +4 -4
- package/types/meta/utility-types.d.ts +1 -0
- package/types/transaction.d.ts +4 -2
package/index.d.ts
CHANGED
|
@@ -35,7 +35,7 @@ import { ProtocolAccountMetadata, ProtocolFeeMetadata, ProtocolMetadata, Protoco
|
|
|
35
35
|
import { V3SchemaConfiguration } from './types/serializer';
|
|
36
36
|
import { Signature } from './types/signature';
|
|
37
37
|
import { SubProtocolType } from './types/sub-protocol';
|
|
38
|
-
import { AirGapTransaction, AirGapTransactionStatus, AirGapTransactionsWithCursor, SignedTransaction,
|
|
38
|
+
import { AirGapTransaction, AirGapTransactionStatus, AirGapTransactionsWithCursor, SignedTransaction, TransactionSimpleConfiguration, TransactionCursor, TransactionDetails, TransactionType, UnsignedTransaction, TransactionFullConfiguration } from './types/transaction';
|
|
39
39
|
import { AirGapUIAction } from './types/ui/action';
|
|
40
40
|
import { AirGapUIAlert } from './types/ui/alert';
|
|
41
41
|
import { AirGapUIText } from './types/ui/text';
|
|
@@ -51,6 +51,6 @@ export { AirGapModule, ModuleNetworkRegistry, ProtocolConfiguration, OfflineProt
|
|
|
51
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, ProtocolTransactionMetadata, ProtocolNetworkType, ProtocolNetwork, SubProtocolType };
|
|
52
52
|
export { AirGapV3SerializerCompanion, V3SchemaConfiguration };
|
|
53
53
|
export { AirGapInterface };
|
|
54
|
-
export { AirGapUIAction, AirGapUIAlert, AirGapUIText, Address, AddressCursor, AddressWithCursor, Amount, Balance, MultiTokenBalanceConfiguration, BytesStringFormat, BytesString, HexString, CryptoAlgorithm, CryptoSecretType, Ed25519CryptoConfiguration, Sr25519CryptoConfiguration, Secp256K1CryptoConfiguration, SaplingCryptoConfiguration, CryptoConfiguration, CryptoDerivative, FeeDefaults, FeeEstimation, KeyType, SecretKey, ExtendedSecretKey, PublicKey, ExtendedPublicKey, KeyPair, ExtendedKeyPair, Signature, TransactionType, UnsignedTransaction, SignedTransaction, AirGapTransaction, TransactionCursor, AirGapTransactionsWithCursor, TransactionDetails,
|
|
54
|
+
export { AirGapUIAction, AirGapUIAlert, AirGapUIText, Address, AddressCursor, AddressWithCursor, Amount, Balance, MultiTokenBalanceConfiguration, BytesStringFormat, BytesString, HexString, CryptoAlgorithm, CryptoSecretType, Ed25519CryptoConfiguration, Sr25519CryptoConfiguration, Secp256K1CryptoConfiguration, SaplingCryptoConfiguration, CryptoConfiguration, CryptoDerivative, FeeDefaults, FeeEstimation, KeyType, SecretKey, ExtendedSecretKey, PublicKey, ExtendedPublicKey, KeyPair, ExtendedKeyPair, Signature, TransactionType, UnsignedTransaction, SignedTransaction, AirGapTransaction, TransactionCursor, AirGapTransactionsWithCursor, TransactionDetails, TransactionSimpleConfiguration, TransactionFullConfiguration, AirGapTransactionStatus, RecursivePartial };
|
|
55
55
|
export { isAmount, Schema, implementsInterface, isAnyKey, isSecretKey, isExtendedSecretKey, isPublicKey, isExtendedPublicKey, createSupportedProtocols, isOfflineProtocol, isOnlineProtocol, isBip32Protocol, isSubProtocol, isSingleTokenSubProtocol, isMultiTokenSubProtocol, canFetchDataForAddress, canFetchDataForMultipleAddresses, hasMultiAddressPublicKeys, hasConfigurableContract, canEncryptAES, canEncryptAsymmetric, canSignMessage, hasConfigurableTransactionInjector, isTransactionStatusChecker, protocolNetworkIdentifier, normalizeToUndefined };
|
|
56
56
|
export { baseProtocolSchema, offlineProtocolSchema, onlineProtocolSchema, bip32BaseProtocolSchema, bip32OfflineProtocolSchema, bip32OnlineProtocolSchema, subProtocolSchema, singleTokenSubProtocolSchema, multiTokenSubProtocolBaseSchema, fetchDataForAddressProtocolSchema, fetchDataForMultipleAddressesProtocolSchema, multiAddressPublicKeyProtocolSchema, configurableContractProtocolSchema, aesEncryptionSchema, asymmetricEncryptionBaseSchema, asymmetricEncryptionOfflineSchema, signMessageBaseSchema, signMessageOfflineSchema, configurableTransactionInjectorSchema, transactionStatusCheckerSchema };
|
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;AAqI5C,0FArIO,kBAAS,OAqIP;AApIX,uCAAwG;AAwItG,qGAxIO,0BAAoB,OAwIP;AAFpB,qGAtI6B,0BAAoB,OAsI7B;AACpB,6FAvImD,kBAAY,OAuInD;AAFZ,6FArIiE,kBAAY,OAqIjE;AApId,mDAAoD;AAwIlD,6FAxIO,wBAAY,OAwIP;AAvId,uDAAsF;AAyIpF,qGAzIO,kCAAoB,OAyIP;AADpB,uGAxI6B,oCAAsB,OAwI7B;AAvIxB,8CAA4G;AA+H1G,gGA/HO,uBAAe,OA+HP;AAFf,+FA7HwB,sBAAc,OA6HxB;AADd,kGA5HwC,yBAAiB,OA4HxC;AAEjB,kGA9H2D,yBAAiB,OA8H3D;AA7HnB,4CAAoD;AA+HlD,+FA/HO,qBAAc,OA+HP;AA7HhB,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oHArLA,8CAAmC,OAqLA;AAHnC,gHAjLA,0CAA+B,OAiLA;AAP/B,sGAzKA,gCAAqB,OAyKA;AACrB,qGAzKA,+BAAoB,OAyKA;AATpB,0GA/JA,oCAAyB,OA+JA;AAuBzB,sGArLA,gCAAqB,OAqLA;AACrB,yGArLA,mCAAwB,OAqLA;AAVxB,6GA1KA,uCAA4B,OA0KA;AAD5B,kGAxKA,4BAAiB,OAwKA;AAajB,+GApLA,yCAA8B,OAoLA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@airgap/module-kit",
|
|
3
|
-
"version": "0.13.14-beta.
|
|
3
|
+
"version": "0.13.14-beta.1",
|
|
4
4
|
"description": "The @airgap/module-kit package provides the common interfaces and functionalities to implement AirGap modules.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"airgap",
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
},
|
|
30
30
|
"author": "Papers AG <contact@papers.ch> (https://papers.ch)",
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@airgap/coinlib-core": "
|
|
33
|
-
"@airgap/serializer": "
|
|
32
|
+
"@airgap/coinlib-core": "*",
|
|
33
|
+
"@airgap/serializer": "*"
|
|
34
34
|
},
|
|
35
35
|
"nyc": {
|
|
36
36
|
"include": [
|
package/protocol/protocol.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ import { FeeEstimation } from '../types/fee';
|
|
|
7
7
|
import { ExtendedKeyPair, ExtendedPublicKey, ExtendedSecretKey, KeyPair, PublicKey, SecretKey } from '../types/key';
|
|
8
8
|
import { Complement } from '../types/meta/utility-types';
|
|
9
9
|
import { ProtocolMetadata, ProtocolNetwork } from '../types/protocol';
|
|
10
|
-
import { AirGapTransaction, AirGapTransactionsWithCursor, SignedTransaction,
|
|
10
|
+
import { AirGapTransaction, AirGapTransactionsWithCursor, SignedTransaction, TransactionSimpleConfiguration, TransactionCursor, TransactionDetails, UnsignedTransaction, TransactionFullConfiguration } from '../types/transaction';
|
|
11
11
|
export interface BaseGeneric<_AddressCursor extends AddressCursor = AddressCursor, _AddressResult extends Address | AddressWithCursor<_AddressCursor> = Address | AddressWithCursor<_AddressCursor>, _Units extends string = string, _FeeUnits extends string = _Units, _SignedTransaction extends SignedTransaction = SignedTransaction, _UnsignedTransaction extends UnsignedTransaction = UnsignedTransaction> {
|
|
12
12
|
AddressCursor: _AddressCursor;
|
|
13
13
|
AddressResult: _AddressResult;
|
|
@@ -50,9 +50,9 @@ export interface _OnlineProtocol<_AddressCursor extends OnlineGeneric['AddressCu
|
|
|
50
50
|
getNetwork(): Promise<_ProtocolNetwork>;
|
|
51
51
|
getTransactionsForPublicKey(publicKey: _PublicKey, limit: number, cursor?: _TransactionCursor): Promise<AirGapTransactionsWithCursor<_TransactionCursor, _Units, _FeeUnits>>;
|
|
52
52
|
getBalanceOfPublicKey(publicKey: _PublicKey, configuration?: _BalanceConfiguration): Promise<Balance<_Units>>;
|
|
53
|
-
getTransactionMaxAmountWithPublicKey(publicKey: _PublicKey, to: Address[], configuration?:
|
|
54
|
-
getTransactionFeeWithPublicKey(publicKey: _PublicKey, details: TransactionDetails<_Units>[]): Promise<_FeeEstimation>;
|
|
55
|
-
prepareTransactionWithPublicKey(publicKey: _PublicKey, details: TransactionDetails<_Units>[], configuration?:
|
|
53
|
+
getTransactionMaxAmountWithPublicKey(publicKey: _PublicKey, to: Address[], configuration?: TransactionFullConfiguration<_FeeUnits>): Promise<Amount<_Units>>;
|
|
54
|
+
getTransactionFeeWithPublicKey(publicKey: _PublicKey, details: TransactionDetails<_Units>[], configuration?: TransactionSimpleConfiguration): Promise<_FeeEstimation>;
|
|
55
|
+
prepareTransactionWithPublicKey(publicKey: _PublicKey, details: TransactionDetails<_Units>[], configuration?: TransactionFullConfiguration<_FeeUnits>): Promise<_UnsignedTransaction>;
|
|
56
56
|
broadcastTransaction(transaction: _SignedTransaction): Promise<string>;
|
|
57
57
|
}
|
|
58
58
|
export declare type OnlineProtocol<G extends Partial<OnlineGeneric> = {}> = _OnlineProtocol<TypedAddressCursor<G>, TypedAddressResult<G>, TypedProtocolNetwork<G>, TypedUnits<G>, TypedFeeUnits<G>, TypedFeeEstimation<G>, TypedSignedTransaction<G>, TypedUnsignedTransaction<G>, TypedTransactionCursor<G>, PublicKey, undefined>;
|
|
@@ -5,3 +5,4 @@ export declare type RecursivePartial<T> = {
|
|
|
5
5
|
export declare type Override<T, U> = Omit<T, keyof U> & U;
|
|
6
6
|
export declare type ExtractTyped<T, K extends T> = Extract<T, K>;
|
|
7
7
|
export declare type ExcludeTyped<T, K extends T> = Exclude<T, K>;
|
|
8
|
+
export declare type OmitTyped<T, K extends keyof T> = Omit<T, K>;
|
package/types/transaction.d.ts
CHANGED
|
@@ -41,12 +41,14 @@ export interface TransactionDetails<_Units extends string = string> {
|
|
|
41
41
|
amount: Amount<_Units>;
|
|
42
42
|
arbitraryData?: string;
|
|
43
43
|
}
|
|
44
|
-
export interface
|
|
45
|
-
fee?: Amount<_FeeUnits>;
|
|
44
|
+
export interface TransactionSimpleConfiguration {
|
|
46
45
|
arbitraryData?: string;
|
|
47
46
|
keepMinBalance?: boolean;
|
|
48
47
|
assetId?: number;
|
|
49
48
|
}
|
|
49
|
+
export interface TransactionFullConfiguration<_FeeUnits extends string = string> extends TransactionSimpleConfiguration {
|
|
50
|
+
fee?: Amount<_FeeUnits>;
|
|
51
|
+
}
|
|
50
52
|
interface BaseTransactionStatus<_Type extends string> extends Sealed<_Type> {
|
|
51
53
|
hash?: string;
|
|
52
54
|
block?: string;
|