@chipi-stack/chipi-react 14.11.0 → 14.12.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/README.md +28 -0
- package/dist/hooks.js +12 -3
- package/dist/hooks.js.map +1 -1
- package/dist/hooks.mjs +12 -3
- package/dist/hooks.mjs.map +1 -1
- package/dist/index.d.mts +6 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +14 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +14 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -5
package/dist/hooks.mjs
CHANGED
|
@@ -701,7 +701,8 @@ function useTransfer(config3) {
|
|
|
701
701
|
throw new Error("externalUserId is required when usePasskey is true");
|
|
702
702
|
}
|
|
703
703
|
const passkeyKey = await passkeyAdapter.getWalletEncryptKey({
|
|
704
|
-
externalUserId: input.params.externalUserId
|
|
704
|
+
externalUserId: input.params.externalUserId,
|
|
705
|
+
credentialId: input.params.credentialId
|
|
705
706
|
});
|
|
706
707
|
if (passkeyKey) {
|
|
707
708
|
encryptKey = passkeyKey;
|
|
@@ -732,6 +733,8 @@ function useTransfer(config3) {
|
|
|
732
733
|
const {
|
|
733
734
|
usePasskey: _usePasskey,
|
|
734
735
|
externalUserId: _externalUserId,
|
|
736
|
+
// Client-only: scopes the WebAuthn prompt. Never sent to the API.
|
|
737
|
+
credentialId: _credentialId,
|
|
735
738
|
...transferParams
|
|
736
739
|
} = input.params;
|
|
737
740
|
return chipiSDK.transfer({
|
|
@@ -767,7 +770,8 @@ function useApprove() {
|
|
|
767
770
|
}
|
|
768
771
|
try {
|
|
769
772
|
const key = await passkeyAdapter.getWalletEncryptKey({
|
|
770
|
-
externalUserId: params.params.externalUserId
|
|
773
|
+
externalUserId: params.params.externalUserId,
|
|
774
|
+
credentialId: params.params.credentialId
|
|
771
775
|
});
|
|
772
776
|
if (!key) {
|
|
773
777
|
throw new Error("Passkey authentication was cancelled");
|
|
@@ -788,6 +792,8 @@ function useApprove() {
|
|
|
788
792
|
const {
|
|
789
793
|
usePasskey: _usePasskey,
|
|
790
794
|
externalUserId: _externalUserId,
|
|
795
|
+
// Client-only: scopes the WebAuthn prompt. Never sent to the API.
|
|
796
|
+
credentialId: _credentialId,
|
|
791
797
|
...approveParams
|
|
792
798
|
} = params.params;
|
|
793
799
|
return chipiSDK.approve({
|
|
@@ -1140,7 +1146,8 @@ function useCallAnyContract() {
|
|
|
1140
1146
|
}
|
|
1141
1147
|
try {
|
|
1142
1148
|
const key = await passkeyAdapter.getWalletEncryptKey({
|
|
1143
|
-
externalUserId: params.params.externalUserId
|
|
1149
|
+
externalUserId: params.params.externalUserId,
|
|
1150
|
+
credentialId: params.params.credentialId
|
|
1144
1151
|
});
|
|
1145
1152
|
if (!key) {
|
|
1146
1153
|
throw new Error("Passkey authentication was cancelled");
|
|
@@ -1162,6 +1169,8 @@ function useCallAnyContract() {
|
|
|
1162
1169
|
const {
|
|
1163
1170
|
usePasskey: _usePasskey,
|
|
1164
1171
|
externalUserId: _externalUserId,
|
|
1172
|
+
// Client-only: scopes the WebAuthn prompt. Never sent to the API.
|
|
1173
|
+
credentialId: _credentialId,
|
|
1165
1174
|
...contractParams
|
|
1166
1175
|
} = params.params;
|
|
1167
1176
|
return chipiSDK.callAnyContract({
|