@medialane/sdk 0.59.0 → 0.60.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-V6imkXvR.cjs';
2
+ import { V as VenueAdapter, C as Chain, R as RegisterOrderParams, A as AdapterTxResult, O as OrderRef } from '../types-Bx3ax9lW.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-V6imkXvR.js';
2
+ import { V as VenueAdapter, C as Chain, R as RegisterOrderParams, A as AdapterTxResult, O as OrderRef } from '../types-Bx3ax9lW.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). */
@@ -102,9 +102,26 @@ declare function getStarknetCoordinates(chain: Chain): StarknetCoordinates;
102
102
  * (`@medialane/sdk/starknet`, `/evm`, `/solana`, `/stellar`) implements, so
103
103
  * apps can transact against a chain-tagged asset without knowing the chain
104
104
  * (chain-sovereignty I2/I4; platform-federation spec §2.2). `Signer` is the
105
- * chain's wallet/account handle (starknet.js AccountInterface, a viem wallet
106
- * client, a Solana signer, a Stellar signer) adapters fix the type.
105
+ * chain's `VenueSigner` capability port (see {@link VenueSigner}), not a raw
106
+ * account the app implements it over its own wallet layer.
107
107
  */
108
+ /**
109
+ * A chain-neutral capability port the app implements over its own wallet layer.
110
+ * The adapter orchestrates with only these three capabilities — it never holds a
111
+ * chain account or an execution provider. Confirmation lives behind `execute`
112
+ * (the app awaits + revert-detects the receipt before resolving), so there is no
113
+ * separate receipt method: a resolved `execute` means "on-chain, not reverted".
114
+ * `TypedData`/`Call` are the chain's native shapes (Starknet: SNIP-12 typed data
115
+ * and `{ contractAddress, entrypoint, calldata }`); the signature is `string[]`
116
+ * (Starknet felt array).
117
+ */
118
+ interface VenueSigner<TypedData = unknown, Call = unknown> {
119
+ readonly address: string;
120
+ signTypedData(data: TypedData): Promise<string[]>;
121
+ execute(calls: Call[]): Promise<{
122
+ txHash: string;
123
+ }>;
124
+ }
108
125
  /** A chain-tagged asset reference — the working asset identity `(chain, contract, tokenId)`. */
109
126
  interface AssetRef {
110
127
  chain: Chain;
@@ -176,4 +193,4 @@ interface IssuanceAdapter<Signer> {
176
193
  }): Promise<AdapterTxResult>;
177
194
  }
178
195
 
179
- 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 };
196
+ 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 };
@@ -102,9 +102,26 @@ declare function getStarknetCoordinates(chain: Chain): StarknetCoordinates;
102
102
  * (`@medialane/sdk/starknet`, `/evm`, `/solana`, `/stellar`) implements, so
103
103
  * apps can transact against a chain-tagged asset without knowing the chain
104
104
  * (chain-sovereignty I2/I4; platform-federation spec §2.2). `Signer` is the
105
- * chain's wallet/account handle (starknet.js AccountInterface, a viem wallet
106
- * client, a Solana signer, a Stellar signer) adapters fix the type.
105
+ * chain's `VenueSigner` capability port (see {@link VenueSigner}), not a raw
106
+ * account the app implements it over its own wallet layer.
107
107
  */
108
+ /**
109
+ * A chain-neutral capability port the app implements over its own wallet layer.
110
+ * The adapter orchestrates with only these three capabilities — it never holds a
111
+ * chain account or an execution provider. Confirmation lives behind `execute`
112
+ * (the app awaits + revert-detects the receipt before resolving), so there is no
113
+ * separate receipt method: a resolved `execute` means "on-chain, not reverted".
114
+ * `TypedData`/`Call` are the chain's native shapes (Starknet: SNIP-12 typed data
115
+ * and `{ contractAddress, entrypoint, calldata }`); the signature is `string[]`
116
+ * (Starknet felt array).
117
+ */
118
+ interface VenueSigner<TypedData = unknown, Call = unknown> {
119
+ readonly address: string;
120
+ signTypedData(data: TypedData): Promise<string[]>;
121
+ execute(calls: Call[]): Promise<{
122
+ txHash: string;
123
+ }>;
124
+ }
108
125
  /** A chain-tagged asset reference — the working asset identity `(chain, contract, tokenId)`. */
109
126
  interface AssetRef {
110
127
  chain: Chain;
@@ -176,4 +193,4 @@ interface IssuanceAdapter<Signer> {
176
193
  }): Promise<AdapterTxResult>;
177
194
  }
178
195
 
179
- 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 };
196
+ 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,7 +1,7 @@
1
1
  {
2
2
  "name": "@medialane/sdk",
3
- "version": "0.59.0",
4
- "description": "Framework-agnostic TypeScript SDK for Medialane.io \u2014 the IP marketplace on Starknet",
3
+ "version": "0.60.0",
4
+ "description": "Framework-agnostic TypeScript SDK for Medialane.io the IP marketplace on Starknet",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
7
7
  "module": "./dist/index.js",