@1claw/sdk 0.35.1 → 0.37.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.
- package/README.md +55 -0
- package/dist/generated/api-types.d.ts +56 -0
- package/dist/generated/api-types.d.ts.map +1 -1
- package/dist/types.d.ts +62 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -237,6 +237,61 @@ console.log(signRes.data?.from); // derived sender address
|
|
|
237
237
|
|
|
238
238
|
All agent guardrails (allowlists, value caps, daily limits) are enforced exactly as for submit. The transaction is recorded for audit and daily-limit tracking with `status: "sign_only"`.
|
|
239
239
|
|
|
240
|
+
### Non-EVM transactions (Bitcoin, Solana, XRP, Cardano, Tron)
|
|
241
|
+
|
|
242
|
+
The same `submitTransaction` / `signTransaction` methods accept chain-specific fields. Values are in the chain's native unit (BTC, SOL, XRP, ADA, TRX):
|
|
243
|
+
|
|
244
|
+
```typescript
|
|
245
|
+
// Solana devnet — native SOL
|
|
246
|
+
await client.agents.submitTransaction(agentId, {
|
|
247
|
+
chain: "solana-devnet",
|
|
248
|
+
to: "RecipientBase58...",
|
|
249
|
+
value: "0.001",
|
|
250
|
+
});
|
|
251
|
+
|
|
252
|
+
// Bitcoin testnet
|
|
253
|
+
await client.agents.signTransaction(agentId, {
|
|
254
|
+
chain: "bitcoin-testnet",
|
|
255
|
+
to: "tb1q...",
|
|
256
|
+
value: "0.00001",
|
|
257
|
+
fee_rate_sat_per_vbyte: 5,
|
|
258
|
+
});
|
|
259
|
+
|
|
260
|
+
// XRP — simple Payment with destination tag
|
|
261
|
+
await client.agents.submitTransaction(agentId, {
|
|
262
|
+
chain: "xrp-testnet",
|
|
263
|
+
to: "r...",
|
|
264
|
+
value: "1",
|
|
265
|
+
destination_tag: 12345,
|
|
266
|
+
});
|
|
267
|
+
|
|
268
|
+
// XRP — arbitrary XRPL transaction type via xrpl_tx_json
|
|
269
|
+
// Supports 30+ types: TrustSet, OfferCreate, NFTokenMint, AMMCreate, EscrowCreate, etc.
|
|
270
|
+
// Account, Sequence, Fee, and SigningPubKey are auto-filled by the server.
|
|
271
|
+
await client.agents.submitTransaction(agentId, {
|
|
272
|
+
chain: "xrp",
|
|
273
|
+
xrpl_tx_json: {
|
|
274
|
+
TransactionType: "TrustSet",
|
|
275
|
+
LimitAmount: {
|
|
276
|
+
currency: "USD",
|
|
277
|
+
issuer: "rIssuer...",
|
|
278
|
+
value: "100",
|
|
279
|
+
},
|
|
280
|
+
},
|
|
281
|
+
});
|
|
282
|
+
|
|
283
|
+
// Solana SPL token
|
|
284
|
+
await client.agents.submitTransaction(agentId, {
|
|
285
|
+
chain: "solana-devnet",
|
|
286
|
+
to: "RecipientBase58...",
|
|
287
|
+
value: "10",
|
|
288
|
+
token_mint: "MintBase58...",
|
|
289
|
+
token_decimals: 6,
|
|
290
|
+
});
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
See the [Intents API guide](https://docs.1claw.xyz/docs/guides/intents-api#non-evm-transaction-signing) for full field reference.
|
|
294
|
+
|
|
240
295
|
Key properties:
|
|
241
296
|
|
|
242
297
|
- **Disabled by default** — a human must explicitly enable per-agent
|
|
@@ -5334,6 +5334,24 @@ export interface components {
|
|
|
5334
5334
|
* @default false
|
|
5335
5335
|
*/
|
|
5336
5336
|
gasless: boolean;
|
|
5337
|
+
/** @description Non-EVM (XRP): destination tag for exchange deposits */
|
|
5338
|
+
destination_tag?: number;
|
|
5339
|
+
/** @description Non-EVM (XRP, Solana): optional memo */
|
|
5340
|
+
memo?: string;
|
|
5341
|
+
/** @description Non-EVM (Bitcoin): override the fetched fee rate (sat/vByte) */
|
|
5342
|
+
fee_rate_sat_per_vbyte?: number;
|
|
5343
|
+
/** @description Non-EVM (Tron): TRC-20 energy fee limit in sun */
|
|
5344
|
+
fee_limit_sun?: number;
|
|
5345
|
+
/** @description Non-EVM (Solana SPL / Tron TRC-20): token mint or contract address; omit for native transfer */
|
|
5346
|
+
token_mint?: string;
|
|
5347
|
+
/** @description Non-EVM (Solana, Tron): token decimals (default 6) */
|
|
5348
|
+
token_decimals?: number;
|
|
5349
|
+
/** @description Non-EVM (Cardano): transaction time-to-live (absolute slot) */
|
|
5350
|
+
ttl?: number;
|
|
5351
|
+
/** @description Raw XRPL transaction JSON for full transaction type coverage. When present (and chain is XRP), the handler uses the xrpl-rust binary codec to encode and sign the transaction as-is. Supports all XRPL transaction types: Payment, TrustSet, OfferCreate, OfferCancel, AccountSet, EscrowCreate, NFTokenMint, AMMCreate, and 20+ more. Account, Sequence, Fee, LastLedgerSequence, and SigningPubKey are auto-filled when absent. */
|
|
5352
|
+
xrpl_tx_json?: {
|
|
5353
|
+
[key: string]: unknown;
|
|
5354
|
+
};
|
|
5337
5355
|
};
|
|
5338
5356
|
SignTransactionRequest: {
|
|
5339
5357
|
/** @description Destination address (0x-prefixed) */
|
|
@@ -5353,6 +5371,24 @@ export interface components {
|
|
|
5353
5371
|
max_priority_fee_per_gas?: string;
|
|
5354
5372
|
/** @default false */
|
|
5355
5373
|
simulate_first: boolean;
|
|
5374
|
+
/** @description Non-EVM (XRP): destination tag for exchange deposits */
|
|
5375
|
+
destination_tag?: number;
|
|
5376
|
+
/** @description Non-EVM (XRP, Solana): optional memo */
|
|
5377
|
+
memo?: string;
|
|
5378
|
+
/** @description Non-EVM (Bitcoin): override the fetched fee rate (sat/vByte) */
|
|
5379
|
+
fee_rate_sat_per_vbyte?: number;
|
|
5380
|
+
/** @description Non-EVM (Tron): TRC-20 energy fee limit in sun */
|
|
5381
|
+
fee_limit_sun?: number;
|
|
5382
|
+
/** @description Non-EVM (Solana SPL / Tron TRC-20): token mint or contract address; omit for native transfer */
|
|
5383
|
+
token_mint?: string;
|
|
5384
|
+
/** @description Non-EVM (Solana, Tron): token decimals (default 6) */
|
|
5385
|
+
token_decimals?: number;
|
|
5386
|
+
/** @description Non-EVM (Cardano): transaction time-to-live (absolute slot) */
|
|
5387
|
+
ttl?: number;
|
|
5388
|
+
/** @description Raw XRPL transaction JSON for full transaction type coverage. When present (and chain is XRP), the handler uses the xrpl-rust binary codec to encode and sign the transaction as-is. Supports all XRPL transaction types: Payment, TrustSet, OfferCreate, OfferCancel, AccountSet, EscrowCreate, NFTokenMint, AMMCreate, and 20+ more. Account, Sequence, Fee, LastLedgerSequence, and SigningPubKey are auto-filled when absent. */
|
|
5389
|
+
xrpl_tx_json?: {
|
|
5390
|
+
[key: string]: unknown;
|
|
5391
|
+
};
|
|
5356
5392
|
};
|
|
5357
5393
|
SignTransactionResponse: {
|
|
5358
5394
|
/** @description Raw signed transaction hex (always included) */
|
|
@@ -5471,6 +5507,26 @@ export interface components {
|
|
|
5471
5507
|
max_fee_per_blob_gas?: string;
|
|
5472
5508
|
blob_versioned_hashes?: string[];
|
|
5473
5509
|
authorization_list?: Record<string, never>[];
|
|
5510
|
+
/** @description When true, sign only (do not broadcast). Non-EVM transaction intents only. */
|
|
5511
|
+
sign_only?: boolean;
|
|
5512
|
+
/** @description Non-EVM (XRP): destination tag for exchange deposits */
|
|
5513
|
+
destination_tag?: number;
|
|
5514
|
+
/** @description Non-EVM (XRP, Solana): optional memo */
|
|
5515
|
+
memo?: string;
|
|
5516
|
+
/** @description Non-EVM (Bitcoin): override the fetched fee rate (sat/vByte) */
|
|
5517
|
+
fee_rate_sat_per_vbyte?: number;
|
|
5518
|
+
/** @description Non-EVM (Tron): TRC-20 energy fee limit in sun */
|
|
5519
|
+
fee_limit_sun?: number;
|
|
5520
|
+
/** @description Non-EVM (Solana SPL / Tron TRC-20): token mint or contract address; omit for native transfer */
|
|
5521
|
+
token_mint?: string;
|
|
5522
|
+
/** @description Non-EVM (Solana, Tron): token decimals (default 6) */
|
|
5523
|
+
token_decimals?: number;
|
|
5524
|
+
/** @description Non-EVM (Cardano): transaction time-to-live (absolute slot) */
|
|
5525
|
+
ttl?: number;
|
|
5526
|
+
/** @description Raw XRPL transaction JSON for full transaction type coverage. When present (and chain is XRP), the handler uses the xrpl-rust binary codec to encode and sign the transaction as-is. Supports all XRPL transaction types: Payment, TrustSet, OfferCreate, OfferCancel, AccountSet, EscrowCreate, NFTokenMint, AMMCreate, and 20+ more. Account, Sequence, Fee, LastLedgerSequence, and SigningPubKey are auto-filled when absent. */
|
|
5527
|
+
xrpl_tx_json?: {
|
|
5528
|
+
[key: string]: unknown;
|
|
5529
|
+
};
|
|
5474
5530
|
};
|
|
5475
5531
|
SignIntentResponse: {
|
|
5476
5532
|
intent_type?: string;
|