@airgap/module-kit 0.13.11-beta.0 → 0.13.11-beta.2

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 CHANGED
@@ -26,12 +26,12 @@ import { Amount } from './types/amount';
26
26
  import { Balance } from './types/balance';
27
27
  import { BlockExplorerMetadata } from './types/block-explorer';
28
28
  import { BytesString, BytesStringFormat, HexString } from './types/bytes';
29
+ import { CryptoAlgorithm, CryptoConfiguration, CryptoDerivative, CryptoSecretType, Ed25519CryptoConfiguration, SaplingCryptoConfiguration, Secp256K1CryptoConfiguration, Sr25519CryptoConfiguration } from './types/crypto';
29
30
  import { FeeDefaults, FeeEstimation } from './types/fee';
30
31
  import { ExtendedKeyPair, ExtendedPublicKey, ExtendedSecretKey, KeyPair, KeyType, PublicKey, SecretKey } from './types/key';
31
32
  import { RecursivePartial } from './types/meta/utility-types';
32
33
  import { FullProtocolConfiguration, OfflineProtocolConfiguration, OnlineProtocolConfiguration, ProtocolConfiguration } from './types/module';
33
34
  import { ProtocolAccountMetadata, ProtocolFeeMetadata, ProtocolMetadata, ProtocolNetwork, ProtocolNetworkType, ProtocolSymbol, ProtocolUnitsMetadata } from './types/protocol';
34
- import { HexSecret, MnemonicSecret, Secret, SecretType } from './types/secret';
35
35
  import { V3SchemaConfiguration } from './types/serializer';
36
36
  import { Signature } from './types/signature';
37
37
  import { SubProtocolType } from './types/sub-protocol';
@@ -51,5 +51,5 @@ 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, 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, FeeDefaults, FeeEstimation, KeyType, SecretKey, ExtendedSecretKey, PublicKey, ExtendedPublicKey, KeyPair, ExtendedKeyPair, SecretType, MnemonicSecret, HexSecret, Secret, Signature, TransactionType, UnsignedTransaction, SignedTransaction, AirGapTransaction, TransactionCursor, AirGapTransactionsWithCursor, TransactionDetails, TransactionConfiguration, AirGapTransactionStatus, RecursivePartial };
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, TransactionConfiguration, 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 };
package/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AACA,6CAA8C;AAsG5C,0FAtGO,kBAAS,OAsGP;AArGX,uCAAwG;AAyGtG,qGAzGO,0BAAoB,OAyGP;AAFpB,qGAvG6B,0BAAoB,OAuG7B;AACpB,6FAxGmD,kBAAY,OAwGnD;AAFZ,6FAtGiE,kBAAY,OAsGjE;AArGd,mDAAoD;AAyGlD,6FAzGO,wBAAY,OAyGP;AAxGd,uDAAsF;AA0GpF,qGA1GO,kCAAoB,OA0GP;AADpB,uGAzG6B,oCAAsB,OAyG7B;AAxGxB,8CAA4G;AAgG1G,gGAhGO,uBAAe,OAgGP;AAFf,+FA9FwB,sBAAc,OA8FxB;AADd,kGA7FwC,yBAAiB,OA6FxC;AAEjB,kGA/F2D,yBAAiB,OA+F3D;AA9FnB,4CAAoD;AAgGlD,+FAhGO,qBAAc,OAgGP;AA9FhB,4EAAwE;AA6GtE,sGA7GO,+CAAqB,OA6GP;AAlDvB,yCAAyC;AAiJvC,yFAjJO,iBAAQ,OAiJP;AAhJV,+CAA+D;AAkJ7D,oGAlJO,+BAAmB,OAkJP;AAjJrB,mCAA0G;AAkJxG,yFAlJO,cAAQ,OAkJP;AAIR,oGAtJiB,yBAAmB,OAsJjB;AAFnB,oGApJsC,yBAAmB,OAoJtC;AACnB,4FArJ2D,iBAAW,OAqJ3D;AAFX,4FAnJwE,iBAAW,OAmJxE;AAlJb,yCAAyD;AAsJvD,yGAtJO,iCAAwB,OAsJP;AArJ1B,+CAAwD;AAsKtD,qGAtKO,gCAAoB,OAsKP;AArKtB,6CAiByB;AA8IvB,8FA9JA,wBAAa,OA8JA;AACb,qGA9JA,+B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B;AAFnB,oGAxJsC,yBAAmB,OAwJtC;AACnB,4FAzJ2D,iBAAW,OAyJ3D;AAFX,4FAvJwE,iBAAW,OAuJxE;AAtJb,yCAAyD;AA0JvD,yGA1JO,iCAAwB,OA0JP;AAzJ1B,+CAAwD;AA0KtD,qGA1KO,gCAAoB,OA0KP;AAzKtB,6CAiByB;AAkJvB,8FAlKA,wBAAa,OAkKA;AACb,qGAlKA,+BAAoB,OAkKA;AALpB,uGA5JA,iCAAsB,OA4JA;AACtB,iHA5JA,2CAAgC,OA4JA;AAKhC,+FAhKA,yBAAc,OAgKA;AAHd,wGA5JA,kCAAuB,OA4JA;AAIvB,mHA/JA,6CAAkC,OA+JA;AALlC,0GAzJA,oCAAyB,OAyJA;AANzB,gGAlJA,0BAAe,OAkJA;AAGf,wGApJA,kCAAuB,OAoJA;AALvB,kGA9IA,4BAAiB,OA8IA;AACjB,iGA9IA,2BAAgB,OA8IA;AAGhB,yGAhJA,mCAAwB,OAgJA;AADxB,8FA9IA,wBAAa,OA8IA;AAWb,2GAxJA,qCAA0B,OAwJA;AAC1B,0GAxJA,oCAAyB,OAwJA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@airgap/module-kit",
3
- "version": "0.13.11-beta.0",
3
+ "version": "0.13.11-beta.2",
4
4
  "description": "TODO",
