@subwallet/extension-base 0.4.10-0 → 0.5.3-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.
@@ -47,6 +47,14 @@ export interface RequestAuthorization extends RequestAuthorizationAll {
47
47
  export interface RequestAuthorizationPerAccount extends RequestAuthorization {
48
48
  address: string;
49
49
  }
50
+ export interface RequestAuthorizationPerSite {
51
+ id: string;
52
+ values: Record<string, boolean>;
53
+ }
54
+ export interface RequestAuthorizationBlock {
55
+ id: string;
56
+ connectedValue: boolean;
57
+ }
50
58
  export interface ResultResolver {
51
59
  result: boolean;
52
60
  accounts: string[];
@@ -80,11 +88,17 @@ export interface StakingItem {
80
88
  nativeToken: string;
81
89
  unit?: string;
82
90
  state: APIItemState;
91
+ unlockingInfo?: UnlockingStakeInfo;
83
92
  }
84
93
  export interface StakingJson {
94
+ reset?: boolean;
85
95
  ready?: boolean;
86
96
  details: Record<string, StakingItem>;
87
97
  }
98
+ export interface StakingStoreJson {
99
+ bonded: Record<string, StakingItem>;
100
+ reward: Array<StakingRewardItem>;
101
+ }
88
102
  export interface PriceJson {
89
103
  ready?: boolean;
90
104
  currency: string;
@@ -140,6 +154,10 @@ export interface NftCollectionJson {
140
154
  ready: boolean;
141
155
  nftCollectionList: Array<NftCollection>;
142
156
  }
157
+ export interface NftStoreJson {
158
+ nftList: Array<NftItem>;
159
+ nftCollectionList: Array<NftCollection>;
160
+ }
143
161
  export interface TokenBalanceRaw {
144
162
  reserved: BN;
145
163
  frozen: BN;
@@ -153,13 +171,15 @@ export interface BalanceChildItem {
153
171
  }
154
172
  export interface BalanceItem {
155
173
  state: APIItemState;
156
- free: string;
157
- reserved: string;
158
- miscFrozen: string;
159
- feeFrozen: string;
174
+ free?: string;
175
+ reserved?: string;
176
+ miscFrozen?: string;
177
+ feeFrozen?: string;
160
178
  children?: Record<string, BalanceChildItem>;
179
+ timestamp?: number;
161
180
  }
162
181
  export interface BalanceJson {
182
+ reset?: boolean;
163
183
  details: Record<string, BalanceItem>;
164
184
  }
165
185
  export interface CrowdloanItem {
@@ -168,6 +188,7 @@ export interface CrowdloanItem {
168
188
  contribute: string;
169
189
  }
170
190
  export interface CrowdloanJson {
191
+ reset?: boolean;
171
192
  details: Record<string, CrowdloanItem>;
172
193
  }
173
194
  export interface ChainRegistry {
@@ -339,6 +360,8 @@ export interface TransactionHistoryItemType {
339
360
  isSuccess: boolean;
340
361
  action: 'send' | 'received';
341
362
  extrinsicHash: string;
363
+ origin?: 'app' | 'network';
364
+ eventIdx?: number | null;
342
365
  }
343
366
  export interface RequestTransactionHistoryGet {
344
367
  address: string;
@@ -457,6 +480,8 @@ export declare type RequestNftForceUpdate = {
457
480
  nft: NftItem;
458
481
  isSendingSelf: boolean;
459
482
  chain: string;
483
+ senderAddress: string;
484
+ recipientAddress: string;
460
485
  };
461
486
  export declare enum NETWORK_ERROR {
462
487
  INVALID_INFO_TYPE = "invalidInfoType",
@@ -751,6 +776,8 @@ export interface ValidatorInfo {
751
776
  isVerified: boolean;
752
777
  minBond: number;
753
778
  isNominated: boolean;
779
+ icon?: string;
780
+ hasScheduledRequest?: boolean;
754
781
  }
755
782
  export interface BondingOptionInfo {
756
783
  isBondedBefore: boolean;
@@ -776,6 +803,7 @@ export interface BondingSubmitParams {
776
803
  password?: string;
777
804
  isBondedBefore: boolean;
778
805
  bondedValidators: string[];
806
+ lockPeriod?: number;
779
807
  }
780
808
  export interface BasicTxResponse {
781
809
  passwordError?: string | null;
@@ -793,20 +821,48 @@ export interface UnbondingSubmitParams {
793
821
  networkKey: string;
794
822
  address: string;
795
823
  password?: string;
824
+ validatorAddress?: string;
825
+ unstakeAll?: boolean;
796
826
  }
797
827
  export interface UnlockingStakeParams {
798
828
  address: string;
799
829
  networkKey: string;
830
+ validatorList?: string[];
831
+ }
832
+ export interface DelegationItem {
833
+ owner: string;
834
+ amount: string;
835
+ identity?: string;
836
+ minBond: string;
837
+ hasScheduledRequest: boolean;
800
838
  }
801
839
  export interface UnlockingStakeInfo {
802
840
  nextWithdrawal: number;
803
841
  redeemable: number;
804
842
  nextWithdrawalAmount: number;
843
+ nextWithdrawalAction?: string;
844
+ validatorAddress?: string;
845
+ }
846
+ export interface StakeUnlockingJson {
847
+ timestamp: number;
848
+ details: Record<string, UnlockingStakeInfo>;
805
849
  }
806
850
  export interface StakeWithdrawalParams {
807
851
  address: string;
808
852
  networkKey: string;
809
853
  password?: string;
854
+ validatorAddress?: string;
855
+ action?: string;
856
+ }
857
+ export interface StakeClaimRewardParams {
858
+ address: string;
859
+ networkKey: string;
860
+ validatorAddress?: string;
861
+ password?: string;
862
+ }
863
+ export interface StakeDelegationRequest {
864
+ address: string;
865
+ networkKey: string;
810
866
  }
811
867
  export interface SingleModeJson {
812
868
  networkKeys: string[];
@@ -834,14 +890,17 @@ export interface ResponseParseEVMTransactionInput {
834
890
  result: ParseEVMTransactionData | string;
835
891
  }
836
892
  export interface KoniRequestSignatures {
893
+ 'pri(staking.delegationInfo)': [StakeDelegationRequest, DelegationItem[]];
894
+ 'pri(staking.submitClaimReward)': [StakeClaimRewardParams, BasicTxResponse, BasicTxResponse];
895
+ 'pri(staking.claimRewardTxInfo)': [StakeClaimRewardParams, BasicTxInfo];
837
896
  'pri(unbonding.submitWithdrawal)': [StakeWithdrawalParams, BasicTxResponse, BasicTxResponse];
838
897
  'pri(unbonding.withdrawalTxInfo)': [StakeWithdrawalParams, BasicTxInfo];
839
- 'pri(unbonding.unlockingInfo)': [UnlockingStakeParams, UnlockingStakeInfo];
898
+ 'pri(unbonding.subscribeUnlockingInfo)': [null, StakeUnlockingJson, StakeUnlockingJson];
840
899
  'pri(unbonding.submitTransaction)': [UnbondingSubmitParams, BasicTxResponse, BasicTxResponse];
841
900
  'pri(unbonding.txInfo)': [UnbondingSubmitParams, BasicTxInfo];
842
901
  'pri(bonding.txInfo)': [BondingSubmitParams, BasicTxInfo];
843
902
  'pri(bonding.submitTransaction)': [BondingSubmitParams, BasicTxResponse, BasicTxResponse];
844
- 'pri(bonding.getChainBondingBasics)': [NetworkJson[], Record<string, ChainBondingBasics>];
903
+ 'pri(bonding.getChainBondingBasics)': [NetworkJson[], Record<string, ChainBondingBasics>, Record<string, ChainBondingBasics>];
845
904
  'pri(bonding.getBondingOptions)': [BondingOptionParams, BondingOptionInfo];
846
905
  'pri(networkMap.recoverDotSama)': [string, boolean];
847
906
  'pri(substrateNft.submitTransaction)': [SubstrateNftSubmitTransaction, NftTransactionResponse, NftTransactionResponse];
@@ -888,6 +947,8 @@ export interface KoniRequestSignatures {
888
947
  'pri(authorize.changeSiteAll)': [RequestAuthorizationAll, boolean, AuthUrls];
889
948
  'pri(authorize.changeSite)': [RequestAuthorization, boolean, AuthUrls];
890
949
  'pri(authorize.changeSitePerAccount)': [RequestAuthorizationPerAccount, boolean, AuthUrls];
950
+ 'pri(authorize.changeSitePerSite)': [RequestAuthorizationPerSite, boolean];
951
+ 'pri(authorize.changeSiteBlock)': [RequestAuthorizationBlock, boolean];
891
952
  'pri(authorize.forgetSite)': [RequestForgetSite, boolean, AuthUrls];
892
953
  'pri(authorize.forgetAllSite)': [null, boolean, AuthUrls];
893
954
  'pri(authorize.rejectV2)': [RequestAuthorizeReject, boolean];
@@ -930,5 +991,9 @@ export interface KoniRequestSignatures {
930
991
  'evm(request)': [RequestArguments, unknown];
931
992
  'evm(provider.send)': [RequestEvmProviderSend, string | number, ResponseEvmProviderSend];
932
993
  'pri(evm.transaction.parse.input)': [RequestParseEVMTransactionInput, ResponseParseEVMTransactionInput];
994
+ 'pri(authorize.subscribe)': [null, AuthUrls, AuthUrls];
995
+ }
996
+ export interface ApplicationMetadataType {
997
+ version: string;
933
998
  }
934
999
  export {};
@@ -11,6 +11,6 @@ const packageInfo = {
11
11
  name: '@subwallet/extension-base',
12
12
  path: typeof __dirname === 'string' ? __dirname : 'auto',
13
13
  type: 'cjs',
14
- version: '0.4.10-0'
14
+ version: '0.5.3-1'
15
15
  };
16
16
  exports.packageInfo = packageInfo;
package/package.json CHANGED
@@ -17,7 +17,7 @@
17
17
  "./cjs/detectPackage.js"
18
18
  ],
19
19
  "type": "module",
20
- "version": "0.4.10-0",
20
+ "version": "0.5.3-1",
21
21
  "main": "./cjs/index.js",
22
22
  "module": "./index.js",
23
23
  "types": "./index.d.ts",
@@ -199,9 +199,9 @@
199
199
  "@polkadot/ui-settings": "^2.7.2",
200
200
  "@polkadot/util": "^9.7.2",
201
201
  "@polkadot/util-crypto": "^9.7.2",
202
- "@subwallet/extension-chains": "^0.4.10-0",
203
- "@subwallet/extension-dapp": "^0.4.10-0",
204
- "@subwallet/extension-inject": "^0.4.10-0",
202
+ "@subwallet/extension-chains": "^0.5.3-1",
203
+ "@subwallet/extension-dapp": "^0.5.3-1",
204
+ "@subwallet/extension-inject": "^0.5.3-1",
205
205
  "ethereumjs-tx": "^2.1.2",
206
206
  "eventemitter3": "^4.0.7",
207
207
  "rxjs": "^7.5.5",
package/packageInfo.js CHANGED
@@ -5,5 +5,5 @@ export const packageInfo = {
5
5
  name: '@subwallet/extension-base',
6
6
  path: (import.meta && import.meta.url) ? new URL(import.meta.url).pathname.substring(0, new URL(import.meta.url).pathname.lastIndexOf('/') + 1) : 'auto',
7
7
  type: 'esm',
8
- version: '0.4.10-0'
8
+ version: '0.5.3-1'
9
9
  };