@ar.io/sdk 3.17.2-alpha.1 → 3.18.0-alpha.1

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 CHANGED
@@ -1970,9 +1970,21 @@ const name = await ario.getPrimaryName({
1970
1970
 
1971
1971
  </details>
1972
1972
 
1973
+ #### `setPrimaryName({ name })`
1974
+
1975
+ Sets an ArNS name already owned by the `signer` as their primary name. Note: `signer` must be the owner of the `processId` that is assigned to the name. If not, the transaction will fail.
1976
+
1977
+ _Note: Requires `signer` to be provided on `ARIO.init` to sign the transaction._
1978
+
1979
+ ```typescript
1980
+ const signer = new ArweaveSigner(jwk);
1981
+ const ario = ARIO.mainnet({ signer });
1982
+ await ario.setPrimaryName({ name: 'my-arns-name' }); // the caller must already have purchased the name my-arns-name and be assigned as the owner of the processId that is assigned to the name
1983
+ ```
1984
+
1973
1985
  #### `requestPrimaryName({ name })`
1974
1986
 
1975
- Requests a primary name for the caller's address. The request must be approved by the new owner of the requested name via the `approvePrimaryNameRequest`[#approveprimarynamerequest-name-address-] API.
1987
+ Requests a primary name for the `signer`'s address. The request must be approved by the new owner of the requested name via the `approvePrimaryNameRequest`[#approveprimarynamerequest-name-address-] API.
1976
1988
 
1977
1989
  _Note: Requires `signer` to be provided on `ARIO.init` to sign the transaction._
1978
1990