@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

    • Delete user's key policy on the network. This will try to delete to all the available nodes on the network. Uses authModule to authenticate the request by the User.

      Parameters

      • keyId: string

        the key id returned from keygen

      Returns Promise<SimpleResponse>

      DeletePolicyResponse

    • 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
      • Optionalpolicy: Policy

        optional policy that will be stored in the key metadata. The policy 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

    • 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<SimpleResponse>

      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

    • Update user's key policy on the network. This will try to update to all the available nodes on the network. Uses authModule to authenticate the request by the User.

      Parameters

      • keyId: string

        the key id returned from keygen

      • policy: Policy

        the key policy to be updated

      Returns Promise<SimpleResponse>

      UpdatePolicyResponse

    • Parameters

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

      Returns void