@binance/w3w-multichain-connector 1.0.8 → 1.0.10

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/index.d.ts CHANGED
@@ -40,20 +40,6 @@ interface IConnectedWallet {
40
40
  binanceChainId: string;
41
41
  }[];
42
42
  }
43
- interface SASRequestConfig {
44
- publicKeyList: SASRequestPublicKeyVo[];
45
- timestamp: number;
46
- }
47
- interface SASRequestPublicKeyVo {
48
- binanceChainId: string;
49
- attestationForKeyShareA: string;
50
- /**
51
- * attestation中的多个PCR0,配置在Apollo Configs,用于验证attestation
52
- */
53
- attestationPCR0s: string[];
54
- publicKeyForKeyShareA: string;
55
- spsVersion: string;
56
- }
57
43
  interface SASAuthorizeInfo {
58
44
  walletType: 'SEED_PHRASE' | 'PRIVATE_KEY';
59
45
  proofKeyPublicKey: string;
@@ -95,6 +81,7 @@ interface IWallet extends EventEmitter<WalletEvents> {
95
81
  requestEnableSAS(arg: {
96
82
  walletId: string;
97
83
  userId: string;
84
+ userEmail: string;
98
85
  }): Promise<{
99
86
  aggreeEnableSAS: boolean;
100
87
  }>;
@@ -107,13 +94,11 @@ interface IWallet extends EventEmitter<WalletEvents> {
107
94
  getSASKeyshare(arg: {
108
95
  walletId: string;
109
96
  userId: string;
110
- requestConfig: SASRequestConfig;
111
97
  isSlient?: false;
112
98
  }): Promise<SASAuthorizeInfo>;
113
99
  getSASKeyshare(arg: {
114
100
  walletId: string;
115
101
  userId: string;
116
- requestConfig: SASRequestConfig;
117
102
  isSlient: true;
118
103
  }): Promise<SASAuthorizeInfo | null>;
119
104
  /**
@@ -192,4 +177,4 @@ declare const checkExtensionInstalled: () => boolean;
192
177
  declare const checkExtensionSupported: (feature: Features) => any;
193
178
  declare const getMultichainWallet: () => IWallet | null;
194
179
 
195
- export { ChainType, Features, IConnectedWallet, IWallet, SASAuthorizeInfo, SASAuthorizeInfoItem, SASRequestConfig, SASRequestPublicKeyVo, WalletEvents, WalletType, checkExtensionInstalled, checkExtensionSupported, getMultichainWallet };
180
+ export { ChainType, Features, IConnectedWallet, IWallet, SASAuthorizeInfo, SASAuthorizeInfoItem, WalletEvents, WalletType, checkExtensionInstalled, checkExtensionSupported, getMultichainWallet };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@binance/w3w-multichain-connector",
3
- "version": "1.0.8",
3
+ "version": "1.0.10",
4
4
  "description": "A multichain connector for Binance Wallet",
5
5
  "main": "dist/index.mjs",
6
6
  "types": "dist/index.d.ts",
package/src/type.ts CHANGED
@@ -23,21 +23,6 @@ export interface IConnectedWallet {
23
23
  }[]
24
24
  }
25
25
 
26
- export interface SASRequestConfig {
27
- publicKeyList: SASRequestPublicKeyVo[]
28
- timestamp: number
29
- }
30
- export interface SASRequestPublicKeyVo {
31
- binanceChainId: string
32
- attestationForKeyShareA: string
33
- /**
34
- * attestation中的多个PCR0,配置在Apollo Configs,用于验证attestation
35
- */
36
- attestationPCR0s: string[]
37
- publicKeyForKeyShareA: string
38
- spsVersion: string
39
- }
40
-
41
26
  export interface SASAuthorizeInfo {
42
27
  walletType: 'SEED_PHRASE' | 'PRIVATE_KEY'
43
28
  proofKeyPublicKey: string
@@ -81,7 +66,11 @@ export interface IWallet extends EventEmitter<WalletEvents> {
81
66
  /**
82
67
  * 弹出要求用户同意开启SAS的弹窗
83
68
  */
84
- requestEnableSAS(arg: { walletId: string; userId: string }): Promise<{
69
+ requestEnableSAS(arg: {
70
+ walletId: string
71
+ userId: string
72
+ userEmail: string
73
+ }): Promise<{
85
74
  aggreeEnableSAS: boolean
86
75
  }>
87
76
 
@@ -94,14 +83,12 @@ export interface IWallet extends EventEmitter<WalletEvents> {
94
83
  getSASKeyshare(arg: {
95
84
  walletId: string
96
85
  userId: string
97
- requestConfig: SASRequestConfig
98
86
  isSlient?: false
99
87
  }): Promise<SASAuthorizeInfo>
100
88
 
101
89
  getSASKeyshare(arg: {
102
90
  walletId: string
103
91
  userId: string
104
- requestConfig: SASRequestConfig
105
92
  isSlient: true
106
93
  }): Promise<SASAuthorizeInfo | null>
107
94