1.0.0 • Published 7 months ago

@xmtp/consent-proof-signature v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
7 months ago

Consent Proof Signature

Usage

// Sign the message for example with Viem
import { createWalletClient, custom } from "viem";

const timestamp = Date.now();
const message = createConsentMessage(broadcastAddress, timestamp);

const walletClient = createWalletClient({
  chain: mainnet,
  transport: custom((window as any).ethereum!),
});
const [account] = await walletClient.getAddresses();
const signature = await walletClient.signMessage({
  account,
  message,
});
const consentProofBytes = createConsentProofPayload(signature, timestamp);

Now the consentProofBytes can be encoded and sent to a service to decode and add in a new conversation invitation

1.0.0

7 months ago

0.1.4

8 months ago

0.1.3

1 year ago

0.1.2

1 year ago

0.1.1

1 year ago

0.1.0

1 year ago