LIT-Protocol / Issues-and-Reports

For bug reports, feature requests, and implementation questions related to Lit Protocol and use of the Lit SDK.
0 stars 0 forks source link

[Genius] [Slack] Error when minting PKPs through relayer #21

Closed spacesailor24 closed 3 weeks ago

spacesailor24 commented 3 weeks ago

Description of the issue

Just passing the auth method works:

const txHash = await provider.mintPKPThroughRelayer(currentAuthMethod);

but when trying to pass additional params:

const txHash = await provider.mintPKPThroughRelayer(currentAuthMethod, {
    permittedAuthMethodScopes: [[AuthMethodScope.SignAnything], [AuthMethodScope.SignAnything]],
    addPkpEthAddressAsPermittedAddress: true,
});

or

const txHash = await provider.mintPKPThroughRelayer(currentAuthMethod!, {
    keyType: 1,
    permittedAuthMethodTypes: [currentAuthMethod!.authMethodType, 2],
    permittedAuthMethodIds: [authMethodId],
    permittedAuthMethodPubkeys: ['0x', '0x'],
    permittedAuthMethodScopes: [[AuthMethodScope.SignAnything], [AuthMethodScope.SignAnything]],
    addPkpEthAddressAsPermittedAddress: true,
    sendPkpToItself: false,
});

the following error is thrown:

image

Additional context

No response

spacesailor24 commented 3 weeks ago

An additional authMethodId is missing from permittedAuthMethodIds since there are two items given for permittedAuthMethodTypes, permittedAuthMethodPubkeys, and permittedAuthMethodScopes, the relayer isn't able to correctly map the data to the contract call