UNPKG

mina-attestations

Version:
20 lines (19 loc) 933 B
/** * Native signature credential */ import { PrivateKey, PublicKey, Signature } from 'o1js'; import { type StoredCredential, type Credential, type CredentialSpec } from './credential.ts'; import { type InferNestedProvable, NestedProvable } from './nested.ts'; import type { Json } from './types.ts'; export { Native, createNative, type NativeWitness }; type NativeWitness = { type: 'native'; issuer: PublicKey; issuerSignature: Signature; }; type Native<Data> = StoredCredential<Data, NativeWitness>; declare function Native<DataType extends NestedProvable>(dataType: DataType): CredentialSpec<NativeWitness, InferNestedProvable<DataType>>; declare namespace Native { var issuer: (issuer: PublicKey) => import("node_modules/o1js/dist/node/lib/provable/field.js").Field; } declare function createNative<Data>(issuerPrivateKey: PrivateKey, credentialInput: Credential<Data> | string, metadata?: Json): Native<Data>;