Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(guide): 7.0.0 migration guide #877

Merged
merged 6 commits into from
Jan 28, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 58 additions & 0 deletions docs/guides/migration/migration-7.0.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Migration to SDK 7.0.0
This guide describes the process of migrating to SDK version 7.0.0

## Step 1
SDK will not accept `url`, `internalUrl` init arguments anymore:
#### Before
```js
Universal({
url,
internalUrl
})
```
#### After
```js
const nodeInstance = await Node({ url, internalUrl })
Universal({
nodes: [{ name: 'testnet', instance: nodeInstance }]
})
```

## Step 2
Remove deprecated function `setKeypair`
`SDK` will not accept `keypair` init argument anymore:
#### Before
```js
Universal({ keypair })
```
#### After
```js
Universal({
accounts: [MemoryAccount({ keypair })]
})
```

## Step 3
Change all of `AENS` method's first argument from `nameId` to `name`
### Before
```js
const client = Universal({ ... })

await client.aensUpdate('cm_ad1wdsa...', ...)
await client.aensTransfer('cm_ad1wdsa...', ...)
await client.aensRevoke('cm_ad1wdsa...', ...)
```
### After
```js
const client = Universal({ ... })

await client.aensUpdate('testname.chain', ...)
await client.aensTransfer('testname.chain', ...)
await client.aensRevoke('testname.chain', ...)
```

## Other Breaking Changes
- Add new compiler `methods` to RPC `communication` (base-app update required)
- Drop compiler version to `version >= 4.0.0 && version < 5.0.0`
- Change node compatibility range to `node >= 5.0.0 && node < 6.0.0`
- Always `verify` transactions before sending them to the node (can be disabled using the option `verify: false`)