Documentation Index
Fetch the complete documentation index at: https://docs.spaceport.xyz/llms.txt
Use this file to discover all available pages before exploring further.
client.SpaceportSDK
Table of contents
Accessors
Methods
Properties
Accessors
agreements
• get agreements(): AgreementClient
Get the Agreements client instance
Returns
AgreementClient
assets
• get assets(): AssetClient
Get the Assets client instance
Returns
AssetClient
listings
• get listings(): ListingClient
Get the Listings client instance
Returns
ListingClient
smartLicenses
• get smartLicenses(): SmartLicenseClient
Get the Smart Licenses client instance
Returns
SmartLicenseClient
bondToken
• get bondToken(): BondTokenClient
Get the Bond Token client instance
Returns
BondTokenClient
users
• get users(): UserClient
Get the Users client instance
Returns
UserClient
products
• get products(): ProductClient
Get the Products client instance
Returns
ProductClient
royalties
• get royalties(): RoyaltyClient
Get the Royalties client instance
Returns
RoyaltyClient
invoices
• get invoices(): InvoiceClient
Get the Invoices client instance
Returns
InvoiceClient
query
• get query(): QueryClient
Get the Query client instance for querying indexed blockchain data
Returns
QueryClient
utils
• get utils(): SpaceportUtils
Get the Utils module instance
Returns
SpaceportUtils
constructor
• new SpaceportSDK(config): SpaceportSDK
Parameters
Returns
SpaceportSDK
Methods
create
▸ create(config?): SpaceportSDK
Create an instance of SpaceportClient
Parameters
| Name | Type | Description |
|---|
config | SpaceportConfig | Optional configuration options |
Returns
SpaceportSDK
A new instance of SpaceportClient
createWithWallet
▸ createWithWallet(ethereum, config?): SpaceportSDK
Create a new SDK instance with a wallet
Parameters
| Name | Type | Description |
|---|
ethereum | EthereumProvider | Ethereum provider (e.g., window.ethereum) |
config | Omit<SpaceportConfig, "wallet"> | Additional SDK configuration |
Returns
SpaceportSDK
createWithAccount
▸ createWithAccount(account, config?): SpaceportSDK
Create a new SDK instance with a specific account
Parameters
| Name | Type | Description |
|---|
account | undefined | `0x${string}` | Account | Ethereum account address or Viem Account object created with privateKeyToAccount() |
config | Omit<SpaceportConfig, "account"> | Additional SDK configuration |
Returns
SpaceportSDK
Example
// With an address (limited signing capability)
const sdk = SpaceportSDK.createWithAccount('0x123...');
// With a private key (full signing capability)
import { privateKeyToAccount } from 'viem/accounts';
const account = privateKeyToAccount('0xYourPrivateKeyHere');
const sdk = SpaceportSDK.createWithAccount(account);
▸ buildAuthHeaders(includeContentType?): Record<string, string>
Build authentication headers for API requests
Parameters
| Name | Type | Default value | Description |
|---|
includeContentType | boolean | true | Whether to include Content-Type header (default: true) |
Returns
Record<string, string>
generateSignatureParams
▸ generateSignatureParams(signerAddress, dataToSign, primaryType, types): Promise<SignatureParams>
Generates EIP-712 signature parameters for contract interactions.
NOTE: This is a simplified adaptation. Production use requires robust nonce handling
and precise matching of types/domain with the target contract facet.
Parameters
| Name | Type | Description |
|---|
signerAddress | `0x${string}` | The address performing the signing. |
dataToSign | Record<string, unknown> | An object containing the data fields specific to the EIP-712 type. |
primaryType | string | The primary EIP-712 type name (e.g., “_verifyTokenURI”). |
types | Record<string, { name: string ; type: string }[]> | The EIP-712 type definitions. |
Returns
Promise<SignatureParams>
The generated SignatureParams.
generateDocSignature
▸ generateDocSignature(docURI): Promise<SignatureParams>
Generates a document signature by signing the keccak256 hash of a document URI.
This method follows the same approach used in listings for document verification.
Parameters
| Name | Type | Description |
|---|
docURI | string | The document URI to sign |
Returns
Promise<SignatureParams>
The signature params formatted for contract consumption
Properties
config
• Readonly config: SpaceportConfig
publicClient
• Readonly publicClient: Object
walletClient
• Optional Readonly walletClient: Object
cultura
• Optional cultura: CulturaSDK