@dakota-xyz/ts-sdk 1.2.0 → 1.3.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/dist/index.mjs CHANGED
@@ -1210,6 +1210,46 @@ var WalletsResource = class extends BaseResource {
1210
1210
  idempotencyKey: options?.idempotencyKey
1211
1211
  });
1212
1212
  }
1213
+ /**
1214
+ * Get a single wallet by ID.
1215
+ *
1216
+ * @param walletId - Wallet ID
1217
+ * @returns Wallet record (includes `customer_name` and `created_at`)
1218
+ *
1219
+ * @example
1220
+ * ```typescript
1221
+ * const wallet = await client.wallets.get(walletId);
1222
+ * console.log(wallet.address, wallet.customer_name);
1223
+ * ```
1224
+ */
1225
+ async get(walletId) {
1226
+ return this.transport.request({
1227
+ method: "GET",
1228
+ path: `/wallets/${walletId}`
1229
+ });
1230
+ }
1231
+ /**
1232
+ * Get policies attached to a wallet.
1233
+ *
1234
+ * Returns slim references (id + name) for the policies currently attached to the wallet.
1235
+ *
1236
+ * @param walletId - Wallet ID
1237
+ * @returns Array of attached policies
1238
+ *
1239
+ * @example
1240
+ * ```typescript
1241
+ * const policies = await client.wallets.getPolicies(walletId);
1242
+ * for (const policy of policies) {
1243
+ * console.log(policy.id, policy.name);
1244
+ * }
1245
+ * ```
1246
+ */
1247
+ async getPolicies(walletId) {
1248
+ return this.transport.request({
1249
+ method: "GET",
1250
+ path: `/wallets/${walletId}/policies`
1251
+ });
1252
+ }
1213
1253
  /**
1214
1254
  * Get wallet balances.
1215
1255
  *
@@ -1695,6 +1735,20 @@ var PoliciesResource = class extends BaseResource {
1695
1735
  path: `/policies/${policyId}/rules/${ruleId}`
1696
1736
  });
1697
1737
  }
1738
+ /**
1739
+ * Get wallets attached to a policy.
1740
+ *
1741
+ * Returns slim references (id + name + family) for the wallets the policy is currently attached to.
1742
+ *
1743
+ * @param policyId - Policy ID
1744
+ * @returns Array of attached wallets
1745
+ */
1746
+ async getWallets(policyId) {
1747
+ return this.transport.request({
1748
+ method: "GET",
1749
+ path: `/policies/${policyId}/wallets`
1750
+ });
1751
+ }
1698
1752
  /**
1699
1753
  * Attach a policy to a wallet.
1700
1754
  *
@@ -1786,6 +1840,20 @@ var SignerGroupsResource = class extends BaseResource {
1786
1840
  path: `/signer-groups/${signerGroupId}/signers/${signerId}`
1787
1841
  });
1788
1842
  }
1843
+ /**
1844
+ * Get wallets attached to a signer group.
1845
+ *
1846
+ * Returns slim references (id + name + family) for the wallets the signer group is currently attached to.
1847
+ *
1848
+ * @param signerGroupId - Signer group ID
1849
+ * @returns Array of attached wallets
1850
+ */
1851
+ async getWallets(signerGroupId) {
1852
+ return this.transport.request({
1853
+ method: "GET",
1854
+ path: `/signer-groups/${signerGroupId}/wallets`
1855
+ });
1856
+ }
1789
1857
  /**
1790
1858
  * Attach a signer group to a wallet.
1791
1859
  *