@realmint/sdk 0.2.1 → 0.2.3
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/dist/client.js +4 -2
- package/dist/types.d.ts +5 -5
- package/package.json +6 -6
package/dist/client.js
CHANGED
|
@@ -231,9 +231,11 @@ export class RealmintClient {
|
|
|
231
231
|
* → poll. One Solana signature; gas is relayer-sponsored.
|
|
232
232
|
*/
|
|
233
233
|
async sellSolana(params, signWire, opts = {}) {
|
|
234
|
-
|
|
234
|
+
// destination_chain_id 0 selects the Solana sell lane (else the deployment
|
|
235
|
+
// lookup excludes Solana and 422s with no_sell_deployment).
|
|
236
|
+
const created = await this.createIntent({ destination_chain_id: 0, ...params, action: "sell" });
|
|
235
237
|
const prep = await this.prepareSolanaSell(created.intent_id);
|
|
236
|
-
const signed = await signWire(prep.
|
|
238
|
+
const signed = await signWire(prep.transaction);
|
|
237
239
|
await this.submitSolanaSell(created.intent_id, signed);
|
|
238
240
|
return this.waitForSettlement(created.intent_id, opts);
|
|
239
241
|
}
|
package/dist/types.d.ts
CHANGED
|
@@ -96,11 +96,11 @@ export interface GetIntentResponse {
|
|
|
96
96
|
steps: unknown[];
|
|
97
97
|
}
|
|
98
98
|
export interface PrepareSolanaSellResponse {
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
99
|
+
/** Base64 V0 transaction wire, partially signed (relayer); the user co-signs it. */
|
|
100
|
+
transaction: string;
|
|
101
|
+
min_usdc_out_raw: string;
|
|
102
|
+
/** The Solana pubkey expected to co-sign (the seller's Realmint Wallet). */
|
|
103
|
+
signer: string;
|
|
104
104
|
}
|
|
105
105
|
/** Terminal-ish states the SDK's waiters stop on. */
|
|
106
106
|
export declare const TERMINAL_STATES: readonly ["completed", "terminal_failed", "expired", "cancelled"];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@realmint/sdk",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.3",
|
|
4
4
|
"description": "TypeScript SDK for the Realmint API — list, buy, and sell tokenized RWAs (non-custodial; the partner's signer signs).",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -15,6 +15,10 @@
|
|
|
15
15
|
"files": [
|
|
16
16
|
"dist"
|
|
17
17
|
],
|
|
18
|
+
"scripts": {
|
|
19
|
+
"build": "tsc -p tsconfig.json",
|
|
20
|
+
"typecheck": "tsc -p tsconfig.json --noEmit"
|
|
21
|
+
},
|
|
18
22
|
"keywords": [
|
|
19
23
|
"realmint",
|
|
20
24
|
"rwa",
|
|
@@ -27,9 +31,5 @@
|
|
|
27
31
|
},
|
|
28
32
|
"devDependencies": {
|
|
29
33
|
"typescript": "^5.4.0"
|
|
30
|
-
},
|
|
31
|
-
"scripts": {
|
|
32
|
-
"build": "tsc -p tsconfig.json",
|
|
33
|
-
"typecheck": "tsc -p tsconfig.json --noEmit"
|
|
34
34
|
}
|
|
35
|
-
}
|
|
35
|
+
}
|