@portal-hq/web 3.6.2-alpha → 3.7.0
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/hypernative.d.ts +346 -0
- package/lib/commonjs/index.js +144 -2
- package/lib/commonjs/index.test.js +119 -2
- package/lib/commonjs/integrations/security/hypernative/index.js +101 -0
- package/lib/commonjs/integrations/security/hypernative/index.test.js +151 -0
- package/lib/commonjs/integrations/security/index.js +16 -0
- package/lib/commonjs/integrations/trading/zero-x/index.js +17 -4
- package/lib/commonjs/integrations/trading/zero-x/index.test.js +61 -15
- package/lib/commonjs/mpc/index.js +156 -5
- package/lib/commonjs/mpc/index.test.js +794 -5
- package/lib/commonjs/passkeys/index.js +394 -0
- package/lib/commonjs/passkeys/types.js +2 -0
- package/lib/commonjs/provider/index.js +5 -2
- package/lib/esm/index.js +144 -2
- package/lib/esm/index.test.js +119 -2
- package/lib/esm/integrations/security/hypernative/index.js +98 -0
- package/lib/esm/integrations/security/hypernative/index.test.js +146 -0
- package/lib/esm/integrations/security/index.js +10 -0
- package/lib/esm/integrations/trading/zero-x/index.js +17 -4
- package/lib/esm/integrations/trading/zero-x/index.test.js +62 -16
- package/lib/esm/mpc/index.js +156 -5
- package/lib/esm/mpc/index.test.js +795 -6
- package/lib/esm/passkeys/index.js +390 -0
- package/lib/esm/passkeys/types.js +1 -0
- package/lib/esm/provider/index.js +5 -2
- package/lifi-types.d.ts +1236 -0
- package/package.json +6 -3
- package/src/__mocks/constants.ts +422 -5
- package/src/__mocks/portal/mpc.ts +1 -0
- package/src/index.test.ts +179 -3
- package/src/index.ts +212 -4
- package/src/integrations/security/hypernative/index.test.ts +196 -0
- package/src/integrations/security/hypernative/index.ts +106 -0
- package/src/integrations/security/index.ts +14 -0
- package/src/integrations/trading/zero-x/index.test.ts +98 -19
- package/src/integrations/trading/zero-x/index.ts +29 -9
- package/src/mpc/index.test.ts +944 -7
- package/src/mpc/index.ts +200 -10
- package/src/passkeys/index.ts +536 -0
- package/src/passkeys/types.ts +78 -0
- package/src/provider/index.ts +5 -0
- package/tsconfig.json +7 -1
- package/types.d.ts +45 -12
- package/yieldxyz-types.d.ts +778 -0
- package/zero-x.d.ts +204 -0
package/types.d.ts
CHANGED
|
@@ -31,8 +31,14 @@ export interface BackupArgs extends MpcOperationArgs {
|
|
|
31
31
|
backupConfigs: BackupConfigs = {}
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
+
|
|
35
|
+
export interface CustomBackupConfig {
|
|
36
|
+
encryptionKey: string
|
|
37
|
+
}
|
|
38
|
+
|
|
34
39
|
export interface BackupConfigs {
|
|
35
40
|
passwordStorage?: PasswordConfig
|
|
41
|
+
customStorage?: CustomBackupConfig
|
|
36
42
|
}
|
|
37
43
|
|
|
38
44
|
export interface OrgBackupShares {
|
|
@@ -51,6 +57,7 @@ export interface BackupData {
|
|
|
51
57
|
export interface BackupResult {
|
|
52
58
|
backupIds: string[]
|
|
53
59
|
cipherText: string
|
|
60
|
+
encryptionKey?: string
|
|
54
61
|
}
|
|
55
62
|
|
|
56
63
|
export interface Address {
|
|
@@ -62,6 +69,41 @@ export interface Address {
|
|
|
62
69
|
export interface BackupResponse {
|
|
63
70
|
cipherText: string
|
|
64
71
|
storageCallback: () => Promise<void>
|
|
72
|
+
encryptionKey?: string
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export interface BackupShareResult {
|
|
76
|
+
cipherText: string
|
|
77
|
+
encryptionKey: string
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export interface PasskeyOptions {
|
|
81
|
+
/**
|
|
82
|
+
* Toggle legacy popup behaviour. Defaults to true to preserve existing integrations.
|
|
83
|
+
*/
|
|
84
|
+
usePopup?: boolean
|
|
85
|
+
/**
|
|
86
|
+
* Fully qualified domain or hostname that hosts passkey endpoints.
|
|
87
|
+
* Example: `passkeys.wigwam.app`
|
|
88
|
+
*/
|
|
89
|
+
customDomain?: string
|
|
90
|
+
/**
|
|
91
|
+
* Human-friendly name rendered in the browser passkey prompt.
|
|
92
|
+
*/
|
|
93
|
+
relyingPartyName?: string
|
|
94
|
+
/**
|
|
95
|
+
* Override the relying party ID. Useful when the TBS domain differs from the browser origin.
|
|
96
|
+
* Example: Use `localhost` when testing locally against a staging TBS.
|
|
97
|
+
*/
|
|
98
|
+
relyingPartyId?: string
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export interface BackupOptions extends PasskeyOptions {
|
|
102
|
+
/**
|
|
103
|
+
* Backup method to use when running combined flows.
|
|
104
|
+
* Defaults to `BackupMethods.passkey` for direct passkey flows.
|
|
105
|
+
*/
|
|
106
|
+
backupMethod?: BackupMethods
|
|
65
107
|
}
|
|
66
108
|
|
|
67
109
|
export interface Balance {
|
|
@@ -73,18 +115,7 @@ export interface SendAssetParams {
|
|
|
73
115
|
amount: string
|
|
74
116
|
to: string
|
|
75
117
|
token: string
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
export interface SendAssetResponse {
|
|
79
|
-
transactionHash: string
|
|
80
|
-
metadata: {
|
|
81
|
-
amount?: string
|
|
82
|
-
lastValidBlockHeight?: string
|
|
83
|
-
rawAmount?: string
|
|
84
|
-
tokenAddress?: string
|
|
85
|
-
tokenDecimals?: number
|
|
86
|
-
tokenSymbol?: string
|
|
87
|
-
}
|
|
118
|
+
sponsorGas?: boolean
|
|
88
119
|
}
|
|
89
120
|
|
|
90
121
|
export interface FundParams {
|
|
@@ -468,6 +499,7 @@ export interface RequestArguments {
|
|
|
468
499
|
chainId?: string
|
|
469
500
|
method: RequestMethod
|
|
470
501
|
params?: unknown[] | SigningRequestParams
|
|
502
|
+
sponsorGas?: boolean
|
|
471
503
|
}
|
|
472
504
|
|
|
473
505
|
export interface RecoverArgs extends MpcOperationArgs {
|
|
@@ -502,6 +534,7 @@ export interface SignArgs {
|
|
|
502
534
|
method: string
|
|
503
535
|
params: string
|
|
504
536
|
rpcUrl: string
|
|
537
|
+
sponsorGas?: boolean
|
|
505
538
|
}
|
|
506
539
|
|
|
507
540
|
export interface SignData {
|