@obscura-fhe/sdk 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/config/defaults.ts","../src/fhe/types.ts","../src/core/utils.ts","../src/core/http.ts","../src/core/chain.ts","../src/config/activity-filters.ts","../src/modules/activity.ts","../src/abis/index.ts","../src/modules/credit.ts","../src/modules/notifications.ts","../src/modules/pay.ts","../src/modules/reputation.ts","../src/modules/vote.ts","../src/client.ts"],"names":["arbitrumSepolia","createPublicClient","http","encodeFunctionData","createClient"],"mappings":";;;;;;;AAyBO,IAAM,yBAAA,GAA4B;AAElC,IAAM,eAAA,GAAkB;AACxB,IAAM,eAAA,GAAkB;AACxB,IAAM,oBAAA,GAAuB;AAE7B,IAAM,iBAAA,GAAsC;AAAA,EACjD,UAAA,EAAY,4CAAA;AAAA,EACZ,UAAA,EAAY,4CAAA;AAAA,EACZ,kBAAA,EAAoB,4CAAA;AAAA,EACpB,yBAAA,EAA2B,4CAAA;AAAA,EAC3B,cAAA,EAAgB,4CAAA;AAAA,EAChB,sBAAA,EAAwB,4CAAA;AAAA,EACxB,WAAA,EAAa,4CAAA;AAAA,EACb,eAAA,EAAiB,4CAAA;AAAA,EACjB,cAAA,EAAgB,4CAAA;AAAA,EAChB,oBAAA,EAAsB,4CAAA;AAAA,EACtB,mBAAA,EAAqB,4CAAA;AAAA,EACrB,gBAAA,EAAkB,4CAAA;AAAA,EAClB,oBAAA,EAAsB,4CAAA;AAAA,EACtB,oBAAA,EAAsB,4CAAA;AAAA,EACtB,8BAAA,EAAgC,4CAAA;AAAA,EAChC,oBAAA,EAAsB,4CAAA;AAAA,EACtB,gBAAA,EAAkB,4CAAA;AAAA,EAClB,eAAA,EAAiB,4CAAA;AAAA,EACjB,eAAA,EAAiB;AACnB;AAEO,SAAS,eAAe,OAAA,EAAuD;AACpF,EAAA,OAAO,EAAE,GAAG,iBAAA,EAAmB,G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,KACZ;AAEA,IAAA,IAAA,CAAK,GAAA,GAAM,IAAI,SAAA,CAAU,UAAU,CAAA;AACnC,IAAA,IAAA,CAAK,MAAA,GAAS,IAAI,YAAA,CAAa;AAAA,MAC7B,SAAS,IAAA,CAAK,OAAA;AAAA,MACd,WAAW,IAAA,CAAK,SAAA;AAAA,MAChB,KAAK,IAAA,CAAK;AAAA,KACX,CAAA;AACD,IAAA,IAAA,CAAK,IAAA,GAAO,IAAI,UAAA,CAAW,UAAU,CAAA;AACrC,IAAA,IAAA,CAAK,UAAA,GAAa,IAAI,gBAAA,CAAiBA,KAAI,CAAA;AAC3C,IAAA,IAAA,CAAK,aAAA,GAAgB,IAAI,mBAAA,CAAoBA,KAAI,CAAA;AACjD,IAAA,IAAA,CAAK,WAAW,IAAI,cAAA;AAAA,MAClB,OAAO,WAAA,IAAe,oBAAA;AAAA,MACtB,MAAA,CAAO;AAAA,KACT;AAAA,EACF;AAAA,EAEA,OAAO,MAAA,CAAO,MAAA,GAA2B,EAAC,EAAe;AACvD,IAAA,OAAO,IAAI,YAAW,MAAM,CAAA;AAAA,EAC9B;AAAA,EAEA,WAAW,IAAA,EAAyB;AAClC,IAAA,OAAO,WAAW,IAAI,CAAA;AAAA,EACxB;AAAA,EAEA,MAAM,QAAA,CAAS,IAAA,EAAoB,OAAA,EAAgC;AACjE,IAAA,IAAI,CAAC,KAAK,YAAA,EAAc;AACtB,MAAA,MAAM,IAAI,MAAM,+EAA+E,CAAA;AAAA,IACjG;AACA,IAAA,OAAO,gBAAA,CAAiB,IAAA,EAAM,IAAA,CAAK,YAAA,EAAc,OAAO,CAAA;AAAA,EAC1D;AACF","file":"index.cjs","sourcesContent":["import type { Address } from \"viem\";\r\n\r\n/** Arbitrum Sepolia deployment snapshot — sync from contracts-hardhat/deployments/arb-sepolia.json */\r\nexport interface ObscuraAddresses {\r\n ocUSDC_Pay: Address;\r\n ObscuraPay: Address;\r\n ObscuraPayStreamV3: Address;\r\n ObscuraConfidentialEscrow: Address;\r\n ObscuraInvoice: Address;\r\n ObscuraStealthRegistry: Address;\r\n ObscuraVote: Address;\r\n ObscuraTreasury: Address;\r\n ObscuraRewards: Address;\r\n ObscuraCreditFactory: Address;\r\n ObscuraCreditOracle: Address;\r\n ObscuraCreditIRM: Address;\r\n ObscuraCreditAuction: Address;\r\n ObscuraCreditScoreV2: Address;\r\n CreditCanonicalPayOcUSDCMarket: Address;\r\n v2_ConservativeVault: Address;\r\n v2_BalancedVault: Address;\r\n ObscuraGovernor: Address;\r\n ObscuraTimelock: Address;\r\n}\r\n\r\nexport const ARBITRUM_SEPOLIA_CHAIN_ID = 421614;\r\n\r\nexport const DEFAULT_RPC_URL = \"https://sepolia-rollup.arbitrum.io/rpc\";\r\nexport const DEFAULT_API_URL = \"https://obscura-api-n62v.onrender.com\";\r\nexport const DEFAULT_SUPABASE_URL = \"https://quoovjkjwgtdqwdofubh.supabase.co\";\r\n\r\nexport const DEFAULT_ADDRESSES: ObscuraAddresses = {\r\n ocUSDC_Pay: \"0xEd46020Df8abe7BB1E096f27d089F4326D223a53\",\r\n ObscuraPay: \"0x91CdD9a481C732bEB09Ce039da23DC11e83547a4\",\r\n ObscuraPayStreamV3: \"0xE4328F139F03138D63f7fdF90A8Ef240e04653fA\",\r\n ObscuraConfidentialEscrow: \"0x293810A2081114CcE0c98A709a0c31aE07c01D75\",\r\n ObscuraInvoice: \"0x62a86C8d68fF32ea41Faf349db6EF7EF496620b7\",\r\n ObscuraStealthRegistry: \"0xa36e791a611D36e2C817a7DA0f41547D30D4917d\",\r\n ObscuraVote: \"0xe358776AfdbA95d7c9F040e6ef1f5A021aF91730\",\r\n ObscuraTreasury: \"0x89252ee3f920978EEfDB650760fe56BA1Ede8c08\",\r\n ObscuraRewards: \"0x435ea117404553A6868fbe728A7A284FCEd15BC2\",\r\n ObscuraCreditFactory: \"0x5aDC1965D155f4b18119222CBA7a7A4be4F45680\",\r\n ObscuraCreditOracle: \"0x5F00910533AB6fc12a35a87BaFe856EF2cb323c3\",\r\n ObscuraCreditIRM: \"0xA072c038cE98dEC8F5350D451145fB98F5EA57Bc\",\r\n ObscuraCreditAuction: \"0x205FfC0A3b8207B645c1a6B1b4805eb3FfC828F0\",\r\n ObscuraCreditScoreV2: \"0xe5B0c6c06C0B1fd7d7CD5D2e93997693863d3D4D\",\r\n CreditCanonicalPayOcUSDCMarket: \"0x1Ec113297c7F9516A6604aa3b18C180559a6f551\",\r\n v2_ConservativeVault: \"0xCEBb042ae8FDE217a9FdE5b8a82E23827FdBB898\",\r\n v2_BalancedVault: \"0xF508315bD4C5EC4c71C5E431AE972C0dC6B78Bbc\",\r\n ObscuraGovernor: \"0xE4807C9F90a0da8F5B5bafa4361B15ff855b7186\",\r\n ObscuraTimelock: \"0x07b7961627f433a1d9001F82Ac4af9F19b9a9E05\",\r\n};\r\n\r\nexport function mergeAddresses(partial?: Partial<ObscuraAddresses>): ObscuraAddresses {\r\n return { ...DEFAULT_ADDRESSES, ...partial };\r\n}\r\n","import type { Address } from \"viem\";\r\nimport type { InEuint64 } from \"../types/index.js\";\r\n\r\nexport interface FheEncryptOptions {\r\n contractAddress: Address;\r\n onStep?: (step: string) => void;\r\n}\r\n\r\n/** Injectable FHE adapter — host supplies @cofhe/sdk or custom implementation */\r\nexport interface FheProvider {\r\n encryptUint64(value: bigint, options: FheEncryptOptions): Promise<InEuint64>;\r\n decryptCtHash?(ctHash: bigint, contractAddress: Address): Promise<bigint>;\r\n}\r\n\r\nexport class FheRequiredError extends Error {\r\n constructor(operation: string) {\r\n super(\r\n `FHE provider required for ${operation}. Pass fhe in ObscuraSDK.create() or supply a pre-encrypted InEuint64.`,\r\n );\r\n this.name = \"FheRequiredError\";\r\n }\r\n}\r\n","import type { Address } from \"viem\";\r\nimport type { FheProvider } from \"../fhe/types.js\";\r\nimport type { InEuint64 } from \"../types/index.js\";\r\nimport { FheRequiredError } from \"../fhe/types.js\";\r\n\r\nexport async function resolveInEuint64(\r\n value: bigint,\r\n contractAddress: Address,\r\n fhe: FheProvider | undefined,\r\n preEncrypted?: InEuint64,\r\n): Promise<InEuint64> {\r\n if (preEncrypted) return preEncrypted;\r\n if (!fhe) throw new FheRequiredError(\"encrypted amount\");\r\n return fhe.encryptUint64(value, { contractAddress });\r\n}\r\n\r\n/** Serialize InEuint64 for viem contract args (bigint ctHash) */\r\nexport function toContractInEuint64(input: InEuint64): {\r\n ctHash: bigint;\r\n securityZone: number;\r\n utype: number;\r\n signature: `0x${string}`;\r\n} {\r\n return {\r\n ctHash: input.ctHash,\r\n securityZone: input.securityZone,\r\n utype: input.utype,\r\n signature: input.signature,\r\n };\r\n}\r\n\r\nexport function normalizeWallet(wallet: string): Address | null {\r\n if (!/^0x[0-9a-fA-F]{40}$/.test(wallet)) return null;\r\n return wallet.toLowerCase() as Address;\r\n}\r\n\r\nexport function stripTrailingSlash(url: string): string {\r\n return url.replace(/\\/$/, \"\");\r\n}\r\n","import { stripTrailingSlash } from \"./utils.js\";\r\n\r\nexport class HttpClient {\r\n constructor(private readonly baseUrl: string) {}\r\n\r\n get url(): string {\r\n return stripTrailingSlash(this.baseUrl);\r\n }\r\n\r\n async get<T>(path: string, init?: RequestInit): Promise<T> {\r\n const response = await fetch(`${this.url}${path}`, {\r\n ...init,\r\n method: \"GET\",\r\n headers: { Accept: \"application/json\", ...init?.headers },\r\n });\r\n if (!response.ok) {\r\n const body = await response.text().catch(() => \"\");\r\n throw new HttpError(response.status, `GET ${path} failed (${response.status})${body ? `: ${body}` : \"\"}`);\r\n }\r\n return response.json() as Promise<T>;\r\n }\r\n\r\n async post<T>(path: string, body: unknown, init?: RequestInit): Promise<T> {\r\n const response = await fetch(`${this.url}${path}`, {\r\n ...init,\r\n method: \"POST\",\r\n headers: {\r\n Accept: \"application/json\",\r\n \"Content-Type\": \"application/json\",\r\n ...init?.headers,\r\n },\r\n body: JSON.stringify(body),\r\n });\r\n if (!response.ok) {\r\n const text = await response.text().catch(() => \"\");\r\n throw new HttpError(response.status, `POST ${path} failed (${response.status})${text ? `: ${text}` : \"\"}`);\r\n }\r\n return response.json() as Promise<T>;\r\n }\r\n\r\n async delete<T>(path: string, body?: unknown, init?: RequestInit): Promise<T> {\r\n const response = await fetch(`${this.url}${path}`, {\r\n ...init,\r\n method: \"DELETE\",\r\n headers: {\r\n Accept: \"application/json\",\r\n \"Content-Type\": \"application/json\",\r\n ...init?.headers,\r\n },\r\n body: body !== undefined ? JSON.stringify(body) : undefined,\r\n });\r\n if (!response.ok) {\r\n const text = await response.text().catch(() => \"\");\r\n throw new HttpError(response.status, `DELETE ${path} failed (${response.status})${text ? `: ${text}` : \"\"}`);\r\n }\r\n return response.json() as Promise<T>;\r\n }\r\n}\r\n\r\nexport class HttpError extends Error {\r\n constructor(\r\n readonly status: number,\r\n message: string,\r\n ) {\r\n super(message);\r\n this.name = \"HttpError\";\r\n }\r\n}\r\n","import {\r\n createPublicClient,\r\n encodeFunctionData,\r\n http,\r\n type Abi,\r\n type Address,\r\n type Chain,\r\n type Hex,\r\n type PublicClient,\r\n type WalletClient,\r\n} from \"viem\";\r\nimport { arbitrumSepolia } from \"viem/chains\";\r\nimport { ARBITRUM_SEPOLIA_CHAIN_ID, DEFAULT_RPC_URL } from \"../config/defaults.js\";\r\nimport type { ContractCall } from \"../types/index.js\";\r\n\r\nexport function resolveChain(chainId: number): Chain {\r\n if (chainId === ARBITRUM_SEPOLIA_CHAIN_ID) return arbitrumSepolia;\r\n return {\r\n ...arbitrumSepolia,\r\n id: chainId,\r\n };\r\n}\r\n\r\nexport function createDefaultPublicClient(rpcUrl: string, chainId: number): PublicClient {\r\n return createPublicClient({\r\n chain: resolveChain(chainId),\r\n transport: http(rpcUrl || DEFAULT_RPC_URL),\r\n });\r\n}\r\n\r\nexport function encodeCall(call: ContractCall): Hex {\r\n return encodeFunctionData({\r\n abi: call.abi as Abi,\r\n functionName: call.functionName,\r\n args: [...call.args],\r\n });\r\n}\r\n\r\nexport async function sendContractCall(\r\n call: ContractCall,\r\n walletClient: WalletClient,\r\n account: Address,\r\n): Promise<Hex> {\r\n const hash = await walletClient.writeContract({\r\n address: call.address,\r\n abi: call.abi as Abi,\r\n functionName: call.functionName,\r\n args: [...call.args],\r\n chain: resolveChain(call.chainId),\r\n account,\r\n });\r\n return hash;\r\n}\r\n\r\nexport function makeCall(\r\n chainId: number,\r\n address: Address,\r\n abi: readonly unknown[],\r\n functionName: string,\r\n args: readonly unknown[],\r\n): ContractCall {\r\n return { address, abi, functionName, args, chainId };\r\n}\r\n","import type { ActivityEventType } from \"../types/index.js\";\r\n\r\nconst CREDIT_ACTIVITY_EVENT_NAMES = [\r\n \"ObscuraCreditMarket.Supplied\",\r\n \"ObscuraCreditMarket.Withdrawn\",\r\n \"ObscuraCreditMarket.Borrowed\",\r\n \"ObscuraCreditMarket.Repaid\",\r\n \"ObscuraCreditMarket.Liquidated\",\r\n \"ObscuraCreditMarket.CollateralSupplied\",\r\n \"ObscuraCreditMarket.CollateralWithdrawn\",\r\n \"ObscuraCreditVault.Deposited\",\r\n \"ObscuraCreditVault.Withdrew\",\r\n \"ObscuraCreditAuction.AuctionCreated\",\r\n \"ObscuraCreditAuction.BidPlaced\",\r\n \"ObscuraCreditAuction.AuctionSettled\",\r\n \"ObscuraCreditScoreV2.ScoreUpdated\",\r\n];\r\n\r\nconst VOTE_ACTIVITY_EVENT_NAMES = [\r\n \"ObscuraVote.ProposalCreated\",\r\n \"ObscuraVote.VoteCast\",\r\n \"ObscuraVote.VoteChanged\",\r\n \"ObscuraVote.Delegated\",\r\n \"ObscuraVote.DelegationRemoved\",\r\n \"ObscuraVote.ProposalFinalized\",\r\n \"ObscuraTreasury.SpendAttached\",\r\n \"ObscuraTreasury.SpendExecuted\",\r\n \"ObscuraRewards.RewardAccrued\",\r\n \"ObscuraRewards.RewardWithdrawn\",\r\n];\r\n\r\nexport const ACTIVITY_EVENT_FILTERS: Record<ActivityEventType, readonly string[]> = {\r\n all: [],\r\n sent: [\"ObscuraPay.PaymentSent\"],\r\n received: [\"ObscuraPay.PaymentReceived\"],\r\n stream: [\r\n \"ObscuraPayStreamV2.StreamCreated\",\r\n \"ObscuraPayStreamV2.StreamCancelled\",\r\n \"ObscuraPayStreamV2.StreamWithdrawn\",\r\n \"ObscuraPayStreamV3.StreamCreated\",\r\n \"ObscuraPayStreamV3.StreamCancelled\",\r\n \"ObscuraPayStreamV3.CycleSettled\",\r\n ],\r\n invoice: [\"ObscuraInvoice.InvoiceCreated\", \"ObscuraInvoice.InvoicePaid\"],\r\n escrow: [\r\n \"ObscuraConfidentialEscrow.EscrowCreated\",\r\n \"ObscuraConfidentialEscrow.EscrowFunded\",\r\n \"ObscuraConfidentialEscrow.EscrowRedeemed\",\r\n \"ObscuraConfidentialEscrow.EscrowCancelled\",\r\n \"ObscuraConfidentialEscrow.EscrowRefunded\",\r\n ],\r\n stealth: [\"ObscuraStealthRegistry.Announcement\", \"ObscuraStealthRegistry.MetaAddressSet\"],\r\n credit: CREDIT_ACTIVITY_EVENT_NAMES,\r\n vote: VOTE_ACTIVITY_EVENT_NAMES,\r\n};\r\n\r\nexport type ActivityEventFilterMap = typeof ACTIVITY_EVENT_FILTERS;\r\n","import { createClient, type SupabaseClient } from \"@supabase/supabase-js\";\r\nimport type { Address } from \"viem\";\r\nimport { ACTIVITY_EVENT_FILTERS, type ActivityEventFilterMap } from \"../config/activity-filters.js\";\r\nimport { normalizeWallet } from \"../core/utils.js\";\r\nimport type {\r\n ActivityEventType,\r\n ActivityItem,\r\n ActivityListOptions,\r\n ActivityListResult,\r\n} from \"../types/index.js\";\r\n\r\nconst DEFAULT_PAGE_SIZE = 20;\r\n\r\nexport class ActivityModule {\r\n private readonly client: SupabaseClient | null;\r\n\r\n constructor(supabaseUrl: string | undefined, supabaseAnonKey: string | undefined) {\r\n this.client =\r\n supabaseUrl && supabaseAnonKey ? createClient(supabaseUrl, supabaseAnonKey) : null;\r\n }\r\n\r\n getEventFilters(): ActivityEventFilterMap {\r\n return ACTIVITY_EVENT_FILTERS;\r\n }\r\n\r\n async listForWallet(wallet: Address, options: ActivityListOptions = {}): Promise<ActivityListResult> {\r\n if (!this.client) {\r\n throw new Error(\r\n \"Supabase not configured. Pass supabaseUrl and supabaseAnonKey to ObscuraSDK.create().\",\r\n );\r\n }\r\n\r\n const normalized = normalizeWallet(wallet);\r\n if (!normalized) throw new Error(\"Invalid wallet address\");\r\n\r\n const filter: ActivityEventType = options.filter ?? \"all\";\r\n const page = options.page ?? 0;\r\n const pageSize = options.pageSize ?? DEFAULT_PAGE_SIZE;\r\n\r\n let query = this.client\r\n .from(\"obscura_activity\")\r\n .select(\"*\")\r\n .contains(\"participants\", [normalized])\r\n .order(\"block_number\", { ascending: false })\r\n .range(page * pageSize, page * pageSize + pageSize - 1);\r\n\r\n const allowed = ACTIVITY_EVENT_FILTERS[filter];\r\n if (allowed.length > 0) {\r\n query = query.in(\"event_name\", [...allowed]);\r\n }\r\n\r\n const { data, error } = await query;\r\n if (error) throw new Error(error.message);\r\n\r\n const items = (data ?? []) as ActivityItem[];\r\n\r\n return {\r\n items,\r\n page,\r\n pageSize,\r\n hasMore: items.length === pageSize,\r\n };\r\n }\r\n}\r\n","/** Minimal ABI fragments for SDK v1 transaction builders and reads */\r\n\r\nexport const IN_EUINT64_COMPONENTS = [\r\n { name: \"ctHash\", type: \"uint256\" },\r\n { name: \"securityZone\", type: \"uint8\" },\r\n { name: \"utype\", type: \"uint8\" },\r\n { name: \"signature\", type: \"bytes\" },\r\n] as const;\r\n\r\nexport const OC_USDC_PAY_ABI = [\r\n {\r\n name: \"confidentialBalanceOf\",\r\n type: \"function\",\r\n stateMutability: \"view\",\r\n inputs: [{ name: \"account\", type: \"address\" }],\r\n outputs: [{ name: \"\", type: \"uint256\" }],\r\n },\r\n {\r\n name: \"shield\",\r\n type: \"function\",\r\n stateMutability: \"nonpayable\",\r\n inputs: [\r\n { name: \"amount\", type: \"uint256\" },\r\n { name: \"encryptedAmount\", type: \"tuple\", components: [...IN_EUINT64_COMPONENTS] },\r\n ],\r\n outputs: [],\r\n },\r\n {\r\n name: \"unshield\",\r\n type: \"function\",\r\n stateMutability: \"nonpayable\",\r\n inputs: [\r\n { name: \"to\", type: \"address\" },\r\n { name: \"encryptedAmount\", type: \"tuple\", components: [...IN_EUINT64_COMPONENTS] },\r\n ],\r\n outputs: [],\r\n },\r\n {\r\n name: \"confidentialTransfer\",\r\n type: \"function\",\r\n stateMutability: \"nonpayable\",\r\n inputs: [\r\n { name: \"to\", type: \"address\" },\r\n { name: \"encryptedAmount\", type: \"tuple\", components: [...IN_EUINT64_COMPONENTS] },\r\n ],\r\n outputs: [],\r\n },\r\n] as const;\r\n\r\nexport const CREDIT_MARKET_ABI = [\r\n {\r\n name: \"supplyCollateral\",\r\n type: \"function\",\r\n stateMutability: \"nonpayable\",\r\n inputs: [\r\n { name: \"encryptedAmount\", type: \"tuple\", components: [...IN_EUINT64_COMPONENTS] },\r\n ],\r\n outputs: [],\r\n },\r\n {\r\n name: \"borrow\",\r\n type: \"function\",\r\n stateMutability: \"nonpayable\",\r\n inputs: [\r\n { name: \"encryptedAmount\", type: \"tuple\", components: [...IN_EUINT64_COMPONENTS] },\r\n ],\r\n outputs: [],\r\n },\r\n {\r\n name: \"repay\",\r\n type: \"function\",\r\n stateMutability: \"nonpayable\",\r\n inputs: [\r\n { name: \"encryptedAmount\", type: \"tuple\", components: [...IN_EUINT64_COMPONENTS] },\r\n ],\r\n outputs: [],\r\n },\r\n] as const;\r\n\r\nexport const OBSCURA_VOTE_ABI = [\r\n {\r\n name: \"proposalCount\",\r\n type: \"function\",\r\n stateMutability: \"view\",\r\n inputs: [],\r\n outputs: [{ name: \"\", type: \"uint256\" }],\r\n },\r\n {\r\n name: \"getProposal\",\r\n type: \"function\",\r\n stateMutability: \"view\",\r\n inputs: [{ name: \"proposalId\", type: \"uint256\" }],\r\n outputs: [\r\n { name: \"creator\", type: \"address\" },\r\n { name: \"title\", type: \"string\" },\r\n { name: \"description\", type: \"string\" },\r\n { name: \"options\", type: \"string[]\" },\r\n { name: \"startTime\", type: \"uint256\" },\r\n { name: \"endTime\", type: \"uint256\" },\r\n { name: \"finalized\", type: \"bool\" },\r\n { name: \"winningOption\", type: \"uint256\" },\r\n ],\r\n },\r\n {\r\n name: \"castVote\",\r\n type: \"function\",\r\n stateMutability: \"nonpayable\",\r\n inputs: [\r\n { name: \"proposalId\", type: \"uint256\" },\r\n { name: \"encryptedOption\", type: \"tuple\", components: [...IN_EUINT64_COMPONENTS] },\r\n ],\r\n outputs: [],\r\n },\r\n {\r\n name: \"delegate\",\r\n type: \"function\",\r\n stateMutability: \"nonpayable\",\r\n inputs: [{ name: \"delegatee\", type: \"address\" }],\r\n outputs: [],\r\n },\r\n] as const;\r\n","import type { Address } from \"viem\";\r\nimport { CREDIT_MARKET_ABI } from \"../abis/index.js\";\r\nimport { makeCall } from \"../core/chain.js\";\r\nimport { resolveInEuint64, toContractInEuint64 } from \"../core/utils.js\";\r\nimport type { ObscuraAddresses } from \"../config/defaults.js\";\r\nimport type { FheProvider } from \"../fhe/types.js\";\r\nimport type { ContractCall, InEuint64 } from \"../types/index.js\";\r\n\r\nexport interface CreditModuleDeps {\r\n chainId: number;\r\n addresses: ObscuraAddresses;\r\n fhe?: FheProvider;\r\n}\r\n\r\nexport class CreditModule {\r\n constructor(private readonly deps: CreditModuleDeps) {}\r\n\r\n getMarketAddress(override?: Address): Address {\r\n return override ?? this.deps.addresses.CreditCanonicalPayOcUSDCMarket;\r\n }\r\n\r\n async buildSupplyCollateral(\r\n amount: bigint,\r\n encryptedAmount?: InEuint64,\r\n marketAddress?: Address,\r\n ): Promise<ContractCall> {\r\n const market = this.getMarketAddress(marketAddress);\r\n const enc = await resolveInEuint64(amount, market, this.deps.fhe, encryptedAmount);\r\n return makeCall(this.deps.chainId, market, CREDIT_MARKET_ABI, \"supplyCollateral\", [\r\n toContractInEuint64(enc),\r\n ]);\r\n }\r\n\r\n async buildBorrow(\r\n amount: bigint,\r\n encryptedAmount?: InEuint64,\r\n marketAddress?: Address,\r\n ): Promise<ContractCall> {\r\n const market = this.getMarketAddress(marketAddress);\r\n const enc = await resolveInEuint64(amount, market, this.deps.fhe, encryptedAmount);\r\n return makeCall(this.deps.chainId, market, CREDIT_MARKET_ABI, \"borrow\", [\r\n toContractInEuint64(enc),\r\n ]);\r\n }\r\n\r\n async buildRepay(\r\n amount: bigint,\r\n encryptedAmount?: InEuint64,\r\n marketAddress?: Address,\r\n ): Promise<ContractCall> {\r\n const market = this.getMarketAddress(marketAddress);\r\n const enc = await resolveInEuint64(amount, market, this.deps.fhe, encryptedAmount);\r\n return makeCall(this.deps.chainId, market, CREDIT_MARKET_ABI, \"repay\", [\r\n toContractInEuint64(enc),\r\n ]);\r\n }\r\n}\r\n","import type { Address } from \"viem\";\r\nimport { HttpClient, HttpError } from \"../core/http.js\";\r\nimport { normalizeWallet } from \"../core/utils.js\";\r\nimport type { NotificationPrefs, PushSubscriptionJSON } from \"../types/index.js\";\r\n\r\ninterface VapidResponse {\r\n publicKey: string;\r\n}\r\n\r\ninterface OkResponse {\r\n ok: boolean;\r\n}\r\n\r\nexport class NotificationsModule {\r\n constructor(private readonly http: HttpClient) {}\r\n\r\n async getVapidPublicKey(): Promise<string> {\r\n const { publicKey } = await this.http.get<VapidResponse>(\"/vapid-public-key\");\r\n return publicKey;\r\n }\r\n\r\n async getPrefs(wallet: Address): Promise<NotificationPrefs | null> {\r\n const normalized = normalizeWallet(wallet);\r\n if (!normalized) throw new Error(\"Invalid wallet address\");\r\n\r\n try {\r\n return await this.http.get<NotificationPrefs>(`/prefs/${normalized}`);\r\n } catch (err) {\r\n if (err instanceof HttpError && err.status === 404) return null;\r\n throw err;\r\n }\r\n }\r\n\r\n async savePrefs(prefs: NotificationPrefs): Promise<void> {\r\n const normalized = normalizeWallet(prefs.wallet);\r\n if (!normalized) throw new Error(\"Invalid wallet address\");\r\n\r\n await this.http.post<OkResponse>(\"/prefs\", {\r\n ...prefs,\r\n wallet: normalized,\r\n });\r\n }\r\n\r\n async subscribe(wallet: Address, subscription: PushSubscriptionJSON): Promise<void> {\r\n const normalized = normalizeWallet(wallet);\r\n if (!normalized) throw new Error(\"Invalid wallet address\");\r\n if (!subscription?.endpoint) throw new Error(\"subscription.endpoint is required\");\r\n\r\n await this.http.post<OkResponse>(\"/subscribe\", { wallet: normalized, subscription });\r\n }\r\n\r\n async unsubscribe(wallet: Address): Promise<void> {\r\n const normalized = normalizeWallet(wallet);\r\n if (!normalized) throw new Error(\"Invalid wallet address\");\r\n\r\n await this.http.delete<OkResponse>(\"/subscribe\", { wallet: normalized });\r\n }\r\n}\r\n","import type { Address, PublicClient } from \"viem\";\r\nimport { OC_USDC_PAY_ABI } from \"../abis/index.js\";\r\nimport { makeCall } from \"../core/chain.js\";\r\nimport { resolveInEuint64, toContractInEuint64 } from \"../core/utils.js\";\r\nimport type { ObscuraAddresses } from \"../config/defaults.js\";\r\nimport type { FheProvider } from \"../fhe/types.js\";\r\nimport type { ContractCall, InEuint64 } from \"../types/index.js\";\r\n\r\nexport interface PayModuleDeps {\r\n chainId: number;\r\n addresses: ObscuraAddresses;\r\n publicClient: PublicClient;\r\n fhe?: FheProvider;\r\n}\r\n\r\nexport class PayModule {\r\n constructor(private readonly deps: PayModuleDeps) {}\r\n\r\n get ocUsdcAddress(): Address {\r\n return this.deps.addresses.ocUSDC_Pay;\r\n }\r\n\r\n /** Returns encrypted balance ctHash (uint256) for account */\r\n async getShieldedBalance(account: Address): Promise<bigint> {\r\n return this.deps.publicClient.readContract({\r\n address: this.deps.addresses.ocUSDC_Pay,\r\n abi: OC_USDC_PAY_ABI,\r\n functionName: \"confidentialBalanceOf\",\r\n args: [account],\r\n }) as Promise<bigint>;\r\n }\r\n\r\n async buildShield(\r\n amount: bigint,\r\n encryptedAmount?: InEuint64,\r\n ): Promise<ContractCall> {\r\n const enc = await resolveInEuint64(\r\n amount,\r\n this.deps.addresses.ocUSDC_Pay,\r\n this.deps.fhe,\r\n encryptedAmount,\r\n );\r\n return makeCall(\r\n this.deps.chainId,\r\n this.deps.addresses.ocUSDC_Pay,\r\n OC_USDC_PAY_ABI,\r\n \"shield\",\r\n [amount, toContractInEuint64(enc)],\r\n );\r\n }\r\n\r\n async buildUnshield(\r\n to: Address,\r\n amount: bigint,\r\n encryptedAmount?: InEuint64,\r\n ): Promise<ContractCall> {\r\n const enc = await resolveInEuint64(\r\n amount,\r\n this.deps.addresses.ocUSDC_Pay,\r\n this.deps.fhe,\r\n encryptedAmount,\r\n );\r\n return makeCall(\r\n this.deps.chainId,\r\n this.deps.addresses.ocUSDC_Pay,\r\n OC_USDC_PAY_ABI,\r\n \"unshield\",\r\n [to, toContractInEuint64(enc)],\r\n );\r\n }\r\n\r\n async buildTransfer(\r\n to: Address,\r\n amount: bigint,\r\n encryptedAmount?: InEuint64,\r\n ): Promise<ContractCall> {\r\n const enc = await resolveInEuint64(\r\n amount,\r\n this.deps.addresses.ocUSDC_Pay,\r\n this.deps.fhe,\r\n encryptedAmount,\r\n );\r\n return makeCall(\r\n this.deps.chainId,\r\n this.deps.addresses.ocUSDC_Pay,\r\n OC_USDC_PAY_ABI,\r\n \"confidentialTransfer\",\r\n [to, toContractInEuint64(enc)],\r\n );\r\n }\r\n}\r\n","import type { Address } from \"viem\";\r\nimport type { HttpClient } from \"../core/http.js\";\r\nimport { normalizeWallet } from \"../core/utils.js\";\r\nimport type { ReputationSummary } from \"../types/index.js\";\r\n\r\nexport class ReputationModule {\r\n constructor(private readonly http: HttpClient) {}\r\n\r\n async getSummary(wallet: Address): Promise<ReputationSummary> {\r\n const normalized = normalizeWallet(wallet);\r\n if (!normalized) {\r\n throw new Error(\"Invalid wallet address\");\r\n }\r\n return this.http.get<ReputationSummary>(`/reputation/${normalized}`);\r\n }\r\n}\r\n","import type { Address, PublicClient } from \"viem\";\r\nimport { OBSCURA_VOTE_ABI } from \"../abis/index.js\";\r\nimport { makeCall } from \"../core/chain.js\";\r\nimport { resolveInEuint64, toContractInEuint64 } from \"../core/utils.js\";\r\nimport type { ObscuraAddresses } from \"../config/defaults.js\";\r\nimport type { FheProvider } from \"../fhe/types.js\";\r\nimport type { ContractCall, InEuint64, ProposalState } from \"../types/index.js\";\r\n\r\nexport interface VoteModuleDeps {\r\n chainId: number;\r\n addresses: ObscuraAddresses;\r\n publicClient: PublicClient;\r\n fhe?: FheProvider;\r\n}\r\n\r\nexport class VoteModule {\r\n constructor(private readonly deps: VoteModuleDeps) {}\r\n\r\n get voteAddress(): Address {\r\n return this.deps.addresses.ObscuraVote;\r\n }\r\n\r\n async getProposalCount(): Promise<bigint> {\r\n return this.deps.publicClient.readContract({\r\n address: this.deps.addresses.ObscuraVote,\r\n abi: OBSCURA_VOTE_ABI,\r\n functionName: \"proposalCount\",\r\n }) as Promise<bigint>;\r\n }\r\n\r\n async getProposal(id: bigint): Promise<ProposalState> {\r\n const result = (await this.deps.publicClient.readContract({\r\n address: this.deps.addresses.ObscuraVote,\r\n abi: OBSCURA_VOTE_ABI,\r\n functionName: \"getProposal\",\r\n args: [id],\r\n })) as readonly [Address, string, string, string[], bigint, bigint, boolean, bigint];\r\n\r\n return {\r\n id,\r\n creator: result[0],\r\n title: result[1],\r\n description: result[2],\r\n options: [...result[3]],\r\n startTime: result[4],\r\n endTime: result[5],\r\n finalized: result[6],\r\n winningOption: result[7],\r\n };\r\n }\r\n\r\n async buildCastVote(\r\n proposalId: bigint,\r\n optionIndex: number,\r\n encryptedOption?: InEuint64,\r\n ): Promise<ContractCall> {\r\n const enc = await resolveInEuint64(\r\n BigInt(optionIndex),\r\n this.deps.addresses.ObscuraVote,\r\n this.deps.fhe,\r\n encryptedOption,\r\n );\r\n return makeCall(\r\n this.deps.chainId,\r\n this.deps.addresses.ObscuraVote,\r\n OBSCURA_VOTE_ABI,\r\n \"castVote\",\r\n [proposalId, toContractInEuint64(enc)],\r\n );\r\n }\r\n\r\n buildDelegate(delegatee: Address): ContractCall {\r\n return makeCall(\r\n this.deps.chainId,\r\n this.deps.addresses.ObscuraVote,\r\n OBSCURA_VOTE_ABI,\r\n \"delegate\",\r\n [delegatee],\r\n );\r\n }\r\n}\r\n","import type { Address, Hex, PublicClient, WalletClient } from \"viem\";\r\nimport {\r\n ARBITRUM_SEPOLIA_CHAIN_ID,\r\n DEFAULT_API_URL,\r\n DEFAULT_RPC_URL,\r\n DEFAULT_SUPABASE_URL,\r\n mergeAddresses,\r\n type ObscuraAddresses,\r\n} from \"./config/defaults.js\";\r\nimport { HttpClient } from \"./core/http.js\";\r\nimport {\r\n createDefaultPublicClient,\r\n encodeCall,\r\n sendContractCall,\r\n} from \"./core/chain.js\";\r\nimport type { FheProvider } from \"./fhe/types.js\";\r\nimport { ActivityModule } from \"./modules/activity.js\";\r\nimport { CreditModule } from \"./modules/credit.js\";\r\nimport { NotificationsModule } from \"./modules/notifications.js\";\r\nimport { PayModule } from \"./modules/pay.js\";\r\nimport { ReputationModule } from \"./modules/reputation.js\";\r\nimport { VoteModule } from \"./modules/vote.js\";\r\nimport type { ContractCall, ObscuraSDKConfig } from \"./types/index.js\";\r\n\r\nexport class ObscuraSDK {\r\n readonly chainId: number;\r\n readonly addresses: ObscuraAddresses;\r\n readonly publicClient: PublicClient;\r\n readonly fhe?: FheProvider;\r\n\r\n readonly pay: PayModule;\r\n readonly credit: CreditModule;\r\n readonly vote: VoteModule;\r\n readonly reputation: ReputationModule;\r\n readonly activity: ActivityModule;\r\n readonly notifications: NotificationsModule;\r\n\r\n private readonly walletClient?: WalletClient;\r\n\r\n private constructor(config: ObscuraSDKConfig) {\r\n this.chainId = config.chainId ?? ARBITRUM_SEPOLIA_CHAIN_ID;\r\n this.addresses = mergeAddresses(config.addresses);\r\n this.fhe = config.fhe;\r\n this.walletClient = config.walletClient;\r\n\r\n const rpcUrl = config.rpcUrl ?? DEFAULT_RPC_URL;\r\n this.publicClient = config.publicClient ?? createDefaultPublicClient(rpcUrl, this.chainId);\r\n\r\n const apiUrl = config.apiUrl ?? DEFAULT_API_URL;\r\n const http = new HttpClient(apiUrl);\r\n\r\n const moduleDeps = {\r\n chainId: this.chainId,\r\n addresses: this.addresses,\r\n publicClient: this.publicClient,\r\n fhe: this.fhe,\r\n };\r\n\r\n this.pay = new PayModule(moduleDeps);\r\n this.credit = new CreditModule({\r\n chainId: this.chainId,\r\n addresses: this.addresses,\r\n fhe: this.fhe,\r\n });\r\n this.vote = new VoteModule(moduleDeps);\r\n this.reputation = new ReputationModule(http);\r\n this.notifications = new NotificationsModule(http);\r\n this.activity = new ActivityModule(\r\n config.supabaseUrl ?? DEFAULT_SUPABASE_URL,\r\n config.supabaseAnonKey,\r\n );\r\n }\r\n\r\n static create(config: ObscuraSDKConfig = {}): ObscuraSDK {\r\n return new ObscuraSDK(config);\r\n }\r\n\r\n encodeCall(call: ContractCall): Hex {\r\n return encodeCall(call);\r\n }\r\n\r\n async sendCall(call: ContractCall, account: Address): Promise<Hex> {\r\n if (!this.walletClient) {\r\n throw new Error(\"walletClient required for sendCall. Pass walletClient in ObscuraSDK.create().\");\r\n }\r\n return sendContractCall(call, this.walletClient, account);\r\n }\r\n}\r\n"]}
@@ -0,0 +1,488 @@
1
+ import * as viem from 'viem';
2
+ import { Address, PublicClient, Hex } from 'viem';
3
+
4
+ /** Arbitrum Sepolia deployment snapshot — sync from contracts-hardhat/deployments/arb-sepolia.json */
5
+ interface ObscuraAddresses {
6
+ ocUSDC_Pay: Address;
7
+ ObscuraPay: Address;
8
+ ObscuraPayStreamV3: Address;
9
+ ObscuraConfidentialEscrow: Address;
10
+ ObscuraInvoice: Address;
11
+ ObscuraStealthRegistry: Address;
12
+ ObscuraVote: Address;
13
+ ObscuraTreasury: Address;
14
+ ObscuraRewards: Address;
15
+ ObscuraCreditFactory: Address;
16
+ ObscuraCreditOracle: Address;
17
+ ObscuraCreditIRM: Address;
18
+ ObscuraCreditAuction: Address;
19
+ ObscuraCreditScoreV2: Address;
20
+ CreditCanonicalPayOcUSDCMarket: Address;
21
+ v2_ConservativeVault: Address;
22
+ v2_BalancedVault: Address;
23
+ ObscuraGovernor: Address;
24
+ ObscuraTimelock: Address;
25
+ }
26
+ declare const ARBITRUM_SEPOLIA_CHAIN_ID = 421614;
27
+ declare const DEFAULT_RPC_URL = "https://sepolia-rollup.arbitrum.io/rpc";
28
+ declare const DEFAULT_API_URL = "https://obscura-api-n62v.onrender.com";
29
+ declare const DEFAULT_SUPABASE_URL = "https://quoovjkjwgtdqwdofubh.supabase.co";
30
+ declare const DEFAULT_ADDRESSES: ObscuraAddresses;
31
+
32
+ type ReputationTier = "new" | "active" | "steady" | "reliable";
33
+ type ReputationSourceApp = "all" | "pay" | "credit" | "vote";
34
+ interface ReputationSignalSummary {
35
+ label: string;
36
+ count: number;
37
+ cappedWeight: number;
38
+ latestAt: string | null;
39
+ }
40
+ interface ReputationSummary {
41
+ wallet: Address;
42
+ sourceApp: ReputationSourceApp;
43
+ totalCappedWeight: number;
44
+ tier: ReputationTier;
45
+ signals: Record<string, ReputationSignalSummary>;
46
+ sources?: Record<string, number>;
47
+ updatedAt: string | null;
48
+ }
49
+ interface NotificationPrefs {
50
+ wallet: Address;
51
+ push_enabled: boolean;
52
+ email_enabled: boolean;
53
+ email?: string;
54
+ events: string[];
55
+ }
56
+ interface PushSubscriptionJSON {
57
+ endpoint: string;
58
+ expirationTime?: number | null;
59
+ keys: {
60
+ p256dh: string;
61
+ auth: string;
62
+ };
63
+ }
64
+ type ActivityEventType = "all" | "sent" | "received" | "stream" | "invoice" | "escrow" | "stealth" | "credit" | "vote";
65
+ interface ActivityItem {
66
+ id: number;
67
+ chain_id: number;
68
+ block_number: string;
69
+ tx_hash: string;
70
+ log_index: number;
71
+ contract_address: string;
72
+ event_name: string;
73
+ wallet: string;
74
+ participants: string[];
75
+ args: Record<string, unknown>;
76
+ created_at: string;
77
+ }
78
+ interface ActivityListOptions {
79
+ filter?: ActivityEventType;
80
+ page?: number;
81
+ pageSize?: number;
82
+ }
83
+ interface ActivityListResult {
84
+ items: ActivityItem[];
85
+ page: number;
86
+ pageSize: number;
87
+ hasMore: boolean;
88
+ }
89
+ /** FHE encrypted uint64 input tuple for contract calls */
90
+ interface InEuint64 {
91
+ ctHash: bigint;
92
+ securityZone: number;
93
+ utype: number;
94
+ signature: `0x${string}`;
95
+ }
96
+ interface ContractCall {
97
+ address: Address;
98
+ abi: readonly unknown[];
99
+ functionName: string;
100
+ args: readonly unknown[];
101
+ chainId: number;
102
+ }
103
+ interface ProposalState {
104
+ id: bigint;
105
+ creator: Address;
106
+ title: string;
107
+ description: string;
108
+ options: string[];
109
+ startTime: bigint;
110
+ endTime: bigint;
111
+ finalized: boolean;
112
+ winningOption: bigint;
113
+ }
114
+ interface ObscuraSDKConfig {
115
+ chainId?: number;
116
+ rpcUrl?: string;
117
+ apiUrl?: string;
118
+ supabaseUrl?: string;
119
+ supabaseAnonKey?: string;
120
+ addresses?: Partial<ObscuraAddresses>;
121
+ publicClient?: viem.PublicClient;
122
+ walletClient?: viem.WalletClient;
123
+ fhe?: FheProvider;
124
+ }
125
+
126
+ interface FheEncryptOptions {
127
+ contractAddress: Address;
128
+ onStep?: (step: string) => void;
129
+ }
130
+ /** Injectable FHE adapter — host supplies @cofhe/sdk or custom implementation */
131
+ interface FheProvider {
132
+ encryptUint64(value: bigint, options: FheEncryptOptions): Promise<InEuint64>;
133
+ decryptCtHash?(ctHash: bigint, contractAddress: Address): Promise<bigint>;
134
+ }
135
+ declare class FheRequiredError extends Error {
136
+ constructor(operation: string);
137
+ }
138
+
139
+ declare const ACTIVITY_EVENT_FILTERS: Record<ActivityEventType, readonly string[]>;
140
+ type ActivityEventFilterMap = typeof ACTIVITY_EVENT_FILTERS;
141
+
142
+ declare class ActivityModule {
143
+ private readonly client;
144
+ constructor(supabaseUrl: string | undefined, supabaseAnonKey: string | undefined);
145
+ getEventFilters(): ActivityEventFilterMap;
146
+ listForWallet(wallet: Address, options?: ActivityListOptions): Promise<ActivityListResult>;
147
+ }
148
+
149
+ interface CreditModuleDeps {
150
+ chainId: number;
151
+ addresses: ObscuraAddresses;
152
+ fhe?: FheProvider;
153
+ }
154
+ declare class CreditModule {
155
+ private readonly deps;
156
+ constructor(deps: CreditModuleDeps);
157
+ getMarketAddress(override?: Address): Address;
158
+ buildSupplyCollateral(amount: bigint, encryptedAmount?: InEuint64, marketAddress?: Address): Promise<ContractCall>;
159
+ buildBorrow(amount: bigint, encryptedAmount?: InEuint64, marketAddress?: Address): Promise<ContractCall>;
160
+ buildRepay(amount: bigint, encryptedAmount?: InEuint64, marketAddress?: Address): Promise<ContractCall>;
161
+ }
162
+
163
+ declare class HttpClient {
164
+ private readonly baseUrl;
165
+ constructor(baseUrl: string);
166
+ get url(): string;
167
+ get<T>(path: string, init?: RequestInit): Promise<T>;
168
+ post<T>(path: string, body: unknown, init?: RequestInit): Promise<T>;
169
+ delete<T>(path: string, body?: unknown, init?: RequestInit): Promise<T>;
170
+ }
171
+ declare class HttpError extends Error {
172
+ readonly status: number;
173
+ constructor(status: number, message: string);
174
+ }
175
+
176
+ declare class NotificationsModule {
177
+ private readonly http;
178
+ constructor(http: HttpClient);
179
+ getVapidPublicKey(): Promise<string>;
180
+ getPrefs(wallet: Address): Promise<NotificationPrefs | null>;
181
+ savePrefs(prefs: NotificationPrefs): Promise<void>;
182
+ subscribe(wallet: Address, subscription: PushSubscriptionJSON): Promise<void>;
183
+ unsubscribe(wallet: Address): Promise<void>;
184
+ }
185
+
186
+ interface PayModuleDeps {
187
+ chainId: number;
188
+ addresses: ObscuraAddresses;
189
+ publicClient: PublicClient;
190
+ fhe?: FheProvider;
191
+ }
192
+ declare class PayModule {
193
+ private readonly deps;
194
+ constructor(deps: PayModuleDeps);
195
+ get ocUsdcAddress(): Address;
196
+ /** Returns encrypted balance ctHash (uint256) for account */
197
+ getShieldedBalance(account: Address): Promise<bigint>;
198
+ buildShield(amount: bigint, encryptedAmount?: InEuint64): Promise<ContractCall>;
199
+ buildUnshield(to: Address, amount: bigint, encryptedAmount?: InEuint64): Promise<ContractCall>;
200
+ buildTransfer(to: Address, amount: bigint, encryptedAmount?: InEuint64): Promise<ContractCall>;
201
+ }
202
+
203
+ declare class ReputationModule {
204
+ private readonly http;
205
+ constructor(http: HttpClient);
206
+ getSummary(wallet: Address): Promise<ReputationSummary>;
207
+ }
208
+
209
+ interface VoteModuleDeps {
210
+ chainId: number;
211
+ addresses: ObscuraAddresses;
212
+ publicClient: PublicClient;
213
+ fhe?: FheProvider;
214
+ }
215
+ declare class VoteModule {
216
+ private readonly deps;
217
+ constructor(deps: VoteModuleDeps);
218
+ get voteAddress(): Address;
219
+ getProposalCount(): Promise<bigint>;
220
+ getProposal(id: bigint): Promise<ProposalState>;
221
+ buildCastVote(proposalId: bigint, optionIndex: number, encryptedOption?: InEuint64): Promise<ContractCall>;
222
+ buildDelegate(delegatee: Address): ContractCall;
223
+ }
224
+
225
+ declare class ObscuraSDK {
226
+ readonly chainId: number;
227
+ readonly addresses: ObscuraAddresses;
228
+ readonly publicClient: PublicClient;
229
+ readonly fhe?: FheProvider;
230
+ readonly pay: PayModule;
231
+ readonly credit: CreditModule;
232
+ readonly vote: VoteModule;
233
+ readonly reputation: ReputationModule;
234
+ readonly activity: ActivityModule;
235
+ readonly notifications: NotificationsModule;
236
+ private readonly walletClient?;
237
+ private constructor();
238
+ static create(config?: ObscuraSDKConfig): ObscuraSDK;
239
+ encodeCall(call: ContractCall): Hex;
240
+ sendCall(call: ContractCall, account: Address): Promise<Hex>;
241
+ }
242
+
243
+ declare function createDefaultPublicClient(rpcUrl: string, chainId: number): PublicClient;
244
+ declare function encodeCall(call: ContractCall): Hex;
245
+
246
+ /** Serialize InEuint64 for viem contract args (bigint ctHash) */
247
+ declare function toContractInEuint64(input: InEuint64): {
248
+ ctHash: bigint;
249
+ securityZone: number;
250
+ utype: number;
251
+ signature: `0x${string}`;
252
+ };
253
+ declare function normalizeWallet(wallet: string): Address | null;
254
+
255
+ declare const OC_USDC_PAY_ABI: readonly [{
256
+ readonly name: "confidentialBalanceOf";
257
+ readonly type: "function";
258
+ readonly stateMutability: "view";
259
+ readonly inputs: readonly [{
260
+ readonly name: "account";
261
+ readonly type: "address";
262
+ }];
263
+ readonly outputs: readonly [{
264
+ readonly name: "";
265
+ readonly type: "uint256";
266
+ }];
267
+ }, {
268
+ readonly name: "shield";
269
+ readonly type: "function";
270
+ readonly stateMutability: "nonpayable";
271
+ readonly inputs: readonly [{
272
+ readonly name: "amount";
273
+ readonly type: "uint256";
274
+ }, {
275
+ readonly name: "encryptedAmount";
276
+ readonly type: "tuple";
277
+ readonly components: readonly [{
278
+ readonly name: "ctHash";
279
+ readonly type: "uint256";
280
+ }, {
281
+ readonly name: "securityZone";
282
+ readonly type: "uint8";
283
+ }, {
284
+ readonly name: "utype";
285
+ readonly type: "uint8";
286
+ }, {
287
+ readonly name: "signature";
288
+ readonly type: "bytes";
289
+ }];
290
+ }];
291
+ readonly outputs: readonly [];
292
+ }, {
293
+ readonly name: "unshield";
294
+ readonly type: "function";
295
+ readonly stateMutability: "nonpayable";
296
+ readonly inputs: readonly [{
297
+ readonly name: "to";
298
+ readonly type: "address";
299
+ }, {
300
+ readonly name: "encryptedAmount";
301
+ readonly type: "tuple";
302
+ readonly components: readonly [{
303
+ readonly name: "ctHash";
304
+ readonly type: "uint256";
305
+ }, {
306
+ readonly name: "securityZone";
307
+ readonly type: "uint8";
308
+ }, {
309
+ readonly name: "utype";
310
+ readonly type: "uint8";
311
+ }, {
312
+ readonly name: "signature";
313
+ readonly type: "bytes";
314
+ }];
315
+ }];
316
+ readonly outputs: readonly [];
317
+ }, {
318
+ readonly name: "confidentialTransfer";
319
+ readonly type: "function";
320
+ readonly stateMutability: "nonpayable";
321
+ readonly inputs: readonly [{
322
+ readonly name: "to";
323
+ readonly type: "address";
324
+ }, {
325
+ readonly name: "encryptedAmount";
326
+ readonly type: "tuple";
327
+ readonly components: readonly [{
328
+ readonly name: "ctHash";
329
+ readonly type: "uint256";
330
+ }, {
331
+ readonly name: "securityZone";
332
+ readonly type: "uint8";
333
+ }, {
334
+ readonly name: "utype";
335
+ readonly type: "uint8";
336
+ }, {
337
+ readonly name: "signature";
338
+ readonly type: "bytes";
339
+ }];
340
+ }];
341
+ readonly outputs: readonly [];
342
+ }];
343
+ declare const CREDIT_MARKET_ABI: readonly [{
344
+ readonly name: "supplyCollateral";
345
+ readonly type: "function";
346
+ readonly stateMutability: "nonpayable";
347
+ readonly inputs: readonly [{
348
+ readonly name: "encryptedAmount";
349
+ readonly type: "tuple";
350
+ readonly components: readonly [{
351
+ readonly name: "ctHash";
352
+ readonly type: "uint256";
353
+ }, {
354
+ readonly name: "securityZone";
355
+ readonly type: "uint8";
356
+ }, {
357
+ readonly name: "utype";
358
+ readonly type: "uint8";
359
+ }, {
360
+ readonly name: "signature";
361
+ readonly type: "bytes";
362
+ }];
363
+ }];
364
+ readonly outputs: readonly [];
365
+ }, {
366
+ readonly name: "borrow";
367
+ readonly type: "function";
368
+ readonly stateMutability: "nonpayable";
369
+ readonly inputs: readonly [{
370
+ readonly name: "encryptedAmount";
371
+ readonly type: "tuple";
372
+ readonly components: readonly [{
373
+ readonly name: "ctHash";
374
+ readonly type: "uint256";
375
+ }, {
376
+ readonly name: "securityZone";
377
+ readonly type: "uint8";
378
+ }, {
379
+ readonly name: "utype";
380
+ readonly type: "uint8";
381
+ }, {
382
+ readonly name: "signature";
383
+ readonly type: "bytes";
384
+ }];
385
+ }];
386
+ readonly outputs: readonly [];
387
+ }, {
388
+ readonly name: "repay";
389
+ readonly type: "function";
390
+ readonly stateMutability: "nonpayable";
391
+ readonly inputs: readonly [{
392
+ readonly name: "encryptedAmount";
393
+ readonly type: "tuple";
394
+ readonly components: readonly [{
395
+ readonly name: "ctHash";
396
+ readonly type: "uint256";
397
+ }, {
398
+ readonly name: "securityZone";
399
+ readonly type: "uint8";
400
+ }, {
401
+ readonly name: "utype";
402
+ readonly type: "uint8";
403
+ }, {
404
+ readonly name: "signature";
405
+ readonly type: "bytes";
406
+ }];
407
+ }];
408
+ readonly outputs: readonly [];
409
+ }];
410
+ declare const OBSCURA_VOTE_ABI: readonly [{
411
+ readonly name: "proposalCount";
412
+ readonly type: "function";
413
+ readonly stateMutability: "view";
414
+ readonly inputs: readonly [];
415
+ readonly outputs: readonly [{
416
+ readonly name: "";
417
+ readonly type: "uint256";
418
+ }];
419
+ }, {
420
+ readonly name: "getProposal";
421
+ readonly type: "function";
422
+ readonly stateMutability: "view";
423
+ readonly inputs: readonly [{
424
+ readonly name: "proposalId";
425
+ readonly type: "uint256";
426
+ }];
427
+ readonly outputs: readonly [{
428
+ readonly name: "creator";
429
+ readonly type: "address";
430
+ }, {
431
+ readonly name: "title";
432
+ readonly type: "string";
433
+ }, {
434
+ readonly name: "description";
435
+ readonly type: "string";
436
+ }, {
437
+ readonly name: "options";
438
+ readonly type: "string[]";
439
+ }, {
440
+ readonly name: "startTime";
441
+ readonly type: "uint256";
442
+ }, {
443
+ readonly name: "endTime";
444
+ readonly type: "uint256";
445
+ }, {
446
+ readonly name: "finalized";
447
+ readonly type: "bool";
448
+ }, {
449
+ readonly name: "winningOption";
450
+ readonly type: "uint256";
451
+ }];
452
+ }, {
453
+ readonly name: "castVote";
454
+ readonly type: "function";
455
+ readonly stateMutability: "nonpayable";
456
+ readonly inputs: readonly [{
457
+ readonly name: "proposalId";
458
+ readonly type: "uint256";
459
+ }, {
460
+ readonly name: "encryptedOption";
461
+ readonly type: "tuple";
462
+ readonly components: readonly [{
463
+ readonly name: "ctHash";
464
+ readonly type: "uint256";
465
+ }, {
466
+ readonly name: "securityZone";
467
+ readonly type: "uint8";
468
+ }, {
469
+ readonly name: "utype";
470
+ readonly type: "uint8";
471
+ }, {
472
+ readonly name: "signature";
473
+ readonly type: "bytes";
474
+ }];
475
+ }];
476
+ readonly outputs: readonly [];
477
+ }, {
478
+ readonly name: "delegate";
479
+ readonly type: "function";
480
+ readonly stateMutability: "nonpayable";
481
+ readonly inputs: readonly [{
482
+ readonly name: "delegatee";
483
+ readonly type: "address";
484
+ }];
485
+ readonly outputs: readonly [];
486
+ }];
487
+
488
+ export { ACTIVITY_EVENT_FILTERS, ARBITRUM_SEPOLIA_CHAIN_ID, type ActivityEventFilterMap, type ActivityEventType, type ActivityItem, type ActivityListOptions, type ActivityListResult, ActivityModule, CREDIT_MARKET_ABI, type ContractCall, CreditModule, DEFAULT_ADDRESSES, DEFAULT_API_URL, DEFAULT_RPC_URL, DEFAULT_SUPABASE_URL, type FheEncryptOptions, type FheProvider, FheRequiredError, HttpError, type InEuint64, type NotificationPrefs, NotificationsModule, OBSCURA_VOTE_ABI, OC_USDC_PAY_ABI, type ObscuraAddresses, ObscuraSDK, type ObscuraSDKConfig, PayModule, type ProposalState, type PushSubscriptionJSON, ReputationModule, type ReputationSignalSummary, type ReputationSourceApp, type ReputationSummary, type ReputationTier, VoteModule, createDefaultPublicClient, encodeCall, normalizeWallet, toContractInEuint64 };