Function build

  • Create a UCAN, User Controlled Authorization Networks, JWT. This JWT can be used for authorization.


    alg, Algorithm, the type of signature. typ, Type, the type of this data structure, JWT. uav, UCAN version.


    aud, Audience, the ID of who it's intended for. exp, Expiry, unix timestamp of when the jwt is no longer valid. iss, Issuer, the ID of who sent this. nbf, Not Before, unix timestamp of when the jwt becomes valid. prf, Proof, an optional nested token with equal or greater privileges. ptc, Potency, which rights come with the token. rsc, Resource, the involved resource.


    • __namedParameters: {
          addSignature?: boolean;
          audience: string;
          dependencies: {
              crypto: Crypto.Implementation;
          expiration?: number;
          facts?: Fact[];
          issuer: string;
          lifetimeInSeconds?: number;
          potency?: Potency;
          proof?: string | Ucan;
          resource?: Resource;
      • Optional addSignature?: boolean
      • audience: string
      • dependencies: {
            crypto: Crypto.Implementation;
      • Optional expiration?: number
      • Optional facts?: Fact[]
      • issuer: string
      • Optional lifetimeInSeconds?: number
      • Optional potency?: Potency
      • Optional proof?: string | Ucan
      • Optional resource?: Resource

    Returns Promise<Ucan>

Generated using TypeDoc