clubcard
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

ClubCard

Programmable ownership

Transferrable ownership

Threshold ownership

  • ClubCardERC20.sol: allow holders of a minimum balance of ERC-20 tokens to sign transactions
  • ClubCardERC1155.sol: allow holders of a minimum balance of ERC-1155 tokens to sign transactions

Programmable ownership

  • ClubCardBase.sol: implement custom ownership terms by extending this abstract contract

EIP-1271 signatures

ClubCardBase implements the EIP-1271 interface. It validates that a given ECDSA signature is from the expected account where the expected account is derived using the isCardHolder that inheriting contracts must implement.

Additionally, it supports validation of EIP-1271 contract signatures, which are expected to be given in the following format based on ECDSA {r, s, v} components with v = 0 as the recovery identifier:

0x000000000000000000000000<20 bytes smart contract address>>>>>>>>  // r component: the address of signing EIP-1271 contract
  0000000000000000000000000000000000000000000000000000000000000041  // s component: constant 65 bytes offset to signature data
  00                                                                // v component: constant unpadded `0` as recovery identifier
  00000000000000000000000000000000<length of signature data bytes>
  <bytes of signature data ....>

/clubcard/

    Package Sidebar

    Install

    npm i clubcard

    Weekly Downloads

    1

    Version

    1.0.2

    License

    LGPL-3.0

    Unpacked Size

    600 kB

    Total Files

    228

    Last publish

    Collaborators

    • jfschwarz