@ar.io/sdk 3.17.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 +13 -1
- package/bundles/web.bundle.min.js +38 -38
- package/lib/cjs/cli/cli.js +6 -0
- package/lib/cjs/cli/commands/arnsPurchaseCommands.js +16 -3
- package/lib/cjs/common/io.js +81 -0
- package/lib/cjs/utils/ao.js +3 -1
- package/lib/cjs/version.js +1 -1
- package/lib/esm/cli/cli.js +7 -1
- package/lib/esm/cli/commands/arnsPurchaseCommands.js +15 -3
- package/lib/esm/common/io.js +81 -0
- package/lib/esm/utils/ao.js +3 -1
- package/lib/esm/version.js +1 -1
- package/lib/types/cli/commands/arnsPurchaseCommands.d.ts +4 -1
- package/lib/types/common/io.d.ts +10 -4
- package/lib/types/types/common.d.ts +23 -1
- package/lib/types/types/io.d.ts +3 -2
- package/lib/types/utils/ao.d.ts +1 -0
- package/lib/types/version.d.ts +1 -1
- package/package.json +1 -1
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
|
|
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
|
|