@medialane/sdk 0.55.0 → 0.57.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.
@@ -1,5 +1,5 @@
1
1
  import { rpc } from '@stellar/stellar-sdk';
2
- import { V as VenueAdapter, C as Chain, R as RegisterOrderParams, A as AdapterTxResult, O as OrderRef } from '../types-D3PWgk3x.cjs';
2
+ import { V as VenueAdapter, C as Chain, R as RegisterOrderParams, A as AdapterTxResult, O as OrderRef } from '../types-DNJNR50M.cjs';
3
3
 
4
4
  /** Signer shape: the account's public key + a transaction signer (a wallet
5
5
  * kit or a Keypair-backed callback). */
@@ -1,5 +1,5 @@
1
1
  import { rpc } from '@stellar/stellar-sdk';
2
- import { V as VenueAdapter, C as Chain, R as RegisterOrderParams, A as AdapterTxResult, O as OrderRef } from '../types-D3PWgk3x.js';
2
+ import { V as VenueAdapter, C as Chain, R as RegisterOrderParams, A as AdapterTxResult, O as OrderRef } from '../types-DNJNR50M.js';
3
3
 
4
4
  /** Signer shape: the account's public key + a transaction signer (a wallet
5
5
  * kit or a Keypair-backed callback). */
@@ -98,9 +98,26 @@ declare function getStarknetCoordinates(chain: Chain): StarknetCoordinates;
98
98
  * (`@medialane/sdk/starknet`, `/evm`, `/solana`, `/stellar`) implements, so
99
99
  * apps can transact against a chain-tagged asset without knowing the chain
100
100
  * (chain-sovereignty I2/I4; platform-federation spec §2.2). `Signer` is the
101
- * chain's wallet/account handle (starknet.js AccountInterface, a viem wallet
102
- * client, a Solana signer, a Stellar signer) adapters fix the type.
101
+ * chain's `VenueSigner` capability port (see {@link VenueSigner}), not a raw
102
+ * account the app implements it over its own wallet layer.
103
103
  */
104
+ /**
105
+ * A chain-neutral capability port the app implements over its own wallet layer.
106
+ * The adapter orchestrates with only these three capabilities — it never holds a
107
+ * chain account or an execution provider. Confirmation lives behind `execute`
108
+ * (the app awaits + revert-detects the receipt before resolving), so there is no
109
+ * separate receipt method: a resolved `execute` means "on-chain, not reverted".
110
+ * `TypedData`/`Call` are the chain's native shapes (Starknet: SNIP-12 typed data
111
+ * and `{ contractAddress, entrypoint, calldata }`); the signature is `string[]`
112
+ * (Starknet felt array).
113
+ */
114
+ interface VenueSigner<TypedData = unknown, Call = unknown> {
115
+ readonly address: string;
116
+ signTypedData(data: TypedData): Promise<string[]>;
117
+ execute(calls: Call[]): Promise<{
118
+ txHash: string;
119
+ }>;
120
+ }
104
121
  /** A chain-tagged asset reference — the working asset identity `(chain, contract, tokenId)`. */
105
122
  interface AssetRef {
106
123
  chain: Chain;
@@ -172,4 +189,4 @@ interface IssuanceAdapter<Signer> {
172
189
  }): Promise<AdapterTxResult>;
173
190
  }
174
191
 
