prividium 1.3.0 → 1.3.1
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.
package/README.md
CHANGED
|
@@ -417,6 +417,22 @@ interface PrividiumSiweConfig {
|
|
|
417
417
|
browser-only), plus `address` (the wallet address derived from the account) and an `admin` namespace for permissions-API
|
|
418
418
|
administration operations.
|
|
419
419
|
|
|
420
|
+
### Fetching contract ABI: `prividium.fetchContractAbi(address)`
|
|
421
|
+
|
|
422
|
+
Fetches the ABI and function metadata for a registered contract.
|
|
423
|
+
|
|
424
|
+
```typescript
|
|
425
|
+
const result = await prividium.fetchContractAbi('0xCONTRACT_ADDRESS');
|
|
426
|
+
// result.abi — the contract ABI array
|
|
427
|
+
// result.functions — list of { selector, signature, name, accessType }
|
|
428
|
+
```
|
|
429
|
+
|
|
430
|
+
**Parameters:**
|
|
431
|
+
|
|
432
|
+
- `contractAddress: Address` — address of the contract to look up
|
|
433
|
+
|
|
434
|
+
**Returns:** `Promise<ContractAbiResponse>` — includes `contractAddress`, `name`, `abi`, and `functions`.
|
|
435
|
+
|
|
420
436
|
### Admin API: `prividium.admin.*`
|
|
421
437
|
|
|
422
438
|
The `admin` namespace on a `PrividiumSiweChain` instance wraps permissions-API endpoints that require admin
|
package/dist/sdk/siwe-chain.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type Address, type Chain, type LocalAccount, type Transport } from 'viem';
|
|
2
2
|
import { type AdminMethods } from './admin-api/index.js';
|
|
3
|
-
import type { AuthorizeTransactionParams, AuthorizeTransactionResponse, Storage, TokenData, UserProfile } from './types.js';
|
|
3
|
+
import type { AuthorizeTransactionParams, AuthorizeTransactionResponse, ContractAbiResponse, Storage, TokenData, UserProfile } from './types.js';
|
|
4
4
|
export interface PrividiumSiweConfig {
|
|
5
5
|
chain: Omit<Chain, 'rpcUrls'>;
|
|
6
6
|
prividiumApiBaseUrl: string;
|
|
@@ -25,6 +25,7 @@ export interface PrividiumSiweChain {
|
|
|
25
25
|
getWalletRpcUrl(): Promise<string>;
|
|
26
26
|
invalidateWalletToken(): Promise<string>;
|
|
27
27
|
authorizeTransaction(params: AuthorizeTransactionParams): Promise<AuthorizeTransactionResponse>;
|
|
28
|
+
fetchContractAbi(contractAddress: Address): Promise<ContractAbiResponse>;
|
|
28
29
|
admin: AdminMethods;
|
|
29
30
|
}
|
|
30
31
|
export declare function createPrividiumSiweChain(config: PrividiumSiweConfig): PrividiumSiweChain;
|
package/dist/sdk/siwe-chain.js
CHANGED
|
@@ -173,6 +173,7 @@ export function createPrividiumSiweChain(config) {
|
|
|
173
173
|
getWalletRpcUrl: apiMethods.getWalletRpcUrl,
|
|
174
174
|
invalidateWalletToken: apiMethods.invalidateWalletToken,
|
|
175
175
|
authorizeTransaction: apiMethods.authorizeTransaction,
|
|
176
|
+
fetchContractAbi: apiMethods.fetchContractAbi,
|
|
176
177
|
admin
|
|
177
178
|
};
|
|
178
179
|
}
|