feat(ios): hashcash in swift (#8602)

This commit is contained in:
Brooooooklyn
2024-10-29 08:40:15 +00:00
parent efee4dfd66
commit 5709ebbb11
10 changed files with 152 additions and 9 deletions

View File

@@ -0,0 +1,6 @@
export interface HashcashPlugin {
hash(options: {
challenge: string;
bits?: number;
}): Promise<{ value: string }>;
}

View File

@@ -0,0 +1,8 @@
import { registerPlugin } from '@capacitor/core';
import type { HashcashPlugin } from './definitions';
const Hashcash = registerPlugin<HashcashPlugin>('Hashcash');
export * from './definitions';
export { Hashcash };