@1claw/sdk 0.36.0 → 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 +28 -0
- package/dist/generated/api-types.d.ts.map +1 -1
- package/dist/types.d.ts +34 -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
|
|
@@ -5348,6 +5348,10 @@ export interface components {
|
|
|
5348
5348
|
token_decimals?: number;
|
|
5349
5349
|
/** @description Non-EVM (Cardano): transaction time-to-live (absolute slot) */
|
|
5350
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
|
+
};
|
|
5351
5355
|
};
|
|
5352
5356
|
SignTransactionRequest: {
|
|
5353
5357
|
/** @description Destination address (0x-prefixed) */
|
|
@@ -5381,6 +5385,10 @@ export interface components {
|
|
|
5381
5385
|
token_decimals?: number;
|
|
5382
5386
|
/** @description Non-EVM (Cardano): transaction time-to-live (absolute slot) */
|
|
5383
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
|
+
};
|
|
5384
5392
|
};
|
|
5385
5393
|
SignTransactionResponse: {
|
|
5386
5394
|
/** @description Raw signed transaction hex (always included) */
|
|
@@ -5499,6 +5507,26 @@ export interface components {
|
|
|
5499
5507
|
max_fee_per_blob_gas?: string;
|
|
5500
5508
|
blob_versioned_hashes?: string[];
|
|
5501
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
|
+
};
|
|
5502
5530
|
};
|
|
5503
5531
|
SignIntentResponse: {
|
|
5504
5532
|
intent_type?: string;
|