# SDK reference

A source-generated companion to the [Nibgate guides](https://docs.nibgate.xyz). Covers **27 implemented client methods and one standalone metadata validator**, extracted from SDK 0.4.40 at [345fc04](https://github.com/fortunesayspump/nibgate/tree/345fc04b984f01366cbe2a9f4064f22268d5d3f6/).

Built with Sourcey 3.9.0 using its Markdown adapter. Exact signatures come from the TypeScript declarations; behavior notes and examples are checked against the JavaScript implementation. This is a selected browser SDK reference, not full coverage of server, tracking, testing, wallet or tip APIs.


## Start {#start}


```sh
npm install @nibgate/sdk@0.4.40
```

```typescript
import { createNibgate, validateResourceMetadata } from '@nibgate/sdk';
const client = createNibgate();
const resource = { id: 'article-1', title: 'Example article', type: 'article', price: '1' };
const validation = validateResourceMetadata(resource);
client.content(validation.resource);
```

Events are telemetry. Keep protected content behind server verification; emitting unlockCompleted is not proof of payment. Browser event methods return false when queued or when no browser exists. Payment examples require app-provided wallet callbacks and must run only on intentional user action.


## Coverage and known issues {#coverage-and-known-issues}


The declaration contains 28 client methods but validateResourceMetadata is not wired into the client at runtime; import it separately. Transfer types are referenced but undeclared. The rating UI click handler has a boolean/Promise mismatch. Read each method's notes before use.

- [gate](https://docs.nibgate.xyz/sdk-reference/pages/api/gate.md) — client-method
- [content](https://docs.nibgate.xyz/sdk-reference/pages/api/content.md) — client-method
- [registerContent](https://docs.nibgate.xyz/sdk-reference/pages/api/registercontent.md) — client-method
- [view](https://docs.nibgate.xyz/sdk-reference/pages/api/view.md) — client-method
- [track](https://docs.nibgate.xyz/sdk-reference/pages/api/track.md) — client-method
- [unlockStarted](https://docs.nibgate.xyz/sdk-reference/pages/api/unlockstarted.md) — client-method
- [unlockCompleted](https://docs.nibgate.xyz/sdk-reference/pages/api/unlockcompleted.md) — client-method
- [paymentCompleted](https://docs.nibgate.xyz/sdk-reference/pages/api/paymentcompleted.md) — client-method
- [rateResource](https://docs.nibgate.xyz/sdk-reference/pages/api/rateresource.md) — client-method
- [trackResourcePage](https://docs.nibgate.xyz/sdk-reference/pages/api/trackresourcepage.md) — client-method
- [checkResourceAccess](https://docs.nibgate.xyz/sdk-reference/pages/api/checkresourceaccess.md) — client-method
- [payWithPaymentSignature](https://docs.nibgate.xyz/sdk-reference/pages/api/paywithpaymentsignature.md) — client-method
- [createWalletCheckout](https://docs.nibgate.xyz/sdk-reference/pages/api/createwalletcheckout.md) — client-method
- [createCircleGatewayBrowserAdapter](https://docs.nibgate.xyz/sdk-reference/pages/api/createcirclegatewaybrowseradapter.md) — client-method
- [createTransferCheckout](https://docs.nibgate.xyz/sdk-reference/pages/api/createtransfercheckout.md) — client-method
- [payWithTransfer](https://docs.nibgate.xyz/sdk-reference/pages/api/paywithtransfer.md) — client-method
- [createEvmGatewayUnlock](https://docs.nibgate.xyz/sdk-reference/pages/api/createevmgatewayunlock.md) — client-method
- [createHostedUnlock](https://docs.nibgate.xyz/sdk-reference/pages/api/createhostedunlock.md) — client-method
- [rateContentOnchain](https://docs.nibgate.xyz/sdk-reference/pages/api/ratecontentonchain.md) — client-method
- [createOnchainRating](https://docs.nibgate.xyz/sdk-reference/pages/api/createonchainrating.md) — client-method
- [mountRatingUI](https://docs.nibgate.xyz/sdk-reference/pages/api/mountratingui.md) — client-method
- [payAndUnlockResource](https://docs.nibgate.xyz/sdk-reference/pages/api/payandunlockresource.md) — client-method
- [setupResourcePage](https://docs.nibgate.xyz/sdk-reference/pages/api/setupresourcepage.md) — client-method
- [ratingMessage](https://docs.nibgate.xyz/sdk-reference/pages/api/ratingmessage.md) — client-method
- [normalizeResource](https://docs.nibgate.xyz/sdk-reference/pages/api/normalizeresource.md) — client-method
- [validateResourceMetadata](https://docs.nibgate.xyz/sdk-reference/pages/api/validateresourcemetadata.md) — standalone-function
- [normalizeContentType](https://docs.nibgate.xyz/sdk-reference/pages/api/normalizecontenttype.md) — client-method
- [flush](https://docs.nibgate.xyz/sdk-reference/pages/api/flush.md) — client-method
