@silencelaboratories/walletprovider-sdk
    Preparing search index...

    Class NetworkSigner

    The networkSigner contains an API to communicate with the Silent MPC Network. Call to sign and keygen require the Auth module, that is used to prompt the User before executing the request.

    Index

    Constructors

    Properties

    authModule: AuthModule | undefined

    Authentication module, used to get confirmation from the User before request execution

    Wallet Provider backend client

    Methods

    • Add new ephemeral key to an exist distributed key on the network. Uses authModule to authenticate the request by the User.

      Parameters

      • keyIdList: string[]

        the list of key id returned from keygen

      • eph_claim: EphKeyClaim

        the claim to be added

      Returns Promise<AddEphKeyResponse[]>

      AddEphKeyResponse

    • Generate a distributed key that's generated by Silent Network. Uses authModule to authenticate the User with the Silent Network.

      Parameters

      • threshold: number

        Number of nodes that needs to participate in protocol in order to generate valid signature. Also known as t.

      • totalNodes: number

        Number of nodes that participate in keygen operation. Also known as n.

      • signAlgs: string[]

        signature algorithms for which MPC keys will be generated.

      • OptionalephClaim: EphKeyClaim
      • Optionalpermissions: string

        optional permissions that will be stored in the key metadata. The permissions are validated during sign requests.

      Returns Promise<KeygenResponse[]>

      KeygenResponse containing keyId and the pubKey public part of the key

    • Refreshes the secret key shares without changing the common public key of the distributed key that's generated by Silent Network. Uses authModule to authenticate the User with the Silent Network.

      Parameters

      • threshold: number

        Number of nodes that needs to participate in protocol in order to generate valid signature. Also known as t.

      • keyId: string

        the key id returned from keygen

      • signAlg: MPCSignAlgorithm

        signature algorithm of the refresh key.

      Returns Promise<KeygenResponse>

      KeyRefreshResponse containing keyId, pubKey, signAlg

    • Register new user's passkey on the network. This will try to register to all the available nodes on the network. Uses authModule to authenticate the request by the User.

      Parameters

      • Optionaloptions: string

        the options to customize the passkey authentication

      Returns Promise<RegisterPasskeyResponse>

      RegisterPasskeyResponse

    • Revoke ephemeral key of an exist distributed key on the network. Uses authModule to authenticate the request by the User.

      Parameters

      • keyId: string

        the key id returned from keygen

      • eph_claim: EphKeyClaim

        the claim to be revoked

      Returns Promise<RevokeEphKeyResponse>

      RevokeEphKeyResponse

    • Generate a signature by the distributed key of Silent Network. Uses authModule to authenticate the sign request by the User. The network chooses t nodes to execute the protocol.

      Parameters

      • threshold: number

        Number of nodes that needs to participate in protocol in order to generate valid signature. Also known as t.

      • keyId: string

        the key id returned from keygen

      • signAlg: MPCSignAlgorithm

        the signature algorithm to use for MPC signing, different form signAlg inside EphKeyClaim

      • signRequest: string

        the sign request containing the transaction id, request type and message to sign

      Returns Promise<SignResponse[]>

      SignResponse

    • Parameters

      • __namedParameters: { threshold?: number; totalNodes?: number }

      Returns void