# Function build

- build(__namedParameters: {
  addSignature?: boolean;
  audience: string;
  dependencies: {
  crypto: Crypto.Implementation;
  };
  expiration?: number;
  facts?: Fact[];
  issuer: string;
  lifetimeInSeconds?: number;
  potency?: Potency;
  proof?: string | Ucan;
  resource?: Resource;
  }): Promise<Ucan>

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

  ### Header

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

  ### Payload

  `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.

  #### Parameters

  - ##### __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;
      }

      - ##### 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>

  - Defined in ucan/token.ts:31

Generated using TypeDoc