175
- export { type AdapterTxResult as A, type Chain as C, DEFAULT_CHAIN as D, type EvmCoordinates as E, type IssuanceAdapter as I, type MintInput as M, type OrderRef as O, type RegisterOrderParams as R, type SolanaCoordinates as S, type VenueAdapter as V, type CreateCollectionInput as a, type AssetRef as b, CHAINS as c, type ChainCoordinates as d, type CoordinatesByChain as e, type StarknetCoordinates as f, type StellarCoordinates as g, getCoordinates as h, getStarknetCoordinates as i };
192
+ export { type AdapterTxResult as A, type Chain as C, DEFAULT_CHAIN as D, type EvmCoordinates as E, type IssuanceAdapter as I, type MintInput as M, type OrderRef as O, type RegisterOrderParams as R, type SolanaCoordinates as S, type VenueAdapter as V, type AssetRef as a, CHAINS as b, type ChainCoordinates as c, type CoordinatesByChain as d, type CreateCollectionInput as e, type StarknetCoordinates as f, type StellarCoordinates as g, type VenueSigner as h, getCoordinates as i, getStarknetCoordinates as j };
@@ -98,9 +98,26 @@ declare function getStarknetCoordinates(chain: Chain): StarknetCoordinates;
98
98
  * (`@medialane/sdk/starknet`, `/evm`, `/solana`, `/stellar`) implements, so
99
99
  * apps can transact against a chain-tagged asset without knowing the chain
100
100
  * (chain-sovereignty I2/I4; platform-federation spec §2.2). `Signer` is the
101
- * chain's wallet/account handle (starknet.js AccountInterface, a viem wallet
102
- * client, a Solana signer, a Stellar signer) adapters fix the type.
101
+ * chain's `VenueSigner` capability port (see {@link VenueSigner}), not a raw
102
+ * account the app implements it over its own wallet layer.
103
103
  */
104
+ /**
105
+ * A chain-neutral capability port the app implements over its own wallet layer.
106
+ * The adapter orchestrates with only these three capabilities — it never holds a
107
+ * chain account or an execution provider. Confirmation lives behind `execute`
108
+ * (the app awaits + revert-detects the receipt before resolving), so there is no
109
+ * separate receipt method: a resolved `execute` means "on-chain, not reverted".
110
+ * `TypedData`/`Call` are the chain's native shapes (Starknet: SNIP-12 typed data
111
+ * and `{ contractAddress, entrypoint, calldata }`); the signature is `string[]`
112
+ * (Starknet felt array).
113
+ */
114
+ interface VenueSigner<TypedData = unknown, Call = unknown> {
115
+ readonly address: string;
116
+ signTypedData(data: TypedData): Promise<string[]>;
117
+ execute(calls: Call[]): Promise<{
118
+ txHash: string;
119
+ }>;
120
+ }
104
121
  /** A chain-tagged asset reference — the working asset identity `(chain, contract, tokenId)`. */
105
122
  interface AssetRef {
106
123
  chain: Chain;
@@ -172,4 +189,4 @@ interface IssuanceAdapter<Signer> {
172
189
  }): Promise<AdapterTxResult>;
173
190
  }
174
191
 
175
- export { type AdapterTxResult as A, type Chain as C, DEFAULT_CHAIN as D, type EvmCoordinates as E, type IssuanceAdapter as I, type MintInput as M, type OrderRef as O, type RegisterOrderParams as R, type SolanaCoordinates as S, type VenueAdapter as V, type CreateCollectionInput as a, type AssetRef as b, CHAINS as c, type ChainCoordinates as d, type CoordinatesByChain as e, type StarknetCoordinates as f, type StellarCoordinates as g, getCoordinates as h, getStarknetCoordinates as i };
192
+ export { type AdapterTxResult as A, type Chain as C, DEFAULT_CHAIN as D, type EvmCoordinates as E, type IssuanceAdapter as I, type MintInput as M, type OrderRef as O, type RegisterOrderParams as R, type SolanaCoordinates as S, type VenueAdapter as V, type AssetRef as a, CHAINS as b, type ChainCoordinates as c, type CoordinatesByChain as d, type CreateCollectionInput as e, type StarknetCoordinates as f, type StellarCoordinates as g, type VenueSigner as h, getCoordinates as i, getStarknetCoordinates as j };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@medialane/sdk",
3
- "version": "0.55.0",
3
+ "version": "0.57.0",
4
4
  "description": "Framework-agnostic TypeScript SDK for Medialane.io — the IP marketplace on Starknet",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",