5
5
  "keywords": [
6
6
  "airgap",
@@ -25,12 +25,12 @@
25
25
  "lint-ci:prettier": "prettier \"src/**/*.ts\" \"test/**/*.ts\" --list-different",
26
26
  "test": "",
27
27
  "test-ci": "",
28
- "test-legacy": "",
29
28
  "browserify": "browserify ./dist/index.js -s airgapModuleKit > ./dist/airgap-module-kit.min.js"
30
29
  },
31
30
  "author": "Papers GmbH <contact@papers.ch> (https://papers.ch)",
32
- "peerDependencies": {
33
- "@airgap/coinlib-core": "^0.13.10"
31
+ "dependencies": {
32
+ "@airgap/coinlib-core": "*",
33
+ "@airgap/serializer": "*"
34
34
  },
35
35
  "nyc": {
36
36
  "include": [
@@ -1,5 +1,5 @@
1
+ import { CryptoDerivative } from '../../../types/crypto';
1
2
  import { ExtendedKeyPair, ExtendedPublicKey, ExtendedSecretKey, KeyPair, PublicKey, SecretKey } from '../../../types/key';
2
- import { Secret } from '../../../types/secret';
3
3
  import { _AnyProtocol, _BaseProtocol, _OfflineProtocol, _OnlineProtocol, _Protocol, BaseGeneric, OfflineGeneric, OnlineGeneric } from '../../protocol';
4
4
  export declare type Bip32Extension<T extends _AnyProtocol> = T extends _Protocol ? InferredOfflineBip32Protocol<T> & InferredOnlineBip32Protocol<T> : T extends _OfflineProtocol ? InferredOfflineBip32Protocol<T> : T extends _OnlineProtocol ? InferredOnlineBip32Protocol<T> : never;
5
5
  declare type InferredOfflineBip32Protocol<T> = T extends _OfflineProtocol<infer _AddressCursor, infer _AddressResult, infer _Units, infer _FeeUnits, infer _SignedTransaction, infer _UnsignedTransaction> ? OfflineBip32Protocol<_AddressCursor, _AddressResult, _Units, _FeeUnits, _SignedTransaction, _UnsignedTransaction> : never;
@@ -7,8 +7,8 @@ declare type InferredOnlineBip32Protocol<T> = T extends _OnlineProtocol<infer _A
7
7
  export interface BaseBip32Protocol<_AddressCursor extends BaseGeneric['AddressCursor'] = BaseGeneric['AddressCursor'], _AddressResult extends BaseGeneric['AddressResult'] = BaseGeneric['AddressResult'], _Units extends BaseGeneric['Units'] = BaseGeneric['Units'], _FeeUnits extends BaseGeneric['FeeUnits'] = BaseGeneric['FeeUnits'], _SignedTransaction extends BaseGeneric['SignedTransaction'] = BaseGeneric['SignedTransaction'], _UnsignedTransaction extends BaseGeneric['UnsignedTransaction'] = BaseGeneric['UnsignedTransaction']> extends _BaseProtocol<_AddressCursor, _AddressResult, _Units, _FeeUnits, _SignedTransaction, _UnsignedTransaction, PublicKey | ExtendedPublicKey> {
8
8
  deriveFromExtendedPublicKey(extendedPublicKey: ExtendedPublicKey, visibilityIndex: number, addressIndex: number): Promise<PublicKey>;
9
9
  }
10
- export interface OfflineBip32Protocol<_AddressCursor extends OfflineGeneric['AddressCursor'] = OfflineGeneric['AddressCursor'], _AddressResult extends OfflineGeneric['AddressResult'] = OfflineGeneric['AddressResult'], _Units extends OfflineGeneric['Units'] = OfflineGeneric['Units'], _FeeUnits extends OfflineGeneric['FeeUnits'] = OfflineGeneric['FeeUnits'], _SignedTransaction extends OfflineGeneric['SignedTransaction'] = OfflineGeneric['SignedTransaction'], _UnsignedTransaction extends OfflineGeneric['UnsignedTransaction'] = OfflineGeneric['UnsignedTransaction']> extends BaseBip32Protocol<_AddressCursor, _AddressResult, _Units, _FeeUnits, _SignedTransaction, _UnsignedTransaction>, _OfflineProtocol<_AddressCursor, _AddressResult, _Units, _FeeUnits, _SignedTransaction, _UnsignedTransaction, PublicKey | ExtendedPublicKey, SecretKey | ExtendedSecretKey, KeyPair | ExtendedKeyPair> {
11
- getExtendedKeyPairFromSecret(secret: Secret, derivationPath?: string): Promise<ExtendedKeyPair>;
10
+ export interface OfflineBip32Protocol<_AddressCursor extends OfflineGeneric['AddressCursor'] = OfflineGeneric['AddressCursor'], _AddressResult extends OfflineGeneric['AddressResult'] = OfflineGeneric['AddressResult'], _CryptoConfiguration extends OfflineGeneric['CryptoConfiguration'] = OfflineGeneric['CryptoConfiguration'], _Units extends OfflineGeneric['Units'] = OfflineGeneric['Units'], _FeeUnits extends OfflineGeneric['FeeUnits'] = OfflineGeneric['FeeUnits'], _SignedTransaction extends OfflineGeneric['SignedTransaction'] = OfflineGeneric['SignedTransaction'], _UnsignedTransaction extends OfflineGeneric['UnsignedTransaction'] = OfflineGeneric['UnsignedTransaction']> extends BaseBip32Protocol<_AddressCursor, _AddressResult, _Units, _FeeUnits, _SignedTransaction, _UnsignedTransaction>, _OfflineProtocol<_AddressCursor, _AddressResult, _CryptoConfiguration, _Units, _FeeUnits, _SignedTransaction, _UnsignedTransaction, PublicKey | ExtendedPublicKey, SecretKey | ExtendedSecretKey, KeyPair | ExtendedKeyPair> {
11
+ getExtendedKeyPairFromDerivative(derivative: CryptoDerivative): Promise<ExtendedKeyPair>;
12
12
  deriveFromExtendedSecretKey(extendedSecretKey: ExtendedSecretKey, visibilityIndex: number, addressIndex: number): Promise<SecretKey>;
13
13
  }
14
14
  export interface OnlineBip32Protocol<_AddressCursor extends OnlineGeneric['AddressCursor'] = OnlineGeneric['AddressCursor'], _AddressResult extends OnlineGeneric['AddressResult'] = OnlineGeneric['AddressResult'], _ProtocolNetwork extends OnlineGeneric['ProtocolNetwork'] = OnlineGeneric['ProtocolNetwork'], _Units extends OnlineGeneric['Units'] = OnlineGeneric['Units'], _FeeUnits extends OnlineGeneric['FeeUnits'] = OnlineGeneric['FeeUnits'], _FeeEstimation extends OnlineGeneric['FeeEstimation'] = OnlineGeneric['FeeEstimation'], _SignedTransaction extends OnlineGeneric['SignedTransaction'] = OnlineGeneric['SignedTransaction'], _UnsignedTransaction extends OnlineGeneric['UnsignedTransaction'] = OnlineGeneric['UnsignedTransaction'], _TransactionCursor extends OnlineGeneric['TransactionCursor'] = OnlineGeneric['TransactionCursor'], _BalanceConfiguration extends Object | undefined = undefined> extends BaseBip32Protocol<_AddressCursor, _AddressResult, _Units, _FeeUnits, _SignedTransaction, _UnsignedTransaction>, _OnlineProtocol<_AddressCursor, _AddressResult, _ProtocolNetwork, _Units, _FeeUnits, _FeeEstimation, _SignedTransaction, _UnsignedTransaction, _TransactionCursor, PublicKey | ExtendedPublicKey, _BalanceConfiguration> {
@@ -1,6 +1,6 @@
1
1
  import { ExtendedSecretKey, SecretKey } from '../../../types/key';
2
2
  import { _OfflineProtocol } from '../../protocol';
3
- export declare type AESExtension<T extends _OfflineProtocol> = T extends _OfflineProtocol<any, any, any, any, any, any, any, infer _SecretKey> ? AES<_SecretKey> : never;
3
+ export declare type AESExtension<T extends _OfflineProtocol> = T extends _OfflineProtocol<any, any, any, any, any, any, any, any, infer _SecretKey> ? AES<_SecretKey> : never;
4
4
  export interface AES<_SecretKey extends SecretKey | ExtendedSecretKey = SecretKey> {
5
5
  encryptAESWithSecretKey(payload: string, secretKey: _SecretKey): Promise<string>;
6
6
  decryptAESWithSecretKey(payload: string, secretKey: _SecretKey): Promise<string>;
@@ -1,6 +1,6 @@
1
1
  import { ExtendedKeyPair, ExtendedPublicKey, KeyPair, PublicKey } from '../../../types/key';
2
2
  import { _AnyProtocol, _BaseProtocol, _OfflineProtocol } from '../../protocol';
3
- export declare type AsymmetricEncryptionExtension<T extends _AnyProtocol> = T extends _OfflineProtocol<any, any, any, any, any, any, infer _PublicKey, any, infer _KeyPair> ? OfflineAsymmetricEncryption<_PublicKey, _KeyPair> : T extends _BaseProtocol<any, any, any, any, any, any, infer _PublicKey> ? BaseAsymmetricEncryption<_PublicKey> : never;
3
+ export declare type AsymmetricEncryptionExtension<T extends _AnyProtocol> = T extends _OfflineProtocol<any, any, any, any, any, any, any, infer _PublicKey, any, infer _KeyPair> ? OfflineAsymmetricEncryption<_PublicKey, _KeyPair> : T extends _BaseProtocol<any, any, any, any, any, any, infer _PublicKey> ? BaseAsymmetricEncryption<_PublicKey> : never;
4
4
  export interface BaseAsymmetricEncryption<_PublicKey extends PublicKey | ExtendedPublicKey = PublicKey> {
5
5
  encryptAsymmetricWithPublicKey(payload: string, publicKey: _PublicKey): Promise<string>;
6
6
  }
@@ -1,7 +1,7 @@
1
1
  import { ExtendedKeyPair, ExtendedPublicKey, KeyPair, PublicKey } from '../../../types/key';
2
2
  import { Signature } from '../../../types/signature';
3
3
  import { _AnyProtocol, _BaseProtocol, _OfflineProtocol } from '../../protocol';
4
- export declare type SignMessageExtension<T extends _AnyProtocol> = T extends _OfflineProtocol<any, any, any, any, any, any, infer _PublicKey, any, infer _KeyPair> ? OfflineSignMessage<_PublicKey, _KeyPair> : T extends _BaseProtocol<any, any, any, any, any, any, infer _PublicKey> ? BaseSignMessage<_PublicKey> : never;
4
+ export declare type SignMessageExtension<T extends _AnyProtocol> = T extends _OfflineProtocol<any, any, any, any, any, any, any, infer _PublicKey, any, infer _KeyPair> ? OfflineSignMessage<_PublicKey, _KeyPair> : T extends _BaseProtocol<any, any, any, any, any, any, infer _PublicKey> ? BaseSignMessage<_PublicKey> : never;
5
5
  export interface BaseSignMessage<_PublicKey extends PublicKey | ExtendedPublicKey = PublicKey> {
6
6
  verifyMessageWithPublicKey(message: string, signature: Signature, publicKey: _PublicKey): Promise<boolean>;
7
7
  }
@@ -2,11 +2,11 @@ import { Address, AddressCursor, AddressWithCursor } from '../types/address';
2
2
  import { AirGapInterface, ApplicableProtocolExtension } from '../types/airgap';
3
3
  import { Amount } from '../types/amount';
4
4
  import { Balance } from '../types/balance';
5
+ import { CryptoConfiguration, CryptoDerivative } from '../types/crypto';
5
6
  import { FeeEstimation } from '../types/fee';
6
7
  import { ExtendedKeyPair, ExtendedPublicKey, ExtendedSecretKey, KeyPair, PublicKey, SecretKey } from '../types/key';
7
8
  import { Complement } from '../types/meta/utility-types';
8
9
  import { ProtocolMetadata, ProtocolNetwork } from '../types/protocol';
9
- import { Secret } from '../types/secret';
10
10
  import { AirGapTransaction, AirGapTransactionsWithCursor, SignedTransaction, TransactionConfiguration, TransactionCursor, TransactionDetails, UnsignedTransaction } 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;
@@ -16,7 +16,8 @@ export interface BaseGeneric<_AddressCursor extends AddressCursor = AddressCurso
16
16
  SignedTransaction: _SignedTransaction;
17
17
  UnsignedTransaction: _UnsignedTransaction;
18
18
  }
19
- export interface OfflineGeneric<_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> extends BaseGeneric<_AddressCursor, _AddressResult, _Units, _FeeUnits, _SignedTransaction, _UnsignedTransaction> {
19
+ export interface OfflineGeneric<_AddressCursor extends AddressCursor = AddressCursor, _AddressResult extends Address | AddressWithCursor<_AddressCursor> = Address | AddressWithCursor<_AddressCursor>, _CryptoConfiguration extends CryptoConfiguration = CryptoConfiguration, _Units extends string = string, _FeeUnits extends string = _Units, _SignedTransaction extends SignedTransaction = SignedTransaction, _UnsignedTransaction extends UnsignedTransaction = UnsignedTransaction> extends BaseGeneric<_AddressCursor, _AddressResult, _Units, _FeeUnits, _SignedTransaction, _UnsignedTransaction> {
20
+ CryptoConfiguration: _CryptoConfiguration;
20
21
  }
21
22
  export interface OnlineGeneric<_AddressCursor extends AddressCursor = AddressCursor, _AddressResult extends Address | AddressWithCursor<_AddressCursor> = Address | AddressWithCursor<_AddressCursor>, _ProtocolNetwork extends ProtocolNetwork = ProtocolNetwork, _Units extends string = string, _FeeUnits extends string = _Units, _FeeEstimation extends FeeEstimation<_FeeUnits> | undefined = FeeEstimation<_FeeUnits> | undefined, _SignedTransaction extends SignedTransaction = SignedTransaction, _UnsignedTransaction extends UnsignedTransaction = UnsignedTransaction, _TransactionCursor extends TransactionCursor = TransactionCursor> extends BaseGeneric<_AddressCursor, _AddressResult, _Units, _FeeUnits, _SignedTransaction, _UnsignedTransaction> {
22
23
  ProtocolNetwork: _ProtocolNetwork;
@@ -26,6 +27,7 @@ export interface OnlineGeneric<_AddressCursor extends AddressCursor = AddressCur
26
27
  declare type TypedAddressCursor<G extends Partial<BaseGeneric>> = Complement<BaseGeneric, G>['AddressCursor'];
27
28
  declare type TypedAddressResult<G extends Partial<BaseGeneric>> = Complement<BaseGeneric<TypedAddressCursor<G>>, G>['AddressResult'];
28
29
  declare type TypedProtocolNetwork<G extends Partial<OnlineGeneric>> = Complement<OnlineGeneric, G>['ProtocolNetwork'];
30
+ declare type TypedCryptoConfiguration<G extends Partial<OfflineGeneric>> = Complement<OfflineGeneric, G>['CryptoConfiguration'];
29
31
  declare type TypedUnits<G extends Partial<BaseGeneric>> = Complement<BaseGeneric, G>['Units'];
30
32
  declare type TypedFeeUnits<G extends Partial<BaseGeneric>> = Complement<BaseGeneric<any, any, TypedUnits<G>>, G>['FeeUnits'];
31
33
  declare type TypedFeeEstimation<G extends Partial<OnlineGeneric>> = Complement<OnlineGeneric<any, any, any, any, TypedFeeUnits<G>>, G>['FeeEstimation'];
@@ -38,11 +40,12 @@ export interface _BaseProtocol<_AddressCursor extends BaseGeneric['AddressCursor
38
40
  getDetailsFromTransaction(transaction: _UnsignedTransaction | _SignedTransaction, publicKey: _PublicKey): Promise<AirGapTransaction<_Units, _FeeUnits>[]>;
39
41
  }
40
42
  export declare type BaseProtocol<G extends Partial<BaseGeneric> = {}> = _BaseProtocol<TypedAddressCursor<G>, TypedAddressResult<G>, TypedUnits<G>, TypedFeeUnits<G>, TypedSignedTransaction<G>, TypedUnsignedTransaction<G>, PublicKey>;
41
- export interface _OfflineProtocol<_AddressCursor extends OfflineGeneric['AddressCursor'] = any, _AddressResult extends OfflineGeneric['AddressResult'] = any, _Units extends BaseGeneric['Units'] = any, _FeeUnits extends BaseGeneric['FeeUnits'] = any, _SignedTransaction extends BaseGeneric['SignedTransaction'] = any, _UnsignedTransaction extends BaseGeneric['UnsignedTransaction'] = any, _PublicKey extends PublicKey | ExtendedPublicKey = any, _SecretKey extends SecretKey | ExtendedSecretKey = any, _KeyPair extends KeyPair | ExtendedKeyPair = any> extends _BaseProtocol<_AddressCursor, _AddressResult, _Units, _FeeUnits, _SignedTransaction, _UnsignedTransaction, _PublicKey> {
42
- getKeyPairFromSecret(secret: Secret, derivationPath?: string): Promise<KeyPair>;
43
+ export interface _OfflineProtocol<_AddressCursor extends OfflineGeneric['AddressCursor'] = any, _AddressResult extends OfflineGeneric['AddressResult'] = any, _CryptoConfiguration extends OfflineGeneric['CryptoConfiguration'] = any, _Units extends BaseGeneric['Units'] = any, _FeeUnits extends BaseGeneric['FeeUnits'] = any, _SignedTransaction extends BaseGeneric['SignedTransaction'] = any, _UnsignedTransaction extends BaseGeneric['UnsignedTransaction'] = any, _PublicKey extends PublicKey | ExtendedPublicKey = any, _SecretKey extends SecretKey | ExtendedSecretKey = any, _KeyPair extends KeyPair | ExtendedKeyPair = any> extends _BaseProtocol<_AddressCursor, _AddressResult, _Units, _FeeUnits, _SignedTransaction, _UnsignedTransaction, _PublicKey> {
44
+ getCryptoConfiguration(): Promise<_CryptoConfiguration>;
45
+ getKeyPairFromDerivative(derivative: CryptoDerivative): Promise<KeyPair>;
43
46
  signTransactionWithSecretKey(transaction: _UnsignedTransaction, secretKey: _SecretKey): Promise<_SignedTransaction>;
44
47
  }
45
- export declare type OfflineProtocol<G extends Partial<OfflineGeneric> = {}> = _OfflineProtocol<TypedAddressCursor<G>, TypedAddressResult<G>, TypedUnits<G>, TypedFeeUnits<G>, TypedSignedTransaction<G>, TypedUnsignedTransaction<G>, PublicKey, SecretKey, KeyPair>;
48
+ export declare type OfflineProtocol<G extends Partial<OfflineGeneric> = {}> = _OfflineProtocol<TypedAddressCursor<G>, TypedAddressResult<G>, TypedCryptoConfiguration<G>, TypedUnits<G>, TypedFeeUnits<G>, TypedSignedTransaction<G>, TypedUnsignedTransaction<G>, PublicKey, SecretKey, KeyPair>;
46
49
  export interface _OnlineProtocol<_AddressCursor extends OnlineGeneric['AddressCursor'] = any, _AddressResult extends OnlineGeneric['AddressResult'] = any, _ProtocolNetwork extends OnlineGeneric['ProtocolNetwork'] = any, _Units extends OnlineGeneric['Units'] = any, _FeeUnits extends OnlineGeneric['FeeUnits'] = any, _FeeEstimation extends OnlineGeneric['FeeEstimation'] = any, _SignedTransaction extends OnlineGeneric['SignedTransaction'] = any, _UnsignedTransaction extends OnlineGeneric['UnsignedTransaction'] = any, _TransactionCursor extends OnlineGeneric['TransactionCursor'] = any, _PublicKey extends PublicKey | ExtendedPublicKey = any, _BalanceConfiguration extends Object | undefined = any> extends _BaseProtocol<_AddressCursor, _AddressResult, _Units, _FeeUnits, _SignedTransaction, _UnsignedTransaction, _PublicKey> {
47
50
  getNetwork(): Promise<_ProtocolNetwork>;
48
51
  getTransactionsForPublicKey(publicKey: _PublicKey, limit: number, cursor?: _TransactionCursor): Promise<AirGapTransactionsWithCursor<_TransactionCursor, _Units, _FeeUnits>>;
@@ -0,0 +1,29 @@
1
+ export declare type CryptoAlgorithm = 'ed25519' | 'sr25519' | 'secp256k1' | /* | 'secp256r1' */ 'sapling';
2
+ export declare type CryptoSecretType = 'secret' | 'miniSecretXor';
3
+ interface BaseCryptoConfiguration<_Algorithm extends CryptoAlgorithm> {
4
+ algorithm: _Algorithm;
5
+ }
6
+ export interface Ed25519CryptoConfiguration<_SecretType extends CryptoSecretType = CryptoSecretType> extends BaseCryptoConfiguration<'ed25519'> {
7
+ key?: string;
8
+ secretType?: _SecretType;
9
+ }
10
+ export interface Sr25519CryptoConfiguration extends BaseCryptoConfiguration<'sr25519'> {
11
+ compatibility: 'substrate';
12
+ }
13
+ export interface Secp256K1CryptoConfiguration<_SecretType extends CryptoSecretType = CryptoSecretType> extends BaseCryptoConfiguration<'secp256k1'> {
14
+ key?: string;
15
+ secretType?: _SecretType;
16
+ }
17
+ export interface SaplingCryptoConfiguration<_SecretType extends CryptoSecretType = CryptoSecretType> extends BaseCryptoConfiguration<'sapling'> {
18
+ secretType?: _SecretType;
19
+ }
20
+ export declare type CryptoConfiguration = Ed25519CryptoConfiguration | Sr25519CryptoConfiguration | Secp256K1CryptoConfiguration | SaplingCryptoConfiguration;
21
+ export interface CryptoDerivative {
22
+ depth: number;
23
+ parentFingerprint: number;
24
+ index: number;
25
+ chainCode: string;
26
+ secretKey: string;
27
+ publicKey: string;
28
+ }
29
+ export {};
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=secret.js.map
3
+ //# sourceMappingURL=crypto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"crypto.js","sourceRoot":"","sources":["../../src/types/crypto.ts"],"names":[],"mappings":""}
@@ -3,3 +3,5 @@ export declare type RecursivePartial<T> = {
3
3
  [K in keyof T]?: T[K] extends (infer U)[] ? RecursivePartial<U>[] : T[K] extends object ? RecursivePartial<T[K]> : T[K];
4
4
  };
5
5
  export declare type Override<T, U> = Omit<T, keyof U> & U;
6
+ export declare type ExtractTyped<T, K extends T> = Extract<T, K>;
7
+ export declare type ExcludeTyped<T, K extends T> = Exclude<T, K>;
@@ -6,7 +6,7 @@ export interface ProtocolMetadata<_Units extends string = string, _FeeUnits exte
6
6
  units: ProtocolUnitsMetadata<_Units>;
7
7
  mainUnit: _Units;
8
8
  fee?: ProtocolFeeMetadata<_FeeUnits>;
9
- account?: ProtocolAccountMetadata;
9
+ account: ProtocolAccountMetadata;
10
10
  transaction?: ProtocolTransactionMetadata<_Units>;
11
11
  }
12
12
  export declare type ProtocolUnitsMetadata<_Units extends string = string> = {
@@ -25,7 +25,7 @@ export interface ProtocolFeeMetadata<_FeeUnits extends string = string> {
25
25
  mainUnit?: _FeeUnits;
26
26
  }
27
27
  export interface ProtocolAccountMetadata {
28
- standardDerivationPath?: string;
28
+ standardDerivationPath: string;
29
29
  address?: {
30
30
  isCaseSensitive?: boolean;
31
31
  placeholder?: string;
package/utils/protocol.js CHANGED
@@ -21,10 +21,10 @@ var baseProtocolSchema = {
21
21
  getDetailsFromTransaction: 'required',
22
22
  getMetadata: 'required'
23
23
  };
24
- var offlineProtocolSchema = __assign(__assign({}, baseProtocolSchema), { getKeyPairFromSecret: 'required', signTransactionWithSecretKey: 'required' });
24
+ var offlineProtocolSchema = __assign(__assign({}, baseProtocolSchema), { getCryptoConfiguration: 'required', getKeyPairFromDerivative: 'required', signTransactionWithSecretKey: 'required' });
25
25
  var onlineProtocolSchema = __assign(__assign({}, baseProtocolSchema), { broadcastTransaction: 'required', getBalanceOfPublicKey: 'required', getNetwork: 'required', getTransactionFeeWithPublicKey: 'required', getTransactionMaxAmountWithPublicKey: 'required', getTransactionsForPublicKey: 'required', prepareTransactionWithPublicKey: 'required' });
26
26
  var bip32BaseProtocolSchema = __assign(__assign({}, baseProtocolSchema), { deriveFromExtendedPublicKey: 'required' });
27
- var bip32OfflineProtocolSchema = __assign(__assign(__assign({}, bip32BaseProtocolSchema), offlineProtocolSchema), { getExtendedKeyPairFromSecret: 'required', deriveFromExtendedSecretKey: 'required' });
27
+ var bip32OfflineProtocolSchema = __assign(__assign(__assign({}, bip32BaseProtocolSchema), offlineProtocolSchema), { getExtendedKeyPairFromDerivative: 'required', deriveFromExtendedSecretKey: 'required' });
28
28
  var bip32OnlineProtocolSchema = __assign(__assign({}, bip32BaseProtocolSchema), onlineProtocolSchema);
29
29
  var subProtocolSchema = {
30
30
  getType: 'required',
@@ -1 +1 @@
1
- {"version":3,"file":"protocol.js","sourceRoot":"","sources":["../../src/utils/protocol.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,aAAa;AACb,0FAA4F;AAsC5F,yCAAyD;AAEzD,UAAU;AAEV,IAAM,kBAAkB,GAAyB;IAC/C,uBAAuB,EAAE,UAAU;IACnC,yBAAyB,EAAE,UAAU;IACrC,WAAW,EAAE,UAAU;CACxB,CAAA;AAED,IAAM,qBAAqB,yBACtB,kBAAkB,KACrB,oBAAoB,EAAE,UAAU,EAChC,4BAA4B,EAAE,UAAU,GACzC,CAAA;AAED,IAAM,oBAAoB,yBACrB,kBAAkB,KACrB,oBAAoB,EAAE,UAAU,EAChC,qBAAqB,EAAE,UAAU,EACjC,UAAU,EAAE,UAAU,EACtB,8BAA8B,EAAE,UAAU,EAC1C,oCAAoC,EAAE,UAAU,EAChD,2BAA2B,EAAE,UAAU,EACvC,+BAA+B,EAAE,UAAU,GAC5C,CAAA;AAED,IAAM,uBAAuB,yBACxB,kBAAkB,KACrB,2BAA2B,EAAE,UAAU,GACxC,CAAA;AAED,IAAM,0BAA0B,kCAC3B,uBAAuB,GACvB,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